Commit 8d286edb by 翁国栋

8小时后台--

增员替换已投保bug
parent 015e360a
......@@ -890,6 +890,7 @@ public class InsureContorll {
QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(String.valueOf(System.currentTimeMillis())).pw(Md5.md5(pwd)).regTime(new Date()).orgId(company.getId()).username(u.getName()).sts(CommonEnum.U_STS_ON.getType()).build();
qyzxEmpLogin.insert();
u.setEmpNum(qyzxEmpLogin.getId());
u.insert();
});
}
allList = ygglMainEmpMapper.selectListByIZjNum(yg.stream().map(YgglMainEmp::getZjNum).toArray(String[]::new), company.getId());
......@@ -908,6 +909,7 @@ public class InsureContorll {
}
return ResultUtil.error("被保人"+name+"当月已投保");
}
return ResultUtil.data(allList, "导入成功");
} catch (IOException e) {
log.error("一键校验异常:", e);
......@@ -929,7 +931,7 @@ public class InsureContorll {
// if (message.size() > 0) {
// return ResultUtil.data(selectUserList, JSONObject.toJSONString(message) + "已投过保");
// }
return ResultUtil.data(allList, "导入成功");
return ResultUtil.error( "导入错误");
}
@PostMapping(value = "/importUserClient")
......@@ -1024,7 +1026,12 @@ public class InsureContorll {
List<String> idNumList = userList.stream().map(YgglMainEmp::getZjNum).collect(Collectors.toList());
List<YgglMainEmp> newList = yg.stream().filter(v -> !idNumList.contains(v.getZjNum())).collect(Collectors.toList());
if (newList.size() > 0) {
newList.forEach(u -> u.insert());
newList.forEach(u ->{
QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(String.valueOf(System.currentTimeMillis())).pw(Md5.md5(pwd)).regTime(new Date()).orgId(company.getId()).username(u.getName()).sts(CommonEnum.U_STS_ON.getType()).build();
qyzxEmpLogin.insert();
u.setEmpNum(qyzxEmpLogin.getId());
u.insert();
});
}
allList = ygglMainEmpMapper.selectListByIZjNum(yg.stream().map(YgglMainEmp::getZjNum).toArray(String[]::new), company.getId());
// selectUserList = allList.stream().filter(s -> s.getIsInsure() == 0).collect(Collectors.toList());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment