Przeglądaj źródła

导师带徒 修改流程

jiangbiao 11 miesięcy temu
rodzic
commit
4230fc6425

+ 28 - 0
master/src/main/java/com/ruoyi/project/training/bccnew/domain/TTsApprove.java

@@ -91,6 +91,34 @@ public class TTsApprove extends BaseEntity
 
     private TTsNew tTsNew;
 
+    private String studentId;
+    private String studentName;
+    private Date studentConfirmTime;
+
+    public String getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(String studentId) {
+        this.studentId = studentId;
+    }
+
+    public String getStudentName() {
+        return studentName;
+    }
+
+    public void setStudentName(String studentName) {
+        this.studentName = studentName;
+    }
+
+    public Date getStudentConfirmTime() {
+        return studentConfirmTime;
+    }
+
+    public void setStudentConfirmTime(Date studentConfirmTime) {
+        this.studentConfirmTime = studentConfirmTime;
+    }
+
     public TTsNew gettTsNew() {
         return tTsNew;
     }

+ 11 - 3
master/src/main/java/com/ruoyi/project/training/bccnew/service/impl/TTsApproveServiceImpl.java

@@ -130,6 +130,7 @@ public class TTsApproveServiceImpl implements ITTsApproveService
         // 使用任务id,获取任务对象,获取流程实例id
         Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
         //利用任务对象,获取流程实例id
+        String taskName = task.getName();//实例名
         String processInstancesId = task.getProcessInstanceId();
         TTsNew tTsNew = tTsApprove.gettTsNew();
         // 判断流程
@@ -138,9 +139,16 @@ public class TTsApproveServiceImpl implements ITTsApproveService
         } else if ("0".equals(devTask.getCondition())) {
             devTask.setComment("拒绝" );
         }
-        tTsApprove.setApproverName(username);
-        tTsApprove.setApprover(userId);
-        tTsApprove.setApproveTime(new Date());
+        if (taskName.equals("学员确认")) {
+            tTsApprove.setStudentName(username);
+            tTsApprove.setStudentId(userId);
+            tTsApprove.setStudentConfirmTime(new Date());
+        }
+        if (taskName.equals("装置经理")) {
+            tTsApprove.setApproverName(username);
+            tTsApprove.setApprover(userId);
+            tTsApprove.setApproveTime(new Date());
+        }
         // 处理流程节点
         Map<String, Object> param = new HashMap<>();
         param.put("condition", devTask.getCondition());

+ 23 - 12
master/src/main/resources/processes/bccnew/dsdtTraining.bpmn

@@ -3,8 +3,12 @@
   <process id="dsdtTraining" name="导师带徒经理审批" isExecutable="true">
     <startEvent id="startDsdt" name="开始" activiti:initiator="${applyUser}"></startEvent>
     <userTask id="jlTask" name="装置经理" activiti:assignee="#{jluser}"></userTask>
+    <userTask id="xyTask" name="学员确认" activiti:assignee="#{xyuser}"></userTask>
     <endEvent id="endDsdt" name="End"></endEvent>
-    <sequenceFlow id="flow1" sourceRef="startDsdt" targetRef="jlTask"></sequenceFlow>
+    <sequenceFlow id="flow1" sourceRef="startDsdt" targetRef="xyTask"></sequenceFlow>
+    <sequenceFlow id="flow4" sourceRef="xyTask" targetRef="jlTask">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
+    </sequenceFlow>
     <sequenceFlow id="flow2" name="通过" sourceRef="jlTask" targetRef="endDsdt">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
     </sequenceFlow>
@@ -19,32 +23,39 @@
         <omgdc:Bounds height="35.0" width="35.0" x="70.0" y="60.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="jlTask" id="BPMNShape_jlTask">
-        <omgdc:Bounds height="55.0" width="105.0" x="170.0" y="50.0"></omgdc:Bounds>
+        <omgdc:Bounds height="55.0" width="105.0" x="305.0" y="50.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="xyTask" id="BPMNShape_xyTask">
+        <omgdc:Bounds height="55.0" width="105.0" x="160.0" y="50.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="endDsdt" id="BPMNShape_endDsdt">
-        <omgdc:Bounds height="35.0" width="35.0" x="340.0" y="60.0"></omgdc:Bounds>
+        <omgdc:Bounds height="35.0" width="35.0" x="470.0" y="60.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="endDsdt2" id="BPMNShape_endDsdt2">
-        <omgdc:Bounds height="35.0" width="35.0" x="205.0" y="140.0"></omgdc:Bounds>
+        <omgdc:Bounds height="35.0" width="35.0" x="340.0" y="140.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
         <omgdi:waypoint x="105.0" y="77.0"></omgdi:waypoint>
-        <omgdi:waypoint x="170.0" y="77.0"></omgdi:waypoint>
+        <omgdi:waypoint x="160.0" y="77.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
+        <omgdi:waypoint x="265.0" y="77.0"></omgdi:waypoint>
+        <omgdi:waypoint x="305.0" y="77.0"></omgdi:waypoint>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
-        <omgdi:waypoint x="275.0" y="77.0"></omgdi:waypoint>
-        <omgdi:waypoint x="340.0" y="77.0"></omgdi:waypoint>
+        <omgdi:waypoint x="410.0" y="77.0"></omgdi:waypoint>
+        <omgdi:waypoint x="470.0" y="77.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="32.0" x="289.0" y="79.0"></omgdc:Bounds>
+          <omgdc:Bounds height="16.0" width="32.0" x="424.0" y="79.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
-        <omgdi:waypoint x="222.0" y="105.0"></omgdi:waypoint>
-        <omgdi:waypoint x="222.0" y="140.0"></omgdi:waypoint>
+        <omgdi:waypoint x="357.0" y="105.0"></omgdi:waypoint>
+        <omgdi:waypoint x="357.0" y="140.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="48.0" x="227.0" y="109.0"></omgdc:Bounds>
+          <omgdc:Bounds height="16.0" width="48.0" x="305.0" y="119.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>
-</definitions>
+</definitions>