Merge branch 'qtz3' of SH-Arbitrate/Arbitrate-Backend into dev
This commit was merged in pull request #93.
This commit is contained in:
+9
@@ -99,6 +99,15 @@ public class CaseApplicationController extends BaseController {
|
||||
return success(caseApplicationselect);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询已签署裁决书URL
|
||||
*/
|
||||
@PostMapping("/selectSignSealUrl")
|
||||
public AjaxResult selectSignSealUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
|
||||
CaseApplication caseApplicationselect = caseApplicationService.selectSignSealUrl(caseApplication);
|
||||
return success(caseApplicationselect);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询签名链接
|
||||
*/
|
||||
|
||||
+2
@@ -50,4 +50,6 @@ public interface ICaseApplicationService {
|
||||
SealSignRecord selectSealUrl(CaseApplication caseApplication) throws EsignDemoException;
|
||||
|
||||
AjaxResult creatTrialRecord(ArbitrateRecord arbitrateRecord);
|
||||
|
||||
CaseApplication selectSignSealUrl(CaseApplication caseApplication) throws EsignDemoException;
|
||||
}
|
||||
|
||||
+4
-4
@@ -126,10 +126,10 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
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;
|
||||
|
||||
+46
-16
@@ -1116,24 +1116,31 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
// 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.setAnnexType(7);
|
||||
List<CaseAttach> caseAttachs = caseAttachMapper.queryCaseAttachList(caseApplication);
|
||||
if(caseAttachs!=null&&caseAttachs.size()>0){
|
||||
CaseAttach caseAttach = CaseAttach.builder()
|
||||
.caseAppliId(id)
|
||||
.annexName(saveName)
|
||||
.annexPath(savePath)
|
||||
.annexType(7)
|
||||
.build();
|
||||
int i = caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
||||
|
||||
}else {
|
||||
//将庭审笔录保存到附件表里
|
||||
CaseAttach caseAttach = CaseAttach.builder()
|
||||
.caseAppliId(id)
|
||||
.annexName(saveName)
|
||||
.annexPath(savePath)
|
||||
.annexType(7)
|
||||
.build();
|
||||
int i = caseAttachMapper.save(caseAttach);
|
||||
|
||||
}
|
||||
|
||||
//获取案件详细信息
|
||||
CaseApplication caseApplicationSelct = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
CaseApplication caseApplicationSelct = selectCaseApplication(caseApplication);
|
||||
return AjaxResult.success(caseApplicationSelct);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
@@ -1142,6 +1149,29 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public CaseApplication selectSignSealUrl(CaseApplication caseApplication) throws EsignDemoException {
|
||||
Gson gson = new Gson();
|
||||
SealSignRecord sealSignRecord = new SealSignRecord();
|
||||
sealSignRecord.setCaseAppliId(caseApplication.getId());
|
||||
List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecord(sealSignRecord);
|
||||
if(sealSignRecords!=null&&sealSignRecords.size()>0){
|
||||
String signFlowid = sealSignRecords.get(0).getSignFlowid();
|
||||
EsignHttpResponse fileDownload = SaaSAPIFileUtils.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 filearbitraUrl = fileDownloadUrl.substring(1,fileDownloadUrl.length()-1);
|
||||
caseApplication.setFilearbitraUrl(filearbitraUrl);
|
||||
}
|
||||
}
|
||||
|
||||
return caseApplication;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int pendTralSure(CaseApplication caseApplication) {
|
||||
|
||||
+3
-1
@@ -17,6 +17,7 @@ import com.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
@@ -32,7 +33,8 @@ public class FixSelectFlowDetailUtils {
|
||||
@Autowired
|
||||
private CaseAttachMapper caseAttachMapper;
|
||||
|
||||
// @Scheduled(cron = "0/3 * * * * ?")
|
||||
@Scheduled(cron = "0/3 * * * * ?")
|
||||
@Transactional
|
||||
public void fixExecuteSelectFlowDetailUtils() throws EsignDemoException {
|
||||
Gson gson = new Gson();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user