Browse Source

不备案审核流程修改

wucl 10 months ago
parent
commit
bf36088750

+ 4 - 0
dao/src/main/java/com/dayou/mapper/MajorProductionMapper.java

@@ -56,4 +56,8 @@ public interface MajorProductionMapper extends CustomBaseMapper<MajorProduction>
     MajorProductionVO getMajorProductionById(@Param("productionId") Long productionId);
 
     List<String> getProductionNosByMajorId(@Param("majorId") Long majorId);
+
+    void saveSecondCheckId(@Param("secondCheckId")Long secondCheckId, @Param("businessId")Long businessId, @Param("businessMinId")String businessMinId);
+
+    Long getSecondCheckId( @Param("businessId")Long businessId, @Param("businessMinId")String businessMinId);
 }

+ 9 - 0
dao/src/main/resources/mapper/MajorProductionMapper.xml

@@ -737,4 +737,13 @@
     <select id="getProductionNosByMajorId" parameterType="java.lang.Long" resultType="java.lang.String">
         select report_no from major_production where major_id = #{majorId} and deleted = 0
     </select>
+
+    <update id="saveSecondCheckId">
+        update major_production set second_check_id = #{secondCheckId}
+                                where major_id =#{businessId} and report_no = #{businessMinId} and deleted = 0
+    </update>
+
+    <select id="getSecondCheckId" resultType="java.lang.Long">
+        select second_check_id from major_production where major_id =#{businessId} and report_no = #{businessMinId} and deleted = 0
+    </select>
 </mapper>

+ 2 - 0
dao/src/main/resources/mapper/WorkFlowNodeInstanceMapper.xml

@@ -33,6 +33,8 @@
             wfni.flow_id,
             wfni.node_id,
             wfni.business_id,
+            wfni.business_sub_id,
+            wfni.business_min_id,
             wfni.business_type,
             wfni.sequence,
             wfni.state,

+ 5 - 0
domain/src/main/java/com/dayou/dto/WorkNodeCommit.java

@@ -90,4 +90,9 @@ public class WorkNodeCommit {
      */
     private Boolean landIsRecord;
 
+    /**
+     * 复审人
+     */
+    private Long secondCheckId;
+
 }

+ 5 - 0
domain/src/main/java/com/dayou/entity/MajorProduction.java

@@ -273,6 +273,11 @@ public class MajorProduction extends BaseEntity {
     @TableField(updateStrategy = FieldStrategy.IGNORED)
     private String smallWorkerNo;
 
+    /**
+     * 复审人id
+     */
+    private Long secondCheckId;
+
 
     @TableField(exist = false)
     private List<Long> signatoryId;

+ 9 - 1
service/src/main/java/com/dayou/workflow/handler/MajorNodeHandler.java

@@ -93,12 +93,20 @@ public class MajorNodeHandler extends WorkNodeProcessable {
                                 //备案的话才获取审核的节点
                                 nextWorkNode = workNodeService.getNextWorkNodeByCheckState(currentInstanceNode.getFlowId(),currentInstanceNode.getNodeCode(),
                                         workNodeCommit.getDoSecondCheck(),workNodeCommit.getDoThirdCheck(),1);
+                                //将复审人设置为下一节点处理人
+                                workNodeCommit.setNextHandlerId(workNodeCommit.getSecondCheckId());
+                            } else {
+                              //保存复审人
+                                majorProductionMapper.saveSecondCheckId(workNodeCommit.getSecondCheckId(),currentInstanceNode.getBusinessId(),currentInstanceNode.getBusinessMinId());
                             }
                             break;
                         case CHECK_LAND_REPORT_IS_RECORD:
                                 nextWorkNode = workNodeService.getNextWorkNodeByCheckState(currentInstanceNode.getFlowId(),currentInstanceNode.getNodeCode(),
                                         workNodeCommit.getDoSecondCheck(),workNodeCommit.getDoThirdCheck(),0);
-
+                                //获取复审人
+                                if (RECHECK_REPORT.name().equals(nextWorkNode.getCode())){
+                                    workNodeCommit.setNextHandlerId(majorProductionMapper.getSecondCheckId(currentInstanceNode.getBusinessId(),currentInstanceNode.getBusinessMinId()));
+                                }
                             break;
                         case CHECK_PRODUCTION_TYPE:
                             //1. 获取业务上出具的产品类型。