Explorar o código

Merge remote-tracking branch 'origin/develop' into develop

FengChaoYu hai 3 meses
pai
achega
4fc1f5857c

+ 22 - 15
mall-server-api/src/main/java/com/gree/mall/manager/logic/policy/AgreementLogic.java

@@ -873,7 +873,6 @@ public class AgreementLogic {
         List<PolicyOrder> list = policyOrderService.lambdaQuery()
                 .ge(PolicyOrder::getEndTime,  DateUtil.beginOfDay(new Date()))
                 .le(PolicyOrder::getStartTime, new Date())
-                .eq(PolicyOrder::getIsReceipt, IsYesNoEnum.YES.getKey())
                 .ne(PolicyOrder::getPolicyOrderStatus, PolicyOrderStatusEnum.BZZ.getKey())
                 .ne(PolicyOrder::getPolicyOrderStatus, PolicyOrderStatusEnum.YSX.getKey())
                 .select(PolicyOrder::getId)
@@ -893,7 +892,6 @@ public class AgreementLogic {
         policyOrderService.lambdaUpdate()
                 .ge(PolicyOrder::getEndTime,  DateUtil.beginOfDay(new Date()))
                 .le(PolicyOrder::getStartTime, new Date())
-                .eq(PolicyOrder::getIsReceipt, IsYesNoEnum.YES.getKey())
                 .ne(PolicyOrder::getPolicyOrderStatus, PolicyOrderStatusEnum.BZZ.getKey())
                 .ne(PolicyOrder::getPolicyOrderStatus, PolicyOrderStatusEnum.YSX.getKey())
                 .set(PolicyOrder::getPolicyOrderStatus, PolicyOrderStatusEnum.BZZ.getKey())
@@ -1563,12 +1561,18 @@ public class AgreementLogic {
         if (leLetterService.lambdaQuery().eq(LeLetter::getStatus, LetterStatusEnum.SEND.getKey())
                 .le(LeLetter::getSendTime, DateUtil.offsetDay(new Date(),-1*leConfig.getDayNum()))
                 .count() > 0) {
-            leLetterService.lambdaUpdate().eq(LeLetter::getStatus, LetterStatusEnum.SEND.getKey())
-                    .le(LeLetter::getSendTime, DateUtil.offsetDay(new Date(),-1*leConfig.getDayNum()))
-                    .set(LeLetter::getExamineStatus, "OK")
-                    .set(LeLetter::getExamineTime, new Date())
-                    .set(LeLetter::getExamineName, "申诉截止时间已到白动批复")
-                    .set(LeLetter::getStatus,LetterStatusEnum.EXECUTED.getKey()).update();
+
+            List<LeLetter> list = leLetterService.lambdaQuery().eq(LeLetter::getStatus, LetterStatusEnum.SEND.getKey())
+                    .le(LeLetter::getSendTime, DateUtil.offsetDay(new Date(), -1 * leConfig.getDayNum())).list();
+            for (LeLetter leLetter : list) {
+                leLetter.setExamineFration(leLetter.getFraction());
+                leLetter.setExaminePrice(leLetter.getPrice());
+
+                leLetter.setExamineName("申诉截止时间已到自动批复");
+
+                leLetter.updateById();
+            }
+
         }
 
         if (leConfig.getIsDay().equals(IsYesNoEnum.YES.getKey())) {
@@ -1587,13 +1591,16 @@ public class AgreementLogic {
                     letterItem.setExamineName("审批截止时间已到自动批复");
 
                     letterItem.updateById();
-                    leLetterService.lambdaUpdate().eq(LeLetter::getStatus, LetterStatusEnum.WAIT_EXAMINE.getKey())
-                            .eq(LeLetter::getLeLetterId,letterItem.getLeLetterId())
-                            .set(LeLetter::getStatus, LetterStatusEnum.REVOKE.getKey())
-                            .set(LeLetter::getExamineStatus, "OK")
-                            .set(LeLetter::getExamineTime, new Date())
-                            .set(LeLetter::getExamineName, "审批截止时间已到自动批复")
-                            .update();
+                    List<LeLetter> list = leLetterService.lambdaQuery().eq(LeLetter::getStatus, LetterStatusEnum.WAIT_EXAMINE.getKey())
+                            .eq(LeLetter::getLeLetterId, letterItem.getLeLetterId()).list();
+                    for (LeLetter leLetter : list) {
+                        leLetter.setExamineFration(leLetter.getFraction());
+                        leLetter.setExaminePrice(leLetter.getPrice());
+
+                        leLetter.setExamineName("申诉截止时间已到自动批复");
+
+                        leLetter.updateById();
+                    }
 
                 }