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
658fd30d
Commit
658fd30d
authored
May 16, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产计划dev;
parent
aed10bc9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+12
-2
No files found.
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
658fd30d
...
...
@@ -128,6 +128,7 @@ public class HGSCTools {
private
static
void
checkSaveData
(
HGSC005
hgsc005
)
{
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getAccountCode
(),
"当前用户未绑定公司,无法操作数据,请联系管理员!"
);
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getOrgId
(),
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgsc005
.
getMatId
())||
hgsc005
.
getMatId
()<=
0
,
"物料清单ID不能为空!"
);
AssertUtils
.
isEmpty
(
hgsc005
.
getCompanyCode
(),
"公司编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgsc005
.
getCompanyName
(),
"公司名称不能为空!"
);
// AssertUtils.isEmpty(hgsc005.getDepCode(), "部门不能为空!");
...
...
@@ -155,9 +156,18 @@ public class HGSCTools {
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
;
}
public
static
HGSC005A
save
(
HGSC005A
hgsc005a
,
Long
matId
){
AssertUtils
.
isTrue
(
Objects
.
isNull
(
matId
)||
matId
<=
0
,
"物料清单ID不能为空!"
);
checkUpdateData
(
hgsc005a
);
HGSC005
hgsc005
=
(
HGSC005
)
DaoBase
.
getInstance
().
get
(
HGSC005
.
QUERY
,
HGSC005
.
FIELD_mat_id
,
matId
);
DaoUtils
.
insert
(
HGSC005A
.
INSERT
,
THGSC005A
.
constructObj
(
hgsc005a
,
hgsc005
));
return
hgsc005a
;
}
public
static
HGSC005A
update
(
HGSC005A
hgsc005a
){
checkUpdateData
(
hgsc005a
);
HGSC005A
result
=
(
HGSC005A
)
DaoBase
.
getInstance
().
get
(
HGSC00
1
A
.
QUERY
,
HGSC005A
.
FIELD_mat_detail_id
,
hgsc005a
.
getMatDetailId
());
HGSC005A
result
=
(
HGSC005A
)
DaoBase
.
getInstance
().
get
(
HGSC00
5
A
.
QUERY
,
HGSC005A
.
FIELD_mat_detail_id
,
hgsc005a
.
getMatDetailId
());
result
.
setProductCode
(
hgsc005a
.
getProductCode
());
result
.
setProductName
(
hgsc005a
.
getProductName
());
result
.
setQuantity
(
hgsc005a
.
getQuantity
());
...
...
@@ -195,7 +205,7 @@ public class HGSCTools {
hgsc005a
.
setProjName
(
hgsc005
.
getProjName
());
hgsc005a
.
setFinishDate
(
hgsc005
.
getFinishDate
());
hgsc005a
.
setUnfinishQuantity
(
hgsc005a
.
getQuantity
());
hgsc005a
.
setFinishQuantity
(
hgsc005a
.
getQuantity
()-
hgsc005a
.
getUnfinishQuantity
()
);
hgsc005a
.
setFinishQuantity
(
0
);
return
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