|
|
@@ -59,6 +59,7 @@ import com.ruoyi.wisdomarbitrate.service.shortmessage.ShortMessageService;
|
|
59
|
59
|
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
|
60
|
60
|
import com.ruoyi.wisdomarbitrate.utils.SignAward;
|
|
61
|
61
|
import com.ruoyi.wisdomarbitrate.utils.SmsUtils;
|
|
|
62
|
+import lombok.extern.slf4j.Slf4j;
|
|
62
|
63
|
import org.springframework.beans.BeanUtils;
|
|
63
|
64
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
64
|
65
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
@@ -76,7 +77,7 @@ import java.util.concurrent.ExecutorService;
|
|
76
|
77
|
import java.util.stream.Collectors;
|
|
77
|
78
|
|
|
78
|
79
|
import static com.ruoyi.common.core.domain.AjaxResult.success;
|
|
79
|
|
-
|
|
|
80
|
+@Slf4j
|
|
80
|
81
|
@Service
|
|
81
|
82
|
public class MsSignSealServiceImpl implements MsSignSealService {
|
|
82
|
83
|
|
|
|
@@ -706,6 +707,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
|
706
|
707
|
JSONObject jsonObjectCallback = JSONObject.parseObject(reqbodystr);
|
|
707
|
708
|
Gson gson = new Gson();
|
|
708
|
709
|
if (jsonObjectCallback != null) {
|
|
|
710
|
+ log.info("签名回调======"+jsonObjectCallback);
|
|
709
|
711
|
int signResult = jsonObjectCallback.getIntValue("signResult");
|
|
710
|
712
|
String action = jsonObjectCallback.getString("action");
|
|
711
|
713
|
String signFlowId = jsonObjectCallback.getString("signFlowId");
|
|
|
@@ -857,11 +859,15 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
|
857
|
859
|
//修改"签署用印记录表"的状态为待用印
|
|
858
|
860
|
if(caseApplicationselect.getSealFlag()!=null&&caseApplicationselect.getSealFlag()==1) {
|
|
859
|
861
|
sealSignRecordsel.setSignFlowStatus(2);
|
|
|
862
|
+ sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
|
860
|
863
|
}else {
|
|
861
|
864
|
// 否则为已完成
|
|
862
|
865
|
sealSignRecordsel.setSignFlowStatus(3);
|
|
|
866
|
+ sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
|
|
867
|
+ // 下载调解书
|
|
|
868
|
+ downloadMediationBook(caseApplicationselect,signFlowId,gson,caseAppliId);
|
|
863
|
869
|
}
|
|
864
|
|
- sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
|
|
870
|
+
|
|
865
|
871
|
}
|
|
866
|
872
|
}else if(StringUtils.isNotEmpty(accountMobile)&&accountMobile.equals(orgnNamePsnAcc) && caseApplicationselect.getSealFlag()!=null && caseApplicationselect.getSealFlag()==1 ){
|
|
867
|
873
|
//需要用印
|
|
|
@@ -915,71 +921,72 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
|
915
|
921
|
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
|
916
|
922
|
|
|
917
|
923
|
//下载审核完成的调解书
|
|
918
|
|
- EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
|
|
919
|
|
- JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(), JsonObject.class);
|
|
920
|
|
- JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
|
|
921
|
|
- JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
|
|
922
|
|
- if (filesArray != null && filesArray.size() > 0) {
|
|
923
|
|
- JsonObject fileObject = (JsonObject) filesArray.get(0);
|
|
924
|
|
- String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
|
925
|
|
- LocalDate now = LocalDate.now();
|
|
926
|
|
- String year = Integer.toString(now.getYear());
|
|
927
|
|
- String month = String.format("%02d", now.getMonthValue());
|
|
928
|
|
- String day = String.format("%02d", now.getDayOfMonth());
|
|
929
|
|
- String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
|
930
|
|
- String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
|
|
931
|
|
- String saveName = fileName;
|
|
932
|
|
- String savePath = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
|
933
|
|
-
|
|
934
|
|
- // 创建日期目录
|
|
935
|
|
- File saveFolder = new File(saveFolderPath);
|
|
936
|
|
- if (!saveFolder.exists()) {
|
|
937
|
|
- saveFolder.mkdirs();
|
|
938
|
|
- }
|
|
939
|
|
- String resultFilePath = saveFolderPath + "/" + fileName;
|
|
940
|
|
- File resultFilePathFile = new File(resultFilePath);
|
|
941
|
|
- if (!resultFilePathFile.exists()) {
|
|
942
|
|
- resultFilePathFile.createNewFile();
|
|
943
|
|
- }
|
|
944
|
|
-
|
|
945
|
|
- String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
|
|
946
|
|
- boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
|
|
947
|
|
- if (downLoadFile) {
|
|
948
|
|
- // 先删除已经存在的调解书
|
|
949
|
|
- if(StrUtil.isEmpty(caseApplicationselect.getCaseSource())){
|
|
950
|
|
- List<MsCaseAttach> existAttach = msCaseAttachMapper.listCaseAttachByCaseIdAndType(caseAppliId, AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
|
951
|
|
- if(CollectionUtil.isNotEmpty(existAttach)){
|
|
952
|
|
- // 对接北明,同步案件状态,删除
|
|
953
|
|
- for (MsCaseAttach msCaseAttach : existAttach) {
|
|
954
|
|
- if(StrUtil.isEmpty(msCaseAttach.getOtherSysFileId())||StrUtil.isEmpty(msCaseAttach.getAnnexPath())){
|
|
955
|
|
- continue;
|
|
956
|
|
- }
|
|
957
|
|
- beiMingInterfaceService.deleteAttachmentInfo(caseApplicationselect.getCaseNum(), msCaseAttach.getOtherSysFileId(), FileUtil.getName(msCaseAttach.getAnnexPath()));
|
|
958
|
|
- }
|
|
959
|
|
- }
|
|
960
|
|
- }
|
|
961
|
|
- msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAppliId, AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
|
962
|
|
- MsCaseAttach caseAttach = new MsCaseAttach();
|
|
963
|
|
- caseAttach.setCaseAppliId(caseAppliId);
|
|
964
|
|
- caseAttach.setAnnexType(AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
|
965
|
|
- caseAttach.setAnnexPath(savePath);
|
|
966
|
|
- caseAttach.setAnnexName(saveName);
|
|
967
|
|
- caseAttachMapper.save(caseAttach);
|
|
968
|
|
- // 对接北明,调用上传附件接口
|
|
969
|
|
- if(StrUtil.isEmpty(caseApplicationselect.getCaseSource()) ) {
|
|
970
|
|
- String templatePath = "/home/ruoyi" + savePath;
|
|
971
|
|
- File file = new File(templatePath.replace("/profile", "/uploadPath"));
|
|
972
|
|
- MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplicationselect.getCaseNum(), AttachmentOperateTypeEnum.ADD,DocumentTypeEnum.EVEDENT_AGREEMENT);
|
|
973
|
|
- // 更新附件表
|
|
974
|
|
- if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
|
|
975
|
|
- caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
|
|
976
|
|
- msCaseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
|
977
|
|
- }
|
|
978
|
|
-
|
|
979
|
|
- }
|
|
980
|
|
- }
|
|
981
|
|
-
|
|
982
|
|
- }
|
|
|
924
|
+ downloadMediationBook(caseApplicationselect,signFlowId,gson,caseAppliId);
|
|
|
925
|
+// EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
|
|
|
926
|
+// JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(), JsonObject.class);
|
|
|
927
|
+// JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
|
|
|
928
|
+// JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
|
|
|
929
|
+// if (filesArray != null && filesArray.size() > 0) {
|
|
|
930
|
+// JsonObject fileObject = (JsonObject) filesArray.get(0);
|
|
|
931
|
+// String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
|
|
932
|
+// LocalDate now = LocalDate.now();
|
|
|
933
|
+// String year = Integer.toString(now.getYear());
|
|
|
934
|
+// String month = String.format("%02d", now.getMonthValue());
|
|
|
935
|
+// String day = String.format("%02d", now.getDayOfMonth());
|
|
|
936
|
+// String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
|
|
937
|
+// String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
|
|
|
938
|
+// String saveName = fileName;
|
|
|
939
|
+// String savePath = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
|
|
940
|
+//
|
|
|
941
|
+// // 创建日期目录
|
|
|
942
|
+// File saveFolder = new File(saveFolderPath);
|
|
|
943
|
+// if (!saveFolder.exists()) {
|
|
|
944
|
+// saveFolder.mkdirs();
|
|
|
945
|
+// }
|
|
|
946
|
+// String resultFilePath = saveFolderPath + "/" + fileName;
|
|
|
947
|
+// File resultFilePathFile = new File(resultFilePath);
|
|
|
948
|
+// if (!resultFilePathFile.exists()) {
|
|
|
949
|
+// resultFilePathFile.createNewFile();
|
|
|
950
|
+// }
|
|
|
951
|
+//
|
|
|
952
|
+// String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
|
|
|
953
|
+// boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
|
|
|
954
|
+// if (downLoadFile) {
|
|
|
955
|
+// // 先删除已经存在的调解书
|
|
|
956
|
+// if(StrUtil.isEmpty(caseApplicationselect.getCaseSource())){
|
|
|
957
|
+// List<MsCaseAttach> existAttach = msCaseAttachMapper.listCaseAttachByCaseIdAndType(caseAppliId, AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
|
|
958
|
+// if(CollectionUtil.isNotEmpty(existAttach)){
|
|
|
959
|
+// // 对接北明,同步案件状态,删除
|
|
|
960
|
+// for (MsCaseAttach msCaseAttach : existAttach) {
|
|
|
961
|
+// if(StrUtil.isEmpty(msCaseAttach.getOtherSysFileId())||StrUtil.isEmpty(msCaseAttach.getAnnexPath())){
|
|
|
962
|
+// continue;
|
|
|
963
|
+// }
|
|
|
964
|
+// beiMingInterfaceService.deleteAttachmentInfo(caseApplicationselect.getCaseNum(), msCaseAttach.getOtherSysFileId(), FileUtil.getName(msCaseAttach.getAnnexPath()));
|
|
|
965
|
+// }
|
|
|
966
|
+// }
|
|
|
967
|
+// }
|
|
|
968
|
+// msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAppliId, AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
|
|
969
|
+// MsCaseAttach caseAttach = new MsCaseAttach();
|
|
|
970
|
+// caseAttach.setCaseAppliId(caseAppliId);
|
|
|
971
|
+// caseAttach.setAnnexType(AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
|
|
972
|
+// caseAttach.setAnnexPath(savePath);
|
|
|
973
|
+// caseAttach.setAnnexName(saveName);
|
|
|
974
|
+// caseAttachMapper.save(caseAttach);
|
|
|
975
|
+// // 对接北明,调用上传附件接口
|
|
|
976
|
+// if(StrUtil.isEmpty(caseApplicationselect.getCaseSource()) ) {
|
|
|
977
|
+// String templatePath = "/home/ruoyi" + savePath;
|
|
|
978
|
+// File file = new File(templatePath.replace("/profile", "/uploadPath"));
|
|
|
979
|
+// MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplicationselect.getCaseNum(), AttachmentOperateTypeEnum.ADD,DocumentTypeEnum.EVEDENT_AGREEMENT);
|
|
|
980
|
+// // 更新附件表
|
|
|
981
|
+// if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
|
|
|
982
|
+// caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
|
|
|
983
|
+// msCaseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
|
|
984
|
+// }
|
|
|
985
|
+//
|
|
|
986
|
+// }
|
|
|
987
|
+// }
|
|
|
988
|
+//
|
|
|
989
|
+// }
|
|
983
|
990
|
}
|
|
984
|
991
|
}else if(StringUtils.isNotEmpty(accountMobile)&&accountMobile.equals(pensonAccountRes)){
|
|
985
|
992
|
//被申请人签名
|
|
|
@@ -1005,71 +1012,72 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
|
1005
|
1012
|
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
|
1006
|
1013
|
|
|
1007
|
1014
|
//下载审核完成的调解书
|
|
1008
|
|
- EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
|
|
1009
|
|
- JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(), JsonObject.class);
|
|
1010
|
|
- JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
|
|
1011
|
|
- JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
|
|
1012
|
|
- if (filesArray != null && filesArray.size() > 0) {
|
|
1013
|
|
- JsonObject fileObject = (JsonObject) filesArray.get(0);
|
|
1014
|
|
- String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
|
1015
|
|
- LocalDate now = LocalDate.now();
|
|
1016
|
|
- String year = Integer.toString(now.getYear());
|
|
1017
|
|
- String month = String.format("%02d", now.getMonthValue());
|
|
1018
|
|
- String day = String.format("%02d", now.getDayOfMonth());
|
|
1019
|
|
- String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
|
1020
|
|
- String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
|
|
1021
|
|
- String saveName = fileName;
|
|
1022
|
|
- String savePath = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
|
1023
|
|
-
|
|
1024
|
|
- // 创建日期目录
|
|
1025
|
|
- File saveFolder = new File(saveFolderPath);
|
|
1026
|
|
- if (!saveFolder.exists()) {
|
|
1027
|
|
- saveFolder.mkdirs();
|
|
1028
|
|
- }
|
|
1029
|
|
- String resultFilePath = saveFolderPath + "/" + fileName;
|
|
1030
|
|
- File resultFilePathFile = new File(resultFilePath);
|
|
1031
|
|
- if (!resultFilePathFile.exists()) {
|
|
1032
|
|
- resultFilePathFile.createNewFile();
|
|
1033
|
|
- }
|
|
1034
|
|
-
|
|
1035
|
|
- String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
|
|
1036
|
|
- boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
|
|
1037
|
|
- if (downLoadFile) {
|
|
1038
|
|
- // 先删除已经存在的调解书
|
|
1039
|
|
- if(StrUtil.isEmpty(caseApplicationselect.getCaseSource())){
|
|
1040
|
|
- List<MsCaseAttach> existAttach = msCaseAttachMapper.listCaseAttachByCaseIdAndType(caseAppliId, AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
|
1041
|
|
- if(CollectionUtil.isNotEmpty(existAttach)){
|
|
1042
|
|
- // 对接北明,同步案件状态,删除
|
|
1043
|
|
- for (MsCaseAttach msCaseAttach : existAttach) {
|
|
1044
|
|
- if(StrUtil.isEmpty(msCaseAttach.getOtherSysFileId())||StrUtil.isEmpty(msCaseAttach.getAnnexPath())){
|
|
1045
|
|
- continue;
|
|
1046
|
|
- }
|
|
1047
|
|
- beiMingInterfaceService.deleteAttachmentInfo(caseApplicationselect.getCaseNum(), msCaseAttach.getOtherSysFileId(), FileUtil.getName(msCaseAttach.getAnnexPath()));
|
|
1048
|
|
- }
|
|
1049
|
|
- }
|
|
1050
|
|
- }
|
|
1051
|
|
- msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAppliId, AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
|
1052
|
|
- MsCaseAttach caseAttach = new MsCaseAttach();
|
|
1053
|
|
- caseAttach.setCaseAppliId(caseAppliId);
|
|
1054
|
|
- caseAttach.setAnnexType(7);
|
|
1055
|
|
- caseAttach.setAnnexPath(savePath);
|
|
1056
|
|
- caseAttach.setAnnexName(saveName);
|
|
1057
|
|
-
|
|
1058
|
|
- // 对接北明,调用上传附件接口
|
|
1059
|
|
-
|
|
1060
|
|
- if(StrUtil.isEmpty(caseApplicationselect.getCaseSource()) ) {
|
|
1061
|
|
- String templatePath = "/home/ruoyi" + savePath;
|
|
1062
|
|
- File file = new File(templatePath.replace("/profile", "/uploadPath"));
|
|
1063
|
|
- MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplicationselect.getCaseNum(), AttachmentOperateTypeEnum.ADD,DocumentTypeEnum.EVEDENT_AGREEMENT);
|
|
1064
|
|
- // 更新附件表
|
|
1065
|
|
- if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
|
|
1066
|
|
- caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
|
|
1067
|
|
- }
|
|
1068
|
|
- }
|
|
1069
|
|
- caseAttachMapper.save(caseAttach);
|
|
1070
|
|
- }
|
|
1071
|
|
-
|
|
1072
|
|
- }
|
|
|
1015
|
+ downloadMediationBook(caseApplicationselect,signFlowId,gson,caseAppliId);
|
|
|
1016
|
+// EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
|
|
|
1017
|
+// JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(), JsonObject.class);
|
|
|
1018
|
+// JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
|
|
|
1019
|
+// JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
|
|
|
1020
|
+// if (filesArray != null && filesArray.size() > 0) {
|
|
|
1021
|
+// JsonObject fileObject = (JsonObject) filesArray.get(0);
|
|
|
1022
|
+// String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
|
|
1023
|
+// LocalDate now = LocalDate.now();
|
|
|
1024
|
+// String year = Integer.toString(now.getYear());
|
|
|
1025
|
+// String month = String.format("%02d", now.getMonthValue());
|
|
|
1026
|
+// String day = String.format("%02d", now.getDayOfMonth());
|
|
|
1027
|
+// String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
|
|
1028
|
+// String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
|
|
|
1029
|
+// String saveName = fileName;
|
|
|
1030
|
+// String savePath = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
|
|
1031
|
+//
|
|
|
1032
|
+// // 创建日期目录
|
|
|
1033
|
+// File saveFolder = new File(saveFolderPath);
|
|
|
1034
|
+// if (!saveFolder.exists()) {
|
|
|
1035
|
+// saveFolder.mkdirs();
|
|
|
1036
|
+// }
|
|
|
1037
|
+// String resultFilePath = saveFolderPath + "/" + fileName;
|
|
|
1038
|
+// File resultFilePathFile = new File(resultFilePath);
|
|
|
1039
|
+// if (!resultFilePathFile.exists()) {
|
|
|
1040
|
+// resultFilePathFile.createNewFile();
|
|
|
1041
|
+// }
|
|
|
1042
|
+//
|
|
|
1043
|
+// String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
|
|
|
1044
|
+// boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
|
|
|
1045
|
+// if (downLoadFile) {
|
|
|
1046
|
+// // 先删除已经存在的调解书
|
|
|
1047
|
+// if(StrUtil.isEmpty(caseApplicationselect.getCaseSource())){
|
|
|
1048
|
+// List<MsCaseAttach> existAttach = msCaseAttachMapper.listCaseAttachByCaseIdAndType(caseAppliId, AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
|
|
1049
|
+// if(CollectionUtil.isNotEmpty(existAttach)){
|
|
|
1050
|
+// // 对接北明,同步案件状态,删除
|
|
|
1051
|
+// for (MsCaseAttach msCaseAttach : existAttach) {
|
|
|
1052
|
+// if(StrUtil.isEmpty(msCaseAttach.getOtherSysFileId())||StrUtil.isEmpty(msCaseAttach.getAnnexPath())){
|
|
|
1053
|
+// continue;
|
|
|
1054
|
+// }
|
|
|
1055
|
+// beiMingInterfaceService.deleteAttachmentInfo(caseApplicationselect.getCaseNum(), msCaseAttach.getOtherSysFileId(), FileUtil.getName(msCaseAttach.getAnnexPath()));
|
|
|
1056
|
+// }
|
|
|
1057
|
+// }
|
|
|
1058
|
+// }
|
|
|
1059
|
+// msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAppliId, AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
|
|
1060
|
+// MsCaseAttach caseAttach = new MsCaseAttach();
|
|
|
1061
|
+// caseAttach.setCaseAppliId(caseAppliId);
|
|
|
1062
|
+// caseAttach.setAnnexType(7);
|
|
|
1063
|
+// caseAttach.setAnnexPath(savePath);
|
|
|
1064
|
+// caseAttach.setAnnexName(saveName);
|
|
|
1065
|
+//
|
|
|
1066
|
+// // 对接北明,调用上传附件接口
|
|
|
1067
|
+//
|
|
|
1068
|
+// if(StrUtil.isEmpty(caseApplicationselect.getCaseSource()) ) {
|
|
|
1069
|
+// String templatePath = "/home/ruoyi" + savePath;
|
|
|
1070
|
+// File file = new File(templatePath.replace("/profile", "/uploadPath"));
|
|
|
1071
|
+// MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplicationselect.getCaseNum(), AttachmentOperateTypeEnum.ADD,DocumentTypeEnum.EVEDENT_AGREEMENT);
|
|
|
1072
|
+// // 更新附件表
|
|
|
1073
|
+// if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
|
|
|
1074
|
+// caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
|
|
|
1075
|
+// }
|
|
|
1076
|
+// }
|
|
|
1077
|
+// caseAttachMapper.save(caseAttach);
|
|
|
1078
|
+// }
|
|
|
1079
|
+//
|
|
|
1080
|
+// }
|
|
1073
|
1081
|
}
|
|
1074
|
1082
|
}
|
|
1075
|
1083
|
}
|
|
|
@@ -1082,10 +1090,13 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
|
1082
|
1090
|
}
|
|
1083
|
1091
|
|
|
1084
|
1092
|
private void downloadMediationBook(MsCaseApplication caseApplicationselect, String signFlowId, Gson gson, Long caseAppliId) throws EsignDemoException, IOException {
|
|
|
1093
|
+ log.info("signFlowId===="+signFlowId);
|
|
1085
|
1094
|
EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
|
|
|
1095
|
+ log.info("下载成功===="+fileDownload);
|
|
1086
|
1096
|
JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(), JsonObject.class);
|
|
1087
|
1097
|
JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
|
|
1088
|
1098
|
JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
|
|
|
1099
|
+ log.info("下载调解书pdf===="+filesArray);
|
|
1089
|
1100
|
if (filesArray != null && filesArray.size() > 0) {
|
|
1090
|
1101
|
JsonObject fileObject = (JsonObject) filesArray.get(0);
|
|
1091
|
1102
|
String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
|
|
@@ -1111,6 +1122,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
|
1111
|
1122
|
|
|
1112
|
1123
|
String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
|
|
1113
|
1124
|
boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
|
|
|
1125
|
+ log.info("是否下载成功======="+downLoadFile);
|
|
1114
|
1126
|
if (downLoadFile) {
|
|
1115
|
1127
|
// 先删除已经存在的调解书
|
|
1116
|
1128
|
if(StrUtil.isEmpty(caseApplicationselect.getCaseSource())){
|
|
|
@@ -1126,11 +1138,13 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
|
1126
|
1138
|
}
|
|
1127
|
1139
|
}
|
|
1128
|
1140
|
msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAppliId, AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
|
|
1141
|
+
|
|
1129
|
1142
|
MsCaseAttach caseAttach = new MsCaseAttach();
|
|
1130
|
1143
|
caseAttach.setCaseAppliId(caseAppliId);
|
|
1131
|
1144
|
caseAttach.setAnnexType(AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
|
1132
|
1145
|
caseAttach.setAnnexPath(savePath);
|
|
1133
|
1146
|
caseAttach.setAnnexName(saveName);
|
|
|
1147
|
+ log.info("调解书保存======="+downLoadFile);
|
|
1134
|
1148
|
caseAttachMapper.save(caseAttach);
|
|
1135
|
1149
|
// 对接北明,调用上传附件接口
|
|
1136
|
1150
|
if(StrUtil.isEmpty(caseApplicationselect.getCaseSource()) ) {
|