diff --git a/nursing-unit-common/src/main/java/com/nu/dto/EmployeesApplyMQDto.java b/nursing-unit-common/src/main/java/com/nu/dto/EmployeesApplyMQDto.java index 35011cc3..50e9d8d2 100644 --- a/nursing-unit-common/src/main/java/com/nu/dto/EmployeesApplyMQDto.java +++ b/nursing-unit-common/src/main/java/com/nu/dto/EmployeesApplyMQDto.java @@ -112,4 +112,5 @@ public class EmployeesApplyMQDto implements Serializable { * 现住址 */ private String currentAddress; + private String headPath; } diff --git a/nursing-unit-common/src/main/java/com/nu/dto/EmployeesStatusMQDto.java b/nursing-unit-common/src/main/java/com/nu/dto/EmployeesStatusMQDto.java index 1cbcb818..5ac60dac 100644 --- a/nursing-unit-common/src/main/java/com/nu/dto/EmployeesStatusMQDto.java +++ b/nursing-unit-common/src/main/java/com/nu/dto/EmployeesStatusMQDto.java @@ -95,6 +95,7 @@ public class EmployeesStatusMQDto implements Serializable { private String noCrimeCertificate; /**现住址*/ private String currentAddress; + private String headPath; /**有效开始日期*/ @JsonFormat(timezone = "GMT+8",pattern = "yyyy.MM.dd") @DateTimeFormat(pattern="yyyy.MM.dd") diff --git a/nursing-unit-common/src/main/java/com/nu/dto/SysUserMQDto.java b/nursing-unit-common/src/main/java/com/nu/dto/SysUserMQDto.java index fa4783dc..cbb93178 100644 --- a/nursing-unit-common/src/main/java/com/nu/dto/SysUserMQDto.java +++ b/nursing-unit-common/src/main/java/com/nu/dto/SysUserMQDto.java @@ -104,5 +104,6 @@ public class SysUserMQDto implements Serializable { * 是否需要初始化密码(0,否,1是) */ private String izInitPassword; + private String headPath; } diff --git a/nursing-unit-common/src/main/java/com/nu/entity/SysUserEntity.java b/nursing-unit-common/src/main/java/com/nu/entity/SysUserEntity.java index 98fc8ae5..2893409d 100644 --- a/nursing-unit-common/src/main/java/com/nu/entity/SysUserEntity.java +++ b/nursing-unit-common/src/main/java/com/nu/entity/SysUserEntity.java @@ -210,6 +210,7 @@ public class SysUserEntity implements Serializable { * 流程状态 */ private String bpmStatus; + private String headPath; /** * 是否已经绑定第三方 diff --git a/nursing-unit-employee/nu-employee-biz/src/main/java/com/nu/modules/employeesapply/controller/EmployeesApplyController.java b/nursing-unit-employee/nu-employee-biz/src/main/java/com/nu/modules/employeesapply/controller/EmployeesApplyController.java index 889873c7..eea599ce 100644 --- a/nursing-unit-employee/nu-employee-biz/src/main/java/com/nu/modules/employeesapply/controller/EmployeesApplyController.java +++ b/nursing-unit-employee/nu-employee-biz/src/main/java/com/nu/modules/employeesapply/controller/EmployeesApplyController.java @@ -187,6 +187,7 @@ public class EmployeesApplyController extends JeecgController list = Arrays.asList(qualification.split(",")); -// for (int i = 0; i < list.size(); i++) { -// String qua = list.get(i); -// if (StringUtils.isNotBlank(qua)) { -// String url = baseUrl + "/sys/common/open/static/" + URLEncoder.encode(qua, StandardCharsets.UTF_8).replace("%2F", "/") + "?name=" + SafetyUtil.getSecureKey(); -// if (upLoadPath.endsWith("/") || upLoadPath.endsWith("\\")) { -// upLoadPath = upLoadPath.substring(0, upLoadPath.length() - 1); -// } -// String filePath = qua.substring(0, qua.lastIndexOf("/")); -// String fileName = qua.substring(qua.lastIndexOf("/") + 1); -// if (filePath.startsWith("/") || filePath.startsWith("\\")) { -// filePath = filePath.substring(1); -// } -// try { -// FileDownloader.downloadFile(url, upLoadPath + File.separator + filePath, fileName); -// } catch (Exception e) { -// e.printStackTrace(); -// MediaAsyncErrorLog mediaAsyncErrorLog = new MediaAsyncErrorLog(); -// mediaAsyncErrorLog.setMediaid(qualification); -// mediaAsyncErrorLogService.save(mediaAsyncErrorLog); -// throw new RuntimeException("员工申请加入机构-资质证文件拉取错误,员工id" + dto.getEmployeeId() + ";文件:" + qua); -// } -// } -// } -// mediaData.setQualification(qualification); -// } -// } -// //无犯罪证明 -// { -// if (StringUtils.isNotBlank(noCrimeCertificate)) { -// if (StringUtils.isNotBlank(noCrimeCertificate)) { -// String url = baseUrl + "/sys/common/open/static/" + URLEncoder.encode(noCrimeCertificate, StandardCharsets.UTF_8).replace("%2F", "/") + "?name=" + SafetyUtil.getSecureKey(); -// if (upLoadPath.endsWith("/") || upLoadPath.endsWith("\\")) { -// upLoadPath = upLoadPath.substring(0, upLoadPath.length() - 1); -// } -// String filePath = noCrimeCertificate.substring(0, noCrimeCertificate.lastIndexOf("/")); -// String fileName = noCrimeCertificate.substring(noCrimeCertificate.lastIndexOf("/") + 1); -// if (filePath.startsWith("/") || filePath.startsWith("\\")) { -// filePath = filePath.substring(1); -// } -// try { -// FileDownloader.downloadFile(url, upLoadPath + File.separator + filePath, fileName); -// mediaData.setNoCrimeCertificate(noCrimeCertificate); -// } catch (Exception e) { -// e.printStackTrace(); -// MediaAsyncErrorLog mediaAsyncErrorLog = new MediaAsyncErrorLog(); -// mediaAsyncErrorLog.setMediaid(noCrimeCertificate); -// mediaAsyncErrorLogService.save(mediaAsyncErrorLog); -// throw new RuntimeException("员工申请加入机构-无犯罪证明文件拉取错误,员工id" + dto.getEmployeeId()); -// } -// } -// } -// } -// employeesApplyService.updateById(mediaData); -// } } @@ -370,251 +127,8 @@ public class EmployeesMQListener { employeesApply.setApplyType(dto.getApplyType()); employeesApply.setModifyStatus(dto.getModifyStatus()); - //资源文件拉完图片统一存储,不然页面有路径没资源可显示 - String idCardPositive = employeesApply.getIdCardPositive(); - String idCardNegative = employeesApply.getIdCardNegative(); - String healthCertificatePositive = employeesApply.getHealthCertificatePositive(); - String healthCertificateNegative = employeesApply.getHealthCertificateNegative(); - String bankPositive = employeesApply.getBankPositive(); - String bankNegative = employeesApply.getBankNegative(); - String qualification = employeesApply.getQualification(); - String noCrimeCertificate = employeesApply.getNoCrimeCertificate(); - { -// employeesApply.setIdCardPositive(null);//身份证正面 -// employeesApply.setIdCardNegative(null);//身份证反面 -// employeesApply.setHealthCertificatePositive(null);//健康证正面 -// employeesApply.setHealthCertificateNegative(null);//健康证反面 -// employeesApply.setBankPositive(null);//银行卡正面 -// employeesApply.setBankNegative(null);//银行卡反面 -// employeesApply.setQualification(null);//资质证 -// employeesApply.setNoCrimeCertificate(null);//无犯罪证明 - } employeesApplyService.save(employeesApply); - //去管理平台拉取资源 -// { -// EmployeesApply mediaData = new EmployeesApply(); -// mediaData.setId(employeesApply.getId()); -// -// JSONObject opeOpenUrl = sysConfigApi.getByKeyByDS("master", "ope_open_url"); -// String baseUrl = opeOpenUrl.getString("configValue"); -// if (baseUrl.endsWith("/")) { -// baseUrl = baseUrl.substring(0, baseUrl.length() - 1); -// } -// //身份证正面 -// { -// if (StringUtils.isNotBlank(idCardPositive)) { -// if (StringUtils.isNotBlank(idCardPositive)) { -// String url = baseUrl + "/sys/common/open/static/" + URLEncoder.encode(idCardPositive, StandardCharsets.UTF_8).replace("%2F", "/") + "?name=" + SafetyUtil.getSecureKey(); -// if (upLoadPath.endsWith("/") || upLoadPath.endsWith("\\")) { -// upLoadPath = upLoadPath.substring(0, upLoadPath.length() - 1); -// } -// String filePath = idCardPositive.substring(0, idCardPositive.lastIndexOf("/")); -// String fileName = idCardPositive.substring(idCardPositive.lastIndexOf("/") + 1); -// if (filePath.startsWith("/") || filePath.startsWith("\\")) { -// filePath = filePath.substring(1); -// } -// try { -// FileDownloader.downloadFile(url, upLoadPath + File.separator + filePath, fileName); -// mediaData.setIdCardPositive(idCardPositive); -// } catch (Exception e) { -// e.printStackTrace(); -// MediaAsyncErrorLog mediaAsyncErrorLog = new MediaAsyncErrorLog(); -// mediaAsyncErrorLog.setMediaid(idCardPositive); -// mediaAsyncErrorLogService.save(mediaAsyncErrorLog); -// throw new RuntimeException("员工申请加入机构-身份证正面文件拉取错误,员工id" + dto.getEmployeeId()); -// } -// } -// } -// } -// //身份证反面 -// { -// if (StringUtils.isNotBlank(idCardNegative)) { -// if (StringUtils.isNotBlank(idCardNegative)) { -// String url = baseUrl + "/sys/common/open/static/" + URLEncoder.encode(idCardNegative, StandardCharsets.UTF_8).replace("%2F", "/") + "?name=" + SafetyUtil.getSecureKey(); -// if (upLoadPath.endsWith("/") || upLoadPath.endsWith("\\")) { -// upLoadPath = upLoadPath.substring(0, upLoadPath.length() - 1); -// } -// String filePath = idCardNegative.substring(0, idCardNegative.lastIndexOf("/")); -// String fileName = idCardNegative.substring(idCardNegative.lastIndexOf("/") + 1); -// if (filePath.startsWith("/") || filePath.startsWith("\\")) { -// filePath = filePath.substring(1); -// } -// try { -// FileDownloader.downloadFile(url, upLoadPath + File.separator + filePath, fileName); -// mediaData.setIdCardNegative(idCardNegative); -// } catch (Exception e) { -// e.printStackTrace(); -// MediaAsyncErrorLog mediaAsyncErrorLog = new MediaAsyncErrorLog(); -// mediaAsyncErrorLog.setMediaid(idCardNegative); -// mediaAsyncErrorLogService.save(mediaAsyncErrorLog); -// throw new RuntimeException("员工申请加入机构-身份证反面文件拉取错误,员工id" + dto.getEmployeeId()); -// } -// } -// } -// } -// //健康证正面 -// { -// if (StringUtils.isNotBlank(healthCertificatePositive)) { -// if (StringUtils.isNotBlank(healthCertificatePositive)) { -// String url = baseUrl + "/sys/common/open/static/" + URLEncoder.encode(healthCertificatePositive, StandardCharsets.UTF_8).replace("%2F", "/") + "?name=" + SafetyUtil.getSecureKey(); -// if (upLoadPath.endsWith("/") || upLoadPath.endsWith("\\")) { -// upLoadPath = upLoadPath.substring(0, upLoadPath.length() - 1); -// } -// String filePath = healthCertificatePositive.substring(0, healthCertificatePositive.lastIndexOf("/")); -// String fileName = healthCertificatePositive.substring(healthCertificatePositive.lastIndexOf("/") + 1); -// if (filePath.startsWith("/") || filePath.startsWith("\\")) { -// filePath = filePath.substring(1); -// } -// try { -// FileDownloader.downloadFile(url, upLoadPath + File.separator + filePath, fileName); -// mediaData.setHealthCertificatePositive(healthCertificatePositive); -// } catch (Exception e) { -// e.printStackTrace(); -// MediaAsyncErrorLog mediaAsyncErrorLog = new MediaAsyncErrorLog(); -// mediaAsyncErrorLog.setMediaid(healthCertificatePositive); -// mediaAsyncErrorLogService.save(mediaAsyncErrorLog); -// throw new RuntimeException("员工申请加入机构-健康证正面文件拉取错误,员工id" + dto.getEmployeeId()); -// } -// } -// } -// } -// //健康证反面 -// { -// if (StringUtils.isNotBlank(healthCertificateNegative)) { -// if (StringUtils.isNotBlank(healthCertificateNegative)) { -// String url = baseUrl + "/sys/common/open/static/" + URLEncoder.encode(healthCertificateNegative, StandardCharsets.UTF_8).replace("%2F", "/") + "?name=" + SafetyUtil.getSecureKey(); -// if (upLoadPath.endsWith("/") || upLoadPath.endsWith("\\")) { -// upLoadPath = upLoadPath.substring(0, upLoadPath.length() - 1); -// } -// String filePath = healthCertificateNegative.substring(0, healthCertificateNegative.lastIndexOf("/")); -// String fileName = healthCertificateNegative.substring(healthCertificateNegative.lastIndexOf("/") + 1); -// if (filePath.startsWith("/") || filePath.startsWith("\\")) { -// filePath = filePath.substring(1); -// } -// try { -// FileDownloader.downloadFile(url, upLoadPath + File.separator + filePath, fileName); -// mediaData.setHealthCertificateNegative(healthCertificateNegative); -// } catch (Exception e) { -// e.printStackTrace(); -// MediaAsyncErrorLog mediaAsyncErrorLog = new MediaAsyncErrorLog(); -// mediaAsyncErrorLog.setMediaid(healthCertificateNegative); -// mediaAsyncErrorLogService.save(mediaAsyncErrorLog); -// throw new RuntimeException("员工申请加入机构-健康证反面文件拉取错误,员工id" + dto.getEmployeeId()); -// } -// } -// } -// } -// //银行卡正面 -// { -// if (StringUtils.isNotBlank(bankPositive)) { -// if (StringUtils.isNotBlank(bankPositive)) { -// String url = baseUrl + "/sys/common/open/static/" + URLEncoder.encode(bankPositive, StandardCharsets.UTF_8).replace("%2F", "/") + "?name=" + SafetyUtil.getSecureKey(); -// if (upLoadPath.endsWith("/") || upLoadPath.endsWith("\\")) { -// upLoadPath = upLoadPath.substring(0, upLoadPath.length() - 1); -// } -// String filePath = bankPositive.substring(0, bankPositive.lastIndexOf("/")); -// String fileName = bankPositive.substring(bankPositive.lastIndexOf("/") + 1); -// if (filePath.startsWith("/") || filePath.startsWith("\\")) { -// filePath = filePath.substring(1); -// } -// try { -// FileDownloader.downloadFile(url, upLoadPath + File.separator + filePath, fileName); -// mediaData.setBankPositive(bankPositive); -// } catch (Exception e) { -// e.printStackTrace(); -// MediaAsyncErrorLog mediaAsyncErrorLog = new MediaAsyncErrorLog(); -// mediaAsyncErrorLog.setMediaid(bankPositive); -// mediaAsyncErrorLogService.save(mediaAsyncErrorLog); -// throw new RuntimeException("员工申请加入机构-银行卡正面文件拉取错误,员工id" + dto.getEmployeeId()); -// } -// } -// } -// } -// //银行卡反面 -// { -// if (StringUtils.isNotBlank(bankNegative)) { -// if (StringUtils.isNotBlank(bankNegative)) { -// String url = baseUrl + "/sys/common/open/static/" + URLEncoder.encode(bankNegative, StandardCharsets.UTF_8).replace("%2F", "/") + "?name=" + SafetyUtil.getSecureKey(); -// if (upLoadPath.endsWith("/") || upLoadPath.endsWith("\\")) { -// upLoadPath = upLoadPath.substring(0, upLoadPath.length() - 1); -// } -// String filePath = bankNegative.substring(0, bankNegative.lastIndexOf("/")); -// String fileName = bankNegative.substring(bankNegative.lastIndexOf("/") + 1); -// if (filePath.startsWith("/") || filePath.startsWith("\\")) { -// filePath = filePath.substring(1); -// } -// try { -// FileDownloader.downloadFile(url, upLoadPath + File.separator + filePath, fileName); -// mediaData.setBankNegative(bankNegative); -// } catch (Exception e) { -// e.printStackTrace(); -// MediaAsyncErrorLog mediaAsyncErrorLog = new MediaAsyncErrorLog(); -// mediaAsyncErrorLog.setMediaid(bankNegative); -// mediaAsyncErrorLogService.save(mediaAsyncErrorLog); -// throw new RuntimeException("员工申请加入机构-银行卡反面文件拉取错误,员工id" + dto.getEmployeeId()); -// } -// } -// } -// } -// //资质证(多张使用逗号分隔) -// { -// if (StringUtils.isNotBlank(qualification)) { -// List list = Arrays.asList(qualification.split(",")); -// for (int i = 0; i < list.size(); i++) { -// String qua = list.get(i); -// if (StringUtils.isNotBlank(qua)) { -// String url = baseUrl + "/sys/common/open/static/" + URLEncoder.encode(qua, StandardCharsets.UTF_8).replace("%2F", "/") + "?name=" + SafetyUtil.getSecureKey(); -// if (upLoadPath.endsWith("/") || upLoadPath.endsWith("\\")) { -// upLoadPath = upLoadPath.substring(0, upLoadPath.length() - 1); -// } -// String filePath = qua.substring(0, qua.lastIndexOf("/")); -// String fileName = qua.substring(qua.lastIndexOf("/") + 1); -// if (filePath.startsWith("/") || filePath.startsWith("\\")) { -// filePath = filePath.substring(1); -// } -// try { -// FileDownloader.downloadFile(url, upLoadPath + File.separator + filePath, fileName); -// } catch (Exception e) { -// e.printStackTrace(); -// MediaAsyncErrorLog mediaAsyncErrorLog = new MediaAsyncErrorLog(); -// mediaAsyncErrorLog.setMediaid(qualification); -// mediaAsyncErrorLogService.save(mediaAsyncErrorLog); -// throw new RuntimeException("员工申请加入机构-资质证文件拉取错误,员工id" + dto.getEmployeeId() + ";文件:" + qua); -// } -// } -// } -// mediaData.setQualification(qualification); -// } -// } -// //无犯罪证明 -// { -// if (StringUtils.isNotBlank(noCrimeCertificate)) { -// if (StringUtils.isNotBlank(noCrimeCertificate)) { -// String url = baseUrl + "/sys/common/open/static/" + URLEncoder.encode(noCrimeCertificate, StandardCharsets.UTF_8).replace("%2F", "/") + "?name=" + SafetyUtil.getSecureKey(); -// if (upLoadPath.endsWith("/") || upLoadPath.endsWith("\\")) { -// upLoadPath = upLoadPath.substring(0, upLoadPath.length() - 1); -// } -// String filePath = noCrimeCertificate.substring(0, noCrimeCertificate.lastIndexOf("/")); -// String fileName = noCrimeCertificate.substring(noCrimeCertificate.lastIndexOf("/") + 1); -// if (filePath.startsWith("/") || filePath.startsWith("\\")) { -// filePath = filePath.substring(1); -// } -// try { -// FileDownloader.downloadFile(url, upLoadPath + File.separator + filePath, fileName); -// mediaData.setNoCrimeCertificate(noCrimeCertificate); -// } catch (Exception e) { -// e.printStackTrace(); -// MediaAsyncErrorLog mediaAsyncErrorLog = new MediaAsyncErrorLog(); -// mediaAsyncErrorLog.setMediaid(noCrimeCertificate); -// mediaAsyncErrorLogService.save(mediaAsyncErrorLog); -// throw new RuntimeException("员工申请加入机构-无犯罪证明文件拉取错误,员工id" + dto.getEmployeeId()); -// } -// } -// } -// } -// employeesApplyService.updateById(mediaData); -// } } /** @@ -1394,6 +908,7 @@ public class EmployeesMQListener { String izInit = dto.getIzInit(); String izInitPassword = dto.getIzInitPassword(); String employeeId = dto.getEmployeeId(); + String headPath = dto.getHeadPath(); //需要初始化 if (izInit.equals("Y")) { @@ -1439,6 +954,7 @@ public class EmployeesMQListener { j.put("opeType", "employee"); j.put("o_c_", deptInfo.getString("code")); j.put("employees_id", employeeId); + j.put("head_path", headPath); employeesApplyService.initialization(j); } else { user.setUsername(employeesInfo.getTel()); @@ -1566,6 +1082,7 @@ public class EmployeesMQListener { BeanUtils.copyProperties(user, sysUserMQDto); sysUserMQDto.setTargetOrgCode(dto.getTargetOrgCode()); sysUserMQDto.setEmployeeId(user.getEmployeesId()); + sysUserMQDto.setHeadPath(user.getAvatar()); rabbitMQUtil.sendToExchange("hldy.employees", "hldy.employeesorg.sysuser.info", sysUserMQDto); } } diff --git a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/entity/SysUser.java b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/entity/SysUser.java index f9055b44..b65411e0 100644 --- a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/entity/SysUser.java +++ b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/entity/SysUser.java @@ -220,4 +220,6 @@ public class SysUser implements Serializable { */ @TableField(exist = false) private boolean izBindThird; + @TableField(exist = false) + private boolean headPath; } diff --git a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserApiImpl.java b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserApiImpl.java index b14a9f21..480b1b51 100644 --- a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserApiImpl.java +++ b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserApiImpl.java @@ -164,6 +164,7 @@ public class SysUserApiImpl implements ISysUserAPI { user.setPassword(passwordEncode); user.setStatus(1); user.setDelFlag(CommonConstant.DEL_FLAG_0); + user.setAvatar(user.getHomePath()); //用户表字段org_code不能在这里设置他的值 // user.setOrgCode(null); // 保存用户走一个service 保证事务