Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

sangwenwei 8 месяцев назад
Родитель
Сommit
78ca008792

+ 7 - 1
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/controller/FlowableTaskController.java

@@ -37,6 +37,7 @@ import com.jeeplus.sys.service.dto.UserDTO;
 import com.jeeplus.weChat.util.HttpUtils;
 import com.jeeplus.weChat.util.SendMessageUtil;
 import io.swagger.annotations.ApiOperation;
+import lombok.extern.log4j.Log4j2;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.ibatis.annotations.Param;
 import org.flowable.bpmn.model.BpmnModel;
@@ -73,6 +74,7 @@ import java.util.concurrent.atomic.AtomicInteger;
  */
 @RestController
 @RequestMapping("/flowable/task")
+@Log4j2
 public class FlowableTaskController {
 
     @Autowired
@@ -679,6 +681,7 @@ public class FlowableTaskController {
             String userIds = allUsersStringBuilder.toString();
 
             String openIds = SpringUtil.getBean(IUserApi.class).getOpenIdsByIds(userIds);
+
             String[] openIdArray = openIds.split(",");
             List<String> openIdsList = Arrays.asList(openIdArray);
 
@@ -696,8 +699,11 @@ public class FlowableTaskController {
             flow.setProcInsId(procInsId);
             flow.setProcDefKey(procDefKey);
             flow = getFlowInfo(flow);
+            //如果下一节点审核人数量大于0,则进行发送审核微信公众号通知
+            if(openIdsList.size()>0){
+                SendMessageUtil.sendMessage(list.get(i), openIdsList, flow, projectUrl);
+            }
 
-            SendMessageUtil.sendMessage(list.get(i), openIdsList, flow, projectUrl);
         }
     }
 

+ 1 - 1
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/service/FlowProcessService.java

@@ -146,7 +146,7 @@ public class FlowProcessService {
         if (StringUtils.isNotBlank(type)) {
             if (type.equals("ydd")) {
                 // 创建一个包含需要保留的流程定义名称的集合
-                List<String> requiredNames = Arrays.asList("物资管理-领用申请", "物资管理-采购申请", "日常办公-请假申请", "离职申请", "离职交接申请", "会计-报销审批", "会计-发票申请", "报销申请", "发票申请","会议室预约");
+                List<String> requiredNames = Arrays.asList("物资管理-领用申请", "物资管理-采购申请", "日常办公-请假申请", "离职申请", "离职交接申请", "会计-报销审批", "会计-报销审批-电子发票", "会计-发票申请", "报销申请", "发票申请","会议室预约");
                 /**
                  * 移动端工作台数据处理
                  */

+ 2 - 1
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/service/FlowTaskService.java

@@ -424,6 +424,7 @@ public class FlowTaskService {
                 processName.equals("离职申请") ||
                 processName.equals("离职交接申请") ||
                 processName.equals("会计-报销审批") ||
+                processName.equals("会计-报销审批-电子发票") ||
                 processName.equals("会计-发票申请") ||
                 processName.equals("报销申请") ||
                 processName.equals("会议室预约") ||
@@ -672,7 +673,7 @@ public class FlowTaskService {
         if (StringUtils.isNotBlank(type)) {
             if (type.equals("ydd")) {
                 // 创建一个包含需要保留的流程定义名称的集合
-                List<String> requiredNames = Arrays.asList("物资管理-领用申请", "物资管理-采购申请", "日常办公-请假申请", "离职申请", "离职交接申请", "会计-报销审批", "会计-发票申请", "报销申请","发票申请","会议室预约");
+                List<String> requiredNames = Arrays.asList("物资管理-领用申请", "物资管理-采购申请", "日常办公-请假申请", "离职申请", "离职交接申请", "会计-报销审批", "会计-报销审批-电子发票", "会计-发票申请", "报销申请","发票申请","会议室预约");
                 /**
                  * 移动端工作台数据处理
                  */

+ 6 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/weChat/domain/TemplateInfo.java

@@ -17,6 +17,12 @@ public class TemplateInfo {
     private String color;
 
     public TemplateInfo(String value, String color) {
+        /*if(value.length()>20){
+            String substring = value.substring(0, 19);
+            this.value = substring;
+        }else{
+            this.value = value;
+        }*/
         this.value = value;
         this.color = color;
     }

+ 8 - 6
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/weChat/service/WxSendService.java

@@ -6,6 +6,7 @@ import com.jeeplus.weChat.domain.TemplateInfo;
 import com.jeeplus.weChat.domain.TranTemplate;
 import com.jeeplus.weChat.domain.WXTransportTemplate;
 import com.jeeplus.weChat.util.HttpUtils;
+import lombok.extern.log4j.Log4j2;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -20,6 +21,7 @@ import java.util.Map;
  */
 @Service
 @Transactional
+@Log4j2
 public class WxSendService {
 
     @Value("${wechat.sendTemplateUrl}")
@@ -79,24 +81,24 @@ public class WxSendService {
             tranTemplate.setUrl(resource.getUrl());
 
             //设置模板ID
-            tranTemplate.setTemplate_id("ehTUuyDFL7f2RApsMXLsJEPlCgt82aTj2vtmO2l9Cso");
+            tranTemplate.setTemplate_id("-e-nHVBDe8SetRjPX8K7cKB4q3KeNV56WHkpQg5rBjU");
             //给模板的内容赋值
             Map<String , TemplateInfo> dataMap = new HashMap<>();
 
             TemplateInfo title = new TemplateInfo(resource.getTitleName(),"#173177");
-            dataMap.put("title",title);
+            dataMap.put("thing2",title);
 
             TemplateInfo processName = new TemplateInfo(resource.getProcessName(),"#173177");
-            dataMap.put("processName",processName);
+            dataMap.put("thing3",processName);
 
             TemplateInfo currentStage = new TemplateInfo(resource.getCurrentStage(),"#173177");
-            dataMap.put("currentStage",currentStage);
+            dataMap.put("thing11",currentStage);
 
             TemplateInfo processInitiator = new TemplateInfo(resource.getProcessInitiator(),"#173177");
-            dataMap.put("processInitiator",processInitiator);
+            dataMap.put("thing4",processInitiator);
 
             TemplateInfo createTime = new TemplateInfo(resource.getCreateTime(),"#173177");
-            dataMap.put("createTime",createTime);
+            dataMap.put("time5",createTime);
 
             tranTemplate.setData(dataMap);
 

+ 3 - 1
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/weChat/util/SendMessageUtil.java

@@ -5,6 +5,7 @@ import com.jeeplus.flowable.model.Flow;
 import com.jeeplus.flowable.utils.ProcessDefCache;
 import com.jeeplus.weChat.domain.WXTransportTemplate;
 import com.jeeplus.weChat.service.WxSendService;
+import lombok.extern.log4j.Log4j2;
 import org.apache.commons.lang3.StringUtils;
 import org.flowable.task.api.Task;
 
@@ -19,6 +20,7 @@ import java.net.URLEncoder;
  * @version 1.0
  * @date 2024-07-24 14:30
  */
+@Log4j2
 public class SendMessageUtil {
 
     // 给下一节点审核人发送通知
@@ -76,7 +78,7 @@ public class SendMessageUtil {
 
                 // 构建完整的URL
                 String url = String.format(
-                        "http://kqe4km.natappfree.cc/h5/#/pages/workbench/task/TaskForm?flow=%s",
+                        "http://cpaoa.xgccpm.com/h5/#/pages/workbench/task/TaskForm?flow=%s",
                         encodedFlow
                 );