guarantee-lsq 2 天之前
父节点
当前提交
1d36999493

+ 3 - 1
platform-service/src/main/java/com/platform/service/activiti/strategy/ActivitiAssignStrategyStartUserDeptRole.java

@@ -83,21 +83,23 @@ public class ActivitiAssignStrategyStartUserDeptRole implements ActivitiAssignSt
                 taskService.addCandidateUser(task.getId(), id);
             }
         }
-        //taskService.addCandidateUser(task.getId(), getIds(map.get("userId"), activitiUserModel));
     }
 
     public List<String> getIds(String userId, ActivitiUserModel activitiUserModel){
         String roleId = activitiUserModel.getRoleId();
+        log.info("审批的roleId============================" + roleId);
         SysUserDTO sysUserDTO = new SysUserDTO();
         sysUserDTO.setRoleIds(Arrays.asList(roleId));
         // 找到和发起人部门一致的
         sysUserDTO.setDeptIds(sysUserDeptService.selectByUserId(userId).stream().map(SysUserDept::getDeptId).collect(Collectors.toList()));
         String sourceDeptId = sysUserDTO.getDeptIds().get(0);
+        log.info("审批的sourceDeptId============================" + sourceDeptId);
         // 判断是否是要转化的部门
         String transferDeptIds = ConfigCache.getLabelByValueAllowNull(SysConfigEnum.TRANSFER_DEPT_IDS.name());
         if(transferDeptIds.contains(sourceDeptId)){
             sourceDeptId = DictCache.getLabelByValue(DictTypeEnum.VERIFY_DEPT_TRANSFER_MAP.getType(),sourceDeptId);
         }
+        log.info("审批的sourceDeptId==================转化后============================" + sourceDeptId);
         sysUserDTO.setDeptIds(Collections.singletonList(sourceDeptId));
         List<SysUserVO> sysUserVOList = sysUserService.getDeptChildrenRoleUser(sysUserDTO);
         if(CollectionUtils.isEmpty(sysUserVOList)){

+ 7 - 1
platform-service/src/main/java/com/platform/service/wechat/util/WeChatMessageUtil.java

@@ -3,6 +3,7 @@ package com.platform.service.wechat.util;
 import com.platform.common.cache.ConfigCache;
 import com.platform.common.exception.DeniedException;
 import com.platform.common.util.DateUtils;
+import com.platform.common.util.JsonUtils;
 import com.platform.common.util.SpringContextHolder;
 import com.platform.common.util.StringUtils;
 import com.platform.dao.dto.repair.RepairApplicationFormDTO;
@@ -12,6 +13,7 @@ import com.platform.dao.vo.sb.SbInfoVO;
 import com.platform.service.event.WechatEvent;
 import com.platform.service.wechat.model.request.WechatTemplateRequestBuilder;
 import com.platform.service.wechat.model.request.template.WechatTemplateRequest;
+import com.platform.service.wechat.service.WeChatConnectService;
 import lombok.extern.slf4j.Slf4j;
 
 import java.time.LocalDateTime;
@@ -151,10 +153,14 @@ public class WeChatMessageUtil {
             if(StringUtils.isBlank(url)){
                 throw new DeniedException("跳转详情url不能为空");
             }
+            log.info("isSend========" + isSend() + ",openId=====" + openId);
             if (isSend() && StringUtils.isNotBlank(openId)) {
                 String[] colors = getColors(values.length);
                 WechatTemplateRequest request = WechatTemplateRequestBuilder.getAuditRequest(url, wechatTemplateId,openId, values, colors);
-                SpringContextHolder.publishEvent(new WechatEvent(request));
+                log.info("request============" + JsonUtils.objectToJson(request));
+                log.info("微信通知事件执行");
+                WeChatConnectService.postTemplate(request);
+                //SpringContextHolder.publishEvent(new WechatEvent(request));
             }
         } catch (Exception e) {
             log.error("发送微信消息失败", e);