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
e5e8cbd4
Commit
e5e8cbd4
authored
May 21, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产计划排产
parent
37e3a63a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
8 deletions
+24
-8
ComputeTypeEnum.java
src/main/java/com/baosight/hggp/common/ComputeTypeEnum.java
+9
-0
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+15
-8
No files found.
src/main/java/com/baosight/hggp/common/ComputeTypeEnum.java
View file @
e5e8cbd4
...
...
@@ -40,6 +40,15 @@ public enum ComputeTypeEnum {
return
block
;
}
public
static
ComputeTypeEnum
getEnumByCode
(
Integer
code
){
for
(
ComputeTypeEnum
en
:
ComputeTypeEnum
.
values
()){
if
(
code
.
compareTo
(
en
.
code
)==
0
){
return
en
;
}
}
return
null
;
}
public
Integer
getCode
()
{
return
code
;
}
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
e5e8cbd4
package
com
.
baosight
.
hggp
.
hg
.
sc
.
tools
;
import
com.baosight.hggp.common.ComputeTypeEnum
;
import
com.baosight.hggp.common.ProductTypeEnum
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
...
...
@@ -393,14 +394,20 @@ public class HGSCTools {
if
(
StringUtils
.
equals
(
product
.
getInventCode
(),
planInfo
.
getProductCode
())){
//额定工时
BigDecimal
timing
=
sj
.
getStandardJob
().
multiply
(
sj
.
getStandardDays
()).
divide
(
sj
.
getStandardNum
());
if
(
StringUtils
.
equals
(
sj
.
getUnit
(),
"米"
))
{
workHour
.
set
(
product
.
getLength
().
multiply
(
new
BigDecimal
(
planInfo
.
getQuantity
())).
multiply
(
unitConver
).
multiply
(
composingCoeff
)
.
divide
(
timing
)
.
multiply
(
baseWorkHour
).
add
(
finalRemainder
));
}
else
{
workHour
.
set
(
new
BigDecimal
(
planInfo
.
getQuantity
()).
multiply
(
composingCoeff
)
.
divide
(
timing
)
.
multiply
(
baseWorkHour
).
add
(
finalRemainder
));
ComputeTypeEnum
computeType
=
ComputeTypeEnum
.
getEnumByCode
(
sj
.
getComputeType
());
switch
(
computeType
){
case
CD:
workHour
.
set
(
product
.
getLength
().
multiply
(
new
BigDecimal
(
planInfo
.
getQuantity
())).
multiply
(
unitConver
).
multiply
(
composingCoeff
)
.
divide
(
timing
)
.
multiply
(
baseWorkHour
).
add
(
finalRemainder
));
break
;
case
SL:
workHour
.
set
(
new
BigDecimal
(
planInfo
.
getQuantity
()).
multiply
(
composingCoeff
)
.
divide
(
timing
)
.
multiply
(
baseWorkHour
).
add
(
finalRemainder
));
break
;
default
:
break
;
}
}
});
...
...
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