优化
This commit is contained in:
+9
-7
@@ -110,7 +110,6 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
datas.put("resDateOfBirth", responBirthStr);
|
||||
|
||||
}
|
||||
|
||||
datas.put("resContactAddress", affiliate.getContactAddress());
|
||||
nameAgentList.add(affiliate.getNameAgent());
|
||||
}
|
||||
@@ -266,10 +265,10 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
datas.put("year", year);
|
||||
String month = String.format("%02d", now.getMonthValue());
|
||||
String day = String.format("%02d", now.getDayOfMonth());
|
||||
//String modalFilePath = "/data/arbitrate-document/template/新裁决书模板.docx";
|
||||
String modalFilePath = "D:/develop/新裁决书模板.docx";
|
||||
//String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
String saveFolderPath = "D:/data/" + year + "/" + month + "/" + day;
|
||||
String modalFilePath = "/data/arbitrate-document/template/新裁决书模板.docx";
|
||||
//String modalFilePath = "D:/develop/新裁决书模板.docx";
|
||||
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
//String saveFolderPath = "D:/data/" + year + "/" + month + "/" + day;
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
|
||||
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||
@@ -297,9 +296,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
.build();
|
||||
//保存到附件表里,先判断之前有没有,有的话更新,没有的话新增
|
||||
List<CaseAttach> caseAttachList = caseAttachMapper.getCaseAttachByCaseIdAndType(caseAttach);
|
||||
if (caseAttachList != null ) {
|
||||
if (caseAttachList != null && caseAttachList.size()>0) {
|
||||
//之前已经生成过了,更新
|
||||
caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
||||
int i = caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
||||
}else {
|
||||
//之前没生成过,新增
|
||||
int i = caseAttachMapper.save(caseAttach);
|
||||
@@ -312,6 +311,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
}
|
||||
}
|
||||
}
|
||||
//修改案件状态
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
return AjaxResult.success("裁决书已生成");
|
||||
} catch (IOException e) {
|
||||
return AjaxResult.error(e + "请检查文件路径是否有误");
|
||||
|
||||
+2
-23
@@ -178,15 +178,8 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//根据仲裁方式决定生成裁决书还是庭审笔录
|
||||
Integer arbitratMethod = caseApplication1.getArbitratMethod();
|
||||
if (arbitratMethod == 1) {
|
||||
//开庭审理,需要生成裁决书和庭审笔录
|
||||
Boolean aBoolean = generateTrialTranscripts(arbitrateRecord);
|
||||
Boolean aBoolean1 = generateAward(arbitrateRecord);
|
||||
if (aBoolean && aBoolean1) {
|
||||
if (aBoolean1) {
|
||||
//修改案件状态
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
@@ -194,21 +187,7 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
return AjaxResult.success("审理成功");
|
||||
}
|
||||
}
|
||||
} else if (arbitratMethod == 2) {
|
||||
//书面审理,只生成裁决书
|
||||
Boolean aBoolean = generateAward(arbitrateRecord);
|
||||
if (aBoolean) {
|
||||
//修改案件状态
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
if (i > 0) {
|
||||
return AjaxResult.success("审理成功");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return AjaxResult.error("请确认仲裁方式");
|
||||
}
|
||||
return null;
|
||||
return AjaxResult.error("裁决书生成有误");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user