Browse Source

no message

FengChaoYu 4 months ago
parent
commit
238c641cc0

+ 12 - 5
mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/AppraiseRelaLogic.java

@@ -461,11 +461,18 @@ public class AppraiseRelaLogic {
             // 首次申诉:判定网点【全责】的,审核结果为【驳回】,触发二次可申诉
             // 二次申诉:判定网点【全责】的,审核结果为【驳回】,维护原评价
             apply.setExamineResult(orderBase.getAppraiseStatus());
-            PgAppraiseApply copy = new PgAppraiseApply();
-            this.copyApply(copy, apply);
-            copy.setIsSecond(true);
-            copy.setSecondCreateTime(DateUtil.dateSecond());
-            copy.insert();
+            final Integer supCount = pgAppraiseApplyService.lambdaQuery()
+                    .eq(PgAppraiseApply::getIsSecond, false)
+                    .eq(PgAppraiseApply::getOrderBaseId, bean.getOrderBaseId())
+                    .isNotNull(PgAppraiseApply::getRejectTime)
+                    .count();
+            if (!apply.getIsSecond() && supCount == 0) {
+                PgAppraiseApply copy = new PgAppraiseApply();
+                this.copyApply(copy, apply);
+                copy.setIsSecond(true);
+                copy.setSecondCreateTime(DateUtil.dateSecond());
+                copy.insert();
+            }
         }
 
         apply.updateById();