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
2f8ef27c
Commit
2f8ef27c
authored
Jun 18, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
排产计算新增结束日期时间差;
parent
fc0f8d6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+10
-3
No files found.
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
2f8ef27c
...
...
@@ -581,6 +581,8 @@ public class HGSCTools {
//基础工时
private
final
static
BigDecimal
baseWorkHour
=
new
BigDecimal
(
8
);
private
final
static
Integer
finishDateDiffDay
=
new
Integer
(-
3
);
public
static
int
schedule
(
String
planCode
)
{
List
<
HGSC005A
>
hgsc005AList
=
queryByPlanCode
(
planCode
);
// hgsc005AList.sort(Comparator.comparing(HGSC005A::getProductType).thenComparing(HGSC005A::getProcessOrder,Comparator.reverseOrder()));
...
...
@@ -618,12 +620,17 @@ public class HGSCTools {
return
hgsc005AList
.
size
();
}
private
static
String
handleEndDate
(
String
endDate
,
HGSC005A
planInfo
){
if
(
StringUtils
.
isBlank
(
endDate
)&&
StringUtils
.
isNotBlank
(
planInfo
.
getFinishDate
())){
endDate
=
DateUtil
.
toDateStr
(
DateUtils
.
addDays
(
DateUtil
.
toDate
(
planInfo
.
getFinishDate
(),
DateUtil
.
DATE10_PATTERN
),
finishDateDiffDay
.
intValue
()),
DateUtil
.
DATE10_PATTERN
);
}
return
endDate
;
}
private
static
BigDecimal
calculateWordHour
(
HGSC005A
planInfo
,
List
<
HGSJ001
>
hgsj001List
,
List
<
HGPZ005
>
hgpz005List
,
List
<
HGPZ005A
>
hgpz005AList
,
String
endDate
,
BigDecimal
remainder
){
if
(
StringUtils
.
isBlank
(
endDate
)){
endDate
=
planInfo
.
getFinishDate
();
}
endDate
=
handleEndDate
(
endDate
,
planInfo
);
planInfo
.
setPlanEndDate
(
endDate
);
AtomicReference
<
BigDecimal
>
workHour
=
new
AtomicReference
<>(
new
BigDecimal
(
0
));
BigDecimal
finalRemainder
=
remainder
;
...
...
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