Przeglądaj źródła

修改消息通知

tudc 3 lat temu
rodzic
commit
d171c8ff15

+ 1 - 1
flowable/src/main/java/com/huyi/flowable/listener/ExecutionCallListener.java

@@ -52,7 +52,7 @@ public class ExecutionCallListener implements ExecutionListener {
         param.put("procdefId", processDefinitionId);
         List<Map<String, Object>> configList =  myListener.meHistoryMapper.queryMeHistory(param);
         try{
-            String menuListStr = httpClient.doPost(HttpClient.AGREE_APPROVAL, "id=" + businessKey
+            String menuListStr = myListener.httpClient.doPost(HttpClient.AGREE_APPROVAL, "id=" + businessKey
                     + "&menuId=" + configList.get(0).get("menuId")
                     + "&companyId=" + configList.get(0).get("companyId"), null);
 

+ 6 - 4
flowable/src/main/java/com/huyi/flowable/message/MessageService.java

@@ -43,10 +43,9 @@ public class MessageService {
         String businessKey = instance.getBusinessKey();
 
         Map<String, Object> param = new HashMap<>();
-        param.put("id", UUID.randomUUID().toString().replaceAll("-", ""));
         param.put("companyId", companyId);
         param.put("tableId", businessKey);
-
+        param.put("openType", "01");
         // 融资审批
         if ("1000000006".equals(menuId)) {
             param.put("workType", "03");
@@ -59,14 +58,17 @@ public class MessageService {
             param.put("workType", "00");
             param.put("title", "【内部审批】融信【"+paras.get("zfiNumber")+"】资料待审批,审批发起人【"+userInf.get("nickName")+"】");
         }
-        messageMapper.insertMessage(param);
+
 
         try {
             List<Task> taskList = this.taskService.createTaskQuery().processInstanceId(instance.getId()).list();
             for (Task task : taskList) {
+                param.put("id", UUID.randomUUID().toString().replaceAll("-", ""));
+                param.put("openUrl", "/approval/deal?processId=" + instance.getProcessDefinitionId() + "&nodeId"+task.getTaskDefinitionKey() + "&taskId=" + task.getId() + "&instId="+task.getProcessInstanceId());
+                messageMapper.insertMessage(param);
+
                 Map<String, String> messageData = new HashMap<>();
                 messageData.put("id", UUID.randomUUID().toString().replaceAll("-", ""));
-
                 List<Long> userIdList = new ArrayList<>();
                 // 审批人
                 String assignee = task.getAssignee();

+ 3 - 2
flowable/src/main/java/com/huyi/flowable/server/mapper/MessageMapper.xml

@@ -2,12 +2,13 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.huyi.flowable.server.mapper.MessageMapper">
     <insert id="insertMessage">
-        insert into sys_notice values (#{id}, #{companyId}, #{tableId}, #{title}, '00', null, #{workType}, '0', '0', null, null, null, '审批自动生成', now());
+        insert into sys_notice(notice_id, company_id, table_id, notice_title, type, notice_type, work_type,
+        status, message_send, message_id, message_code, message_status, remark, create_time) values (#{id}, #{companyId}, #{tableId}, #{title}, '00', null, #{workType}, '0', '0', null, null, null, '审批自动生成', now());
     </insert>
     <insert id="insertNoticeUserRel">
         insert into sys_notice_user_rel values
         <foreach item="item" collection="userList" separator=",">
-            (#{noticeId}, #{item.id}, '0')
+            (#{noticeId}, #{item}, '0')
         </foreach>
     </insert>
     <select id = "queryUser" resultType="java.util.Map" parameterType="java.lang.String">

Plik diff jest za duży
+ 262 - 175
flowable/src/main/java/com/tianhu/system/api/domain/SysUser.java