Commit 2f8ef27c by wuwenlong

排产计算新增结束日期时间差;

parent fc0f8d6b
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment