Merge branch 'bgy' of SH-Arbitrate/Arbitrate-Backend into dev

This commit was merged in pull request #344.
This commit is contained in:
bgy
2024-04-29 10:03:52 +08:00
committed by Gitea
@@ -163,7 +163,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
return AjaxResult.error("未找到该模板");
}
// todo 部署放开
// 部署放开
if (templatePath != null) {
templatePath = "/home/ruoyi/" + templatePath;
}
@@ -764,9 +764,11 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
return AjaxResult.error("未查询到相关案件");
}
List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication1);
Boolean isExistPdf = false;
if (caseAttachList != null && caseAttachList.size() > 0) {
for (CaseAttach caseAttach : caseAttachList) {
if (caseAttach.getAnnexType() == 3) {
isExistPdf = true;
String annexName = caseAttach.getAnnexName();
String prefix = "/profile/upload/";
int startIndex = prefix.length();
@@ -774,8 +776,8 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
File file = new File(path);
//判断文件是否存在
if (!file.exists()) {
// return AjaxResult.error("未生成裁决书");
//若不存在则从e签宝下载PDF文件
isExistPdf = false;
//若不存在裁决书则从e签宝下载PDF文件
try {
SealSignRecord sealSignRecord = new SealSignRecord();
sealSignRecord.setCaseAppliId(caseApplication.getId());
@@ -789,18 +791,26 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
List<CaseAttach> caseAttachList1 = caseAttachMapper.queryCaseAttachList(caseApplication1);
for (CaseAttach caseAttach1 : caseAttachList1) {
if (caseAttach1.getAnnexType() == 3) {
annexName = caseAttach.getAnnexName();
isExistPdf = true;
annexName = caseAttach1.getAnnexName();
prefix = "/profile/upload/";
startIndex = prefix.length();
path = caseAttach.getAnnexPath() + annexName.substring(startIndex);
path = caseAttach1.getAnnexPath() + annexName.substring(startIndex);
File file1 = new File(path);
if (!file1.exists()) {
return AjaxResult.error("未生成裁决书");
isExistPdf = false;
}
annexName = null;
prefix = null;
path = null;
caseAttachList = caseAttachList1;
break;
}
}
//若附件中没有裁决书PDF文件则终止
if (!isExistPdf) {
return AjaxResult.error("未找到签名后的裁决书");
}
}
} catch (Exception e) {
e.printStackTrace();
@@ -811,6 +821,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
}
}
}
if (!isExistPdf) {
return AjaxResult.error("未找到签名后的裁决书");
}
//修改案件状态
caseApplication1.setCaseStatus(CaseApplicationConstants.CASE_FILING);
caseApplicationMapper.submitCaseApplication(caseApplication1);