Эх сурвалжийг харах

筹建派工+完成维修

guarantee-lsq 2 жил өмнө
parent
commit
852b6575f8

+ 6 - 0
platform-dao/src/main/java/com/platform/dao/dto/preparation/PreparationDTO.java

@@ -182,4 +182,10 @@ public class PreparationDTO extends BaseDTO implements Serializable {
 
     private List<SysFile> fileList;
 
+    private Integer searchType;
+
+    private String tempUserId;
+
+    private List<Integer> statusList;
+
 }

+ 33 - 0
platform-dao/src/main/java/com/platform/dao/enums/PreparationStatusEnum.java

@@ -0,0 +1,33 @@
+package com.platform.dao.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @Description 报修单状态枚举
+ * @Author liuyu
+ * @Date 2020/05/05
+ * @Version Copyright (c) 2020,合肥乾元坤合科技有限公司 All rights reserved.
+ */
+@Getter
+@AllArgsConstructor
+public enum PreparationStatusEnum {
+    /**
+     * 待分配
+     */
+    NOT_ALLOCATED(1),
+    /**
+     * 维修中
+     */
+    PROCESSING(2),
+    /**
+     * 	已完成/生产审核通过
+     */
+    FINISHED(3),
+    /**
+     * 	报修取消
+     */
+    CANCEL(4),
+    ;
+    private final Integer value;
+}

+ 2 - 0
platform-dao/src/main/java/com/platform/dao/enums/SysFileTypeEnum.java

