9.25修复问题改动代码
This commit is contained in:
+47
-39
@@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||||
|
|
||||||
import com.deepoove.poi.config.Configure;
|
import com.deepoove.poi.config.Configure;
|
||||||
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.utils.WordUtil;
|
import com.ruoyi.common.utils.WordUtil;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.*;
|
import com.ruoyi.wisdomarbitrate.domain.*;
|
||||||
@@ -37,7 +38,6 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
public AjaxResult createDocument(CaseApplication caseApplication) {
|
public AjaxResult createDocument(CaseApplication caseApplication) {
|
||||||
try {
|
try {
|
||||||
Map<String, Object> datas = new HashMap<>();
|
Map<String, Object> datas = new HashMap<>();
|
||||||
Adjudication adjudication = new Adjudication();
|
|
||||||
Long id = caseApplication.getId();
|
Long id = caseApplication.getId();
|
||||||
if (id == null){
|
if (id == null){
|
||||||
return null;
|
return null;
|
||||||
@@ -59,14 +59,12 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
int identityType = affiliate.getIdentityType();
|
int identityType = affiliate.getIdentityType();
|
||||||
if (identityType == 1) { //申请人
|
if (identityType == 1) { //申请人
|
||||||
datas.put("appName", affiliate.getName());
|
datas.put("appName", affiliate.getName());
|
||||||
datas.put("appSex", null);
|
|
||||||
datas.put("appIDNo", affiliate.getIdentityNum());
|
datas.put("appIDNo", affiliate.getIdentityNum());
|
||||||
datas.put("appAddress", affiliate.getContactAddress());
|
datas.put("appAddress", affiliate.getContactAddress());
|
||||||
datas.put("appAgentName", affiliate.getNameAgent());
|
datas.put("appAgentName", affiliate.getNameAgent());
|
||||||
datas.put("appAgentIDNo",affiliate.getIdentityNumAgent());
|
datas.put("appAgentIDNo",affiliate.getIdentityNumAgent());
|
||||||
}else if (identityType == 2){ //被申请人
|
}else if (identityType == 2){ //被申请人
|
||||||
datas.put("resName", affiliate.getName());
|
datas.put("resName", affiliate.getName());
|
||||||
datas.put("resSex", null);
|
|
||||||
datas.put("resIDNo", affiliate.getIdentityNum());
|
datas.put("resIDNo", affiliate.getIdentityNum());
|
||||||
datas.put("resAddress", affiliate.getContactAddress());
|
datas.put("resAddress", affiliate.getContactAddress());
|
||||||
datas.put("resAgentName", affiliate.getNameAgent());
|
datas.put("resAgentName", affiliate.getNameAgent());
|
||||||
@@ -77,35 +75,38 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
String arbitratorName = caseApplication1.getArbitratorName();
|
String arbitratorName = caseApplication1.getArbitratorName();
|
||||||
datas.put("caseName",caseApplication1.getCaseName());
|
datas.put("caseName",caseApplication1.getCaseName());
|
||||||
datas.put("arbitratorName",arbitratorName);
|
datas.put("arbitratorName",arbitratorName);
|
||||||
LocalDate localDate = caseApplication1.getHearDate()
|
Date hearDate = caseApplication1.getHearDate();
|
||||||
.toInstant()
|
if (hearDate != null) {
|
||||||
.atZone(ZoneId.systemDefault())
|
LocalDate localDate = hearDate.toInstant()
|
||||||
.toLocalDate();
|
.atZone(ZoneId.systemDefault())
|
||||||
datas.put("hearYear", localDate.getYear());
|
.toLocalDate();
|
||||||
datas.put("hearMonths", localDate.getMonthValue());
|
datas.put("hearYear", localDate.getYear());
|
||||||
datas.put("hearDay", localDate.getDayOfMonth());
|
datas.put("hearMonths", localDate.getMonthValue());
|
||||||
datas.put("appArbitrationClaims", null);
|
datas.put("hearDay", localDate.getDayOfMonth());
|
||||||
datas.put("appEvidenceName", null);
|
}else {
|
||||||
datas.put("appProveFacts", null);
|
datas.put("hearYear", null);
|
||||||
datas.put("resDefenseContentToApp", null);
|
datas.put("hearMonths", null);
|
||||||
datas.put("resArbitrationClaims", null);
|
datas.put("hearDay", null);
|
||||||
datas.put("resEvidenceName", null);
|
}
|
||||||
datas.put("resProveFacts", null);
|
datas.put("appArbitrationClaims", caseApplication1.getArbitratClaims());
|
||||||
datas.put("appDefenseContentToRes", null);
|
if (arbitrateRecord1!=null){
|
||||||
datas.put("evidenDetermi", arbitrateRecord1.getEvidenDetermi());
|
datas.put("evidenDetermi", arbitrateRecord1.getEvidenDetermi());
|
||||||
datas.put("factDetermi", arbitrateRecord1.getFactDetermi());
|
datas.put("factDetermi", arbitrateRecord1.getFactDetermi());
|
||||||
datas.put("caseSketch", arbitrateRecord1.getCaseSketch());
|
datas.put("caseSketch", arbitrateRecord1.getCaseSketch());
|
||||||
datas.put("arbitrateThink", arbitrateRecord1.getArbitrateThink());
|
datas.put("arbitrateThink", arbitrateRecord1.getArbitrateThink());
|
||||||
datas.put("legalProvisions", null);
|
datas.put("rulingFollows", arbitrateRecord1.getRulingFollows());
|
||||||
datas.put("rulingFollows", arbitrateRecord1.getRulingFollows());
|
}
|
||||||
datas.put("umpire", null);
|
datas.put("legalProvisions", "仲裁法");
|
||||||
if (arbitratorName.contains(",")){
|
if (arbitratorName==null){
|
||||||
|
datas.put("arbitratorName1", null);
|
||||||
|
datas.put("arbitratorName2", null);
|
||||||
|
}else if (arbitratorName.contains(",")){
|
||||||
String[] nameArray = arbitratorName.split(",");
|
String[] nameArray = arbitratorName.split(",");
|
||||||
String firstName = nameArray[0];
|
String firstName = nameArray[0];
|
||||||
String secondName = nameArray[1];
|
String secondName = nameArray[1];
|
||||||
datas.put("arbitratorName1", firstName);
|
datas.put("arbitratorName1", firstName);
|
||||||
datas.put("arbitratorName2", secondName);
|
datas.put("arbitratorName2", secondName);
|
||||||
}else {
|
} else {
|
||||||
String secondName = "";
|
String secondName = "";
|
||||||
datas.put("arbitratorName1", arbitratorName);
|
datas.put("arbitratorName1", arbitratorName);
|
||||||
datas.put("arbitratorName2", secondName);
|
datas.put("arbitratorName2", secondName);
|
||||||
@@ -114,19 +115,24 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
datas.put("year", now.getYear());
|
datas.put("year", now.getYear());
|
||||||
datas.put("months", now.getMonthValue());
|
datas.put("months", now.getMonthValue());
|
||||||
datas.put("day", now.getDayOfMonth());
|
datas.put("day", now.getDayOfMonth());
|
||||||
datas.put("clerk", null);
|
|
||||||
String modalFilePath = "/data/arbitrate-document/template/仲裁裁决书模板.docx";
|
String modalFilePath = "/data/arbitrate-document/template/仲裁裁决书模板.docx";
|
||||||
|
//String modalFilePath = "D:/develop/仲裁裁决书模板 (2).docx";
|
||||||
String currentDateStr = now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
String saveFolderPath = "/data/arbitrate-document/formal/" + now.getYear() + "/" + now.getMonthValue() + "/" + now.getDayOfMonth();
|
||||||
String saveFolderPath = "/data/arbitrate-document/formal/" + currentDateStr;
|
//String saveFolderPath = "D:/data/" + now.getYear() + "/" + now.getMonthValue() + "/" + now.getDayOfMonth();
|
||||||
|
String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
|
||||||
|
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||||
// 创建日期目录
|
// 创建日期目录
|
||||||
File saveFolder = new File(saveFolderPath);
|
File saveFolder = new File(saveFolderPath);
|
||||||
if (!saveFolder.exists()) {
|
if (!saveFolder.exists()) {
|
||||||
saveFolder.mkdirs();
|
saveFolder.mkdirs();
|
||||||
}
|
}
|
||||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
|
Path sourcePath = new File(modalFilePath).toPath();
|
||||||
String resultFilePath = saveFolderPath+ fileName;
|
Path destinationPath = new File(resultFilePath).toPath();
|
||||||
String docFilePath = WordUtil.getDocFilePath(datas, modalFilePath, resultFilePath);
|
Files.copy(sourcePath, destinationPath, StandardCopyOption.REPLACE_EXISTING);
|
||||||
|
String docFilePath = WordUtil.getDocFilePath(datas,modalFilePath,resultFilePath);
|
||||||
|
//修改案件状态
|
||||||
|
caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
|
||||||
|
caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||||
//将裁决书保存到附件表里
|
//将裁决书保存到附件表里
|
||||||
CaseAttach caseAttach = CaseAttach.builder()
|
CaseAttach caseAttach = CaseAttach.builder()
|
||||||
.caseAppliId(id)
|
.caseAppliId(id)
|
||||||
@@ -136,12 +142,14 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
.build();
|
.build();
|
||||||
int i = caseAttachMapper.save(caseAttach);
|
int i = caseAttachMapper.save(caseAttach);
|
||||||
if (i>0){
|
if (i>0){
|
||||||
Integer annexId = caseAttach.getAnnexId();
|
if (arbitrateRecord1!=null){
|
||||||
//将附件id保存到仲裁记录表里面
|
Integer annexId = caseAttach.getAnnexId();
|
||||||
arbitrateRecord1.setAnnexId(annexId);
|
//将附件id保存到仲裁记录表里面
|
||||||
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord1);
|
arbitrateRecord1.setAnnexId(annexId);
|
||||||
|
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return AjaxResult.success("裁决书保存路径为" + docFilePath);
|
return AjaxResult.success("裁决书已生成");
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
+47
-16
@@ -42,12 +42,22 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
|||||||
if (opinion==0){ //拒绝
|
if (opinion==0){ //拒绝
|
||||||
if (arbitratMethod == 2){
|
if (arbitratMethod == 2){
|
||||||
caseApplication1.setArbitratMethod(1); // 更改仲裁方式
|
caseApplication1.setArbitratMethod(1); // 更改仲裁方式
|
||||||
|
//修改案件状态为待开庭审理
|
||||||
|
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
|
||||||
}else {
|
}else {
|
||||||
caseApplication1.setArbitratMethod(2);
|
caseApplication1.setArbitratMethod(2);
|
||||||
|
//修改案件状态为待书面审理
|
||||||
|
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (arbitratMethod == 2){
|
||||||
|
//修改案件状态为待书面审理
|
||||||
|
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
||||||
|
}else {
|
||||||
|
//修改案件状态为待开庭审理
|
||||||
|
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//修改案件状态为待开庭
|
|
||||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
|
|
||||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
String arbitratMethodStr = caseApplication1.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
|
String arbitratMethodStr = caseApplication1.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
|
||||||
@@ -92,21 +102,42 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
|||||||
if (createBy!=null){
|
if (createBy!=null){
|
||||||
arbitrateRecord.setCreateBy(createBy);
|
arbitrateRecord.setCreateBy(createBy);
|
||||||
}
|
}
|
||||||
//提交仲裁结果
|
//先判断案件是否已经提交过仲裁结果
|
||||||
int i = arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecord);
|
ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
|
||||||
if (i>0){
|
if (arbitrateRecord1!=null){
|
||||||
//案件日志表里添加数据
|
int i = arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
|
||||||
CaseLogRecord caseLogRecord = new CaseLogRecord();
|
if (i>0){
|
||||||
caseLogRecord.setCaseAppliId(caseApplication1.getId());
|
//案件日志表里添加数据
|
||||||
caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
|
CaseLogRecord caseLogRecord = new CaseLogRecord();
|
||||||
if (createBy!=null){
|
caseLogRecord.setCaseAppliId(caseApplication1.getId());
|
||||||
caseLogRecord.setCreateBy(createBy);
|
caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
|
||||||
|
if (createBy!=null){
|
||||||
|
caseLogRecord.setCreateBy(createBy);
|
||||||
|
}
|
||||||
|
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
|
||||||
|
//修改案件状态
|
||||||
|
caseApplication.setCaseStatus(CaseApplicationConstants.GENERATED_ARBITRATION);
|
||||||
|
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
|
return AjaxResult.success("提交成功");
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
//提交仲裁结果
|
||||||
|
int i = arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecord);
|
||||||
|
|
||||||
|
if (i>0){
|
||||||
|
//案件日志表里添加数据
|
||||||
|
CaseLogRecord caseLogRecord = new CaseLogRecord();
|
||||||
|
caseLogRecord.setCaseAppliId(caseApplication1.getId());
|
||||||
|
caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
|
||||||
|
if (createBy!=null){
|
||||||
|
caseLogRecord.setCreateBy(createBy);
|
||||||
|
}
|
||||||
|
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
|
||||||
|
//修改案件状态
|
||||||
|
caseApplication.setCaseStatus(CaseApplicationConstants.GENERATED_ARBITRATION);
|
||||||
|
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
|
return AjaxResult.success("提交成功");
|
||||||
}
|
}
|
||||||
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
|
|
||||||
//修改案件状态
|
|
||||||
caseApplication.setCaseStatus(CaseApplicationConstants.GENERATED_ARBITRATION);
|
|
||||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
||||||
return AjaxResult.success("提交成功");
|
|
||||||
}
|
}
|
||||||
return AjaxResult.error("暂无需要提交仲裁结果的案件");
|
return AjaxResult.error("暂无需要提交仲裁结果的案件");
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -85,7 +85,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
|||||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||||
//修改案件状态
|
//修改案件状态
|
||||||
caseApplicationMapper.submitCaseApplication(caseApplication1);
|
caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success("支付成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user