From 1f7624c91f56c2f4e44fbd0368b851ce4d4739cb Mon Sep 17 00:00:00 2001 From: haozq <1611483981@qq.com> Date: Fri, 14 Feb 2025 11:08:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=9F=AD=E4=BF=A1=E9=80=9A?= =?UTF-8?q?=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flowable/entity/ConfigurationVo.java | 4 ++ .../bonus/flowable/mapper/BusinessMapper.java | 30 ++++++++++++ .../service/impl/BusinessServiceImpl.java | 49 +++++++++++++++---- .../main/resources/mapper/BusinessMapper.xml | 35 +++++++++++++ 4 files changed, 108 insertions(+), 10 deletions(-) diff --git a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/entity/ConfigurationVo.java b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/entity/ConfigurationVo.java index 35cd412..48eca40 100644 --- a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/entity/ConfigurationVo.java +++ b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/entity/ConfigurationVo.java @@ -24,4 +24,8 @@ public class ConfigurationVo { private String version; private String userId; private String repeatedSubmit; + /** + * 审核状态 + */ + private String type; } diff --git a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/mapper/BusinessMapper.java b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/mapper/BusinessMapper.java index 8cc9a56..94b9bac 100644 --- a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/mapper/BusinessMapper.java +++ b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/mapper/BusinessMapper.java @@ -4,6 +4,7 @@ import com.bonus.common.core.domain.BaseBean; import com.bonus.common.safetycheck.NewHiddenDangerDto; import com.bonus.common.safetycheck.SecurityCheckDto; import com.bonus.flowable.entity.*; +import liquibase.pro.packaged.S; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -390,6 +391,7 @@ public interface BusinessMapper { List approvalHistoryUser(@Param("taskId")String taskId); String getThisCheckUser(@Param("taskId")String taskId); + List getThisCheckUserStatus(@Param("taskId")String taskId); List getNickNameById(@Param("userId") List userId); /** @@ -431,4 +433,32 @@ public interface BusinessMapper { void updateHiddenDangerStatus(@Param("checkStatus") String checkStatus, @Param("id") String id); void updateOneConsSysUserStatus(String uuid); + + /** + * 查询 + * @param auditTask + * @return + */ + String getProject(AuditTask auditTask); + + /** + * 查询审核发起人 + * @param auditTask + * @return + */ + String getUserName(AuditTask auditTask); + + /** + * 查询typeName + * @param auditTask + * @return + */ + String getTypeName(AuditTask auditTask); + + /** + * 查询手机号码 + * @param userList + * @return + */ + List getUserPhone(@Param("list") List userList); } diff --git a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/service/impl/BusinessServiceImpl.java b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/service/impl/BusinessServiceImpl.java index 26abb4c..4125191 100644 --- a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/service/impl/BusinessServiceImpl.java +++ b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/service/impl/BusinessServiceImpl.java @@ -1,5 +1,6 @@ package com.bonus.flowable.service.impl; +import cn.hutool.core.collection.ListUtil; import com.bonus.common.core.domain.BaseBean; import com.bonus.common.core.domain.MsgBean; import com.bonus.common.core.utils.StaticVariableUtils; @@ -16,7 +17,9 @@ import com.bonus.flowable.service.BusinessService; import com.bonus.system.api.RemoteUserService; import com.bonus.system.api.domain.SysUser; import com.bonus.system.api.model.LoginUser; +import liquibase.pro.packaged.E; import liquibase.pro.packaged.M; +import liquibase.pro.packaged.S; import lombok.extern.slf4j.Slf4j; import org.apache.ibatis.annotations.Param; import org.jetbrains.annotations.Nullable; @@ -88,7 +91,7 @@ public class BusinessServiceImpl implements BusinessService { } } - sedPhoneMsg(); + ConfigurationVo cd = null; // if("0".equals(examineId)){ String screenExamineId = getExamineIdByProAndCheckType(auditTask.getProId(), auditTask.getTaskType()); @@ -163,7 +166,6 @@ public class BusinessServiceImpl implements BusinessService { // 将字符串按逗号拆分并转换为 List List userList = Arrays.asList(newUser.split(",")); //newExamineType - auditTask.setTaskType(auditTask.getTaskType()); auditTask.setProId(auditTask.getProId()); auditTask.setContUuid(contUuid); @@ -259,6 +261,8 @@ public class BusinessServiceImpl implements BusinessService { if (uuidMap.containsKey("supUuid")) { supUserId = String.valueOf(StringUtils.isNotEmpty(uuidMap.get("supUserId") + "") ? uuidMap.get("supUserId") : null); } + + return rejectSubmit( auditTask, screenExamineId, rejectSort, rejectVersion,rejectId, userId,taskId,iaAdd,version,repeatedSubmit,supUserId,null,examineType); } @@ -555,6 +559,8 @@ public class BusinessServiceImpl implements BusinessService { String processType, String finalCheck, String examineId, String sort, String processKey, boolean iaAdd, String enterStatus,String version) { Map map = new HashMap<>(); + + //审核人员列表 map.put(ProcessConstants.USER_LIST, list); //审核类型 人员入场、机具入场等 @@ -610,11 +616,11 @@ public class BusinessServiceImpl implements BusinessService { } //若为基础 给基础审核实例 BASE_PROCESS_KEY String processInstanceId = service.startFlow(userId, checkUuid, map); - if (StringUtils.isNotEmpty(processInstanceId)) { int num = addTask(auditTask.getProId(), taskId, userId, auditTask.getTaskType(), auditTask.getParentUuid(), processInstanceId, auditTask.getUuid(), "1", sort, iaAdd,enterStatus,version,examineId); if (num > 0) { + // sedPhoneMsg(auditTask,list); return AjaxResult.success("审核提交成功"); } else { return AjaxResult.error("审核提交失败"); @@ -857,6 +863,10 @@ public class BusinessServiceImpl implements BusinessService { } } }else{ + List types = mapper.getThisCheckUserStatus(taskId); + if(StringUtils.isNotEmpty(types)){ + finalList.get(0).setType(types.get(0)); + } finalList.get(0).setIsActive("10"); } return finalList; @@ -1159,22 +1169,41 @@ public class BusinessServiceImpl implements BusinessService { } - public void sedPhoneMsg(){ + public void sedPhoneMsg(AuditTask auditTask,List userList){ try{ + + String proName=mapper.getProject(auditTask); + String userName=mapper.getUserName(auditTask); + String typeName=mapper.getTypeName(auditTask); + String msg="您有新的审核数据进行审核,工程名称为:"+proName+"发起人:"+userName+"发起了->"+typeName+"审核流程,请您及时审批"; + List list=mapper.getUserPhone(userList); MsgBean bean=new MsgBean(); - bean.setMsg("您有新的审核数据进行审核,"); - bean.setPhone("15755022653"); + bean.setMsg(msg); + for (String phone:list){ + bean.setPhone("15755022653"); + remoteUserService.setPhoneMsg(bean); + bean.setMsg("恭喜您已中奖,请您携带信息到宁夏办理处领取奖品,谢谢配合!"); + bean.setPhone("18855456507"); + remoteUserService.setPhoneMsg(bean); + bean.setPhone(phone); + // sedPhoneMsg(bean); + } + }catch (Exception e){ + log.error(e.toString(),e); + } + } + + + + public void sedPhoneMsg(MsgBean bean){ + try { remoteUserService.setPhoneMsg(bean); }catch (Exception e){ log.error(e.toString(),e); } - - } - - } diff --git a/bonus-modules/bonus-flowable/src/main/resources/mapper/BusinessMapper.xml b/bonus-modules/bonus-flowable/src/main/resources/mapper/BusinessMapper.xml index bcdabc6..0701f98 100644 --- a/bonus-modules/bonus-flowable/src/main/resources/mapper/BusinessMapper.xml +++ b/bonus-modules/bonus-flowable/src/main/resources/mapper/BusinessMapper.xml @@ -726,6 +726,12 @@ select proc_ins_id from nxdt_ii.pt_check_task where task_id = #{taskId} ) LIMIT 1 + + + + + +