|
@@ -53,6 +53,7 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.math.RoundingMode;
|
|
|
import java.net.URLEncoder;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
@@ -3054,7 +3055,7 @@ public class ApsProcessOperationProcessEquServiceImpl extends ServiceImpl<ApsPro
|
|
|
)));
|
|
|
|
|
|
SysUserVo currentUser = CXCommonUtils.getCurrentUser();
|
|
|
- if (currentUser == null){
|
|
|
+ if (currentUser == null) {
|
|
|
currentUser = new SysUserVo();
|
|
|
currentUser.setId("0");
|
|
|
currentUser.setName("定时任务操作");
|
|
@@ -3152,11 +3153,17 @@ public class ApsProcessOperationProcessEquServiceImpl extends ServiceImpl<ApsPro
|
|
|
if (endDate != null) {
|
|
|
//如果料卷计划完工时间的日期<坯料计划承诺交货期起,则=料卷计划完工时间的日期-坯料计划承诺交货期起
|
|
|
if (endDate.before(promiseStartDate)) {
|
|
|
- int offsetDay = (int) DateUtil.between(promiseStartDate, endDate, DateUnit.DAY, false);
|
|
|
+ long between = DateUtil.between(promiseStartDate, endDate, DateUnit.HOUR, false);
|
|
|
+ //取整
|
|
|
+ BigDecimal divide = new BigDecimal(between).divide(new BigDecimal(24), RoundingMode.UP);
|
|
|
+ int offsetDay = divide.intValue();
|
|
|
apsDeliveryOffsetDo.setDeliveryoffset(offsetDay);
|
|
|
// 如果料卷计划完工时间的日期>坯料计划承诺交货期止,则=料卷计划完工时间的日期-坯料计划承诺交货期止
|
|
|
} else if (endDate.after(promiseEndDate)) {
|
|
|
- int offsetDay = (int) DateUtil.between(promiseEndDate, endDate, DateUnit.DAY, false);
|
|
|
+ long between = DateUtil.between(promiseEndDate, endDate, DateUnit.HOUR, false);
|
|
|
+ //取整
|
|
|
+ BigDecimal divide = new BigDecimal(between).divide(new BigDecimal(24), RoundingMode.UP);
|
|
|
+ int offsetDay = divide.intValue();
|
|
|
apsDeliveryOffsetDo.setDeliveryoffset(offsetDay);
|
|
|
} else {
|
|
|
apsDeliveryOffsetDo.setDeliveryoffset(null);
|