Bläddra i källkod

关系转移流程修改

Wang Zi Wen 2 år sedan
förälder
incheckning
e2c86f78e6

+ 15 - 12
ruoyi-admin/src/main/java/com/ruoyi/web/controller/branch/TBranchMemberController.java

@@ -88,7 +88,19 @@ public class TBranchMemberController extends BaseController
         taskService.addComment(taskId, processInstancesId, devTask.getComment());
         taskService.complete(taskId, param);
 
-        if (taskName.equals("党总支审核")) {
+        if (taskName.equals("支部申请")) {
+            if (condition.equals("1")) {
+                // 修改 xxx对象的属性后,前端会把 xxx对象转为 LinkedHashMap类型,
+                // 为了避免出现 java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to xxx 类型转换异常,
+                // 将 LinkedHashMap转为 JSON字符串,再转回 xxx类型。
+                TBranchMember newMember = JSONObject.parseObject(JSON.toJSONString(devTask.getObj()), TBranchMember.class);
+                member.setNewDeptId(newMember.getNewDeptId());
+            } else {
+                member.setApStatus("1");
+            }
+        } else if (taskName.equals("党支部审核")) {
+
+        } else if (taskName.equals("党总支审核")) {
             if (condition.equals("1")) {
                 // 新增一条党员关系转移记录
                 TBranchMemTransfer transfer = new TBranchMemTransfer();
@@ -104,16 +116,6 @@ public class TBranchMemberController extends BaseController
             } else {
 
             }
-        } else if (taskName.equals("支部申请")) {
-            if (condition.equals("1")) {
-                // 修改 xxx对象的属性后,前端会把 xxx对象转为 LinkedHashMap类型,
-                // 为了避免出现 java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to xxx 类型转换异常,
-                // 将 LinkedHashMap转为 JSON字符串,再转回 xxx类型。
-                TBranchMember newMember = JSONObject.parseObject(JSON.toJSONString(devTask.getObj()), TBranchMember.class);
-                member.setNewDeptId(newMember.getNewDeptId());
-            } else {
-                member.setApStatus("1");
-            }
         }
         // 更新支部成员表
         tBranchMemberService.updateTBranchMember(member);
@@ -134,7 +136,8 @@ public class TBranchMemberController extends BaseController
         Authentication.setAuthenticatedUserId(userId);
         Map<String, Object> variables = new HashMap<>();
         variables.put("applicant", userId);
-        variables.put("assessor", "139");
+        variables.put("verifier1", "120");
+        variables.put("verifier2", "139");
         long businessKey = tBranchMember.getMemberId();
         ProcessInstance pi = runtimeService.startProcessInstanceByKey("commonProcess", String.valueOf(businessKey), variables);
 

+ 59 - 34
ruoyi-common/src/main/resources/processes/common.bpmn

@@ -4,18 +4,25 @@
     <startEvent id="startevent" name="start"></startEvent>
     <endEvent id="endevent" name="end"></endEvent>
     <userTask id="apply" name="支部申请" activiti:assignee="#{applicant}"></userTask>
-    <userTask id="assess" name="党总支审核" activiti:assignee="#{assessor}"></userTask>
-    <sequenceFlow id="flow1" name="提交" sourceRef="startevent" targetRef="apply"></sequenceFlow>
-    <sequenceFlow id="flow2" name="提交" sourceRef="apply" targetRef="assess">
+    <sequenceFlow id="flow1" sourceRef="startevent" targetRef="apply"></sequenceFlow>
+    <userTask id="verify1" name="党支部审核" activiti:assignee="#{verifier1}"></userTask>
+    <sequenceFlow id="flow2" name="提交" sourceRef="apply" targetRef="verify1">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
     </sequenceFlow>
-    <sequenceFlow id="flow3" name="批准" sourceRef="assess" targetRef="endevent">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
+    <sequenceFlow id="flow5" name="驳回" sourceRef="verify1" targetRef="apply">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 0}]]></conditionExpression>
     </sequenceFlow>
-    <sequenceFlow id="flow4" name="驳回" sourceRef="assess" targetRef="apply">
+    <sequenceFlow id="flow7" name="撤销" sourceRef="apply" targetRef="endevent">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 0}]]></conditionExpression>
     </sequenceFlow>
-    <sequenceFlow id="flow5" name="取消" sourceRef="apply" targetRef="endevent">
+    <userTask id="verify2" name="党总支审核" activiti:assignee="#{verifier2}"></userTask>
+    <sequenceFlow id="flow8" name="批准" sourceRef="verify1" targetRef="verify2">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="flow9" name="批准" sourceRef="verify2" targetRef="endevent">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="flow10" name="驳回" sourceRef="verify2" targetRef="apply">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 0}]]></conditionExpression>
     </sequenceFlow>
   </process>
@@ -25,52 +32,70 @@
         <omgdc:Bounds height="35.0" width="35.0" x="60.0" y="140.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="endevent" id="BPMNShape_endevent">
-        <omgdc:Bounds height="35.0" width="35.0" x="680.0" y="140.0"></omgdc:Bounds>
+        <omgdc:Bounds height="35.0" width="35.0" x="740.0" y="140.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="apply" id="BPMNShape_apply">
-        <omgdc:Bounds height="55.0" width="105.0" x="230.0" y="130.0"></omgdc:Bounds>
+        <omgdc:Bounds height="55.0" width="105.0" x="180.0" y="130.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="assess" id="BPMNShape_assess">
-        <omgdc:Bounds height="55.0" width="105.0" x="450.0" y="130.0"></omgdc:Bounds>
+      <bpmndi:BPMNShape bpmnElement="verify1" id="BPMNShape_verify1">
+        <omgdc:Bounds height="55.0" width="105.0" x="355.0" y="130.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="verify2" id="BPMNShape_verify2">
+        <omgdc:Bounds height="55.0" width="105.0" x="550.0" y="130.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
         <omgdi:waypoint x="95.0" y="157.0"></omgdi:waypoint>
