Merge branch 'qtz' of SH-Arbitrate/Mediation-Backend into dev
This commit was merged in pull request #52.
This commit is contained in:
@@ -18,4 +18,7 @@ public interface MsCaseFlowMapper extends Mapper<MsCaseFlow> {
|
||||
|
||||
@Select("select f1.id,f1.node_id nodeId,f1.node_name nodeName,f1.case_status_name caseStatusName,f1.back_flow_id backFlowId,f1.sort from ms_case_flow f1 join ms_case_flow f2 on f2.id=#{caseFlowId} and f1.sort >= f2.sort+1 ")
|
||||
List<MsCaseFlow> nextFlowall(Integer caseFlowId);
|
||||
|
||||
@Select("select f1.id,f1.node_id nodeId,f1.node_name nodeName,f1.case_status_name caseStatusName,f1.back_flow_id backFlowId,f1.sort from ms_case_flow f1 join ms_case_flow f2 on f2.id=#{caseFlowId} and f1.sort=f2.sort+3 ")
|
||||
MsCaseFlow nextFlow1(Integer caseFlowId);
|
||||
}
|
||||
+3
@@ -1236,6 +1236,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
|
||||
Long id = attach.getCaseAppliId();
|
||||
MsCaseApplication caseApplication = msCaseApplicationMapper.selectByPrimaryKey(id);
|
||||
caseApplication.setIsReconci(attach.getIsReconci());
|
||||
msCaseApplicationMapper.updateByPrimaryKeySelective(caseApplication);
|
||||
|
||||
// 查询案件相关人员
|
||||
MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(id);
|
||||
Integer isReconci = attach.getIsReconci();
|
||||
|
||||
+144
-70
@@ -286,86 +286,160 @@ public class FixSelectFlowDetailUtils {
|
||||
|
||||
List<Integer> psnsignStatusListnew = psnsignStatusList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
if (( psnsignStatusListnew.size()==1 && (psnsignStatusListnew.get(0).intValue() == 2)) && (orgsignStatus.intValue() == 1)) {
|
||||
//更新立案申请状态为待用印
|
||||
MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(sealSignRecord.getCaseAppliId());
|
||||
if ((mssealSignRecord.getSignFlowStatus() != null) && (mssealSignRecord.getSignFlowStatus().intValue() == 1)) {
|
||||
// 根据流程id查找下一个流程节点
|
||||
MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId().intValue());
|
||||
MsCaseApplication application = new MsCaseApplication();
|
||||
application.setId(caseApplicationselect.getId());
|
||||
application.setCaseFlowId(nextFlow.getId());
|
||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||
MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(sealSignRecord.getCaseAppliId());
|
||||
Integer isReconci = caseApplicationselect.getIsReconci();
|
||||
if(isReconci!=null){
|
||||
if(isReconci.intValue()==1){
|
||||
if (( psnsignStatusListnew.size()==1 && (psnsignStatusListnew.get(0).intValue() == 2))) {
|
||||
//更新立案申请状态为待送达
|
||||
// MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(sealSignRecord.getCaseAppliId());
|
||||
if ((mssealSignRecord.getSignFlowStatus() != null) && (mssealSignRecord.getSignFlowStatus().intValue() == 1)) {
|
||||
MsCaseFlow nextFlow = caseFlowMapper.nextFlow1(caseApplicationselect.getCaseFlowId().intValue());
|
||||
MsCaseApplication application = new MsCaseApplication();
|
||||
application.setId(caseApplicationselect.getId());
|
||||
application.setCaseFlowId(nextFlow.getId());
|
||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||
|
||||
//修改"签署用印记录表"的状态为待用印
|
||||
mssealSignRecord.setSignFlowStatus(2);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(mssealSignRecord);
|
||||
}
|
||||
}
|
||||
if (( psnsignStatusListnew.size()==1 && (psnsignStatusListnew.get(0).intValue() == 2)) && (orgsignStatus.intValue() == 2)) {
|
||||
//更新立案申请状态为待送达
|
||||
MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(sealSignRecord.getCaseAppliId());
|
||||
//修改"签署用印记录表"的状态为完成
|
||||
mssealSignRecord.setSignFlowStatus(3);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(mssealSignRecord);
|
||||
|
||||
if ((mssealSignRecord.getSignFlowStatus() != null) && (mssealSignRecord.getSignFlowStatus().intValue() == 2)) {
|
||||
//修改"签署用印记录表"的状态为签署完成
|
||||
mssealSignRecord.setSignFlowStatus(3);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(mssealSignRecord);
|
||||
|
||||
// 根据流程id查找下一个流程节点
|
||||
MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId().intValue());
|
||||
MsCaseApplication application = new MsCaseApplication();
|
||||
application.setId(caseApplicationselect.getId());
|
||||
application.setCaseFlowId(nextFlow.getId());
|
||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||
|
||||
//下载审核完成的调解书
|
||||
String signFlowId = sealSignRecord.getSignFlowid();
|
||||
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 signFlowId = sealSignRecord.getSignFlowid();
|
||||
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 = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
// String savePath = "/home/ruoyi/uploadPath/upload/";
|
||||
String saveName = fileName;
|
||||
String savePath = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
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();
|
||||
}
|
||||
// 创建日期目录
|
||||
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) {
|
||||
Long caseAppliId = sealSignRecord.getCaseAppliId();
|
||||
MsCaseAttach caseAttach = new MsCaseAttach();
|
||||
caseAttach.setCaseAppliId(caseAppliId);
|
||||
caseAttach.setAnnexType(7);
|
||||
caseAttach.setAnnexPath(savePath);
|
||||
caseAttach.setAnnexName(saveName);
|
||||
caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
||||
}
|
||||
String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
|
||||
boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
|
||||
if (downLoadFile) {
|
||||
Long caseAppliId = sealSignRecord.getCaseAppliId();
|
||||
MsCaseAttach caseAttach = new MsCaseAttach();
|
||||
caseAttach.setCaseAppliId(caseAppliId);
|
||||
caseAttach.setAnnexType(7);
|
||||
caseAttach.setAnnexPath(savePath);
|
||||
caseAttach.setAnnexName(saveName);
|
||||
caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
if (( psnsignStatusListnew.size()==1 && (psnsignStatusListnew.get(0).intValue() == 2)) && (orgsignStatus.intValue() == 1)) {
|
||||
//更新立案申请状态为待用印
|
||||
// MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(sealSignRecord.getCaseAppliId());
|
||||
if ((mssealSignRecord.getSignFlowStatus() != null) && (mssealSignRecord.getSignFlowStatus().intValue() == 1)) {
|
||||
// 根据流程id查找下一个流程节点
|
||||
MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId().intValue());
|
||||
MsCaseApplication application = new MsCaseApplication();
|
||||
application.setId(caseApplicationselect.getId());
|
||||
application.setCaseFlowId(nextFlow.getId());
|
||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||
|
||||
//修改"签署用印记录表"的状态为待用印
|
||||
mssealSignRecord.setSignFlowStatus(2);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(mssealSignRecord);
|
||||
}
|
||||
}
|
||||
if (( psnsignStatusListnew.size()==1 && (psnsignStatusListnew.get(0).intValue() == 2)) && (orgsignStatus.intValue() == 2)) {
|
||||
//更新立案申请状态为待送达
|
||||
// MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(sealSignRecord.getCaseAppliId());
|
||||
|
||||
if ((mssealSignRecord.getSignFlowStatus() != null) && (mssealSignRecord.getSignFlowStatus().intValue() == 2)) {
|
||||
//修改"签署用印记录表"的状态为签署完成
|
||||
mssealSignRecord.setSignFlowStatus(3);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(mssealSignRecord);
|
||||
|
||||
// 根据流程id查找下一个流程节点
|
||||
MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId().intValue());
|
||||
MsCaseApplication application = new MsCaseApplication();
|
||||
application.setId(caseApplicationselect.getId());
|
||||
application.setCaseFlowId(nextFlow.getId());
|
||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||
|
||||
//下载审核完成的调解书
|
||||
String signFlowId = sealSignRecord.getSignFlowid();
|
||||
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 = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
// String savePath = "/home/ruoyi/uploadPath/upload/";
|
||||
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) {
|
||||
Long caseAppliId = sealSignRecord.getCaseAppliId();
|
||||
MsCaseAttach caseAttach = new MsCaseAttach();
|
||||
caseAttach.setCaseAppliId(caseAppliId);
|
||||
caseAttach.setAnnexType(7);
|
||||
caseAttach.setAnnexPath(savePath);
|
||||
caseAttach.setAnnexName(saveName);
|
||||
caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user