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
81b7829e
Commit
81b7829e
authored
May 28, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产计划重量计算
parent
80f8ef06
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+15
-0
No files found.
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
81b7829e
...
...
@@ -372,8 +372,10 @@ public class HGSCTools {
HGSC005A
uo
=
op
.
get
();
uo
.
setQuantity
(
uo
.
getQuantity
()+
o
.
getQuantity
());
uo
.
setUnfinishQuantity
(
uo
.
getUnfinishQuantity
()+
o
.
getQuantity
());
handleWeight
(
hgsc005a
,
uo
);
updateList
.
add
(
uo
);
}
else
{
handleWeight
(
hgsc005a
,
o
);
createList
.
add
(
o
);
}
});
...
...
@@ -403,8 +405,10 @@ public class HGSCTools {
HGSC005A
uo
=
op
.
get
();
uo
.
setQuantity
(
o
.
getQuantity
());
uo
.
setUnfinishQuantity
(
o
.
getQuantity
()-
uo
.
getFinishQuantity
());
handleWeight
(
hgsc005a
,
uo
);
updateList
.
add
(
uo
);
}
else
{
handleWeight
(
hgsc005a
,
o
);
createList
.
add
(
o
);
}
});
...
...
@@ -429,10 +433,12 @@ public class HGSCTools {
oldObjMap
.
forEach
((
k
,
v
)->{
HGSC005A
oldObj
=
v
.
get
();
if
(
oldObj
.
getQuantity
()-
hgsc005a
.
getQuantity
()<=
0
){
handleWeight
(
hgsc005a
,
oldObj
);
deleteIds
.
add
(
oldObj
.
getId
());
}
else
{
oldObj
.
setQuantity
(
oldObj
.
getQuantity
()-
hgsc005a
.
getQuantity
());
oldObj
.
setUnfinishQuantity
(
oldObj
.
getQuantity
()-
oldObj
.
getFinishQuantity
());
handleWeight
(
hgsc005a
,
oldObj
);
updateList
.
add
(
oldObj
);
}
});
...
...
@@ -449,6 +455,15 @@ public class HGSCTools {
}
}
private
static
void
handleWeight
(
HGSC005A
hgsc005a
,
HGSC005A
target
){
if
(
Objects
.
nonNull
(
hgsc005a
.
getSingleWeight
()))
{
target
.
setSingleWeight
(
hgsc005a
.
getSingleWeight
());
target
.
setTotalWeight
(
hgsc005a
.
getSingleWeight
().
multiply
(
new
BigDecimal
(
target
.
getQuantity
())));
target
.
setFinishWeight
(
hgsc005a
.
getSingleWeight
().
multiply
(
new
BigDecimal
(
target
.
getFinishQuantity
())));
target
.
setUnfinishWeight
(
hgsc005a
.
getSingleWeight
().
multiply
(
new
BigDecimal
(
target
.
getUnfinishQuantity
())));
}
}
/**
* 校验修改的数据
*
...
...
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