-        <omgdi:waypoint x="230.0" y="157.0"></omgdi:waypoint>
+        <omgdi:waypoint x="180.0" y="157.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
+        <omgdi:waypoint x="285.0" y="157.0"></omgdi:waypoint>
+        <omgdi:waypoint x="355.0" y="157.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="32.0" x="139.0" y="140.0"></omgdc:Bounds>
+          <omgdc:Bounds height="16.0" width="100.0" x="300.0" y="140.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
-        <omgdi:waypoint x="335.0" y="157.0"></omgdi:waypoint>
-        <omgdi:waypoint x="450.0" y="157.0"></omgdi:waypoint>
+      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
+        <omgdi:waypoint x="407.0" y="185.0"></omgdi:waypoint>
+        <omgdi:waypoint x="406.0" y="248.0"></omgdi:waypoint>
+        <omgdi:waypoint x="309.0" y="248.0"></omgdi:waypoint>
+        <omgdi:waypoint x="232.0" y="248.0"></omgdi:waypoint>
+        <omgdi:waypoint x="232.0" y="185.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="32.0" x="369.0" y="140.0"></omgdc:Bounds>
+          <omgdc:Bounds height="16.0" width="100.0" x="301.0" y="230.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
-        <omgdi:waypoint x="555.0" y="157.0"></omgdi:waypoint>
-        <omgdi:waypoint x="680.0" y="157.0"></omgdi:waypoint>
+      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
+        <omgdi:waypoint x="232.0" y="130.0"></omgdi:waypoint>
+        <omgdi:waypoint x="232.0" y="86.0"></omgdi:waypoint>
+        <omgdi:waypoint x="494.0" y="86.0"></omgdi:waypoint>
+        <omgdi:waypoint x="756.0" y="86.0"></omgdi:waypoint>
+        <omgdi:waypoint x="757.0" y="140.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="32.0" x="589.0" y="140.0"></omgdc:Bounds>
+          <omgdc:Bounds height="16.0" width="100.0" x="470.0" y="71.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
-        <omgdi:waypoint x="502.0" y="185.0"></omgdi:waypoint>
-        <omgdi:waypoint x="502.0" y="263.0"></omgdi:waypoint>
-        <omgdi:waypoint x="282.0" y="263.0"></omgdi:waypoint>
-        <omgdi:waypoint x="282.0" y="185.0"></omgdi:waypoint>
+      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
+        <omgdi:waypoint x="460.0" y="157.0"></omgdi:waypoint>
+        <omgdi:waypoint x="550.0" y="157.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="32.0" x="370.0" y="230.0"></omgdc:Bounds>
+          <omgdc:Bounds height="16.0" width="100.0" x="479.0" y="140.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
-        <omgdi:waypoint x="282.0" y="130.0"></omgdi:waypoint>
-        <omgdi:waypoint x="282.0" y="73.0"></omgdi:waypoint>
-        <omgdi:waypoint x="582.0" y="72.0"></omgdi:waypoint>
-        <omgdi:waypoint x="696.0" y="72.0"></omgdi:waypoint>
-        <omgdi:waypoint x="697.0" y="140.0"></omgdi:waypoint>
+      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
+        <omgdi:waypoint x="655.0" y="157.0"></omgdi:waypoint>
+        <omgdi:waypoint x="740.0" y="157.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="16.0" width="100.0" x="674.0" y="140.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
+        <omgdi:waypoint x="602.0" y="185.0"></omgdi:waypoint>
+        <omgdi:waypoint x="602.0" y="296.0"></omgdi:waypoint>
+        <omgdi:waypoint x="418.0" y="296.0"></omgdi:waypoint>
+        <omgdi:waypoint x="232.0" y="296.0"></omgdi:waypoint>
+        <omgdi:waypoint x="232.0" y="185.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="32.0" x="453.0" y="52.0"></omgdc:Bounds>
+          <omgdc:Bounds height="16.0" width="100.0" x="400.0" y="279.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>

+ 0 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java

@@ -49,7 +49,6 @@ public class SysDeptServiceImpl implements ISysDeptService
      * @return 部门信息集合
      */
     @Override
-    @DataScope(deptAlias = "d")
     public List<SysDept> selectDeptList(SysDept dept)
     {
         return deptMapper.selectDeptList(dept);

+ 0 - 3
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -42,9 +42,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<if test="status != null and status != ''">
 			AND status = #{status}
 		</if>
-		<!-- 数据范围过滤 -->
-		${params.dataScope}
-		order by d.parent_id, d.order_num
     </select>
 
 	<select id="selectAllDeptList" parameterType="SysDept" resultMap="SysDeptResult">

+ 2 - 2
ruoyi-ui/src/views/branch/approve/detail/common-detail.vue

@@ -31,8 +31,8 @@
     </el-table>
 
     <div slot="footer" class="dialog-footer">
-      <el-button v-if="dialogType == 1" type="success" @click="dataFormSubmit(1)">{{ taskForm.taskName == "党总支审核" ? "通 过" : "提 交" }}</el-button>
-      <el-button v-if="dialogType == 1" type="info" @click="dataFormSubmit(0)">{{ taskForm.taskName == "党总支审核" ? "驳 回" : "撤 销" }}</el-button>
+      <el-button v-if="dialogType == 1" type="success" @click="dataFormSubmit(1)">{{ taskForm.taskName == "支部申请" ? "提 交" : "通 过" }}</el-button>
+      <el-button v-if="dialogType == 1" type="info" @click="dataFormSubmit(0)">{{ taskForm.taskName == "支部申请" ? "撤 销" : "驳 回" }}</el-button>
       <el-button @click="visible = false">返回</el-button>
     </div>
   </el-dialog>