guarantee-lsq hace 2 años
padre
commit
8f07c53f5d

+ 4 - 0
platform-dao/src/main/java/com/platform/dao/enums/SysRoleCodeEnum.java

@@ -175,6 +175,10 @@ public enum SysRoleCodeEnum {
      * 筹建主管
      */
     PREPARATION_MANAGER,
+    /**
+     * 筹建执行人
+     */
+    PREPARATION_USER,
     ;
 
 }

+ 70 - 46
platform-dao/src/main/java/com/platform/dao/vo/query/preparation/PreparationVO.java

@@ -1,16 +1,19 @@
 package com.platform.dao.vo.query.preparation;
 
+import com.platform.dao.entity.upms.SysFile;
 import lombok.Data;
 import com.platform.common.bean.BaseVO;
 import com.platform.common.bean.BaseDTO;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
+
 import javax.validation.constraints.*;
 import java.io.Serializable;
 import java.time.LocalDateTime;
 import java.time.LocalDate;
 import java.math.BigDecimal;
+import java.util.List;
 
 /**
  * @Description 筹建管理VO结果类
@@ -21,98 +24,119 @@ import java.math.BigDecimal;
 @Data
 @Accessors(chain = true)
 @EqualsAndHashCode(callSuper = true)
-public class PreparationVO extends BaseVO implements Serializable{
+public class PreparationVO extends BaseVO implements Serializable {
 
     /**
      * 主键
      */
-        private String id;
-        /**
+    private String id;
+    /**
      * 设备型号
      */
-        private String positionId;
-        /**
+    private String positionId;
+    /**
      * 申请人id
      */
-        private String userId;
-        /**
+    private String userId;
+    /**
      * 申请部门
      */
-        private String departId;
-        /**
+    private String departId;
+    /**
      * 报修时间
      */
-        private LocalDateTime applyTime;
-        /**
+    private LocalDateTime applyTime;
+    /**
      * 问题描述
      */
-        private String content;
-        /**
+    private String content;
+    /**
      * 报修状态:0:草稿 1-待分配 2-已分配 3-已完成 4-已撤销
-            
      */
-        private Integer status;
-        /**
+    private Integer status;
+    /**
      * 备注
      */
-        private String remark;
-        /**
+    private String remark;
+    /**
      * 创建日期
      */
-        private LocalDateTime createdTime;
-        /**
+    private LocalDateTime createdTime;
+    /**
      * 更新日期
      */
-        private LocalDateTime updateTime;
-        /**
+    private LocalDateTime updateTime;
+    /**
      * 创建人
      */
-        private String createdUserId;
-        /**
+    private String createdUserId;
+    /**
      * 创建人名称
      */
-        private String createdUserName;
-        /**
+    private String createdUserName;
+    /**
      * 更新人
      */
-        private String updateUserId;
-        /**
+    private String updateUserId;
+    /**
      * 更新人名称
      */
-        private String updateUserName;
-        /**
+    private String updateUserName;
+    /**
      * 维修开始时间
      */
-        private LocalDateTime repairStartTime;
-        /**
+    private LocalDateTime repairStartTime;
+    /**
      * 维修结束时间
      */
-        private LocalDateTime repairEndTime;
-        /**
+    private LocalDateTime repairEndTime;
+    /**
      * 维修耗时
      */
-        private Double repairMinutes;
-        /**
+    private Double repairMinutes;
+    /**
      * 维修人员id
      */
-        private String repairUserId;
-        /**
+    private String repairUserId;
+    /**
      * 维修描述
      */
-        private String repairContent;
-        /**
+    private String repairContent;
+    /**
      * 要求完成日期
      */
-        private LocalDate limitHours;
-        /**
+    private LocalDate limitHours;
+    /**
      * 费用预算
      */
-        private BigDecimal fee;
-        /**
+    private BigDecimal fee;
+    /**
      * 预算明细表
      */
-        private String feeFile;
-    
+    private String feeFile;
+
+    /**
+     * 派单人
+     */
+    private String dispatchUserId;
+
+    private String no;
+
+    /**
+     * 公司
+     */
+    private String parentPositionId;
+
+    private List<SysFile> imageList;
+
+    private List<SysFile> fileList;
+
+    private String userName;
+
+    private String positionName;
+
+    private String companyName;
 
+    private String deptName;
 
 }

+ 4 - 2
platform-dao/src/main/resources/mapper/preparation/PreparationMapper.xml

@@ -161,8 +161,10 @@
     </sql>
     <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
+        select preparation.*,applyU.real_name as userName,sp.name as positionName,spp.name as companyName,dept.name as deptName
+        from t_preparation as preparation join t_sys_user applyU on preparation.user_id = applyU.user_id
+        join t_sb_position sp on preparation.position_id = sp.id join t_sb_position spp on preparation.parent_position_id = spp.id
+        join t_sys_dept dept on preparation.depart_id = dept.dept_id
         <where>
             <include refid="List_Condition"/>
         </where>

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

@@ -95,7 +95,7 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
         queryUserDTO.setRoleCode(SysRoleCodeEnum.PREPARATION_MANAGER.name());
         List<SysUserVO> userVOS = sysUserMapper.selectDeptRoleUser(queryUserDTO);
         if(userVOS == null || userVOS.size() == 0){
-            throw new DeniedException("报修失败,筹建部门,尚无派主管。");
+            throw new DeniedException("报修失败,筹建部门,尚无派主管。");
         }
         if(userVOS.size() == 1){
             model.setDispatchUserId(userVOS.get(0).getUserId());