实现生成庭审笔录 #92
+12
@@ -8,6 +8,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.exception.EsignDemoException;
|
import com.ruoyi.common.exception.EsignDemoException;
|
||||||
import com.ruoyi.common.utils.WxAppletNotifyUtils;
|
import com.ruoyi.common.utils.WxAppletNotifyUtils;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
||||||
@@ -243,4 +244,15 @@ public class CaseApplicationController extends BaseController {
|
|||||||
return success(schemeUrl);
|
return success(schemeUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成庭审笔录
|
||||||
|
* @param arbitrateRecord
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/creatTrialRecord")
|
||||||
|
@PreAuthorize("@ss.hasPermi('caseManagement:list:creatTrialRecord')")
|
||||||
|
public AjaxResult creatTrialRecord(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
|
||||||
|
return caseApplicationService.creatTrialRecord(arbitrateRecord);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
package com.ruoyi.common.utils.file;
|
package com.ruoyi.common.utils.file;
|
||||||
|
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.JsonArray;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
import com.ruoyi.common.config.EsignDemoConfig;
|
import com.ruoyi.common.config.EsignDemoConfig;
|
||||||
import com.ruoyi.common.constant.EsignHeaderConstant;
|
import com.ruoyi.common.constant.EsignHeaderConstant;
|
||||||
|
import com.ruoyi.common.constant.FileTransformation;
|
||||||
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||||
import com.ruoyi.common.enums.EsignRequestType;
|
import com.ruoyi.common.enums.EsignRequestType;
|
||||||
import com.ruoyi.common.exception.EsignDemoException;
|
import com.ruoyi.common.exception.EsignDemoException;
|
||||||
import com.ruoyi.common.utils.EsignHttpHelper;
|
import com.ruoyi.common.utils.EsignHttpHelper;
|
||||||
import com.ruoyi.common.utils.bean.EsignFileBean;
|
import com.ruoyi.common.utils.bean.EsignFileBean;
|
||||||
|
import com.ruoyi.common.utils.uuid.IdUtils;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class SaaSAPIFileUtils {
|
public class SaaSAPIFileUtils {
|
||||||
@@ -79,7 +85,7 @@ public class SaaSAPIFileUtils {
|
|||||||
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr,requestType , jsonParm, header,true);
|
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr,requestType , jsonParm, header,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws EsignDemoException {
|
public static void main1(String[] args) throws EsignDemoException {
|
||||||
String filePath = "D:\\home\\ruoyi\\uploadPath\\upload\\2023\\10\\7\\23893bfd3f2249ffa5c82850c11c482e.docx";
|
String filePath = "D:\\home\\ruoyi\\uploadPath\\upload\\2023\\10\\7\\23893bfd3f2249ffa5c82850c11c482e.docx";
|
||||||
EsignHttpResponse uploadUrl = getUploadUrl(filePath);
|
EsignHttpResponse uploadUrl = getUploadUrl(filePath);
|
||||||
String body = uploadUrl.getBody();
|
String body = uploadUrl.getBody();
|
||||||
@@ -96,5 +102,34 @@ public class SaaSAPIFileUtils {
|
|||||||
// System.out.println("这是获取文件上传状态的结果:"+fileStatus.getBody());
|
// System.out.println("这是获取文件上传状态的结果:"+fileStatus.getBody());
|
||||||
// getFileStatus("a808f1f39a744357a2f018e4ab34c55d");
|
// getFileStatus("a808f1f39a744357a2f018e4ab34c55d");
|
||||||
// fileDownloadUrl("");
|
// fileDownloadUrl("");
|
||||||
|
}
|
||||||
|
public static void main(String[] args) throws EsignDemoException {
|
||||||
|
String signFlowId = "41e6732b48c54c63a91b2379c352212d";
|
||||||
|
Gson gson = new Gson();
|
||||||
|
EsignHttpResponse fileDownload = 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();
|
||||||
|
String fileName = java.util.UUID.randomUUID().toString().replace("-", "") + ".pdf";
|
||||||
|
String savePath = "/home/ruoyi/uploadPath/upload";
|
||||||
|
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 saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||||
|
String dir = "F:\\ymkf\\shanghaixm\\testCaijueshu\\" + fileName;
|
||||||
|
String fileDownloadUrlnew = fileDownloadUrl.substring(1,fileDownloadUrl.length()-1);
|
||||||
|
FileTransformation.downLoadFileByUrl(fileDownloadUrlnew,dir);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,6 +101,16 @@ public class CaseApplication extends BaseEntity {
|
|||||||
|
|
||||||
/** 案件描述 */
|
/** 案件描述 */
|
||||||
private String caseDescribe;
|
private String caseDescribe;
|
||||||
|
/** 裁决书URL */
|
||||||
|
private String filearbitraUrl;
|
||||||
|
|
||||||
|
public String getFilearbitraUrl() {
|
||||||
|
return filearbitraUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFilearbitraUrl(String filearbitraUrl) {
|
||||||
|
this.filearbitraUrl = filearbitraUrl;
|
||||||
|
}
|
||||||
|
|
||||||
/** 是否同意组庭 */
|
/** 是否同意组庭 */
|
||||||
private Integer isAgreePendTral;
|
private Integer isAgreePendTral;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
|
|||||||
|
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -14,4 +15,7 @@ public interface CaseAttachMapper {
|
|||||||
|
|
||||||
|
|
||||||
int updateCaseAttach(CaseAttach caseAttach);
|
int updateCaseAttach(CaseAttach caseAttach);
|
||||||
|
|
||||||
|
int updateCaseAttachBycaseid(CaseAttach caseAttach);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -1,6 +1,8 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.service;
|
package com.ruoyi.wisdomarbitrate.service;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.exception.EsignDemoException;
|
import com.ruoyi.common.exception.EsignDemoException;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
||||||
@@ -46,4 +48,6 @@ public interface ICaseApplicationService {
|
|||||||
SealSignRecord selectSignUrl(CaseApplication caseApplication) throws EsignDemoException;
|
SealSignRecord selectSignUrl(CaseApplication caseApplication) throws EsignDemoException;
|
||||||
|
|
||||||
SealSignRecord selectSealUrl(CaseApplication caseApplication) throws EsignDemoException;
|
SealSignRecord selectSealUrl(CaseApplication caseApplication) throws EsignDemoException;
|
||||||
|
|
||||||
|
AjaxResult creatTrialRecord(ArbitrateRecord arbitrateRecord);
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-4
@@ -56,6 +56,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
private ICaseLogRecordService caseLogRecordService;
|
private ICaseLogRecordService caseLogRecordService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public AjaxResult createDocument(CaseApplication caseApplication) {
|
public AjaxResult createDocument(CaseApplication caseApplication) {
|
||||||
try {
|
try {
|
||||||
Map<String, Object> datas = new HashMap<>();
|
Map<String, Object> datas = new HashMap<>();
|
||||||
@@ -125,10 +126,10 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
datas.put("year", year);
|
datas.put("year", year);
|
||||||
datas.put("months", month);
|
datas.put("months", month);
|
||||||
datas.put("day", day);
|
datas.put("day", day);
|
||||||
String modalFilePath = "/data/arbitrate-document/template/仲裁裁决书模板.docx";
|
// String modalFilePath = "/data/arbitrate-document/template/仲裁裁决书模板.docx";
|
||||||
//String modalFilePath = "D:/develop/仲裁裁决书模板 (2).docx";
|
String modalFilePath = "D:/develop/仲裁裁决书模板 (2).docx";
|
||||||
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
// String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||||
//String saveFolderPath = "D:/data/" + now.getYear() + "/" + now.getMonthValue() + "/" + now.getDayOfMonth();
|
String saveFolderPath = "D:/data/" + now.getYear() + "/" + now.getMonthValue() + "/" + now.getDayOfMonth();
|
||||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
|
String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
|
||||||
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||||
|
|||||||
+174
@@ -20,6 +20,7 @@ import com.ruoyi.common.core.domain.entity.SysDept;
|
|||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.exception.EsignDemoException;
|
import com.ruoyi.common.exception.EsignDemoException;
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
|
import com.ruoyi.common.utils.WordUtil;
|
||||||
import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
|
import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
|
||||||
|
|
||||||
|
|
||||||
@@ -44,8 +45,14 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.nio.file.StandardCopyOption;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.ZoneId;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -75,6 +82,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
private SysUserMapper sysUserMapper;
|
private SysUserMapper sysUserMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SealSignRecordMapper sealSignRecordMapper;
|
private SealSignRecordMapper sealSignRecordMapper;
|
||||||
|
@Autowired
|
||||||
|
private CaseLogRecordMapper caseLogRecordMapper;
|
||||||
// 手机号正则
|
// 手机号正则
|
||||||
private static final Pattern TELEPHONE_REGX = Pattern.compile("^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$");
|
private static final Pattern TELEPHONE_REGX = Pattern.compile("^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$");
|
||||||
|
|
||||||
@@ -968,6 +977,171 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
return sealSignRecordReslt;
|
return sealSignRecordReslt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public AjaxResult creatTrialRecord(ArbitrateRecord arbitrateRecordselect) {
|
||||||
|
//生成仲裁结果
|
||||||
|
CaseApplication caseApplicationselect = new CaseApplication();
|
||||||
|
caseApplicationselect.setId(arbitrateRecordselect.getCaseAppliId());
|
||||||
|
CaseApplication caseApplication = caseApplicationMapper.selectCaseApplication(caseApplicationselect);
|
||||||
|
String createBy = caseApplication.getCreateBy();
|
||||||
|
if (createBy!=null){
|
||||||
|
arbitrateRecordselect.setCreateBy(createBy);
|
||||||
|
}
|
||||||
|
//先判断案件是否已经提交过仲裁结果
|
||||||
|
ArbitrateRecord arbitrateRecordsele = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecordselect);
|
||||||
|
if (arbitrateRecordsele!=null){
|
||||||
|
int i = arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecordselect);
|
||||||
|
if (i>0){
|
||||||
|
//案件日志表里添加数据
|
||||||
|
CaseLogRecord caseLogRecord = new CaseLogRecord();
|
||||||
|
caseLogRecord.setCaseAppliId(caseApplication.getId());
|
||||||
|
caseLogRecord.setCaseNode(caseApplication.getCaseStatus());
|
||||||
|
if (createBy!=null){
|
||||||
|
caseLogRecord.setCreateBy(createBy);
|
||||||
|
}
|
||||||
|
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
|
||||||
|
|
||||||
|
// 新增日志
|
||||||
|
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.GENERATED_ARBITRATION,"");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
//提交仲裁结果
|
||||||
|
int i = arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecordselect);
|
||||||
|
|
||||||
|
if (i>0){
|
||||||
|
//案件日志表里添加数据
|
||||||
|
CaseLogRecord caseLogRecord = new CaseLogRecord();
|
||||||
|
caseLogRecord.setCaseAppliId(caseApplication.getId());
|
||||||
|
caseLogRecord.setCaseNode(caseApplication.getCaseStatus());
|
||||||
|
if (createBy!=null){
|
||||||
|
caseLogRecord.setCreateBy(createBy);
|
||||||
|
}
|
||||||
|
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
|
||||||
|
|
||||||
|
// 新增日志
|
||||||
|
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.GENERATED_ARBITRATION,"");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//生成庭审笔录
|
||||||
|
try {
|
||||||
|
Map<String, Object> datas = new HashMap<>();
|
||||||
|
Long id = caseApplication.getId();
|
||||||
|
if (id == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取仲裁记录表里的相关信息
|
||||||
|
ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
|
||||||
|
arbitrateRecord.setCaseAppliId(id);
|
||||||
|
ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
|
||||||
|
|
||||||
|
//获取案件关联人信息
|
||||||
|
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||||
|
caseAffiliate.setCaseAppliId(id);
|
||||||
|
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
||||||
|
if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
||||||
|
for (CaseAffiliate affiliate : caseAffiliates) {
|
||||||
|
//获取身份类型
|
||||||
|
int identityType = affiliate.getIdentityType();
|
||||||
|
if (identityType == 1) { //申请人
|
||||||
|
datas.put("appName", affiliate.getName());
|
||||||
|
datas.put("appIDNo", affiliate.getIdentityNum());
|
||||||
|
datas.put("appAddress", affiliate.getContactAddress());
|
||||||
|
datas.put("appAgentName", affiliate.getNameAgent());
|
||||||
|
datas.put("appAgentIDNo", affiliate.getIdentityNumAgent());
|
||||||
|
} else if (identityType == 2) { //被申请人
|
||||||
|
datas.put("resName", affiliate.getName());
|
||||||
|
datas.put("resIDNo", affiliate.getIdentityNum());
|
||||||
|
datas.put("resAddress", affiliate.getContactAddress());
|
||||||
|
datas.put("resAgentName", affiliate.getNameAgent());
|
||||||
|
datas.put("resAgentIDNo", affiliate.getIdentityNumAgent());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String arbitratorName = caseApplication.getArbitratorName();
|
||||||
|
datas.put("caseName", caseApplication.getCaseName());
|
||||||
|
datas.put("arbitratorName", arbitratorName);
|
||||||
|
Date hearDate = caseApplication.getHearDate();
|
||||||
|
if (hearDate != null) {
|
||||||
|
LocalDate localDate = hearDate.toInstant()
|
||||||
|
.atZone(ZoneId.systemDefault())
|
||||||
|
.toLocalDate();
|
||||||
|
datas.put("hearYear", localDate.getYear());
|
||||||
|
datas.put("hearMonths", localDate.getMonthValue());
|
||||||
|
datas.put("hearDay", localDate.getDayOfMonth());
|
||||||
|
} else {
|
||||||
|
datas.put("hearYear", null);
|
||||||
|
datas.put("hearMonths", null);
|
||||||
|
datas.put("hearDay", null);
|
||||||
|
}
|
||||||
|
datas.put("appArbitrationClaims", caseApplication.getArbitratClaims());
|
||||||
|
if (arbitrateRecord1 != null) {
|
||||||
|
datas.put("evidenDetermi", arbitrateRecord1.getEvidenDetermi());
|
||||||
|
datas.put("factDetermi", arbitrateRecord1.getFactDetermi());
|
||||||
|
datas.put("caseSketch", arbitrateRecord1.getCaseSketch());
|
||||||
|
datas.put("arbitrateThink", arbitrateRecord1.getArbitrateThink());
|
||||||
|
datas.put("rulingFollows", arbitrateRecord1.getRulingFollows());
|
||||||
|
}
|
||||||
|
datas.put("legalProvisions", "仲裁法");
|
||||||
|
LocalDate now = LocalDate.now();
|
||||||
|
String year = Integer.toString(now.getYear());
|
||||||
|
String month = String.format("%02d", now.getMonthValue());
|
||||||
|
String day = String.format("%02d", now.getDayOfMonth());
|
||||||
|
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 fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
|
||||||
|
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||||
|
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||||
|
// 创建日期目录
|
||||||
|
File saveFolder = new File(saveFolderPath);
|
||||||
|
if (!saveFolder.exists()) {
|
||||||
|
saveFolder.mkdirs();
|
||||||
|
}
|
||||||
|
Path sourcePath = new File(modalFilePath).toPath();
|
||||||
|
Path destinationPath = new File(resultFilePath).toPath();
|
||||||
|
Files.copy(sourcePath, destinationPath, StandardCopyOption.REPLACE_EXISTING);
|
||||||
|
String docFilePath = WordUtil.getDocFilePath(datas, modalFilePath, resultFilePath);
|
||||||
|
String savePath = docFilePath.substring(0, docFilePath.indexOf("/upload/") + 8);
|
||||||
|
|
||||||
|
// String savePath = saveFolderPath;
|
||||||
|
// saveName = fileName;
|
||||||
|
|
||||||
|
//将庭审笔录保存到附件表里
|
||||||
|
CaseAttach caseAttach = CaseAttach.builder()
|
||||||
|
.caseAppliId(id)
|
||||||
|
.annexName(saveName)
|
||||||
|
.annexPath(savePath)
|
||||||
|
.annexType(7)
|
||||||
|
.build();
|
||||||
|
int i = caseAttachMapper.save(caseAttach);
|
||||||
|
if (i > 0) {
|
||||||
|
if (arbitrateRecord1 != null) {
|
||||||
|
Integer annexId = caseAttach.getAnnexId();
|
||||||
|
//将附件id保存到仲裁记录表里面
|
||||||
|
arbitrateRecord1.setAnnexId(annexId);
|
||||||
|
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//获取案件详细信息
|
||||||
|
CaseApplication caseApplicationSelct = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||||
|
return AjaxResult.success(caseApplicationSelct);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return AjaxResult.error("生成庭审笔录异常");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public int pendTralSure(CaseApplication caseApplication) {
|
public int pendTralSure(CaseApplication caseApplication) {
|
||||||
|
|||||||
+12
-4
@@ -4,18 +4,23 @@ import com.google.gson.Gson;
|
|||||||
import com.google.gson.JsonArray;
|
import com.google.gson.JsonArray;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||||
|
import com.ruoyi.common.constant.FileTransformation;
|
||||||
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||||
import com.ruoyi.common.exception.EsignDemoException;
|
import com.ruoyi.common.exception.EsignDemoException;
|
||||||
import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
|
import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
||||||
|
import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper;
|
import com.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class FixSelectFlowDetailUtils {
|
public class FixSelectFlowDetailUtils {
|
||||||
@@ -24,8 +29,10 @@ public class FixSelectFlowDetailUtils {
|
|||||||
private CaseApplicationMapper caseApplicationMapper;
|
private CaseApplicationMapper caseApplicationMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SealSignRecordMapper sealSignRecordMapper;
|
private SealSignRecordMapper sealSignRecordMapper;
|
||||||
|
@Autowired
|
||||||
|
private CaseAttachMapper caseAttachMapper;
|
||||||
|
|
||||||
@Scheduled(cron = "0/3 * * * * ?")
|
// @Scheduled(cron = "0/3 * * * * ?")
|
||||||
public void fixExecuteSelectFlowDetailUtils() throws EsignDemoException {
|
public void fixExecuteSelectFlowDetailUtils() throws EsignDemoException {
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
|
|
||||||
@@ -83,8 +90,6 @@ public class FixSelectFlowDetailUtils {
|
|||||||
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||||
if(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.ARBITRATED_SEAL){
|
if(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.ARBITRATED_SEAL){
|
||||||
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
||||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
||||||
|
|
||||||
//下载审核完成的裁决书,
|
//下载审核完成的裁决书,
|
||||||
String signFlowId = sealSignRecord.getSignFlowid();
|
String signFlowId = sealSignRecord.getSignFlowid();
|
||||||
EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
|
EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
|
||||||
@@ -96,8 +101,11 @@ public class FixSelectFlowDetailUtils {
|
|||||||
String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
||||||
//修改"签署用印记录表"的状态为签署完成
|
//修改"签署用印记录表"的状态为签署完成
|
||||||
sealSignRecord.setSignFlowStatus(3);
|
sealSignRecord.setSignFlowStatus(3);
|
||||||
sealSignRecord.setFileDownloadUrl(fileDownloadUrl);
|
sealSignRecord.setFileDownloadUrl(fileDownloadUrl.substring(1,fileDownloadUrl.length()-1));
|
||||||
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
||||||
|
String filearbitraUrl = fileDownloadUrl.substring(1,fileDownloadUrl.length()-1);
|
||||||
|
caseApplication.setFilearbitraUrl(filearbitraUrl);
|
||||||
|
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
<result property="arbitratorName" column="arbitrator_name" />
|
<result property="arbitratorName" column="arbitrator_name" />
|
||||||
<result property="paymentStatus" column="payment_status" />
|
<result property="paymentStatus" column="payment_status" />
|
||||||
<result property="paymentStatusName" column="paymentStatusName" />
|
<result property="paymentStatusName" column="paymentStatusName" />
|
||||||
|
<result property="filearbitraUrl" column="filearbitra_url" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
@@ -55,7 +56,7 @@
|
|||||||
c.hear_date ,c.arbitrat_claims ,
|
c.hear_date ,c.arbitrat_claims ,
|
||||||
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
|
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
|
||||||
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
|
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
|
||||||
c.update_by ,c.update_time , c.arbitrator_name,d.dept_name as applicantName,c.register_date
|
c.update_by ,c.update_time , c.arbitrator_name,d.dept_name as applicantName,c.register_date,c.filearbitra_url
|
||||||
from case_application c
|
from case_application c
|
||||||
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
|
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
|
||||||
LEFT JOIN sys_dept d ON ca.NAME = d.dept_id and ca.name=d.dept_id
|
LEFT JOIN sys_dept d ON ca.NAME = d.dept_id and ca.name=d.dept_id
|
||||||
@@ -181,6 +182,7 @@
|
|||||||
<if test="objectionAddEviden != null">objection_add_eviden = #{objectionAddEviden},</if>
|
<if test="objectionAddEviden != null">objection_add_eviden = #{objectionAddEviden},</if>
|
||||||
<if test="openCourtHear != null">open_court_hear = #{openCourtHear},</if>
|
<if test="openCourtHear != null">open_court_hear = #{openCourtHear},</if>
|
||||||
<if test="hearDate != null">hear_date = #{hearDate},</if>
|
<if test="hearDate != null">hear_date = #{hearDate},</if>
|
||||||
|
<if test="filearbitraUrl != null and filearbitraUrl != ''">filearbitra_url = #{filearbitraUrl},</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -49,6 +49,22 @@
|
|||||||
where annex_id = #{annexId}
|
where annex_id = #{annexId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updateCaseAttachBycaseid" parameterType="CaseAttach">
|
||||||
|
update case_attach
|
||||||
|
<set>
|
||||||
|
<if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
|
||||||
|
<if test="annexPath != null and annexPath != ''">annex_path = #{annexPath}</if>
|
||||||
|
</set>
|
||||||
|
<where>
|
||||||
|
<if test="caseAppliId != null ">
|
||||||
|
AND case_appli_id = #{caseAppliId}
|
||||||
|
</if>
|
||||||
|
<if test="annexType != null ">
|
||||||
|
AND annex_type = #{annexType}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user