Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into hjb
This commit is contained in:
+1
@@ -120,6 +120,7 @@ public class AdjudicationController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/archives")
|
@GetMapping("/archives")
|
||||||
public AjaxResult getArchivesDetail(Long id){
|
public AjaxResult getArchivesDetail(Long id){
|
||||||
|
|
||||||
return adjudicationService.getArchivesDetail(id);
|
return adjudicationService.getArchivesDetail(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+102
-95
@@ -37,120 +37,127 @@ public class FixSelectFlowDetailUtils {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private DeptIdentifyMapper deptIdentifyMapper;
|
private DeptIdentifyMapper deptIdentifyMapper;
|
||||||
|
|
||||||
@Scheduled(cron = "0/3 * * * * ?")
|
@Scheduled(cron = "0/10 * * * * ?")
|
||||||
@Transactional
|
@Transactional
|
||||||
public void fixExecuteSelectFlowDetailUtils() throws EsignDemoException {
|
public void fixExecuteSelectFlowDetailUtils(){
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
|
|
||||||
SealSignRecord sealSignRecordselect = new SealSignRecord();
|
SealSignRecord sealSignRecordselect = new SealSignRecord();
|
||||||
// sealSignRecordselect.setSignFlowStatus(1);
|
// sealSignRecordselect.setSignFlowStatus(1);
|
||||||
List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecordbyStat(sealSignRecordselect);
|
List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecordbyStat(sealSignRecordselect);
|
||||||
if(sealSignRecords!=null&&sealSignRecords.size()>0){
|
|
||||||
for (int i = 0; i < sealSignRecords.size(); i++) {
|
|
||||||
SealSignRecord sealSignRecord = sealSignRecords.get(i);
|
|
||||||
EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
|
|
||||||
JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
|
|
||||||
JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
|
|
||||||
JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
|
|
||||||
Integer psnsignStatus = null;
|
|
||||||
Integer orgsignStatus = null;
|
|
||||||
for (int j = 0; j < signersArray.size(); j++) {
|
|
||||||
JsonObject signerObject = (JsonObject)signersArray.get(j);
|
|
||||||
|
|
||||||
if(!(signerObject.get("psnSigner").toString()).equals("null")){
|
try {
|
||||||
JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
|
if(sealSignRecords!=null&&sealSignRecords.size()>0){
|
||||||
if(psnSignerData!=null){
|
for (int i = 0; i < sealSignRecords.size(); i++) {
|
||||||
psnsignStatus = signerObject.get("signStatus").getAsInt();
|
SealSignRecord sealSignRecord = sealSignRecords.get(i);
|
||||||
}
|
EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
|
||||||
}
|
JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
|
||||||
if(!(signerObject.get("orgSigner").toString()).equals("null")){
|
JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
|
||||||
JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
|
JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
|
||||||
if(orgSignerData!=null){
|
Integer psnsignStatus = null;
|
||||||
orgsignStatus = signerObject.get("signStatus").getAsInt();
|
Integer orgsignStatus = null;
|
||||||
}
|
for (int j = 0; j < signersArray.size(); j++) {
|
||||||
}
|
JsonObject signerObject = (JsonObject)signersArray.get(j);
|
||||||
|
|
||||||
}
|
|
||||||
if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==1)){
|
|
||||||
//更新立案申请状态为待用印
|
|
||||||
CaseApplication caseApplication = new CaseApplication();
|
|
||||||
caseApplication.setId(sealSignRecord.getCaseAppliId());
|
|
||||||
|
|
||||||
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
|
||||||
if(caseApplicationselect!=null){
|
|
||||||
if((caseApplicationselect.getCaseStatus()!=null)&&(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.SIGN_ARBITRATION)){
|
|
||||||
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
|
|
||||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
||||||
|
|
||||||
//修改"签署用印记录表"的状态为待用印
|
|
||||||
sealSignRecord.setSignFlowStatus(2);
|
|
||||||
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==2)){
|
|
||||||
//更新立案申请状态为待送达
|
|
||||||
CaseApplication caseApplication = new CaseApplication();
|
|
||||||
caseApplication.setId(sealSignRecord.getCaseAppliId());
|
|
||||||
|
|
||||||
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
|
||||||
if(caseApplicationselect!=null){
|
|
||||||
if((caseApplicationselect.getCaseStatus()!=null)&&(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.ARBITRATED_SEAL)){
|
|
||||||
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
|
||||||
//下载审核完成的裁决书,
|
|
||||||
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();
|
|
||||||
//修改"签署用印记录表"的状态为签署完成
|
|
||||||
sealSignRecord.setSignFlowStatus(3);
|
|
||||||
sealSignRecord.setFileDownloadUrl(fileDownloadUrl.substring(1,fileDownloadUrl.length()-1));
|
|
||||||
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
|
||||||
|
|
||||||
String filearbitraUrl = fileDownloadUrl.substring(1,fileDownloadUrl.length()-1);
|
|
||||||
caseApplication.setFilearbitraUrl(filearbitraUrl);
|
|
||||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
||||||
|
|
||||||
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";
|
|
||||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
|
||||||
String fileDownloadUrlnew = fileDownloadUrl.substring(1,fileDownloadUrl.length()-1);
|
|
||||||
FileTransformation.downLoadFileByUrl(fileDownloadUrlnew,resultFilePath);
|
|
||||||
|
|
||||||
Long caseAppliId = sealSignRecord.getCaseAppliId();
|
|
||||||
CaseAttach caseAttach = new CaseAttach();
|
|
||||||
caseAttach.setCaseAppliId(caseAppliId);
|
|
||||||
caseAttach.setAnnexType(3);
|
|
||||||
caseAttach.setAnnexPath(savePath);
|
|
||||||
caseAttach.setAnnexName(saveName);
|
|
||||||
caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
|
||||||
|
|
||||||
|
if(!(signerObject.get("psnSigner").toString()).equals("null")){
|
||||||
|
JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
|
||||||
|
if(psnSignerData!=null){
|
||||||
|
psnsignStatus = signerObject.get("signStatus").getAsInt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!(signerObject.get("orgSigner").toString()).equals("null")){
|
||||||
|
JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
|
||||||
|
if(orgSignerData!=null){
|
||||||
|
orgsignStatus = signerObject.get("signStatus").getAsInt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==1)){
|
||||||
|
//更新立案申请状态为待用印
|
||||||
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
|
caseApplication.setId(sealSignRecord.getCaseAppliId());
|
||||||
|
|
||||||
|
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||||
|
if(caseApplicationselect!=null){
|
||||||
|
if((caseApplicationselect.getCaseStatus()!=null)&&(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.SIGN_ARBITRATION)){
|
||||||
|
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
|
||||||
|
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
|
|
||||||
|
//修改"签署用印记录表"的状态为待用印
|
||||||
|
sealSignRecord.setSignFlowStatus(2);
|
||||||
|
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==2)){
|
||||||
|
//更新立案申请状态为待送达
|
||||||
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
|
caseApplication.setId(sealSignRecord.getCaseAppliId());
|
||||||
|
|
||||||
|
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||||
|
if(caseApplicationselect!=null){
|
||||||
|
if((caseApplicationselect.getCaseStatus()!=null)&&(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.ARBITRATED_SEAL)){
|
||||||
|
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
||||||
|
//下载审核完成的裁决书,
|
||||||
|
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();
|
||||||
|
//修改"签署用印记录表"的状态为签署完成
|
||||||
|
sealSignRecord.setSignFlowStatus(3);
|
||||||
|
sealSignRecord.setFileDownloadUrl(fileDownloadUrl.substring(1,fileDownloadUrl.length()-1));
|
||||||
|
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
||||||
|
|
||||||
|
String filearbitraUrl = fileDownloadUrl.substring(1,fileDownloadUrl.length()-1);
|
||||||
|
caseApplication.setFilearbitraUrl(filearbitraUrl);
|
||||||
|
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
|
|
||||||
|
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";
|
||||||
|
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||||
|
String fileDownloadUrlnew = fileDownloadUrl.substring(1,fileDownloadUrl.length()-1);
|
||||||
|
boolean b = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
|
||||||
|
if(b) {
|
||||||
|
Long caseAppliId = sealSignRecord.getCaseAppliId();
|
||||||
|
CaseAttach caseAttach = new CaseAttach();
|
||||||
|
caseAttach.setCaseAppliId(caseAppliId);
|
||||||
|
caseAttach.setAnnexType(3);
|
||||||
|
caseAttach.setAnnexPath(savePath);
|
||||||
|
caseAttach.setAnnexName(saveName);
|
||||||
|
caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} catch (EsignDemoException e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Scheduled(cron = "0/10 * * * * ?")
|
@Scheduled(cron = "0/30 * * * * ?")
|
||||||
@Transactional
|
@Transactional
|
||||||
public void fixExecuteSelectDeptIndentifyUtils() throws EsignDemoException {
|
public void fixExecuteSelectDeptIndentifyUtils() throws EsignDemoException {
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import com.ruoyi.common.utils.EsignHttpHelper;
|
|||||||
import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
|
import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -28,7 +29,6 @@ public class SignAward {
|
|||||||
|
|
||||||
SealSignRecord sealSignRecord = new SealSignRecord();
|
SealSignRecord sealSignRecord = new SealSignRecord();
|
||||||
|
|
||||||
|
|
||||||
/* 发起签署*/
|
/* 发起签署*/
|
||||||
// EsignHttpResponse createByFile = createByFile(sealSignRecord);
|
// EsignHttpResponse createByFile = createByFile(sealSignRecord);
|
||||||
// JsonObject createByFileJsonObject = gson.fromJson(createByFile.getBody(), JsonObject.class);
|
// JsonObject createByFileJsonObject = gson.fromJson(createByFile.getBody(), JsonObject.class);
|
||||||
|
|||||||
Reference in New Issue
Block a user