|
@@ -258,7 +258,7 @@ public class PolicyOrderLogic {
|
|
|
policyOrderup.setId(IdWorker.getIdStr());
|
|
|
policyOrderup.setPolicyId(policyOrderup.getId());
|
|
|
policyOrderup.setPolicyNumber(policyOrderup.getId());
|
|
|
- policyOrderup.setPolicyName("意外险");
|
|
|
+ policyOrderup.setPolicyName("工伤险");
|
|
|
|
|
|
policyOrderup.setType("IN");
|
|
|
|
|
@@ -267,8 +267,8 @@ public class PolicyOrderLogic {
|
|
|
policyOrderup.setStartTime(DateUtil.parse((String) row.get(9), "yyyy-MM-dd"));
|
|
|
policyOrderup.setEndTime(this.getEndOfDay(DateUtil.parse((String) row.get(10), "yyyy-MM-dd")));
|
|
|
|
|
|
- policyOrderup.setIsSend(IsYesNoEnum.NO.getKey());
|
|
|
- policyOrderup.setIsReceipt(IsYesNoEnum.NO.getKey());
|
|
|
+ policyOrderup.setIsSend(IsYesNoEnum.YES.getKey());
|
|
|
+ policyOrderup.setIsReceipt(IsYesNoEnum.YES.getKey());
|
|
|
|
|
|
|
|
|
policyOrderup.setBelongCompany(adminWebsit.getBelongCompany());
|
|
@@ -302,6 +302,14 @@ public class PolicyOrderLogic {
|
|
|
policyOrderup.setPolicyOrderStatus("DSX");
|
|
|
}
|
|
|
|
|
|
+ if (policyOrderService.lambdaQuery().lt(PolicyOrder::getStartTime,policyOrderup.getEndTime())
|
|
|
+ .gt(PolicyOrder::getEndTime,policyOrderup.getStartTime())
|
|
|
+ .eq(PolicyOrder::getType,"IN")
|
|
|
+ .ne(PolicyOrder::getPolicyOrderStatus,"YSX")
|
|
|
+ .eq(PolicyOrder::getWebsitUserId,policyOrderup.getWebsitUserId()).count() > 0){
|
|
|
+ throw new RemoteServiceException(errPrefix + "师傅已导入该时间段得保险");
|
|
|
+ }
|
|
|
+
|
|
|
policyOrderup.insert();
|
|
|
|
|
|
|
|
@@ -309,7 +317,7 @@ public class PolicyOrderLogic {
|
|
|
WorkerPolicy workerPolicy = new WorkerPolicy();
|
|
|
workerPolicy.setWorkerId(websitUser.getWorkerNumber());
|
|
|
workerPolicy.setType("IN");
|
|
|
-
|
|
|
+ workerPolicy.setOrderId(policyOrderup.getId());
|
|
|
workerPolicy.setPolicyName(policyOrderup.getPolicyName());
|
|
|
workerPolicy.setCompany(policyOrderup.getCompany());
|
|
|
|
|
@@ -329,6 +337,15 @@ public class PolicyOrderLogic {
|
|
|
workerPolicy.setStatus("DSX");
|
|
|
}
|
|
|
workerPolicy.insert();
|
|
|
+
|
|
|
+ if (workerPolicyService.lambdaQuery().lt(WorkerPolicy::getStartTime,policyOrderup.getEndTime())
|
|
|
+ .gt(WorkerPolicy::getEndTime,policyOrderup.getStartTime())
|
|
|
+ .eq(WorkerPolicy::getPolicyType,"IN")
|
|
|
+ .ne(WorkerPolicy::getStatus,"YSX")
|
|
|
+ .eq(WorkerPolicy::getWebsitUserId,policyOrderup.getWebsitUserId()).count() > 0){
|
|
|
+ throw new RemoteServiceException(errPrefix + "师傅已导入该时间段得保险");
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|