Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hp-smart
Commits
17f6152d
Commit
17f6152d
authored
Mar 26, 2024
by
wancheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产下料修改bug修复
parent
257df619
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
6 deletions
+74
-6
ServiceHPSC006.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
+69
-0
HPSC006.js
src/main/webapp/HP/SC/HPSC006.js
+5
-6
No files found.
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
View file @
17f6152d
...
...
@@ -10,6 +10,7 @@ import com.baosight.hpjx.core.dao.DaoUtils;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.ds.domain.HPDS002
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ002
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ011
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.hp.sc.domain.*
;
...
...
@@ -107,6 +108,74 @@ public class ServiceHPSC006 extends ServiceBase {
}
/**
* 保存操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产下料"
,
operType
=
"保存"
,
operDesc
=
"保存"
)
public
EiInfo
save
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
"detail"
).
getRows
();
String
productionOrderNo
=
inInfo
.
getString
(
"productionOrderNo"
);
String
projCode
=
inInfo
.
getString
(
"projCode"
);
String
projName
=
inInfo
.
getString
(
"projName"
);
// 写入数据
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HPSC006
hpsc006
=
new
HPSC006
();
hpsc006
.
fromMap
(
resultRows
.
get
(
i
));
hpsc006
.
setInventType
(
7
);
BigDecimal
num
=
hpsc006
.
getNum
();
BigDecimal
unitWt
=
hpsc006
.
getUnitWt
();
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.000"
);
BigDecimal
totalWt
=
new
BigDecimal
(
decimalFormat
.
format
(
num
.
multiply
(
unitWt
).
floatValue
()));
hpsc006
.
setInventSpec
(
HPPZTools
.
HpPz006
.
jointSpec
(
hpsc006
.
getInventLength
(),
hpsc006
.
getInventWidth
(),
hpsc006
.
getInventThick
()));
hpsc006
.
setProjCode
(
projCode
);
hpsc006
.
setProjName
(
projName
);
hpsc006
.
setProductionOrderNo
(
productionOrderNo
);
hpsc006
.
setTotalWt
(
totalWt
);
hpsc006
.
setInventCode
(
HPPZTools
.
checkAndSavePZ04
(
hpsc006
.
getInventType
(),
hpsc006
.
getInventName
()));
// 去除日期字符串中的-
hpsc006
.
setPlanCompletionDate
(
StringUtil
.
removeHorizontalLine
(
hpsc006
.
getPlanCompletionDate
()));
if
(
hpsc006
.
getFactoryCode
()!=
null
&&
!(
hpsc006
.
getFactoryCode
().
equals
(
" "
)))
{
AssertUtils
.
isEmpty
(
hpsc006
.
getOrgNo
(),
"已选择厂区,下料组不能为空"
);
hpsc006
.
setStatus
(
1
);
hpsc006
.
setOrgName
(
HPXSTools
.
XsOrg
.
get
(
hpsc006
.
getFactoryCode
()).
getOrgCname
());
hpsc006
.
setFactoryName
(
HPXSTools
.
XsOrg
.
get
(
hpsc006
.
getOrgNo
()).
getOrgCname
());
}
if
(
hpsc006
.
getId
()
==
null
||
hpsc006
.
getId
()
==
0
)
{
hpsc006
.
setStatus
(
CommonConstant
.
YesNo
.
NO_0
.
intValue
());
this
.
add
(
hpsc006
);
}
else
{
this
.
modify
(
hpsc006
);
}
}
int
size
=
resultRows
.
size
();
//刷新
//inInfo = this.refreshHPSC006(inInfo, productionOrderNo);
inInfo
=
this
.
queryDetail
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
size
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"保存失败"
);
}
return
inInfo
;
}
/**
* 新增操作.
*/
public
void
add
(
HPSC006
hpsc006
)
{
DaoUtils
.
insert
(
"HPSC006.insert"
,
hpsc006
);
}
/**
* 修改操作.
*/
public
void
modify
(
HPSC006
hpsc006
)
{
DaoUtils
.
update
(
"HPSC006.update"
,
hpsc006
);
}
/**
* 新增操作.
*/
@OperationLogAnnotation
(
operModul
=
"生产下料"
,
operType
=
"新增"
,
operDesc
=
"新增"
)
...
...
src/main/webapp/HP/SC/HPSC006.js
View file @
17f6152d
...
...
@@ -238,13 +238,12 @@ $(function () {
}
],
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'update'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'insert'
/* onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete' ){
query
();
query
Detail
();
}
},
},
*/
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
e
.
preventDefault
();
...
...
@@ -478,7 +477,7 @@ function saveFunc() {
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"detail"
,
"HPSC006"
,
"
insert
"
,
true
,
JSUtils
.
submitGridsData
(
"detail"
,
"HPSC006"
,
"
save
"
,
true
,
function
(
e
)
{
detailGrid
.
setEiInfo
(
e
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment