Bladeren bron

领料出库

2 jaren geleden
bovenliggende
commit
f347f52e3f

+ 1 - 0
platform-dao/src/main/java/com/platform/dao/dto/store/OutStoreFormDTO.java

@@ -24,6 +24,7 @@ import java.util.List;
 @Accessors(chain = true)
 @EqualsAndHashCode(callSuper = true)
 public class OutStoreFormDTO extends BaseDTO implements Serializable {
+    private Integer oldOrNew;
     private String projectName;
     private String projectId;
     private String repairFormId;//关联维修工单

+ 1 - 0
platform-dao/src/main/java/com/platform/dao/entity/store/OutStoreForm.java

@@ -22,6 +22,7 @@ import javax.persistence.Transient;
 @Accessors(chain = true)
 @Table(name = "t_out_store_form")
 public class OutStoreForm implements Serializable{
+    private Integer oldOrNew;
     private String projectName;
 
     private String repairFormId;

+ 9 - 1
platform-dao/src/main/java/com/platform/dao/vo/export/repair/ExportRepairApplicationFormVO.java

@@ -25,7 +25,7 @@ public class ExportRepairApplicationFormVO implements Serializable {
     /**
      * 设备编号
      */
-    @Excel(name = "设备号", orderNum = "2")
+    @Excel(name = "设备号", orderNum = "2")
     private String sbNo;
 
     /**
@@ -119,4 +119,12 @@ public class ExportRepairApplicationFormVO implements Serializable {
     @Excel(name = "改进内容", orderNum = "19")
     private String changeRepairPlanContent;
 
+    /**
+     * 故障描述
+     */
+    @Excel(name = "维修专业", orderNum = "20")
+    private String repairProfessor; // 维修专业
+
+
+
 }

+ 1 - 0
platform-dao/src/main/java/com/platform/dao/vo/query/store/OutStoreFormVO.java

@@ -26,6 +26,7 @@ import java.util.List;
 @Accessors(chain = true)
 @EqualsAndHashCode(callSuper = true)
 public class OutStoreFormVO extends BaseVO implements Serializable {
+    private Integer oldOrNew;
     private String projectName;
     private String projectId;
     private String repairNo;

+ 7 - 1
platform-dao/src/main/resources/mapper/repair/RepairApplicationFormMapper.xml

@@ -14,7 +14,8 @@
     <select id="selectPageList" parameterType="com.platform.dao.dto.repair.RepairApplicationFormDTO"
             resultType="com.platform.dao.vo.repair.RepairApplicationFormVO">
         select
-        <include refid="Base_Column_List"/>
+        <include refid="Base_Column_List"/>,
+        dept.name as repairDeptName,position.name as sbPositionName
         from t_repair_application_form application
         left join t_sys_user user on application.user_id = user.user_id
         left join t_sys_user user2 on application.repair_user_id = user2.user_id
@@ -22,6 +23,8 @@
         left join t_sb_info sb on application.sb_id = sb.id
         left join t_error_type error on application.repair_error_type_id = error.id
         left join t_part_info part on application.part_id = part.id
+        left join t_sys_dept dept on dept.dept_id =application.repair_dept_id
+        left join t_sb_position position on position.id = sb.`position_id`
         <where>
             <if test="keyword != null and keyword != ''">
                 and ( sb.name like concat('%',#{keyword},'%') or
@@ -116,6 +119,9 @@
             <if test="sbPositionId != null and sbPositionId != ''">
                 and sb.position_id = #{sbPositionId}
             </if>
+            <if test="repairProfessor!=null and repairProfessor!=''">
+                and application.repair_professor=#{repairProfessor}
+            </if>
         </where>
     </select>
     <select id="selectById" parameterType="java.lang.Object"

+ 15 - 0
platform-rest/src/main/java/com/platform/rest/controller/repair/RepairApplicationFormController.java

@@ -1,7 +1,9 @@
 package com.platform.rest.controller.repair;
 
 import com.alibaba.fastjson.JSONArray;
+import com.platform.common.cache.DictCache;
 import com.platform.common.constant.CommonConstants;
+import com.platform.common.enums.DictTypeEnum;
 import com.platform.common.exception.DeniedException;
 import com.platform.common.model.UserInfo;
 import com.platform.common.util.*;
@@ -493,6 +495,19 @@ public class RepairApplicationFormController {
     @PreAuthorize("@pms.hasPermission('repair-application-forms-export')")
     public void export(HttpServletResponse response, RepairApplicationFormDTO repairApplicationFormDTO) {
         List<RepairApplicationFormVO> list = repairApplicationFormService.getVOListByDTO(repairApplicationFormDTO);
+        for (RepairApplicationFormVO vo:list){
+            String[] arr = vo.getRepairProfessor().split(",");
+            StringBuffer sb = new StringBuffer();
+            for (String a:arr){
+                String professor = DictCache.getLabelByValue("REPAIR_APPLICATION_PROFESSOR",Integer.parseInt(a));
+                sb.append(professor+",");
+            }
+//            vo.setRepairProfessor(DictCache.getLabelByValue("REPAIR_APPLICATION_PROFESSOR",vo.getRepairProfessor()));
+//            String str =DictCache.getLabelByValue("SYS_DEPT_NATURE", "JITUAN");
+//            System.out.println(str);
+            vo.setRepairProfessor(sb.toString().substring(0,sb.toString().length()-1));
+
+        }
         List<ExportRepairApplicationFormVO> excelList = new ArrayList<>();
         for (RepairApplicationFormVO vo : list) {
             ExportRepairApplicationFormVO excel = BeanConverterUtil.copyObjectProperties(vo, ExportRepairApplicationFormVO.class);