@@ -24,6 +24,8 @@ public enum SysFileTypeEnum {
     SB_IMG(4, "设备图片"),
     REPAIR_APPLICATION_IMGS(11, "维修-报修图片"),
     REPAIR_APPLICATION_FILES(41, "维修-报修文件"),
+    PREPARATION_APPLICATION_IMGS(43, "筹建-报修图片"),
+    PREPARATION_APPLICATION_FILES(44, "筹建-报修文件"),
     REPAIR_REPAIR_IMGS(12, "维修-维修图片"),
     REPAIR_REPAIR_FILES(35, "维修-维修文件"),
     REPAIR_CHECK_IMGS(13, "维修-验收图片"),

+ 1 - 0
platform-dao/src/main/java/com/platform/dao/enums/WorkplaceBacklogDetailTypeEnum.java

@@ -34,6 +34,7 @@ public enum WorkplaceBacklogDetailTypeEnum {
     SB_CALLER_REPAIR(28, "设备部报修审核"),
     SB_APPLY_BIG_REPAIR(30, "报修转大修审核"),
     PREPARATION_REPAIR(31, "筹建报修"),
+    PREPARATION_REPAIR_DISPATCH(32, "筹建报修派工通知"),
     REPAIR_EXAMINE(24, "维修审核通知"),
     CHECK_RUN_EXPIRE(7, "润滑任务过期通知"),
     CHECK_BAOYANG_EXPIRE(8, "保养任务过期通知"),

+ 4 - 0
platform-dao/src/main/java/com/platform/dao/util/MessageTemplateUtil.java

@@ -428,6 +428,10 @@ public class MessageTemplateUtil {
         return String.format("您有新的筹建报修单【%s】待处理,请处理", no);
     }
 
+    public static String getPreparationForRepair(String no) {
+        return String.format("有一条新的派工任务【%s】待处理,请处理", no);
+    }
+
 
     /**
      * 调拨审批通知内容

+ 118 - 107
platform-dao/src/main/resources/mapper/preparation/PreparationMapper.xml

@@ -43,117 +43,128 @@
                                      preparation.fee_file
                                 </sql>
     <sql id="List_Condition">
-                                    <if test="id != null and id != ''">
-                    and preparation.id = #{id}
-                </if>
-                                                <if test="positionId != null and positionId != ''">
-                    and preparation.position_id = #{positionId}
-                </if>
-                                                <if test="userId != null and userId != ''">
-                    and preparation.user_id = #{userId}
-                </if>
-                                                <if test="departId != null and departId != ''">
-                    and preparation.depart_id = #{departId}
-                </if>
-                                                <if test="applyTimeStart != null">
-                    and preparation.apply_time <![CDATA[>=]]>; #{applyTimeStart}
-                </if>
-                <if test="applyTimeEnd != null">
-                    and preparation.apply_time <![CDATA[<=]]> #{applyTimeEnd}
-                </if>
-                <if test="applyTime != null">
-                    and preparation.apply_time = #{applyTime}
-                </if>
-                                                <if test="content != null and content != ''">
-                    and preparation.content = #{content}
-                </if>
-                                                <if test="status != null">
-                    and preparation.status = #{status}
-                </if>
-                                                <if test="remark != null and remark != ''">
-                    and preparation.remark = #{remark}
-                </if>
-                                                <if test="createdTimeStart != null">
-                    and preparation.created_time <![CDATA[>=]]>; #{createdTimeStart}
-                </if>
-                <if test="createdTimeEnd != null">
-                    and preparation.created_time <![CDATA[<=]]> #{createdTimeEnd}
-                </if>
-                <if test="createdTime != null">
-                    and preparation.created_time = #{createdTime}
-                </if>
-                                                <if test="updateTimeStart != null">
-                    and preparation.update_time <![CDATA[>=]]>; #{updateTimeStart}
-                </if>
-                <if test="updateTimeEnd != null">
-                    and preparation.update_time <![CDATA[<=]]> #{updateTimeEnd}
-                </if>
-                <if test="updateTime != null">
-                    and preparation.update_time = #{updateTime}
-                </if>
-                                                <if test="createdUserId != null and createdUserId != ''">
-                    and preparation.created_user_id = #{createdUserId}
-                </if>
-                                                <if test="createdUserName != null and createdUserName != ''">
-                    and preparation.created_user_name = #{createdUserName}
-                </if>
-                                                <if test="updateUserId != null and updateUserId != ''">
-                    and preparation.update_user_id = #{updateUserId}
-                </if>
-                                                <if test="updateUserName != null and updateUserName != ''">
-                    and preparation.update_user_name = #{updateUserName}
-                </if>
-                                                <if test="repairStartTimeStart != null">
-                    and preparation.repair_start_time <![CDATA[>=]]>; #{repairStartTimeStart}
-                </if>
-                <if test="repairStartTimeEnd != null">
-                    and preparation.repair_start_time <![CDATA[<=]]> #{repairStartTimeEnd}
-                </if>
-                <if test="repairStartTime != null">
-                    and preparation.repair_start_time = #{repairStartTime}
-                </if>
-                                                <if test="repairEndTimeStart != null">
-                    and preparation.repair_end_time <![CDATA[>=]]>; #{repairEndTimeStart}
-                </if>
-                <if test="repairEndTimeEnd != null">
-                    and preparation.repair_end_time <![CDATA[<=]]> #{repairEndTimeEnd}
-                </if>
-                <if test="repairEndTime != null">
-                    and preparation.repair_end_time = #{repairEndTime}
-                </if>
-                                                <if test="repairMinutes != null">
-                    and preparation.repair_minutes = #{repairMinutes}
-                </if>
-                                                <if test="repairUserId != null and repairUserId != ''">
-                    and preparation.repair_user_id = #{repairUserId}
-                </if>
-                                                <if test="repairContent != null and repairContent != ''">
-                    and preparation.repair_content = #{repairContent}
-                </if>
-                                                <if test="limitHoursStart != null">
-                    and preparation.limit_hours <![CDATA[>=]]>; #{limitHoursStart}
-                </if>
-                <if test="limitHoursEnd != null">
-                    and preparation.limit_hours <![CDATA[<=]]> #{limitHoursEnd}
-                </if>
-                <if test="limitHours != null">
-                    and preparation.limit_hours = #{limitHours}
-                </if>
-                                                <if test="fee != null">
-                    and preparation.fee = #{fee}
-                </if>
-                                                <if test="feeFile != null and feeFile != ''">
-                    and preparation.fee_file = #{feeFile}
-                </if>
-                            <if test="keyword != null and keyword != ''">
+        <if test="id != null and id != ''">
+            and preparation.id = #{id}
+        </if>
+        <if test="positionId != null and positionId != ''">
+            and preparation.position_id = #{positionId}
+        </if>
+        <if test="userId != null and userId != ''">
+            and preparation.user_id = #{userId}
+        </if>
+        <if test="departId != null and departId != ''">
+            and preparation.depart_id = #{departId}
+        </if>
+        <if test="applyTimeStart != null">
+            and preparation.apply_time <![CDATA[>=]]> #{applyTimeStart}
+        </if>
+        <if test="applyTimeEnd != null">
+            and preparation.apply_time <![CDATA[<=]]> #{applyTimeEnd}
+        </if>
+        <if test="applyTime != null">
+            and preparation.apply_time = #{applyTime}
+        </if>
+        <if test="content != null and content != ''">
+            and preparation.content = #{content}
+        </if>
+        <if test="status != null">
+            and preparation.status = #{status}
+        </if>
+        <if test="remark != null and remark != ''">
+            and preparation.remark = #{remark}
+        </if>
+        <if test="createdTimeStart != null">
+            and preparation.created_time <![CDATA[>=]]> #{createdTimeStart}
+        </if>
+        <if test="createdTimeEnd != null">
+            and preparation.created_time <![CDATA[<=]]> #{createdTimeEnd}
+        </if>
+        <if test="createdTime != null">
+            and preparation.created_time = #{createdTime}
+        </if>
+        <if test="updateTimeStart != null">
+            and preparation.update_time <![CDATA[>=]]> #{updateTimeStart}
+        </if>
+        <if test="updateTimeEnd != null">
+            and preparation.update_time <![CDATA[<=]]> #{updateTimeEnd}
+        </if>
+        <if test="updateTime != null">
+            and preparation.update_time = #{updateTime}
+        </if>
+        <if test="createdUserId != null and createdUserId != ''">
+            and preparation.created_user_id = #{createdUserId}
+        </if>
+        <if test="createdUserName != null and createdUserName != ''">
+            and preparation.created_user_name = #{createdUserName}
+        </if>
+        <if test="updateUserId != null and updateUserId != ''">
+            and preparation.update_user_id = #{updateUserId}
+        </if>
+        <if test="updateUserName != null and updateUserName != ''">
+            and preparation.update_user_name = #{updateUserName}
+        </if>
+        <if test="repairStartTimeStart != null">
+            and preparation.repair_start_time <![CDATA[>=]]> #{repairStartTimeStart}
+        </if>
+        <if test="repairStartTimeEnd != null">
+            and preparation.repair_start_time <![CDATA[<=]]> #{repairStartTimeEnd}
+        </if>
+        <if test="repairStartTime != null">
+            and preparation.repair_start_time = #{repairStartTime}
+        </if>
+        <if test="repairEndTimeStart != null">
+            and preparation.repair_end_time <![CDATA[>=]]> #{repairEndTimeStart}
+        </if>
+        <if test="repairEndTimeEnd != null">
+            and preparation.repair_end_time <![CDATA[<=]]> #{repairEndTimeEnd}
+        </if>
+        <if test="repairEndTime != null">
+            and preparation.repair_end_time = #{repairEndTime}
+        </if>
+        <if test="repairMinutes != null">
+            and preparation.repair_minutes = #{repairMinutes}
+        </if>
+        <if test="repairUserId != null and repairUserId != ''">
+            and preparation.repair_user_id = #{repairUserId}
+        </if>
+        <if test="repairContent != null and repairContent != ''">
+            and preparation.repair_content = #{repairContent}
+        </if>
+        <if test="limitHoursStart != null">
+            and preparation.limit_hours <![CDATA[>=]]> #{limitHoursStart}
+        </if>
+        <if test="limitHoursEnd != null">
+            and preparation.limit_hours <![CDATA[<=]]> #{limitHoursEnd}
+        </if>
+        <if test="limitHours != null">
+            and preparation.limit_hours = #{limitHours}
+        </if>
+        <if test="fee != null">
+            and preparation.fee = #{fee}
+        </if>
+        <if test="feeFile != null and feeFile != ''">
+            and preparation.fee_file = #{feeFile}
+        </if>
+        <if test="keyword != null and keyword != ''">
             and preparation.id like concat(concat('%',#{keyword}),'%')
         </if>
+        <!-- 新增查询参数 -->
+        <if test="statusList != null and statusList.size > 0">
+            AND preparation.status in
+            <foreach item="item" index="index" collection="statusList" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
+        <if test="tempUserId != null and tempUserId != ''">
+            and (preparation.user_id = #{tempUserId} or preparation.dispatch_user_id = #{tempUserId} or preparation.repair_user_id = #{tempUserId})
+        </if>
     </sql>
-    <select id="selectList" parameterType="com.platform.dao.dto.preparation.PreparationDTO" resultType="com.platform.dao.vo.query.preparation.PreparationVO">
+    <select id="selectList" parameterType="com.platform.dao.dto.preparation.PreparationDTO"
+            resultType="com.platform.dao.vo.query.preparation.PreparationVO">
         select preparation.*
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                        from t_preparation as preparation
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <where>
-            <include refid="List_Condition" />
+        from t_preparation as preparation
+        <where>
+            <include refid="List_Condition"/>
         </where>
     </select>
 </mapper>

+ 37 - 9
platform-rest/src/main/java/com/platform/rest/controller/preparation/PreparationController.java

@@ -1,23 +1,24 @@
 package com.platform.rest.controller.preparation;
 
+import com.platform.common.bean.AbstractPageResultBean;
+import com.platform.common.util.BeanConverterUtil;
 import com.platform.common.util.R;
+import com.platform.common.validation.group.AddGroup;
+import com.platform.common.validation.group.UpdateGroup;
 import com.platform.dao.dto.preparation.PreparationDTO;
 import com.platform.dao.entity.preparation.Preparation;
-import com.platform.service.preparation.PreparationService;
 import com.platform.dao.util.ExcelUtil;
 import com.platform.dao.vo.export.preparation.ExportPreparationVO;
 import com.platform.dao.vo.query.preparation.PreparationVO;
-import com.platform.common.util.BeanConverterUtil;
-import com.platform.common.validation.group.AddGroup;
-import com.platform.common.validation.group.UpdateGroup;
+import com.platform.rest.log.annotation.SysLog;
+import com.platform.service.preparation.PreparationService;
+import lombok.AllArgsConstructor;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
-import lombok.AllArgsConstructor;
-import com.platform.common.bean.AbstractPageResultBean;
-import com.platform.rest.log.annotation.SysLog;
-import java.util.List;
+
 import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 /**
  * @Description 筹建管理 控制器
@@ -53,7 +54,7 @@ public class PreparationController {
   @PostMapping
   @PreAuthorize("@pms.hasPermission('preparation-preparations-add')")
   public R save(@Validated({AddGroup.class}) @RequestBody PreparationDTO preparationDTO) {
-      return new R<>(preparationService.saveModelByDTO(preparationDTO));
+      return new R<>(preparationService.saveByDTO(preparationDTO));
   }
 
   /**
@@ -138,4 +139,31 @@ public class PreparationController {
     ExcelUtil.exportResponseDict(response, ExportPreparationVO.class, BeanConverterUtil.copyListProperties(list, ExportPreparationVO.class), "筹建管理");
   }
 
+  /**
+   * 完成维修单
+   *
+   * @param preparationDTO 维修单DTO
+   * @return R
+   */
+  @SysLog("完成筹建单")
+  @PutMapping("/finish/{id}")
+  public R finish(@PathVariable("id") String id, @Validated({UpdateGroup.class}) @RequestBody PreparationDTO preparationDTO) {
+    preparationDTO.setId(id);
+    preparationService.completePreparation(preparationDTO);
+    return new R<>();
+  }
+
+  /**
+   * 派单
+   * @param preparationDTO 筹建单DTO
+   * @return R
+   */
+  @SysLog("派工筹建单")
+  @PutMapping("/dispatch/{id}")
+  public R dispatch(@PathVariable("id") String id, @Validated({UpdateGroup.class}) @RequestBody PreparationDTO preparationDTO) {
+    preparationDTO.setId(id);
+    preparationService.dispatchPreparation(preparationDTO);
+    return new R<>();
+  }
+
 }

+ 12 - 0
platform-service/src/main/java/com/platform/service/preparation/PreparationService.java

@@ -39,4 +39,16 @@ public interface PreparationService extends IBaseService<Preparation, Preparatio
      */
     Preparation saveByDTO(PreparationDTO model);
 
+    /**
+     * 主管派工
+     * @param model
+     */
+    void dispatchPreparation(PreparationDTO model);
+
+    /**
+     * 完成筹建维修
+     * @param model
+     */
+    void completePreparation(PreparationDTO model);
+
                                                                                                                                                                                                                                                                             }

+ 84 - 8
platform-service/src/main/java/com/platform/service/preparation/impl/PreparationServiceImpl.java

@@ -4,19 +4,14 @@ import com.github.pagehelper.PageHelper;
 import com.platform.common.bean.AbstractPageResultBean;
 import com.platform.common.cache.ConfigCache;
 import com.platform.common.exception.DeniedException;
-import com.platform.common.util.IdGeneratorUtils;
-import com.platform.common.util.ListUtils;
-import com.platform.common.util.SecurityUtils;
-import com.platform.common.util.SpringContextHolder;
+import com.platform.common.model.UserInfo;
+import com.platform.common.util.*;
 import com.platform.dao.bean.MyPage;
 import com.platform.dao.dto.preparation.PreparationDTO;
 import com.platform.dao.dto.upms.SysUserDTO;
 import com.platform.dao.entity.preparation.Preparation;
 import com.platform.dao.entity.sb.SbPosition;
-import com.platform.dao.enums.SysConfigEnum;
-import com.platform.dao.enums.SysRoleCodeEnum;
-import com.platform.dao.enums.WorkplaceBacklogDetailTypeEnum;
-import com.platform.dao.enums.WorkplaceBacklogTypeEnum;
+import com.platform.dao.enums.*;
 import com.platform.dao.mapper.preparation.PreparationMapper;
 import com.platform.dao.mapper.sb.SbPositionMapper;
 import com.platform.dao.mapper.upms.SysUserDeptMapper;
@@ -27,6 +22,7 @@ import com.platform.dao.vo.query.preparation.PreparationVO;
 import com.platform.service.base.impl.BaseServiceImpl;
 import com.platform.service.event.WorkplaceBacklogEvent;
 import com.platform.service.preparation.PreparationService;
+import com.platform.service.upms.SysFileService;
 import com.platform.service.util.SendMessageUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
@@ -34,6 +30,8 @@ import tk.mybatis.mapper.weekend.Weekend;
 import tk.mybatis.mapper.weekend.WeekendCriteria;
 
 import javax.annotation.Resource;
+import java.time.LocalDateTime;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -53,6 +51,8 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
     private SysUserDeptMapper sysUserDeptMapper;
     @Resource
     private SysUserMapper sysUserMapper;
+    @Resource
+    private SysFileService sysFileService;
 
     @Override
     public int batchDelete(List<String> ids) {
@@ -66,6 +66,23 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
     @Override
     public AbstractPageResultBean<PreparationVO> selectPageList(PreparationDTO record, int pageNum, int pageSize) {
         PageHelper.startPage(pageNum, pageSize);
+        if(record.getSearchType() != null){
+            UserInfo userInfo = SecurityUtils.getUserInfo();
+            record.setTempUserId(userInfo.getUserId());
+            List<Integer> statusList = new ArrayList<>();
+            if(record.getSearchType() == 1){ // 我的工单
+                statusList.add(PreparationStatusEnum.NOT_ALLOCATED.getValue());
+                statusList.add(RepairApplicationFormStatusEnum.PROCESSING.getValue());
+                statusList.add(RepairApplicationFormStatusEnum.FINISHED.getValue());
+            }else if(record.getSearchType() == 2){ // 待派工单
+                statusList.add(PreparationStatusEnum.NOT_ALLOCATED.getValue());
+            }
+            // 超级管理员可以看到各个状态下的所有数据 相关领导,可以在这里进行设置
+            if(userInfo.getSuperAdmin() == 1 || record.getSearchType() == -1){
+                record.setTempUserId(null);
+            }
+            record.setStatusList(statusList);
+        }
         return new MyPage(mapper.selectList(record));
     }
 
@@ -92,12 +109,56 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
         weekend.weekendCriteria().andIsNotNull(Preparation::getId);
         Integer count = mapper.selectCountByExample(weekend);
         model.setNo(IdGeneratorUtils.getPreparationNo(++count));
+        model.setStatus(PreparationStatusEnum.NOT_ALLOCATED.getValue()); // 待分配
         Preparation preparation = this.saveModelByDTO(model);
         // 给主管发送消息
         sendMessageToManger(userVOS,preparation);
         return preparation;
     }
 
+    @Override
+    public void dispatchPreparation(PreparationDTO model) {
+        String roles = com.platform.common.util.StringUtils.getRoles();
+        if(!roles.contains(SysRoleCodeEnum.PREPARATION_MANAGER.name())){
+            throw new DeniedException("不具备派单权限");
+        }
+        if(StringUtils.isEmpty(model.getRepairUserId())){
+            throw new DeniedException("派单对象不能为空");
+        }
+        Preparation preparation = mapper.selectByPrimaryKey(model.getId());
+        Preparation updPre = new Preparation();
+        updPre.setId(model.getId());
+        updPre.setRepairStartTime(LocalDateTime.now());
+        updPre.setRepairUserId(model.getRepairUserId());
+        updPre.setDispatchUserId(SecurityUtils.getUserInfo().getUserId());
+        updPre.setStatus(PreparationStatusEnum.PROCESSING.getValue());
+        mapper.updateByPrimaryKeySelective(updPre);
+        model.setNo(preparation.getNo());
+        model.setContent(preparation.getContent());
+        model.setPositionId(preparation.getPositionId());
+        SysUserDTO queryDTO = new SysUserDTO();
+        queryDTO.setUserId(model.getRepairUserId());
+        List<SysUserVO> userVOS = sysUserMapper.getSysUserVO(queryDTO);
+        // 给具体处理人发送消息
+        sendMessageToRepairer(userVOS,model);
+    }
+
+    @Override
+    public void completePreparation(PreparationDTO model) {
+        Preparation preparation = mapper.selectByPrimaryKey(model.getId());
+        Preparation updPre = new Preparation();
+        updPre.setId(model.getId());
+        updPre.setRepairContent(model.getRepairContent());
+        updPre.setRepairEndTime(LocalDateTime.now());
+        updPre.setRepairMinutes(DateUtils.getDurationHours(preparation.getRepairStartTime(), updPre.getRepairEndTime()));
+        updPre.setStatus(PreparationStatusEnum.FINISHED.getValue());
+        updPre.setFee(model.getFee());
+        // 保存文件图片
+        sysFileService.saveFile(model.getId(), SysFileTypeEnum.PREPARATION_APPLICATION_IMGS.getValue(), model.getImageList());
+        sysFileService.saveFile(model.getId(),SysFileTypeEnum.PREPARATION_APPLICATION_FILES.getValue(),model.getFileList());
+        mapper.updateByPrimaryKeySelective(updPre);
+    }
+
     private String getParentPositionId(String positionId){
         SbPosition sbPosition = sbPositionMapper.selectByPrimaryKey(positionId);
         while(!StringUtils.isEmpty(sbPosition.getParentId())){
@@ -157,4 +218,19 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
                 repairId, content, repairId, userIds, mails));
     }
 
+    private void sendMessageToRepairer(List<SysUserVO> userVOS,PreparationDTO preparation){
+        String info = MessageTemplateUtil.getPreparationForRepair(preparation.getNo());
+        Integer detailType = WorkplaceBacklogDetailTypeEnum.PREPARATION_REPAIR_DISPATCH.getValue();
+        String[] values = new String[]{"有新的筹建派工任务!",preparation.getNo(),"无",preparation.getContent(),sbPositionMapper.selectNameById(preparation.getPositionId()),"请尽快处理"};
+        String wechatTemplateId = ConfigCache.getLabelByValueAllowNull(SysConfigEnum.REPAIR_SEND_SUCCESS_WECHAT_TEMPLATE_ID.name());;
+        String detailUrl = "pages/service-detail/service-detail?id=" + preparation.getId();
+        Map<String,List<String>> maps = getPushReceivers(userVOS);
+        // 1、站内信
+        sendWorkplaceAndEmailNew(maps.get("mails"),maps.get("userIds"),preparation.getId(),info, detailType);
+        // 2、微信
+        SendMessageUtils.sendWechatNew(maps.get("openIds"),detailUrl,values,wechatTemplateId);
+        // 3、短信
+        SendMessageUtils.sendCommonSms(maps.get("phones"),info);
+    }
+
                                                                                                                                                                                                                                                                             }

