From e35ffedea53ee8e629cbb2667ed9814c786380f5 Mon Sep 17 00:00:00 2001 From: 18792927508 <1322446236@qq.com> Date: Mon, 13 May 2024 13:57:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=A7=A3=E7=B3=BB=E7=BB=9F=E6=9C=BA?= =?UTF-8?q?=E6=9E=84=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 2 +- .../mscase/impl/MsSignSealServiceImpl.java | 136 +----------------- .../utils/FixSelectFlowDetailUtils.java | 2 +- 3 files changed, 7 insertions(+), 133 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 89ddc74..ace8348 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -190,7 +190,7 @@ imConfig: # 调解机构代码配置 organizeConfig: # creditCode - creditCode: 910000058386410047 + creditCode: 910000870060480009 # 引入仲裁系统url配置 arbitrateConfig: url: http://121.40.189.20:9001/callArbitrateCaseApplication/generateCaseApplication diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java index 5db4cfb..6097745 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java @@ -77,6 +77,7 @@ import java.util.concurrent.ExecutorService; import java.util.stream.Collectors; import static com.google.common.io.Files.getFileExtension; +import static com.ruoyi.common.core.domain.AjaxResult.error; import static com.ruoyi.common.core.domain.AjaxResult.success; @Slf4j @@ -671,7 +672,9 @@ public class MsSignSealServiceImpl implements MsSignSealService { Example msSealSignRecordExample = new Example(MsSealSignRecord.class); msSealSignRecordExample.createCriteria().andEqualTo("signFlowId", signFlowId); MsSealSignRecord sealSignRecordsel = sealSignRecordMapper.selectOneByExample(msSealSignRecordExample); - + if(sealSignRecordsel==null){ + return error("未找到签署流程"); + } String pensonAccountApply = sealSignRecordsel.getPensonAccount(); String orgnNamePsnAcc = sealSignRecordsel.getOrgnNamePsnAcc(); String pensonAccountRes = sealSignRecordsel.getPensonAccountRes(); @@ -874,71 +877,7 @@ public class MsSignSealServiceImpl implements MsSignSealService { //下载审核完成的调解书 msSignSealService.downloadMediationBook(caseApplicationselect, signFlowId, gson, caseAppliId); -// EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId); -// JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(), JsonObject.class); -// JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data"); -// JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray(); -// if (filesArray != null && filesArray.size() > 0) { -// JsonObject fileObject = (JsonObject) filesArray.get(0); -// String fileDownloadUrl = fileObject.get("downloadUrl").toString(); -// LocalDate now = LocalDate.now(); -// String year = Integer.toString(now.getYear()); -// String month = String.format("%02d", now.getMonthValue()); -// String day = String.format("%02d", now.getDayOfMonth()); -// String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day; -// String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf"; -// String saveName = fileName; -// String savePath = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName; -// -// // 创建日期目录 -// File saveFolder = new File(saveFolderPath); -// if (!saveFolder.exists()) { -// saveFolder.mkdirs(); -// } -// String resultFilePath = saveFolderPath + "/" + fileName; -// File resultFilePathFile = new File(resultFilePath); -// if (!resultFilePathFile.exists()) { -// resultFilePathFile.createNewFile(); -// } -// -// String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1); -// boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath); -// if (downLoadFile) { -// // 先删除已经存在的调解书 -// if(StrUtil.isEmpty(caseApplicationselect.getCaseSource())){ -// List existAttach = msCaseAttachMapper.listCaseAttachByCaseIdAndType(caseAppliId, AnnexTypeEnum.MEDIATE_BOOK.getCode()); -// if(CollectionUtil.isNotEmpty(existAttach)){ -// // 对接北明,同步案件状态,删除 -// for (MsCaseAttach msCaseAttach : existAttach) { -// if(StrUtil.isEmpty(msCaseAttach.getOtherSysFileId())||StrUtil.isEmpty(msCaseAttach.getAnnexPath())){ -// continue; -// } -// beiMingInterfaceService.deleteAttachmentInfo(caseApplicationselect.getCaseNum(), msCaseAttach.getOtherSysFileId(), FileUtil.getName(msCaseAttach.getAnnexPath())); -// } -// } -// } -// msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAppliId, AnnexTypeEnum.MEDIATE_BOOK.getCode()); -// MsCaseAttach caseAttach = new MsCaseAttach(); -// caseAttach.setCaseAppliId(caseAppliId); -// caseAttach.setAnnexType(AnnexTypeEnum.MEDIATE_BOOK.getCode()); -// caseAttach.setAnnexPath(savePath); -// caseAttach.setAnnexName(saveName); -// caseAttachMapper.save(caseAttach); -// // 对接北明,调用上传附件接口 -// if(StrUtil.isEmpty(caseApplicationselect.getCaseSource()) ) { -// String templatePath = "/home/ruoyi" + savePath; -// File file = new File(templatePath.replace("/profile", "/uploadPath")); -// MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplicationselect.getCaseNum(), AttachmentOperateTypeEnum.ADD,DocumentTypeEnum.EVEDENT_AGREEMENT); -// // 更新附件表 -// if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){ -// caseAttach.setOtherSysFileId(caseFileInfo.getFileId()); -// msCaseAttachMapper.updateCaseAttachBycaseid(caseAttach); -// } -// -// } -// } -// -// } + } } else if (StringUtils.isNotEmpty(accountMobile) && accountMobile.equals(pensonAccountRes)) { //被申请人签名 @@ -965,71 +904,6 @@ public class MsSignSealServiceImpl implements MsSignSealService { //下载审核完成的调解书 msSignSealService.downloadMediationBook(caseApplicationselect, signFlowId, gson, caseAppliId); -// EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId); -// JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(), JsonObject.class); -// JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data"); -// JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray(); -// if (filesArray != null && filesArray.size() > 0) { -// JsonObject fileObject = (JsonObject) filesArray.get(0); -// String fileDownloadUrl = fileObject.get("downloadUrl").toString(); -// LocalDate now = LocalDate.now(); -// String year = Integer.toString(now.getYear()); -// String month = String.format("%02d", now.getMonthValue()); -// String day = String.format("%02d", now.getDayOfMonth()); -// String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day; -// String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf"; -// String saveName = fileName; -// String savePath = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName; -// -// // 创建日期目录 -// File saveFolder = new File(saveFolderPath); -// if (!saveFolder.exists()) { -// saveFolder.mkdirs(); -// } -// String resultFilePath = saveFolderPath + "/" + fileName; -// File resultFilePathFile = new File(resultFilePath); -// if (!resultFilePathFile.exists()) { -// resultFilePathFile.createNewFile(); -// } -// -// String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1); -// boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath); -// if (downLoadFile) { -// // 先删除已经存在的调解书 -// if(StrUtil.isEmpty(caseApplicationselect.getCaseSource())){ -// List existAttach = msCaseAttachMapper.listCaseAttachByCaseIdAndType(caseAppliId, AnnexTypeEnum.MEDIATE_BOOK.getCode()); -// if(CollectionUtil.isNotEmpty(existAttach)){ -// // 对接北明,同步案件状态,删除 -// for (MsCaseAttach msCaseAttach : existAttach) { -// if(StrUtil.isEmpty(msCaseAttach.getOtherSysFileId())||StrUtil.isEmpty(msCaseAttach.getAnnexPath())){ -// continue; -// } -// beiMingInterfaceService.deleteAttachmentInfo(caseApplicationselect.getCaseNum(), msCaseAttach.getOtherSysFileId(), FileUtil.getName(msCaseAttach.getAnnexPath())); -// } -// } -// } -// msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAppliId, AnnexTypeEnum.MEDIATE_BOOK.getCode()); -// MsCaseAttach caseAttach = new MsCaseAttach(); -// caseAttach.setCaseAppliId(caseAppliId); -// caseAttach.setAnnexType(7); -// caseAttach.setAnnexPath(savePath); -// caseAttach.setAnnexName(saveName); -// -// // 对接北明,调用上传附件接口 -// -// if(StrUtil.isEmpty(caseApplicationselect.getCaseSource()) ) { -// String templatePath = "/home/ruoyi" + savePath; -// File file = new File(templatePath.replace("/profile", "/uploadPath")); -// MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplicationselect.getCaseNum(), AttachmentOperateTypeEnum.ADD,DocumentTypeEnum.EVEDENT_AGREEMENT); -// // 更新附件表 -// if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){ -// caseAttach.setOtherSysFileId(caseFileInfo.getFileId()); -// } -// } -// caseAttachMapper.save(caseAttach); -// } -// -// } } } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java index e4320e5..0a1dc64 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java @@ -163,7 +163,7 @@ public class FixSelectFlowDetailUtils { /** * 定时查询印章审核状态 */ - @Scheduled(cron = "0/30 * * * * ?") +// @Scheduled(cron = "0/30 * * * * ?") @Transactional public void searchForInstitutionalSeal() { try {