|
@@ -16,10 +16,7 @@ import com.gree.mall.manager.enums.PolicyOrderEmStutasEnum;
|
|
|
import com.gree.mall.manager.enums.PolicyOrderStatusEnum;
|
|
|
import com.gree.mall.manager.logic.common.CommonLogic;
|
|
|
import com.gree.mall.manager.plus.entity.*;
|
|
|
-import com.gree.mall.manager.plus.service.AdminWebsitService;
|
|
|
-import com.gree.mall.manager.plus.service.PolicyOrderService;
|
|
|
-import com.gree.mall.manager.plus.service.SysDictCompanyService;
|
|
|
-import com.gree.mall.manager.plus.service.WebsitUserService;
|
|
|
+import com.gree.mall.manager.plus.service.*;
|
|
|
import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
|
import com.gree.mall.manager.zfire.util.FieldUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -52,6 +49,9 @@ public class PolicyOrderLogic {
|
|
|
@Autowired
|
|
|
SysDictCompanyService sysDictCompanyService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ WorkerPolicyService workerPolicyService;
|
|
|
+
|
|
|
public IPage<PolicyOrderVO> listPolicyOrder(Page page, ZfireParamBean zfireParam) {
|
|
|
//获取当前登录企业id
|
|
|
AdminUserCom adminUser = commonLogic.getAdminUser();
|
|
@@ -157,6 +157,11 @@ public class PolicyOrderLogic {
|
|
|
|
|
|
|
|
|
if (policyOrder != null) {
|
|
|
+
|
|
|
+
|
|
|
+ workerPolicyService.lambdaUpdate().eq(WorkerPolicy::getOrderId,policyOrder.getId()).remove();
|
|
|
+
|
|
|
+
|
|
|
WorkerPolicy workerPolicy = new WorkerPolicy();
|
|
|
workerPolicy.setWorkerId(policyOrder.getWorkerNumber());
|
|
|
workerPolicy.setType("IN");
|
|
@@ -286,6 +291,20 @@ public class PolicyOrderLogic {
|
|
|
}
|
|
|
workerPolicy.insert();
|
|
|
|
|
|
+ List<PolicyOrder> policyOrders = policyOrderService.lambdaQuery()
|
|
|
+ .eq(PolicyOrder::getWebsitId, (String) row.get(1))
|
|
|
+ .eq(PolicyOrder::getWorkerNumber, (String) row.get(3))
|
|
|
+ .eq(PolicyOrder::getType, "EM")
|
|
|
+ .in(PolicyOrder::getPolicyOrderStatus, PolicyOrderEmStutasEnum.XG.getKey(),
|
|
|
+ PolicyOrderEmStutasEnum.DSX.getKey(),
|
|
|
+ PolicyOrderEmStutasEnum.KTH.getKey()
|
|
|
+
|
|
|
+ ).list();
|
|
|
+ for (PolicyOrder order : policyOrders) {
|
|
|
+ workerPolicyService.lambdaUpdate().eq(WorkerPolicy::getOrderId,order.getId()).remove();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
policyOrderService.lambdaUpdate()
|
|
|
.eq(PolicyOrder::getWebsitId, (String) row.get(1))
|
|
|
.eq(PolicyOrder::getWorkerNumber, (String) row.get(3))
|