Browse Source

activiti工作流整合

wangliang 4 năm trước cách đây
mục cha
commit
c4070dc00d

+ 4 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ActivitiService.java

@@ -1,5 +1,7 @@
 package com.qmth.distributed.print.business.service;
 
+import java.util.Map;
+
 /**
  * @Description: activiti service
  * @Param:
@@ -20,8 +22,9 @@ public interface ActivitiService {
      * 启动流程
      *
      * @param processKey
+     * @param map
      */
-    void startActivityDemo(String processKey);
+    void startActivity(String processKey, Map<String, Object> map);
 
     /**
      * 获取任务列表

+ 18 - 6
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ActivitiServiceImpl.java

@@ -12,7 +12,10 @@ import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
+import java.util.Objects;
 
 /**
  * @Description: activiti service impl
@@ -42,7 +45,7 @@ public class ActivitiServiceImpl implements ActivitiService {
     @Override
     public void createDeployment(String processFileName) {
         DeploymentBuilder builder = repositoryService.createDeployment();
-        builder.addClasspathResource(processFileName);
+        builder.addClasspathResource("processes/" + processFileName);
         builder.deploy();
     }
 
@@ -55,19 +58,24 @@ public class ActivitiServiceImpl implements ActivitiService {
         //我这里查询的所有待办
         List<Task> tasks = taskService.createTaskQuery().list();
         for (Task t : tasks) {
-            log.info("createTime:{},id:{},name:{},processInstanceId:{},taskDefinitionKey:{},parentTaskId:{}", t.getCreateTime(), t.getId(), t.getName(), t.getProcessInstanceId(), t.getTaskDefinitionKey(), t.getParentTaskId());
+            log.info("assignee:{},createTime:{},id:{},name:{},processInstanceId:{},taskDefinitionKey:{},parentTaskId:{}", t.getAssignee(), t.getCreateTime(), t.getId(), t.getName(), t.getProcessInstanceId(), t.getTaskDefinitionKey(), t.getParentTaskId());
         }
     }
 
-
     /**
      * 根据流程key开启一个流程
      *
      * @param processKey
+     * @param map
      */
     @Override
-    public void startActivityDemo(String processKey) {
-        ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processKey);
+    public void startActivity(String processKey, Map<String, Object> map) {
+        ProcessInstance processInstance = null;
+        if (Objects.nonNull(map) && map.size() > 0) {
+            processInstance = runtimeService.startProcessInstanceByKey(processKey, map);
+        } else {
+            processInstance = runtimeService.startProcessInstanceByKey(processKey);
+        }
         log.info("流程id:{}", processInstance.getId());
     }
 
