From 40609a1bd11ce79445562ac23f16af23a48c3933 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 18 八月 2023 14:34:28 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmMes

---
 server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java b/server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java
index e0e1c37..42464f1 100644
--- a/server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java
+++ b/server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java
@@ -175,13 +175,12 @@
                     i.setFinishUnQualifiedNum(Objects.isNull(plansExtListVO.getUnqulifiedNum())?Constants.ZERO:plansExtListVO.getUnqulifiedNum());
                     i.setFinishNum(Objects.isNull(plansExtListVO.getDoneNum())?Constants.ZERO:plansExtListVO.getDoneNum());
                 }
-
+                i.setHasExpire(false);
+                i.setStatus(Constants.formatIntegerNum(i.getStatus()));
                 if ( !i.getStatus().equals(Constants.WORKPLANHISTORY_TYPE.done) &&
                         !i.getStatus().equals(Constants.WORKPLANHISTORY_TYPE.close)){
                     if (Objects.nonNull(i.getPlanDate())){
                         i.setHasExpire(DateUtil.toDateLocalDateTime(i.getPlanDate()).toLocalDate().isBefore(LocalDate.now()));
-                    }else {
-                        i.setHasExpire(false);
                     }
                 }
 
@@ -385,7 +384,7 @@
         if(p.getPlanDate() == null){
             throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝绗��"+(index+2)+"銆戣銆愯鍒掔粨鏉熸棩鏈熴�戞暟鎹敊璇紝姝g‘鏍煎紡涓猴細yyyy-MM-dd锛堝2022-06-07锛夛紒");
         }
-        if(p.getPlanDate().getTime() <= p.getStartDate().getTime()){
+        if(p.getPlanDate().getTime() < p.getStartDate().getTime()){
             throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝绗��"+(index+2)+"銆戣銆愯鍒掑紑濮嬫棩鏈熴�戣鏃╀簬銆愯鍒掔粨鏉熸棩鏈熴�戯紒");
         }
         if(StringUtils.isBlank(p.getMaterialCode())){
@@ -399,7 +398,7 @@
         }
 
         Date pDate = DateUtil.getDateFromString(DateUtil.getShortTime(p.getPlanDate()) +" 00:00:00");
-        Date nDate =  DateUtil.getDateFromString(DateUtil.getShortTime(DateUtil.getCurrentDate()) +" 00:00:00");
+        Date nDate =  DateUtil.getDateFromString(DateUtil.getShortTime(DateUtil.getCurrentDate()) +" 23:59:59");
         if( nDate.getTime() > pDate.getTime()){
             throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "瀵逛笉璧凤紝璁″垝鐢熶骇鏃ユ湡蹇呴』涓轰粖澶╀互鍚庣殑鏃ユ湡锛�");
         }

--
Gitblit v1.9.3