From d145c704d4cdd8f6afad234d2c2914475bb4db7f Mon Sep 17 00:00:00 2001
From: Mr.Zhang <710666463@qq.com>
Date: 星期四, 17 八月 2023 09:23:05 +0800
Subject: [PATCH] gitignore
---
server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 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 b25630b..f33817e 100644
--- a/server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java
+++ b/server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java
@@ -32,6 +32,7 @@
import org.springframework.web.multipart.MultipartFile;
import java.math.BigDecimal;
+import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -96,7 +97,9 @@
|| Objects.isNull(workPlansSaveDTO.getNum())
|| Objects.isNull(workPlansSaveDTO.getFactoryId())
|| Objects.isNull(workPlansSaveDTO.getUnitId())
- || Objects.isNull(workPlansSaveDTO.getMaterialId())){
+ || Objects.isNull(workPlansSaveDTO.getMaterialId())
+ || Objects.isNull(workPlansSaveDTO.getStartDate())
+ || workPlansSaveDTO.getStartDate().getTime() > workPlansSaveDTO.getPlanDate().getTime()){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
WorkPlans workPlans = new WorkPlans();
@@ -172,6 +175,12 @@
i.setFinishUnQualifiedNum(Objects.isNull(plansExtListVO.getUnqulifiedNum())?Constants.ZERO:plansExtListVO.getUnqulifiedNum());
i.setFinishNum(Objects.isNull(plansExtListVO.getDoneNum())?Constants.ZERO:plansExtListVO.getDoneNum());
}
+ if (Objects.nonNull(i.getPlanDate())){
+ i.setHasExpire(DateUtil.toDateLocalDateTime(i.getPlanDate()).toLocalDate().isBefore(LocalDate.now()));
+ }else {
+ i.setHasExpire(false);
+ }
+
});
}
return PageData.from(new PageInfo<>(result));
--
Gitblit v1.9.3