‘linchangsheng’ 7 месяцев назад
Родитель
Сommit
43c5ecae02

+ 2 - 1
mall-server-api/src/main/java/com/gree/mall/manager/bean/policy/PolicyOrderInVO.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.gree.mall.manager.annotation.ZfireField;
 import com.gree.mall.manager.enums.IsYesNoEnum;
+import com.gree.mall.manager.enums.PolicyOrderInStutasEnum;
 import com.gree.mall.manager.plus.entity.PolicyOrder;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -60,7 +61,7 @@ public class PolicyOrderInVO    {
     private String payAmount;
 
     @ApiModelProperty(value = "保单状态")
-    private String policyOrderStatus;
+    private PolicyOrderInStutasEnum policyOrderStatus;
 
 
 

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

@@ -226,12 +226,12 @@ public class WorkerManagerLogic {
 
             for (WorkerPolicy workerPolicy : workerManagerBean.getWorkerPolicies()) {
                 if (workerPolicy.getEndTime().after(new Date()) && workerPolicy.getStartTime().before(new Date())) {
-                    workerPolicy.setStatus("ON");
+                    workerPolicy.setStatus("BZZ");
                 } else {
-                    workerPolicy.setStatus("WAIT_ON");
+                    workerPolicy.setStatus("DSX");
                 }
                 if (workerPolicy.getEndTime().before(new Date())) {
-                    workerPolicy.setStatus("OFF");
+                    workerPolicy.setStatus("YSX");
                 }
             }
         }
@@ -245,7 +245,7 @@ public class WorkerManagerLogic {
                 throw new RemoteServiceException("请填工程师意外险");
 
 
-            if (workerPolicies.stream().filter(item -> item.getStatus().equals("ON")).count() > 0) {
+            if (workerPolicies.stream().filter(item -> item.getStatus().equals("BZZ")).count() > 0) {
                 throw new RemoteServiceException("意外险必须有生效的保险");
             }
 
@@ -265,7 +265,7 @@ public class WorkerManagerLogic {
                     throw new RemoteServiceException("工伤险有相同覆盖范围内的保险");
 
 
-                if (workerPoliciesIn.stream().filter(item -> item.getStatus().equals("ON")).count() > 0) {
+                if (workerPoliciesIn.stream().filter(item -> item.getStatus().equals("BZZ")).count() > 0) {
                     throw new RemoteServiceException("工伤险必须有生效的保险");
                 }
 
@@ -279,7 +279,7 @@ public class WorkerManagerLogic {
                     throw new RemoteServiceException("雇主险有相同覆盖范围内的保险");
 
 
-                if (workerPoliciesEm.stream().filter(item -> item.getStatus().equals("ON")).count() > 0) {
+                if (workerPoliciesEm.stream().filter(item -> item.getStatus().equals("BZZ")).count() > 0) {
                     throw new RemoteServiceException("雇主险必须有生效的保险");
                 }
             }
@@ -292,7 +292,7 @@ public class WorkerManagerLogic {
             if (wp)
                 throw new RemoteServiceException("意外险有相同覆盖范围内的保险");
 
-            if (workerPolicies.stream().filter(item -> item.getStatus().equals("ON")).count() < 1)
+            if (workerPolicies.stream().filter(item -> item.getStatus().equals("BZZ")).count() < 1)
                 workerManagerBean.setExamineStatus(ExamineWorkerStatusEnum.WAIT_WORKER.getKey());
 
 
@@ -305,7 +305,7 @@ public class WorkerManagerLogic {
                 if (in)
                     throw new RemoteServiceException("工伤险有相同覆盖范围内的保险");
 
-                if (workerPoliciesIn.stream().filter(item -> item.getStatus().equals("ON")).count() < 1) {
+                if (workerPoliciesIn.stream().filter(item -> item.getStatus().equals("BZZ")).count() < 1) {
                     workerManagerBean.setExamineStatus(ExamineWorkerStatusEnum.WAIT_WORKER.getKey());
                     this.scGongShang(workerManagerBean);
                 }
@@ -320,7 +320,7 @@ public class WorkerManagerLogic {
                 if (em)
                     throw new RemoteServiceException("雇主险有相同覆盖范围内的保险");
 
-                if (workerPoliciesEm.stream().filter(item -> item.getStatus().equals("ON")).count() < 1) {
+                if (workerPoliciesEm.stream().filter(item -> item.getStatus().equals("BZZ")).count() < 1) {
                     workerManagerBean.setExamineStatus(ExamineWorkerStatusEnum.WAIT_WORKER.getKey());
                     this.scGuZhu(workerManagerBean);
                 }
@@ -357,7 +357,7 @@ public class WorkerManagerLogic {
             workerPolicyService.lambdaUpdate()
                     .eq(WorkerPolicy::getOrderId,policyOrders.get(0).getId())
                     .eq(WorkerPolicy::getWebsitUserId,workerManagerBean.getId())
-                    .set(WorkerPolicy::getStatus, "OFF")
+                    .set(WorkerPolicy::getStatus, "YSX")
                     .set(WorkerPolicy::getEndTime,new Date()).update();
 
             PolicyOrder policyOrder = policyOrders.get(0);
@@ -492,15 +492,15 @@ public class WorkerManagerLogic {
 
         for (WorkerPolicy workerPolicy : workerPolicies) {
             if (workerPolicy.getEndTime().after(new Date()) && workerPolicy.getStartTime().before(new Date())) {
-                workerPolicy.setStatus("ON");
+                workerPolicy.setStatus("BZZ");
             }else {
-                workerPolicy.setStatus("WAIT_ON");
+                workerPolicy.setStatus("DSX");
             }
             if (workerPolicy.getEndTime().before(new Date())) {
-                workerPolicy.setStatus("OFF");
+                workerPolicy.setStatus("YSX");
             }
         }
-        if (workerPolicies.stream().filter(item -> item.getStatus().equals("ON")).count() > 0) {
+        if (workerPolicies.stream().filter(item -> item.getStatus().equals("BZZ")).count() < 1) {
             throw new RemoteServiceException("意外险必须有生效的保险");
         }
 
@@ -522,16 +522,16 @@ public class WorkerManagerLogic {
 
             for (WorkerPolicy workerPolicy : workerPoliciesIn) {
                 if (workerPolicy.getEndTime().after(new Date()) && workerPolicy.getStartTime().before(new Date())) {
-                    workerPolicy.setStatus("ON");
+                    workerPolicy.setStatus("BZZ");
                 }else {
-                    workerPolicy.setStatus("WAIT_ON");
+                    workerPolicy.setStatus("DSX");
                 }
                 if (workerPolicy.getEndTime().before(new Date())) {
-                    workerPolicy.setStatus("OFF");
+                    workerPolicy.setStatus("YSX");
                 }
             }
 
-            if (workerPolicies.stream().filter(item -> item.getStatus().equals("ON")).count() > 0) {
+            if (workerPolicies.stream().filter(item -> item.getStatus().equals("BZZ")).count() < 1) {
                 throw new RemoteServiceException("工伤险必须有生效的保险");
             }
 
@@ -547,16 +547,16 @@ public class WorkerManagerLogic {
 
             for (WorkerPolicy workerPolicy : workerPoliciesEm) {
                 if (workerPolicy.getEndTime().after(new Date()) && workerPolicy.getStartTime().before(new Date())) {
-                    workerPolicy.setStatus("ON");
+                    workerPolicy.setStatus("BZZ");
                 }else {
-                    workerPolicy.setStatus("WAIT_ON");
+                    workerPolicy.setStatus("DSX");
                 }
                 if (workerPolicy.getEndTime().before(new Date())) {
-                    workerPolicy.setStatus("OFF");
+                    workerPolicy.setStatus("YSX");
                 }
             }
 
-            if (workerPolicies.stream().filter(item -> item.getStatus().equals("ON")).count() > 0) {
+            if (workerPolicies.stream().filter(item -> item.getStatus().equals("BZZ")).count() < 1) {
                 throw new RemoteServiceException("雇主险必须有生效的保险");
             }
         }