书面审理接口修改
This commit is contained in:
+27
-20
@@ -50,6 +50,7 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
private IAdjudicationService adjudicationService;
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion) {
|
||||
@@ -185,7 +186,7 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
//开庭审理,需要生成裁决书和庭审笔录
|
||||
Boolean aBoolean = generateTrialTranscripts(arbitrateRecord);
|
||||
Boolean aBoolean1 = generateAward(arbitrateRecord);
|
||||
if (aBoolean && aBoolean1){
|
||||
if (aBoolean && aBoolean1) {
|
||||
//修改案件状态
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
@@ -196,7 +197,7 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
} else if (arbitratMethod == 2) {
|
||||
//书面审理,只生成裁决书
|
||||
Boolean aBoolean = generateAward(arbitrateRecord);
|
||||
if (aBoolean){
|
||||
if (aBoolean) {
|
||||
//修改案件状态
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
@@ -272,10 +273,10 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
datas.put("year", year);
|
||||
datas.put("months", month);
|
||||
datas.put("day", day);
|
||||
// String modalFilePath = "/data/arbitrate-document/template/仲裁裁决书模板.docx";
|
||||
String modalFilePath = "D:/develop/仲裁裁决书模板 (2).docx";
|
||||
// String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
String saveFolderPath = "D:/data/" + now.getYear() + "/" + now.getMonthValue() + "/" + now.getDayOfMonth();
|
||||
String modalFilePath = "/data/arbitrate-document/template/仲裁裁决书模板.docx";
|
||||
//String modalFilePath = "D:/develop/仲裁裁决书模板 (2).docx";
|
||||
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
//String saveFolderPath = "D:/data/" + now.getYear() + "/" + now.getMonthValue() + "/" + now.getDayOfMonth();
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
|
||||
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||
@@ -296,13 +297,14 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
.annexType(7)
|
||||
.build();
|
||||
//保存到附件表里,先判断之前有没有,有的话更新,没有的话新增
|
||||
Long caseAppliId = id;
|
||||
Integer annexType = 7;
|
||||
List<CaseAttach> caseAttach1 = caseAttachMapper.getCaseAttachByCaseIdAndType(caseAttach);
|
||||
if (caseAttach1 != null ) {
|
||||
CaseAttach caseAttach1 = new CaseAttach();
|
||||
caseAttach1.setAnnexType(7);
|
||||
caseAttach1.setCaseAppliId(id);
|
||||
List<CaseAttach> caseAttachList = caseAttachMapper.getCaseAttachByCaseIdAndType(caseAttach1);
|
||||
if (caseAttachList != null && caseAttachList.size() > 0) {
|
||||
//之前已经生成过了,更新
|
||||
caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
||||
}else {
|
||||
} else {
|
||||
//之前没生成过,新增
|
||||
int i = caseAttachMapper.save(caseAttach);
|
||||
ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
|
||||
@@ -322,11 +324,12 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
//生成仲裁文书
|
||||
private Boolean generateAward(ArbitrateRecord arbitrateRecord){
|
||||
private Boolean generateAward(ArbitrateRecord arbitrateRecord) {
|
||||
try {
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
Long id = arbitrateRecord.getId();
|
||||
Long id = arbitrateRecord.getCaseAppliId();
|
||||
if (id == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -524,10 +527,10 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
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;
|
||||
@@ -554,11 +557,14 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
.annexType(3)
|
||||
.build();
|
||||
//保存到附件表里,先判断之前有没有,有的话更新,没有的话新增
|
||||
List<CaseAttach> caseAttachList = caseAttachMapper.getCaseAttachByCaseIdAndType(caseAttach);
|
||||
if (caseAttachList != null ) {
|
||||
CaseAttach caseAttach1 = new CaseAttach();
|
||||
caseAttach1.setAnnexType(3);
|
||||
caseAttach1.setCaseAppliId(id);
|
||||
List<CaseAttach> caseAttachList = caseAttachMapper.getCaseAttachByCaseIdAndType(caseAttach1);
|
||||
if (caseAttachList != null && caseAttachList.size() > 0) {
|
||||
//之前已经生成过了,更新
|
||||
caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
||||
}else {
|
||||
} else {
|
||||
//之前没生成过,新增
|
||||
int i = caseAttachMapper.save(caseAttach);
|
||||
if (i > 0) {
|
||||
@@ -575,6 +581,7 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
public String getNewEquipmentNo() {
|
||||
Object awardNum = redisCache.getCacheObject("awardNum");
|
||||
if (awardNum == null) {
|
||||
|
||||
Reference in New Issue
Block a user