Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-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
hg-smart
Commits
692e391f
Commit
692e391f
authored
May 22, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交时校验是否是全部提交,不是全部提交需要新增生产计划明细,并且校验生产计划明细的主表是否提交,提交了不能新增
parent
ae489e58
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
ServiceHGSC004A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC004A.java
+21
-3
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+1
-0
No files found.
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC004A.java
View file @
692e391f
...
@@ -231,19 +231,33 @@ public class ServiceHGSC004A extends ServiceBase {
...
@@ -231,19 +231,33 @@ public class ServiceHGSC004A extends ServiceBase {
try
{
try
{
HGSC004A
hgsc004a
=
new
HGSC004A
();
HGSC004A
hgsc004a
=
new
HGSC004A
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
HGSC004
hgsc004
=
new
HGSC004
();
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hgsc004a
.
fromMap
(
map
);
hgsc004a
.
fromMap
(
map
);
DaoUtils
.
update
(
HGSC004A
.
UPDATE_PRODUCT_STATUS
,
hgsc004a
);
if
(
Objects
.
isNull
(
hgsc004
.
getId
())
||
hgsc004
.
getId
()
==
0
){
hgsc004
=
(
HGSC004
)
super
.
dao
.
get
(
HGSC004
.
QUERY_BY_ID
,
HGSC004
.
FIELD_id
,
hgsc004a
.
getMaterialId
());
}
}
HGSC004
hgsc004
=
(
HGSC004
)
super
.
dao
.
get
(
HGSC004
.
QUERY_BY_ID
,
HGSC004
.
FIELD_id
,
hgsc004a
.
getMaterialId
());
if
(
Objects
.
nonNull
(
hgsc004
)){
if
(
Objects
.
nonNull
(
hgsc004
)){
if
(
hgsc004
.
getMaterialStatus
().
intValue
()
==
HGConstant
.
MaterialStatus
.
QBTJ
){
//子表
HGSC005A
hgsc005a
=
new
HGSC005A
();
BeanUtil
.
copyProperties
(
hgsc004a
,
hgsc005a
,
"id"
,
"productType"
);
hgsc005a
.
setMatDetailId
(
hgsc004a
.
getId
());
hgsc005a
.
setMatId
(
hgsc004
.
getId
());
if
(
hgsc004a
.
getLv
().
intValue
()
==
3
){
hgsc005a
.
setProductType
(
ProductTypeEnum
.
STRUCT
.
getCode
());
}
else
{
hgsc005a
.
setProductType
(
ProductTypeEnum
.
PART
.
getCode
());
}
HGSCTools
.
THGSC005A
.
save
(
hgsc005a
);
}
else
{
Map
<
String
,
Object
>
mapA
=
new
HashMap
<>();
Map
<
String
,
Object
>
mapA
=
new
HashMap
<>();
mapA
.
put
(
"materialId"
,
hgsc004a
.
getMaterialId
());
mapA
.
put
(
"materialId"
,
hgsc004a
.
getMaterialId
());
mapA
.
put
(
"productStatus"
,
HGConstant
.
ProductStatus
.
WTJ
);
mapA
.
put
(
"productStatus"
,
HGConstant
.
ProductStatus
.
WTJ
);
mapA
.
put
(
"notId"
,
hgsc004a
.
getId
());
mapA
.
put
(
"notId"
,
hgsc004a
.
getId
());
List
<
HGSC004A
>
hgsc004AList
=
dao
.
query
(
HGSC004A
.
QUERY_ALL
,
mapA
,
0
,
-
999999
);
List
<
HGSC004A
>
hgsc004AList
=
dao
.
query
(
HGSC004A
.
QUERY_ALL
,
mapA
,
0
,
-
999999
);
if
(!
CollectionUtils
.
isEmpty
(
hgsc004AList
)){
if
(!
CollectionUtils
.
isEmpty
(
hgsc004AList
)){
//如果存在就是部分提交
//如果存在就是部分提交
hgsc004
.
setMaterialStatus
(
HGConstant
.
MaterialStatus
.
BFTJ
);
hgsc004
.
setMaterialStatus
(
HGConstant
.
MaterialStatus
.
BFTJ
);
...
@@ -254,8 +268,12 @@ public class ServiceHGSC004A extends ServiceBase {
...
@@ -254,8 +268,12 @@ public class ServiceHGSC004A extends ServiceBase {
//保存生产计划
//保存生产计划
saveTHGSC005
(
hgsc004
,
hgsc004a
);
saveTHGSC005
(
hgsc004
,
hgsc004a
);
}
}
}
}
}
DaoUtils
.
update
(
HGSC004A
.
UPDATE_PRODUCT_STATUS
,
hgsc004a
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"修改"
)});
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"修改"
)});
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
692e391f
...
@@ -226,6 +226,7 @@ public class HGSCTools {
...
@@ -226,6 +226,7 @@ public class HGSCTools {
public
static
HGSC005A
save
(
HGSC005A
hgsc005a
){
public
static
HGSC005A
save
(
HGSC005A
hgsc005a
){
checkUpdateData
(
hgsc005a
);
checkUpdateData
(
hgsc005a
);
checkFatherSubmitStatus
(
hgsc005a
);
constructObj
(
hgsc005a
);
constructObj
(
hgsc005a
);
List
<
HGSC005A
>
hgsc005AList
=
generatorNewPlanDetail
(
hgsc005a
);
List
<
HGSC005A
>
hgsc005AList
=
generatorNewPlanDetail
(
hgsc005a
);
Map
<
Long
,
Optional
<
HGSC005A
>>
oldObjMap
=
queryOldPlanDetail
(
hgsc005a
);
Map
<
Long
,
Optional
<
HGSC005A
>>
oldObjMap
=
queryOldPlanDetail
(
hgsc005a
);
...
...
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