|
@@ -237,16 +237,8 @@ public class UserLogic {
|
|
|
String policy_order= (String) row.get(14);
|
|
|
String policy_start_time = (String) row.get(15);
|
|
|
String policy_end_time = (String) row.get(16);
|
|
|
- String em_company = (String) row.get(17);
|
|
|
- String em_policy_name= (String) row.get(18);
|
|
|
- String em_policy_order = (String) row.get(19);
|
|
|
- String em_policy_start_time = (String) row.get(20);
|
|
|
- String em_policy_end_time = (String) row.get(21);
|
|
|
- String in_company = (String) row.get(22);
|
|
|
- String in_policy_name = (String) row.get(23);
|
|
|
- String in_policy_order= (String) row.get(24);
|
|
|
- String in_policy_start_time = (String) row.get(25);
|
|
|
- String in_policy_end_time = (String) row.get(26);
|
|
|
+
|
|
|
+
|
|
|
if (StringUtils.isAnyBlank(name, mobile, websitNumber,idcard,idcardStartTime,idcardEndTime)) {
|
|
|
throw new RemoteServiceException(errPrefix + "黄色区域为必填项");
|
|
|
}
|
|
@@ -286,9 +278,47 @@ public class UserLogic {
|
|
|
|
|
|
if (adminWebsit.getInsureType().equals("意外险,工伤险")) {
|
|
|
|
|
|
+ String in_company = row.size() > 22?(String) row.get(22):"";
|
|
|
+ String in_policy_name = row.size() > 22?(String) row.get(23):"";
|
|
|
+ String in_policy_order = row.size() > 22?(String) row.get(24):"";
|
|
|
+ String in_policy_start_time = row.size() > 22?(String) row.get(25):"";
|
|
|
+ String in_policy_end_time = row.size() > 22?(String) row.get(26):"";
|
|
|
+
|
|
|
+ if (!StringUtil.isEmpty(in_company)) {
|
|
|
+ userWait.setInCompany(in_company);
|
|
|
+ userWait.setInPolicyStartTime(DateUtil.parse(in_policy_start_time, "yyyy-MM-dd"));
|
|
|
+ userWait.setInPolicyEndTime(DateUtil.offsetSecond(DateUtil.endOfDay(DateUtil.parse(in_policy_end_time, "yyyy-MM-dd")),-1));
|
|
|
+ if (userWait.getInPolicyEndTime().before(new Date()))
|
|
|
+ throw new RemoteServiceException(userWait.getIdcard()+"导入师傅保险已过期");
|
|
|
+ userWait.setInPolicyName(in_policy_name);
|
|
|
+ userWait.setInPolicyOrder(in_policy_order);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
if (StringUtil.isEmpty(in_company))
|
|
|
throw new RemoteServiceException(userWait.getIdcard()+"必须导入工伤险");
|
|
|
}else {
|
|
|
+
|
|
|
+ String em_company = (String) row.get(17);
|
|
|
+ String em_policy_name= (String) row.get(18);
|
|
|
+ String em_policy_order = (String) row.get(19);
|
|
|
+ String em_policy_start_time = (String) row.get(20);
|
|
|
+ String em_policy_end_time = (String) row.get(21);
|
|
|
+
|
|
|
+
|
|
|
+ if (!StringUtil.isEmpty(em_company)) {
|
|
|
+ userWait.setEmCompany(em_company);
|
|
|
+ userWait.setEmPolicyStartTime(DateUtil.parse(em_policy_start_time, "yyyy-MM-dd"));
|
|
|
+ userWait.setEmPolicyEndTime(DateUtil.offsetSecond(DateUtil.endOfDay(DateUtil.parse(em_policy_end_time, "yyyy-MM-dd")),-1));
|
|
|
+
|
|
|
+ if (userWait.getEmPolicyEndTime().before(new Date()))
|
|
|
+ throw new RemoteServiceException(userWait.getIdcard()+"导入师傅保险已过期");
|
|
|
+ userWait.setEmPolicyName(em_policy_name);
|
|
|
+ userWait.setEmPolicyOrder(em_policy_order);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if (StringUtil.isEmpty(em_company))
|
|
|
throw new RemoteServiceException(userWait.getIdcard()+"必须导入雇主险");
|
|
|
}
|
|
@@ -308,26 +338,6 @@ public class UserLogic {
|
|
|
throw new RemoteServiceException(userWait.getEmCompany()+"必须导入意外险");
|
|
|
}
|
|
|
|
|
|
- if (!StringUtil.isEmpty(em_company)) {
|
|
|
- userWait.setEmCompany(em_company);
|
|
|
- userWait.setEmPolicyStartTime(DateUtil.parse(em_policy_start_time, "yyyy-MM-dd"));
|
|
|
- userWait.setEmPolicyEndTime(DateUtil.offsetSecond(DateUtil.endOfDay(DateUtil.parse(em_policy_end_time, "yyyy-MM-dd")),-1));
|
|
|
-
|
|
|
- if (userWait.getEmPolicyEndTime().before(new Date()))
|
|
|
- throw new RemoteServiceException(userWait.getIdcard()+"导入师傅保险已过期");
|
|
|
- userWait.setEmPolicyName(em_policy_name);
|
|
|
- userWait.setEmPolicyOrder(em_policy_order);
|
|
|
- }
|
|
|
-
|
|
|
- if (!StringUtil.isEmpty(in_company)) {
|
|
|
- userWait.setInCompany(in_company);
|
|
|
- userWait.setInPolicyStartTime(DateUtil.parse(in_policy_start_time, "yyyy-MM-dd"));
|
|
|
- userWait.setInPolicyEndTime(DateUtil.offsetSecond(DateUtil.endOfDay(DateUtil.parse(in_policy_end_time, "yyyy-MM-dd")),-1));
|
|
|
- if (userWait.getInPolicyEndTime().before(new Date()))
|
|
|
- throw new RemoteServiceException(userWait.getIdcard()+"导入师傅保险已过期");
|
|
|
- userWait.setInPolicyName(in_policy_name);
|
|
|
- userWait.setInPolicyOrder(in_policy_order);
|
|
|
- }
|
|
|
|
|
|
if (Objects.nonNull(adminWebsit)) {
|
|
|
userWait.setWebsitId(adminWebsit.getWebsitId());
|