|
@@ -140,32 +140,46 @@ public class CwProjectReportController {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 签章流程审核通过
|
|
|
|
|
|
+ * 签章链接
|
|
* @param cwProjectReportData
|
|
* @param cwProjectReportData
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- @ApiLog(value = "签章流程审核通过", type = LogTypeEnum.SAVE)
|
|
|
|
|
|
+ @ApiLog(value = "签章链接", type = LogTypeEnum.SAVE)
|
|
@PostMapping("saveFlowableParam")
|
|
@PostMapping("saveFlowableParam")
|
|
public ResponseEntity<String> saveFlowableParam(@Valid @RequestBody CwProjectReportData cwProjectReportData) {
|
|
public ResponseEntity<String> saveFlowableParam(@Valid @RequestBody CwProjectReportData cwProjectReportData) {
|
|
//查询报告文件信息(电子章)
|
|
//查询报告文件信息(电子章)
|
|
- List<WorkAttachment> fileList = attachmentMapper.selectWorkAttachmentByReportId(cwProjectReportData.getId());
|
|
|
|
|
|
+// List<WorkAttachment> fileList = attachmentMapper.selectWorkAttachmentByReportId(cwProjectReportData.getId());
|
|
// 有电子章的附件时,走签章流程
|
|
// 有电子章的附件时,走签章流程
|
|
- if (CollectionUtil.isNotEmpty(fileList)) {
|
|
|
|
- CwProjectReportData cwProjectReportDto = projectReportService.queryById(cwProjectReportData.getId());
|
|
|
|
- // 获取签章页面url
|
|
|
|
- String mobile = UserUtils.getCurrentUserDTO().getMobile();
|
|
|
|
- String signatureContractUrl = SignaturePostUtil.getSignatureContractUrl(cwProjectReportDto.getSignatureContractId(), mobile);
|
|
|
|
- // 将数据存储到redis中,key为contractId
|
|
|
|
- cwProjectReportData.getCommitParamDTO().setVars(cwProjectReportDto);
|
|
|
|
- redisUtils.set("cw_report_signature_" + cwProjectReportDto.getSignatureContractId(),cwProjectReportData.getCommitParamDTO());
|
|
|
|
- redisUtils.expire("cw_report_signature_" + cwProjectReportDto.getSignatureContractId(),24, TimeUnit.HOURS);
|
|
|
|
- return ResponseEntity.ok(signatureContractUrl);
|
|
|
|
- } else {
|
|
|
|
- // 没有电子章的附件时,走正常审核流程
|
|
|
|
- // 流程审核通过
|
|
|
|
- projectReportService.commitFlowable(cwProjectReportData);
|
|
|
|
- return ResponseEntity.ok("操作成功");
|
|
|
|
|
|
+// if (CollectionUtil.isNotEmpty(fileList)) {
|
|
|
|
+// CwProjectReportData cwProjectReportDto = projectReportService.queryById(cwProjectReportData.getId());
|
|
|
|
+// // 获取签章页面url
|
|
|
|
+// String mobile = UserUtils.getCurrentUserDTO().getMobile();
|
|
|
|
+// String signatureContractUrl = SignaturePostUtil.getSignatureContractUrl(cwProjectReportDto.getSignatureContractId(), mobile);
|
|
|
|
+// // 将数据存储到redis中,key为contractId
|
|
|
|
+// cwProjectReportData.getCommitParamDTO().setVars(cwProjectReportDto);
|
|
|
|
+// redisUtils.set("cw_report_signature_" + cwProjectReportDto.getSignatureContractId(),cwProjectReportData.getCommitParamDTO());
|
|
|
|
+// redisUtils.expire("cw_report_signature_" + cwProjectReportDto.getSignatureContractId(),24, TimeUnit.HOURS);
|
|
|
|
+// return ResponseEntity.ok(signatureContractUrl);
|
|
|
|
+// } else {
|
|
|
|
+// // 没有电子章的附件时,走正常审核流程
|
|
|
|
+// // 流程审核通过
|
|
|
|
+// projectReportService.commitFlowable(cwProjectReportData);
|
|
|
|
+// return ResponseEntity.ok("操作成功");
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+ CwProjectReportData cwProjectReportDto = projectReportService.queryById(cwProjectReportData.getId());
|
|
|
|
+ // 获取签章页面url
|
|
|
|
+ String mobile = UserUtils.getCurrentUserDTO().getMobile();
|
|
|
|
+ String signatureContractUrl = SignaturePostUtil.getSignatureContractUrl(cwProjectReportDto.getSignatureContractId(), mobile);
|
|
|
|
+ // 将数据存储到redis中,key为contractId
|
|
|
|
+ if("1".equals(cwProjectReportDto.getSignatureType())) {
|
|
|
|
+ redisUtils.set("cw_report_signature_" + cwProjectReportDto.getSignatureContractId(),cwProjectReportDto.getSid1());
|
|
|
|
+ }
|
|
|
|
+ if("2".equals(cwProjectReportDto.getSignatureType())) {
|
|
|
|
+ redisUtils.set("cw_report_signature_" + cwProjectReportDto.getSignatureContractId(),cwProjectReportDto.getSid2());
|
|
}
|
|
}
|
|
|
|
+ redisUtils.expire("cw_report_signature_" + cwProjectReportDto.getSignatureContractId(),24, TimeUnit.HOURS);
|
|
|
|
+ return ResponseEntity.ok(signatureContractUrl);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|