|
@@ -556,6 +556,59 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
|
|
socialSecurityCardMapper.insert(securityCard);
|
|
socialSecurityCardMapper.insert(securityCard);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 修改用户信息
|
|
|
|
+ */
|
|
|
|
+ EnrollmentRegistration registration = mapper.getById(reportData.getId());
|
|
|
|
+ if (StringUtils.isNotBlank(registration.getUserId())){
|
|
|
|
+ UserDTO dto = SpringUtil.getBean(IUserApi.class).getById(registration.getUserId());
|
|
|
|
+ if (dto != null){
|
|
|
|
+ //往用户表中新增一条数据
|
|
|
|
+ UserDTO dto1 = new UserDTO();
|
|
|
|
+ dto1.setId(dto.getId());
|
|
|
|
+ dto1.setName(report.getName());
|
|
|
|
+ dto1.setLoginName(report.getName());
|
|
|
|
+ dto1.setMobile(report.getMobilePhone());
|
|
|
|
+ dto1.setNo(report.getMobilePhone());
|
|
|
|
+ dto1.setPhoto("");
|
|
|
|
+ //根据实习部门获取部门信息
|
|
|
|
+ OfficeDTO officeDTO = SpringUtil.getBean(IOfficeApi.class).getOfficeById(registration.getDepartment());
|
|
|
|
+ dto1.setOfficeDTO(officeDTO);
|
|
|
|
+ OfficeDTO officeDTO1 = new OfficeDTO();
|
|
|
|
+ officeDTO1.setId(officeDTO.getParent().getId());
|
|
|
|
+ dto1.setCompanyDTO(officeDTO1);
|
|
|
|
+ List <RoleDTO> roleIdList = new ArrayList<>();
|
|
|
|
+
|
|
|
|
+ if (null != officeDTO) {
|
|
|
|
+ Map<String,String> keyMap = new HashMap<>();
|
|
|
|
+ TenantDTO tenantDTO = new TenantDTO();
|
|
|
|
+ tenantDTO.setId(officeDTO.getTenantId());
|
|
|
|
+ dto1.setTenantDTO(tenantDTO);
|
|
|
|
+ if (officeDTO.getTenantId().equals("10003")){
|
|
|
|
+ keyMap.put("name", "兴光会计员工,共有权限(会计)");
|
|
|
|
+ keyMap.put("tenantId", officeDTO.getTenantId());
|
|
|
|
+ roleIdList = SpringUtil.getBean(IRoleApi.class).getRoleDTOByNameAndTenantId(keyMap);
|
|
|
|
+ }else if (officeDTO.getTenantId().equals("10004")) {
|
|
|
|
+ keyMap.put("name", "中审员工,共有权限(中审)");
|
|
|
|
+ keyMap.put("tenantId", officeDTO.getTenantId());
|
|
|
|
+ roleIdList = SpringUtil.getBean(IRoleApi.class).getRoleDTOByNameAndTenantId(keyMap);
|
|
|
|
+ }else if (officeDTO.getTenantId().equals("10001")) {
|
|
|
|
+ keyMap.put("name", "评估员工,共有权限(评估)");
|
|
|
|
+ keyMap.put("tenantId", officeDTO.getTenantId());
|
|
|
|
+ roleIdList = SpringUtil.getBean(IRoleApi.class).getRoleDTOByNameAndTenantId(keyMap);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ TenantDTO tenantDTO = new TenantDTO();
|
|
|
|
+ tenantDTO.setId("10002");
|
|
|
|
+ dto1.setTenantDTO(tenantDTO);
|
|
|
|
+ }
|
|
|
|
+ dto1.setRoleDTOList(roleIdList);
|
|
|
|
+ SpringUtil.getBean ( IUserApi.class ).saveOrUpdate(dto1);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
public void insertIntoEnrollmentRegistrationInfo(String value) {
|
|
public void insertIntoEnrollmentRegistrationInfo(String value) {
|