Przeglądaj źródła

签章流程调整

lizhenhao 2 lat temu
rodzic
commit
1c4b9f1d8e

+ 32 - 18
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/controller/CwProjectReportController.java

@@ -140,32 +140,46 @@ public class CwProjectReportController {
     }
 
     /**
-     * 签章流程审核通过
+     * 签章链接
      * @param cwProjectReportData
      * @return
      */
-    @ApiLog(value = "签章流程审核通过", type = LogTypeEnum.SAVE)
+    @ApiLog(value = "签章链接", type = LogTypeEnum.SAVE)
     @PostMapping("saveFlowableParam")
     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);
     }
 
     /**

+ 4 - 4
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/mapper/xml/CwProjectReportMapper.xml

@@ -285,16 +285,16 @@
     <update id="updateSignatureType">
         update cw_project_report_signature
         set
-        id= #{id}
         <if test="signatureAnnotator1Status != null and signatureAnnotator1Status != ''">
-            ,signature_annotator1_status = ${signatureAnnotator1Status}
+            signature_annotator1_status = ${signatureAnnotator1Status}
         </if>
         <if test="signatureAnnotator2Status != null and signatureAnnotator2Status != ''">
-            ,signature_annotator2_status = ${signatureAnnotator2Status}
+            signature_annotator2_status = ${signatureAnnotator2Status}
         </if>
         <if test="sealAdminStatus != null and sealAdminStatus != ''">
-            ,seal_admin_status = ${sealAdminStatus}
+            seal_admin_status = ${sealAdminStatus}
         </if>
+        where id = #{id}
     </update>
 
     <select id="getReportSignatureById" resultType="com.jeeplus.test.cw.projectReport.domain.CwProjectReportSignature">