|
|
|
|
@ -88,251 +88,8 @@ public class EmployeesMQListener {
|
|
|
|
|
employeesApply.setIzHistory("N");
|
|
|
|
|
employeesApply.setApplyType("1");
|
|
|
|
|
|
|
|
|
|
//资源文件拉完图片统一存储,不然页面有路径没资源可显示
|
|
|
|
|
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<String> 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<String> 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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|