调解书签收
This commit is contained in:
+13
@@ -89,6 +89,19 @@ public class MsSignSealController extends BaseController {
|
|||||||
return msSignSealService.msCaseFile(dto.getIds());
|
return msSignSealService.msCaseFile(dto.getIds());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签收
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/msCaseSign")
|
||||||
|
public AjaxResult msCaseSign(@RequestBody MsSignSealDTO dto){
|
||||||
|
if (dto.getCaseId() == null) {
|
||||||
|
return error("参数校验失败");
|
||||||
|
}
|
||||||
|
return msSignSealService.msCaseSign(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+10
@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.domain.dto.mscase;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@@ -22,6 +23,15 @@ public class MsSignSealDTO {
|
|||||||
|
|
||||||
private List<Long> ids;
|
private List<Long> ids;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人是否签收
|
||||||
|
*/
|
||||||
|
private Integer isSignApply;
|
||||||
|
/**
|
||||||
|
* 被申请人是否签收
|
||||||
|
*/
|
||||||
|
private Integer isSignRespon;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+11
@@ -127,4 +127,15 @@ public class MsCaseAffiliate {
|
|||||||
*/
|
*/
|
||||||
@Column(name = "respondent_track_num")
|
@Column(name = "respondent_track_num")
|
||||||
private String respondentTrackNum;
|
private String respondentTrackNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人是否签收
|
||||||
|
*/
|
||||||
|
@Column(name = "is_sign_apply")
|
||||||
|
private Integer isSignApply;
|
||||||
|
/**
|
||||||
|
* 被申请人是否签收
|
||||||
|
*/
|
||||||
|
@Column(name = "is_sign_respon")
|
||||||
|
private Integer isSignRespon;
|
||||||
}
|
}
|
||||||
+2
@@ -24,4 +24,6 @@ public interface MsSignSealService {
|
|||||||
List<MsCaseLogRecordVO> selectCaseLogRecordList(MsSignSealDTO dto);
|
List<MsCaseLogRecordVO> selectCaseLogRecordList(MsSignSealDTO dto);
|
||||||
|
|
||||||
AjaxResult msCaseFile(List<Long> ids);
|
AjaxResult msCaseFile(List<Long> ids);
|
||||||
|
|
||||||
|
AjaxResult msCaseSign(MsSignSealDTO dto);
|
||||||
}
|
}
|
||||||
|
|||||||
+35
@@ -601,6 +601,41 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
|||||||
return AjaxResult.success("归档成功");
|
return AjaxResult.success("归档成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public AjaxResult msCaseSign(MsSignSealDTO dto) {
|
||||||
|
Long caseId = dto.getCaseId();
|
||||||
|
MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(caseId);
|
||||||
|
MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(caseId);
|
||||||
|
if (dto.getIsSignApply() != null && dto.getIsSignApply().intValue() == 1) {
|
||||||
|
caseAffiliate.setIsSignApply(1);
|
||||||
|
msCaseAffiliateMapper.updateByPrimaryKeySelective(caseAffiliate);
|
||||||
|
if (caseAffiliate.getIsSignRespon() != null && caseAffiliate.getIsSignRespon().intValue() == 1) {
|
||||||
|
// 根据流程id查找下一个流程节点
|
||||||
|
MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId());
|
||||||
|
caseApplicationselect.setCaseFlowId(nextFlow.getId());
|
||||||
|
caseApplicationselect.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||||
|
caseApplicationMapper.updateByPrimaryKeySelective(caseApplicationselect);
|
||||||
|
CaseLogUtils.insertCaseLog(caseApplicationselect.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"签收");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (dto.getIsSignRespon() != null && dto.getIsSignRespon().intValue() == 1) {
|
||||||
|
caseAffiliate.setIsSignRespon(1);
|
||||||
|
msCaseAffiliateMapper.updateByPrimaryKeySelective(caseAffiliate);
|
||||||
|
if (caseAffiliate.getIsSignApply() != null && caseAffiliate.getIsSignApply().intValue() == 1) {
|
||||||
|
// 根据流程id查找下一个流程节点
|
||||||
|
MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId());
|
||||||
|
caseApplicationselect.setCaseFlowId(nextFlow.getId());
|
||||||
|
caseApplicationselect.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||||
|
caseApplicationMapper.updateByPrimaryKeySelective(caseApplicationselect);
|
||||||
|
CaseLogUtils.insertCaseLog(caseApplicationselect.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"签收");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return AjaxResult.success("签收成功");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过邮件发送裁决书文件
|
* 通过邮件发送裁决书文件
|
||||||
*
|
*
|
||||||
|
|||||||
+45
-2
@@ -244,7 +244,7 @@ public class FixSelectFlowDetailUtils {
|
|||||||
/*
|
/*
|
||||||
定时查询签署流程详情
|
定时查询签署流程详情
|
||||||
*/
|
*/
|
||||||
// @Scheduled(cron = "0/10 * * * * ?")
|
@Scheduled(cron = "0/10 * * * * ?")
|
||||||
@Transactional
|
@Transactional
|
||||||
public void fixExecuteSelectFlowDetailUtils() {
|
public void fixExecuteSelectFlowDetailUtils() {
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
@@ -319,12 +319,55 @@ public class FixSelectFlowDetailUtils {
|
|||||||
application.setCaseFlowId(nextFlow.getId());
|
application.setCaseFlowId(nextFlow.getId());
|
||||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||||
caseApplicationMapper.updateByPrimaryKeySelective(application);
|
caseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||||
|
|
||||||
|
//下载审核完成的调解书
|
||||||
|
String signFlowId = sealSignRecord.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();
|
||||||
|
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 saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||||
|
String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
|
||||||
|
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||||
|
String savePath = "/home/ruoyi/uploadPath/upload/";
|
||||||
|
|
||||||
|
// 创建日期目录
|
||||||
|
File saveFolder = new File(saveFolderPath);
|
||||||
|
if (!saveFolder.exists()) {
|
||||||
|
saveFolder.mkdirs();
|
||||||
|
}
|
||||||
|
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||||
|
File resultFilePathFile = new File(resultFilePath);
|
||||||
|
if (!resultFilePathFile.exists()) {
|
||||||
|
resultFilePathFile.createNewFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
|
||||||
|
boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
|
||||||
|
if (downLoadFile) {
|
||||||
|
Long caseAppliId = sealSignRecord.getCaseAppliId();
|
||||||
|
MsCaseAttach caseAttach = new MsCaseAttach();
|
||||||
|
caseAttach.setCaseAppliId(caseAppliId);
|
||||||
|
caseAttach.setAnnexType(3);
|
||||||
|
caseAttach.setAnnexPath(savePath);
|
||||||
|
caseAttach.setAnnexName(saveName);
|
||||||
|
caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (EsignDemoException e) {
|
} catch (EsignDemoException | IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user