+ 3 - 6
platform-service/src/main/java/com/platform/service/repair/strategy/impl/LongYanPlanRepairStrategy.java

@@ -644,24 +644,21 @@ public class LongYanPlanRepairStrategy extends AbstractRepairBaseStrategy {
         if(!roles.contains(SysRoleCodeEnum.REPAIR_MANAGE.name()) && !roles.contains(SysRoleCodeEnum.MM.name())){
             throw new DeniedException("对不起,您不具有权限");
         }
-        String produceUser = ConfigCache.getLabelByValueAllowNull(SysConfigEnum.PRODUCE_VERIFY_USERS.name());
-        if(StringUtils.isBlank(produceUser)){
+        if(StringUtils.isBlank(model.getProduceVerifyUserId())){
             throw new DeniedException("生产审核人员为空,请先配置!");
         }
         RepairApplicationForm form = repairApplicationFormMapper.selectByPrimaryKey(model.getId());
         RepairApplicationForm updForm = new RepairApplicationForm();
         updForm.setId(form.getId());
+        updForm.setProduceVerifyUserId(model.getProduceVerifyUserId());
         updForm.setStatus(RepairApplicationFormStatusEnum.CALLER_REPAIR_VERIFYING_THREE.getValue());
         // 添加跟踪状态
         addRepairStatusRecord(form,"再次发起审核");
         model.setNo(form.getNo());
         // 添加审核记录
         addRepairVerifyRecord(model,CommonConstants.STATUS_VERIFY_PASS, CommonConstants.TYPE_REPAIR_MANAGER_VERIFY);
-        List<String> userNames = JSONArray.parseArray(produceUser,String.class);
         List<SysUser> users = ListUtils.newArrayList();
-        userNames.forEach(item -> {
-            users.add(sysUserService.selectByUsername(item));
-        });
+        users.add(sysUserService.getModelById(model.getProduceVerifyUserId()));
         // 通知生产审核
         sendMessageToProducer(model,CommonConstants.SB_CALL_REPAIR,users);
     }