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
d39b079e
Commit
d39b079e
authored
May 22, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将计划校验移除到物料清单模块
parent
692e391f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
ServiceHGSC004A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC004A.java
+6
-4
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+6
-8
No files found.
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC004A.java
View file @
d39b079e
...
...
@@ -7,6 +7,7 @@ import com.baosight.hggp.common.ProductTypeEnum;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.sb.domain.HGSB002
;
import
com.baosight.hggp.hg.sc.domain.*
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.util.*
;
...
...
@@ -231,13 +232,12 @@ public class ServiceHGSC004A extends ServiceBase {
try
{
HGSC004A
hgsc004a
=
new
HGSC004A
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
HGSC004
hgsc004
=
new
HGSC004
();
String
materialId
=
eiBlock
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
HGSC004A
.
FIELD_material_id
);
HGSC004
hgsc004
=
(
HGSC004
)
super
.
dao
.
get
(
HGSC004
.
QUERY_BY_ID
,
HGSC004
.
FIELD_id
,
materialId
);
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hgsc004a
.
fromMap
(
map
);
if
(
Objects
.
isNull
(
hgsc004
.
getId
())
||
hgsc004
.
getId
()
==
0
){
hgsc004
=
(
HGSC004
)
super
.
dao
.
get
(
HGSC004
.
QUERY_BY_ID
,
HGSC004
.
FIELD_id
,
hgsc004a
.
getMaterialId
());
}
if
(
Objects
.
nonNull
(
hgsc004
)){
if
(
hgsc004
.
getMaterialStatus
().
intValue
()
==
HGConstant
.
MaterialStatus
.
QBTJ
){
//子表
...
...
@@ -250,6 +250,8 @@ public class ServiceHGSC004A extends ServiceBase {
}
else
{
hgsc005a
.
setProductType
(
ProductTypeEnum
.
PART
.
getCode
());
}
//校验计划父单据是否提交,提交了不让新增
HGSCTools
.
THGSC004A
.
checkFatherSubmitStatus
(
hgsc004
.
getId
());
HGSCTools
.
THGSC005A
.
save
(
hgsc005a
);
}
else
{
Map
<
String
,
Object
>
mapA
=
new
HashMap
<>();
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
d39b079e
...
...
@@ -95,6 +95,12 @@ public class HGSCTools {
}
}
}
public
static
class
THGSC004A
{
public
static
void
checkFatherSubmitStatus
(
Long
matId
)
{
HGSC005
hgsc005
=
THGSC005
.
queryByMatId
(
matId
);
AssertUtils
.
isTrue
(
hgsc005
.
getCommitStatus
().
compareTo
(
CommonConstant
.
YesNo
.
NO_0
)==
1
,
"生产计划已提交,不能操作!"
);
}
}
public
static
class
THGSC005
{
public
static
List
<
HGSC005
>
buildFinishRate
(
List
<
HGSC005
>
hgsc005List
){
...
...
@@ -191,7 +197,6 @@ public class HGSCTools {
}
private
static
List
<
HGSC005A
>
generatorNewPlanDetail
(
HGSC005A
hgsc005a
){
//通过存货档案编码查询存货档案工序
List
<
HGPZ005A
>
hgpz005AList
=
HGPZTools
.
HgPz005A
.
queryByInventCode
(
hgsc005a
.
getProductCode
());
...
...
@@ -226,7 +231,6 @@ public class HGSCTools {
public
static
HGSC005A
save
(
HGSC005A
hgsc005a
){
checkUpdateData
(
hgsc005a
);
checkFatherSubmitStatus
(
hgsc005a
);
constructObj
(
hgsc005a
);
List
<
HGSC005A
>
hgsc005AList
=
generatorNewPlanDetail
(
hgsc005a
);
Map
<
Long
,
Optional
<
HGSC005A
>>
oldObjMap
=
queryOldPlanDetail
(
hgsc005a
);
...
...
@@ -289,7 +293,6 @@ public class HGSCTools {
public
static
void
delete
(
HGSC005A
hgsc005a
){
checkUpdateData
(
hgsc005a
);
checkFatherSubmitStatus
(
hgsc005a
);
Map
<
Long
,
Optional
<
HGSC005A
>>
oldObjMap
=
queryOldPlanDetail
(
hgsc005a
);
oldObjMap
.
forEach
((
k
,
v
)->{
HGSC005A
oldObj
=
v
.
get
();
...
...
@@ -303,11 +306,6 @@ public class HGSCTools {
});
}
private
static
void
checkFatherSubmitStatus
(
HGSC005A
hgsc005a
)
{
HGSC005
hgsc005
=
THGSC005
.
queryByMatId
(
hgsc005a
.
getMatId
());
AssertUtils
.
isTrue
(
hgsc005
.
getCommitStatus
().
compareTo
(
CommonConstant
.
YesNo
.
NO_0
)==
1
,
"生产计划已提交,不能操作!"
);
}
/**
* 校验修改的数据
*
...
...
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