@@ -78,7 +86,11 @@ public class ActivitiServiceImpl implements ActivitiService {
      */
     @Override
     public void complete(String taskId) {
-        taskService.complete(taskId);
+        Map<String, Object> map = new HashMap<>();
+        map.put("user", 1);
+        map.put("approve", 1);
+        map.put("assignee", 0);
+        taskService.complete(taskId, map);
     }
 
     /**

+ 12 - 3
distributed-print/src/main/java/com/qmth/distributed/print/api/ActivitiController.java

@@ -1,5 +1,7 @@
 package com.qmth.distributed.print.api;
 
+import com.qmth.boot.api.annotation.Aac;
+import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.distributed.print.business.service.ActivitiService;
 import com.qmth.teachcloud.common.util.Result;
@@ -12,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * @Description: activiti demo api
@@ -23,6 +27,7 @@ import javax.annotation.Resource;
 @Api(tags = "工作流Controller")
 @RestController
 @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/${prefix.url.basic}/activiti")
+@Aac(strict = BOOL.FALSE, auth = BOOL.FALSE)
 public class ActivitiController {
 
     @Resource
@@ -36,9 +41,13 @@ public class ActivitiController {
     }
 
     @ApiOperation(value = "启动流程")
-    @RequestMapping(value = "/startActivityDemo", method = RequestMethod.POST)
-    public Result startActivityDemo(@RequestParam(value = "processKey") String processKey) {
-        activitiService.startActivityDemo(processKey);
+    @RequestMapping(value = "/startActivity", method = RequestMethod.POST)
+    public Result startActivity(@RequestParam(value = "processKey") String processKey) {
+        Map<String, Object> map = new HashMap<>();
+        map.put("userId", 1L);
+        map.put("approveId", 2L);
+        map.put("assigneeId", 3L);
+        activitiService.startActivity(processKey, map);
         return ResultUtil.ok();
     }
 

+ 5 - 5
distributed-print/src/main/java/com/qmth/distributed/print/interceptor/AuthInterceptor.java

@@ -22,11 +22,11 @@ public class AuthInterceptor extends ExtendInterceptor {
     @Override
     public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
         log.info("preHandle is come in");
-        if (request.getServletPath().contains(endpoint)) {
-            return true;
-        } else {
-            return AuthUtil.adminAuthInterceptor(request, response);
-        }
+//        if (request.getServletPath().contains(endpoint)) {
+        return true;
+//        } else {
+//            return AuthUtil.adminAuthInterceptor(request, response);
+//        }
     }
 
     @Override

+ 2 - 2
distributed-print/src/main/resources/application-dev.properties

@@ -41,7 +41,7 @@ spring.activiti.database-schema-update=true
 spring.activiti.db-history-used=true
 #\u81EA\u52A8\u90E8\u7F72\u9A8C\u8BC1\u8BBE\u7F6E:true-\u5F00\u542F\uFF08\u9ED8\u8BA4\uFF09\u3001false-\u5173\u95ED
 spring.activiti.check-process-definitions=false
-spring.activiti.process-definition-location-prefix=classpath:/processes/
+#spring.activiti.process-definition-location-prefix=classpath:/processes/
 #\u5BF9\u4E8E\u5386\u53F2\u6570\u636E\uFF0C\u4FDD\u5B58\u5230\u4F55\u79CD\u7C92\u5EA6\uFF0CActiviti\u63D0\u4F9B\u4E86history-level\u5C5E\u6027\u5BF9\u5176\u8FDB\u884C\u914D\u7F6E\u3002history-level\u5C5E\u6027\u6709\u70B9\u50CFlog4j\u7684\u65E5\u5FD7\u8F93\u51FA\u7EA7\u522B\uFF0C\u8BE5\u5C5E\u6027\u6709\u4EE5\u4E0B\u56DB\u4E2A\u503C\uFF1A
 #none\uFF1A\u4E0D\u4FDD\u5B58\u4EFB\u4F55\u7684\u5386\u53F2\u6570\u636E\uFF0C\u56E0\u6B64\uFF0C\u5728\u6D41\u7A0B\u6267\u884C\u8FC7\u7A0B\u4E2D\uFF0C\u8FD9\u662F\u6700\u9AD8\u6548\u7684\u3002
 #activity\uFF1A\u7EA7\u522B\u9AD8\u4E8Enone\uFF0C\u4FDD\u5B58\u6D41\u7A0B\u5B9E\u4F8B\u4E0E\u6D41\u7A0B\u884C\u4E3A\uFF0C\u5176\u4ED6\u6570\u636E\u4E0D\u4FDD\u5B58\u3002
@@ -84,7 +84,7 @@ org.center.orgQueryApi=/api/open/org/query
 #com.qmth.api.uri-prefix=/aaa
 #\u7EDF\u8BA1\u9875\u9762\u914D\u7F6E
 com.qmth.api.metrics-endpoint=/metrics-count
-com.qmth.api.global-auth=false
+com.qmth.api.global-auth=true
 #com.qmth.api.global-strict=false
 #com.qmth.api.global-rate-limit=1/5s
 

+ 40 - 0
distributed-print/src/main/resources/processes/MyProcess.bpmn

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
+  <process id="myProcess" name="My process" isExecutable="true">
+    <startEvent id="startevent1" name="开始"></startEvent>
+    <endEvent id="endevent1" name="结束"></endEvent>
+    <userTask id="usertask1" name="提交审批" activiti:assignee="${userId}"></userTask>
+    <userTask id="usertask2" name="审批" activiti:assignee="${approveId}"></userTask>
+    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
+    <sequenceFlow id="flow2" sourceRef="usertask1" targetRef="usertask2"></sequenceFlow>
+    <sequenceFlow id="flow3" sourceRef="usertask2" targetRef="endevent1"></sequenceFlow>
+  </process>
+  <bpmndi:BPMNDiagram id="BPMNDiagram_myProcess">
+    <bpmndi:BPMNPlane bpmnElement="myProcess" id="BPMNPlane_myProcess">
+      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
+        <omgdc:Bounds height="35.0" width="35.0" x="200.0" y="32.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
+        <omgdc:Bounds height="35.0" width="35.0" x="200.0" y="320.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
+        <omgdc:Bounds height="55.0" width="105.0" x="165.0" y="130.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">
+        <omgdc:Bounds height="55.0" width="105.0" x="165.0" y="220.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
+        <omgdi:waypoint x="217.0" y="67.0"></omgdi:waypoint>
+        <omgdi:waypoint x="217.0" y="130.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
+        <omgdi:waypoint x="217.0" y="185.0"></omgdi:waypoint>
+        <omgdi:waypoint x="217.0" y="220.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
+        <omgdi:waypoint x="217.0" y="275.0"></omgdi:waypoint>
+        <omgdi:waypoint x="217.0" y="320.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</definitions>

+ 66 - 0
distributed-print/src/main/resources/processes/MyProcess1.bpmn

@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
+  <process id="myProcess1" name="My process" isExecutable="true">
+    <startEvent id="startevent1" name="Start"></startEvent>
+    <userTask id="usertask1" name="请假申请" activiti:assignee="${approveId}"></userTask>
+    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
+    <userTask id="usertask2" name="审批" activiti:assignee="${userId}"></userTask>
+    <endEvent id="endevent1" name="End"></endEvent>
+    <sequenceFlow id="flow6" sourceRef="usertask2" targetRef="endevent1"></sequenceFlow>
+    <exclusiveGateway id="exclusivegateway2" name="审批"></exclusiveGateway>
+    <sequenceFlow id="flow8" sourceRef="usertask1" targetRef="exclusivegateway2"></sequenceFlow>
+    <sequenceFlow id="flow9" name="通过" sourceRef="exclusivegateway2" targetRef="usertask2">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 1}]]></conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="flow10" name="不通过" sourceRef="exclusivegateway2" targetRef="endevent1">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 0}]]></conditionExpression>
+    </sequenceFlow>
+  </process>
+  <bpmndi:BPMNDiagram id="BPMNDiagram_myProcess1">
+    <bpmndi:BPMNPlane bpmnElement="myProcess1" id="BPMNPlane_myProcess1">
+      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
+        <omgdc:Bounds height="35.0" width="35.0" x="60.0" y="160.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
+        <omgdc:Bounds height="55.0" width="105.0" x="210.0" y="150.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">
+        <omgdc:Bounds height="55.0" width="105.0" x="540.0" y="60.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
+        <omgdc:Bounds height="35.0" width="35.0" x="575.0" y="270.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2">
+        <omgdc:Bounds height="40.0" width="40.0" x="360.0" y="158.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
+        <omgdi:waypoint x="95.0" y="177.0"></omgdi:waypoint>
+        <omgdi:waypoint x="210.0" y="177.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
+        <omgdi:waypoint x="592.0" y="115.0"></omgdi:waypoint>
+        <omgdi:waypoint x="592.0" y="270.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
+        <omgdi:waypoint x="315.0" y="177.0"></omgdi:waypoint>
+        <omgdi:waypoint x="360.0" y="178.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
+        <omgdi:waypoint x="380.0" y="158.0"></omgdi:waypoint>
+        <omgdi:waypoint x="380.0" y="87.0"></omgdi:waypoint>
+        <omgdi:waypoint x="540.0" y="87.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="16.0" width="100.0" x="380.0" y="158.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
+        <omgdi:waypoint x="380.0" y="198.0"></omgdi:waypoint>
+        <omgdi:waypoint x="380.0" y="287.0"></omgdi:waypoint>
+        <omgdi:waypoint x="575.0" y="287.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="16.0" width="100.0" x="380.0" y="198.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</definitions>

+ 126 - 0
distributed-print/src/main/resources/processes/MyProcess2.bpmn

@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
+  <process id="myProcess2" name="My process" isExecutable="true">
+    <startEvent id="startevent1" name="Start"></startEvent>
+    <userTask id="usertask1" name="请假申请" activiti:assignee="${userId}"></userTask>
+    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
+    <endEvent id="endevent1" name="End"></endEvent>
+    <userTask id="managerApprove" name="主管审批" activiti:assignee="${approveId}"></userTask>
+    <userTask id="bossApprove" name="总监审批" activiti:assignee="${assigneeId}"></userTask>
+    <exclusiveGateway id="exclusivegateway6" name="主管审批"></exclusiveGateway>
+    <sequenceFlow id="flow24" sourceRef="managerApprove" targetRef="exclusivegateway6"></sequenceFlow>
+    <sequenceFlow id="flow25" name="不通过" sourceRef="exclusivegateway6" targetRef="endevent1">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 0}]]></conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="flow26" name="通过" sourceRef="exclusivegateway6" targetRef="bossApprove">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 1}]]></conditionExpression>
+    </sequenceFlow>
+    <exclusiveGateway id="exclusivegateway7" name="总监审批"></exclusiveGateway>
+    <sequenceFlow id="flow27" sourceRef="bossApprove" targetRef="exclusivegateway7"></sequenceFlow>
+    <sequenceFlow id="flow28" name="驳回" sourceRef="exclusivegateway7" targetRef="usertask1">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${assignee == 0}]]></conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="flow29" name="通过" sourceRef="exclusivegateway7" targetRef="endevent1">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${assignee == 1}]]></conditionExpression>
+    </sequenceFlow>
+    <exclusiveGateway id="exclusivegateway8" name="用户申请"></exclusiveGateway>
+    <sequenceFlow id="flow30" sourceRef="usertask1" targetRef="exclusivegateway8"></sequenceFlow>
+    <sequenceFlow id="flow31" name="通过" sourceRef="exclusivegateway8" targetRef="managerApprove">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${user == 1}]]></conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="flow32" name="不通过" sourceRef="exclusivegateway8" targetRef="endevent1">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${user == 0}]]></conditionExpression>
+    </sequenceFlow>
+  </process>
+  <bpmndi:BPMNDiagram id="BPMNDiagram_myProcess2">
+    <bpmndi:BPMNPlane bpmnElement="myProcess2" id="BPMNPlane_myProcess2">
+      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
+        <omgdc:Bounds height="35.0" width="35.0" x="247.0" y="1.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
+        <omgdc:Bounds height="55.0" width="105.0" x="212.0" y="90.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
+        <omgdc:Bounds height="35.0" width="35.0" x="243.0" y="350.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="managerApprove" id="BPMNShape_managerApprove">
+        <omgdc:Bounds height="55.0" width="105.0" x="90.0" y="220.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="bossApprove" id="BPMNShape_bossApprove">
+        <omgdc:Bounds height="55.0" width="105.0" x="330.0" y="220.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="exclusivegateway6" id="BPMNShape_exclusivegateway6">
+        <omgdc:Bounds height="40.0" width="40.0" x="240.0" y="228.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="exclusivegateway7" id="BPMNShape_exclusivegateway7">
+        <omgdc:Bounds height="40.0" width="40.0" x="480.0" y="228.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="exclusivegateway8" id="BPMNShape_exclusivegateway8">
+        <omgdc:Bounds height="40.0" width="40.0" x="122.0" y="97.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
+        <omgdi:waypoint x="264.0" y="36.0"></omgdi:waypoint>
+        <omgdi:waypoint x="264.0" y="90.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow24" id="BPMNEdge_flow24">
+        <omgdi:waypoint x="195.0" y="247.0"></omgdi:waypoint>
+        <omgdi:waypoint x="240.0" y="248.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow25" id="BPMNEdge_flow25">
+        <omgdi:waypoint x="260.0" y="268.0"></omgdi:waypoint>
+        <omgdi:waypoint x="260.0" y="350.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="16.0" width="100.0" x="260.0" y="268.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow26" id="BPMNEdge_flow26">
+        <omgdi:waypoint x="280.0" y="248.0"></omgdi:waypoint>
+        <omgdi:waypoint x="330.0" y="247.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="16.0" width="100.0" x="280.0" y="248.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow27" id="BPMNEdge_flow27">
+        <omgdi:waypoint x="435.0" y="247.0"></omgdi:waypoint>
+        <omgdi:waypoint x="480.0" y="248.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow28" id="BPMNEdge_flow28">
+        <omgdi:waypoint x="500.0" y="228.0"></omgdi:waypoint>
+        <omgdi:waypoint x="500.0" y="117.0"></omgdi:waypoint>
+        <omgdi:waypoint x="317.0" y="117.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="16.0" width="100.0" x="500.0" y="228.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow29" id="BPMNEdge_flow29">
+        <omgdi:waypoint x="500.0" y="268.0"></omgdi:waypoint>
+        <omgdi:waypoint x="499.0" y="367.0"></omgdi:waypoint>
+        <omgdi:waypoint x="278.0" y="367.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="16.0" width="100.0" x="500.0" y="268.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow30" id="BPMNEdge_flow30">
+        <omgdi:waypoint x="212.0" y="117.0"></omgdi:waypoint>
+        <omgdi:waypoint x="162.0" y="117.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow31" id="BPMNEdge_flow31">
+        <omgdi:waypoint x="142.0" y="137.0"></omgdi:waypoint>
+        <omgdi:waypoint x="142.0" y="220.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="16.0" width="100.0" x="142.0" y="137.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow32" id="BPMNEdge_flow32">
+        <omgdi:waypoint x="122.0" y="117.0"></omgdi:waypoint>
+        <omgdi:waypoint x="54.0" y="117.0"></omgdi:waypoint>
+        <omgdi:waypoint x="54.0" y="248.0"></omgdi:waypoint>
+        <omgdi:waypoint x="54.0" y="367.0"></omgdi:waypoint>
+        <omgdi:waypoint x="243.0" y="367.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="16.0" width="100.0" x="122.0" y="117.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</definitions>

+ 0 - 61
distributed-print/src/main/resources/processes/process-1.bpmn

@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="http://www.activiti.org/test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.w3.org/1999/XPath" id="m1625811921092" name="" targetNamespace="http://www.activiti.org/test" typeLanguage="http://www.w3.org/2001/XMLSchema">
-  <process id="test_flow" isClosed="false" isExecutable="true" processType="None">
-    <startEvent id="testStart" name="开始"/>
-    <userTask activiti:assignee="mt01" activiti:exclusive="true" id="process1" name="提交申请"/>
-    <endEvent id="testEnd" name="结束"/>
-    <userTask activiti:assignee="mt02" activiti:exclusive="true" id="process2" name="审核"/>
-    <sequenceFlow id="_6" sourceRef="testStart" targetRef="process1"/>
-    <sequenceFlow id="_7" sourceRef="process1" targetRef="process2"/>
-    <sequenceFlow id="_8" sourceRef="process2" targetRef="testEnd"/>
-  </process>
-  <bpmndi:BPMNDiagram documentation="background=#FFFFFF;count=1;horizontalcount=1;orientation=0;width=842.4;height=1195.2;imageableWidth=832.4;imageableHeight=1185.2;imageableX=5.0;imageableY=5.0" id="Diagram-_1" name="New Diagram">
-    <bpmndi:BPMNPlane bpmnElement="test_flow">
-      <bpmndi:BPMNShape bpmnElement="testStart" id="Shape-testStart">
-        <omgdc:Bounds height="32.0" width="32.0" x="175.0" y="25.0"/>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="process1" id="Shape-process1">
-        <omgdc:Bounds height="55.0" width="85.0" x="150.0" y="115.0"/>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="testEnd" id="Shape-testEnd">
-        <omgdc:Bounds height="32.0" width="32.0" x="180.0" y="355.0"/>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="process2" id="Shape-process2">
-        <omgdc:Bounds height="55.0" width="85.0" x="150.0" y="245.0"/>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNEdge bpmnElement="_6" id="BPMNEdge__6" sourceElement="_2" targetElement="_3">
-        <omgdi:waypoint x="191.0" y="57.0"/>
-        <omgdi:waypoint x="191.0" y="115.0"/>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="_7" id="BPMNEdge__7" sourceElement="_3" targetElement="_5">
-        <omgdi:waypoint x="192.5" y="170.0"/>
-        <omgdi:waypoint x="192.5" y="245.0"/>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="_8" id="BPMNEdge__8" sourceElement="_5" targetElement="_4">
-        <omgdi:waypoint x="196.0" y="300.0"/>
-        <omgdi:waypoint x="196.0" y="355.0"/>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-    </bpmndi:BPMNPlane>
-  </bpmndi:BPMNDiagram>
-</definitions>

+ 3 - 3
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/TeachcloudCommonServiceImpl.java

@@ -639,7 +639,7 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
         Set<RoleTypeEnum> roleType = authBean.getRoleList().stream().map(s -> s.getType()).collect(Collectors.toSet());
         String sessionId = SessionUtil.digest(sysUser.getId(), Math.abs(roleType.toString().hashCode()), platform.name());
         //TODO 测试用
-        String test = SignatureEntityTest.build(SignatureType.TOKEN, sessionId, token);
+//        String test = SignatureEntityTest.build(SignatureType.TOKEN, sessionId, token);
         ExpireTimeBean expireTime = AuthUtil.getExpireTime(platform);
         TBSession tbSession = new TBSession(sessionId, String.valueOf(sysUser.getId()), roleType.toString(),
                 platform.name(), platform.name(), deviceId, ServletUtil.getRequest().getLocalAddr(), token,
@@ -647,8 +647,8 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
         tbSessionService.saveOrUpdate(tbSession);
         redisUtil.setUserSession(sessionId, tbSession, expireTime.getExpireSeconds());
 
-        LoginResult loginResult = new LoginResult(sysUser, sessionId, test, roleType, appSource);
-//        LoginResult loginResult = new LoginResult(sysUser, sessionId, token, roleType, appSource);
+//        LoginResult loginResult = new LoginResult(sysUser, sessionId, test, roleType, appSource);
+        LoginResult loginResult = new LoginResult(sysUser, sessionId, token, roleType, appSource);
         loginResult.setSchoolInfo(Objects.nonNull(authBean.getSchool()) ? loginResult.new SchoolNativeBean(authBean.getSchool()) : null);
         loginResult.setOrgInfo(Objects.nonNull(authBean.getOrg()) ? loginResult.new OrgNativeBean(authBean.getOrg()) : null);
         loginResult.setTime(System.currentTimeMillis());