|
@@ -114,17 +114,10 @@ public class UserLogic {
|
|
|
*/
|
|
|
public IPage<UserVO> page2(WorkerParamBean userZfireParamBean) {
|
|
|
AdminUserCom adminUser = commonLogic.getAdminUser();
|
|
|
- boolean isOK = false;
|
|
|
- if (CollectionUtils.isNotEmpty(userZfireParamBean.getParams())) {
|
|
|
- final long count = userZfireParamBean.getParams().stream()
|
|
|
- .filter(v -> v.getParam().equals("b.examine_status") && v.getValue().equals(ExamineStatusEnum.OK.getKey()))
|
|
|
- .count();
|
|
|
- isOK = count > 0;
|
|
|
- }
|
|
|
|
|
|
ZfireParamBean zfireParamBean = FieldUtils.supplyParam(userZfireParamBean, UserVO.class, adminUser);
|
|
|
|
|
|
- IPage<UserVO> userVOIPage = commonMapper.userList(new Page(userZfireParamBean.getPageNum(), userZfireParamBean.getPageSize()), userZfireParamBean, null, isOK);
|
|
|
+ IPage<UserVO> userVOIPage = commonMapper.userList(new Page(userZfireParamBean.getPageNum(), userZfireParamBean.getPageSize()), userZfireParamBean, null);
|
|
|
return userVOIPage;
|
|
|
}
|
|
|
|
|
@@ -244,17 +237,9 @@ 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,workerNumber,idcard,idcardStartTime,idcardEndTime)) {
|
|
|
+
|
|
|
+
|
|
|
+ if (StringUtils.isAnyBlank(name, mobile, websitNumber,idcard,idcardStartTime,idcardEndTime)) {
|
|
|
throw new RemoteServiceException(errPrefix + "黄色区域为必填项");
|
|
|
}
|
|
|
if (mobile.length() != 11) {
|
|
@@ -274,35 +259,78 @@ public class UserLogic {
|
|
|
throw new RemoteServiceException(errPrefix + "网点不存在");
|
|
|
}
|
|
|
}
|
|
|
- if (StringUtils.isBlank(workerNumber)) {
|
|
|
- throw new RemoteServiceException(errPrefix + "师傅编号不能为空");
|
|
|
- }
|
|
|
+
|
|
|
UserWait userWait = new UserWait();
|
|
|
userWait.setUserType(userTypeEnum.getKey());
|
|
|
userWait.setMobile(mobile);
|
|
|
+ userWait.setIdcard(idcard);
|
|
|
|
|
|
- if(websitUserService.lambdaQuery().eq(WebsitUser::getWebsitId,adminWebsit.getWebsitId())
|
|
|
- .eq(WebsitUser::getWorkerNumber,workerNumber).count() > 0)
|
|
|
- throw new RemoteServiceException(workerNumber+"该师傅已有入驻信息");
|
|
|
+ List<User> userList = userService.lambdaQuery().eq(User::getIdCard, idcard).list();
|
|
|
+
|
|
|
+ if (!CollectionUtils.isEmpty(userList)) {
|
|
|
+
|
|
|
+ User user = userList.get(0);
|
|
|
+ if (websitUserService.lambdaQuery().eq(WebsitUser::getWebsitId, adminWebsit.getWebsitId())
|
|
|
+ .eq(WebsitUser::getUserId, user.getUserId()).count() > 0)
|
|
|
+ throw new RemoteServiceException(idcard + "该师傅已有入驻信息");
|
|
|
+ }
|
|
|
|
|
|
|
|
|
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.getWorkerNumber()+"必须导入工伤险");
|
|
|
+ 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.getEmCompany()+"必须导入雇主险");
|
|
|
+ throw new RemoteServiceException(userWait.getIdcard()+"必须导入雇主险");
|
|
|
}
|
|
|
|
|
|
|
|
|
if (!StringUtil.isEmpty(company)) {
|
|
|
userWait.setCompany(company);
|
|
|
- userWait.setPolicyStartTime(DateUtil.parse(policy_start_time, "yyyy/MM/dd"));
|
|
|
- userWait.setPolicyEndTime(DateUtil.offsetSecond(DateUtil.endOfDay(DateUtil.parse(policy_end_time, "yyyy/MM/dd")),-1));
|
|
|
+ userWait.setPolicyStartTime(DateUtil.parse(policy_start_time, "yyyy-MM-dd"));
|
|
|
+ userWait.setPolicyEndTime(DateUtil.offsetSecond(DateUtil.endOfDay(DateUtil.parse(policy_end_time, "yyyy-MM-dd")),-1));
|
|
|
|
|
|
if (userWait.getPolicyEndTime().before(new Date()))
|
|
|
- throw new RemoteServiceException(userWait.getWorkerNumber()+"导入师傅保险已过期");
|
|
|
+ throw new RemoteServiceException(userWait.getIdcard()+"导入师傅保险已过期");
|
|
|
|
|
|
userWait.setPolicyName(policy_name);
|
|
|
userWait.setPolicyOrder(policy_order);
|
|
@@ -310,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.getWorkerNumber()+"导入师傅保险已过期");
|
|
|
- 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.getWorkerNumber()+"导入师傅保险已过期");
|
|
|
- userWait.setInPolicyName(in_policy_name);
|
|
|
- userWait.setInPolicyOrder(in_policy_order);
|
|
|
- }
|
|
|
|
|
|
if (Objects.nonNull(adminWebsit)) {
|
|
|
userWait.setWebsitId(adminWebsit.getWebsitId());
|
|
@@ -347,8 +355,8 @@ public class UserLogic {
|
|
|
|
|
|
userWait.setName(name);
|
|
|
userWait.setIdcard(idcard);
|
|
|
- userWait.setIdCardStartTime(DateUtil.parse(idcardStartTime, "yyyy/MM/dd"));
|
|
|
- userWait.setIdCardEndTime(DateUtil.parse(idcardEndTime, "yyyy/MM/dd"));
|
|
|
+ userWait.setIdCardStartTime(DateUtil.parse(idcardStartTime, "yyyy-MM-dd"));
|
|
|
+ userWait.setIdCardEndTime(DateUtil.parse(idcardEndTime, "yyyy-MM-dd"));
|
|
|
userWait.setCompanyWechatId(adminUser.getCompanyWechatId());
|
|
|
userWait.setCompanyWechatName(adminUser.getCompanyName());
|
|
|
userWait.setBankAccount(brank);
|
|
@@ -356,9 +364,9 @@ public class UserLogic {
|
|
|
|
|
|
if (!StringUtil.isEmpty(hightNumber)) {
|
|
|
userWait.setNumber(hightNumber);
|
|
|
- userWait.setStartTime(DateUtil.parse(hightStartTime, "yyyy/MM/dd"));
|
|
|
- userWait.setEndTime(DateUtil.parse(hightEndTime, "yyyy/MM/dd"));
|
|
|
- userWait.setHightExamineTime(DateUtil.parse(hightExamineTime, "yyyy/MM/dd"));
|
|
|
+ userWait.setStartTime(DateUtil.parse(hightStartTime, "yyyy-MM-dd"));
|
|
|
+ userWait.setEndTime(DateUtil.parse(hightEndTime, "yyyy-MM-dd"));
|
|
|
+ userWait.setHightExamineTime(DateUtil.parse(hightExamineTime, "yyyy-MM-dd"));
|
|
|
}
|
|
|
|
|
|
|