guarantee-lsq 1 vuosi sitten
vanhempi
commit
1ceafcfcfe

+ 2 - 0
platform-dao/src/main/java/com/platform/dao/dto/repair/RepairSchemeDTO.java

@@ -102,4 +102,6 @@ public class RepairSchemeDTO extends BaseDTO implements Serializable {
 
     private String errorContent; // 故障描述
 
+    private String errorTypeNo; // 异常类别编码
+
 }

+ 0 - 1
platform-dao/src/main/java/com/platform/dao/entity/repair/ErrorType.java

@@ -84,7 +84,6 @@ public class ErrorType implements Serializable {
     /**
      * 上层类型名称
      */
-    @Transient
     private String parentName;
     /**
      * 数据权限

+ 18 - 2
platform-dao/src/main/java/com/platform/dao/util/TreeUtil.java

@@ -319,6 +319,22 @@ public class TreeUtil {
         return TreeUtil.buildByLoop(trees, root);
     }
 
+    public List<CommonTree> buildErrorTypeTree(List<ErrorType> menus, String root) {
+        List<CommonTree> trees = new ArrayList<>();
+        menus.forEach(menu -> {
+            CommonTree node = new CommonTree();
+            node.setId(menu.getId());
+            node.setKey(menu.getId());
+            node.setParentId(menu.getParentId());
+            node.setCode(menu.getNo());
+            node.setTitle(menu.getName());
+            node.setItem(menu);
+            node.setValue(menu.getId());
+            trees.add(node);
+        });
+        return TreeUtil.buildByLoop(trees, root);
+    }
+
     /**
      * 通过sysMenu创建树形节点
      *
@@ -657,7 +673,7 @@ public class TreeUtil {
      * @param root
      * @return
      */
-    public List<CommonTree> buildErrorTypeTree(List<ErrorType> types, String root) {
+    /*public List<CommonTree> buildErrorTypeTree(List<ErrorType> types, String root) {
         List<CommonTree> trees = new LinkedList<>();
         types.forEach(type -> {
             CommonTree node = new CommonTree();
@@ -669,7 +685,7 @@ public class TreeUtil {
             trees.add(node);
         });
         return TreeUtil.buildByLoop(trees, root);
-    }
+    }*/
 
     /**
      * 创建树

+ 74 - 0
platform-dao/src/main/java/com/platform/dao/vo/query/repair/ErrorTypeVO.java

@@ -0,0 +1,74 @@
+package com.platform.dao.vo.query.repair;
+
+import com.platform.common.bean.BaseVO;
+import com.platform.dao.entity.upms.SysFile;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.util.List;
+
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = true)
+public class ErrorTypeVO extends BaseVO implements Serializable {
+    private String id;
+    /**
+     * 编码
+     */
+    private String no;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 类别: 1-大类 2-子类
+     */
+    private Integer type;
+
+    /**
+     * 排序
+     */
+    private Integer sort;
+
+    /**
+     * 上层类别id
+     */
+    private String parentId;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 创建日期
+     */
+    private LocalDateTime createdTime;
+
+    /**
+     * 更新日期
+     */
+    private LocalDateTime updateTime;
+
+    /**
+     * 创建人
+     */
+    private String createdUserId;
+
+    /**
+     * 更新人
+     */
+    private String updateUserId;
+
+    /**
+     * 关键字
+     */
+    private String keyword;
+}

+ 2 - 0
platform-dao/src/main/java/com/platform/dao/vo/query/repair/RepairSchemeVO.java

@@ -90,4 +90,6 @@ public class RepairSchemeVO extends BaseVO implements Serializable {
     private String errorContent; // 故障描述
 
     private String sbName; // 设备名称
+
+    private String errorTypeName;
 }

+ 6 - 2
platform-dao/src/main/resources/mapper/repair/RepairSchemeMapper.xml

@@ -75,11 +75,15 @@
         <if test="keyword != null and keyword != ''">
             and repair.error_content like concat(concat('%',#{keyword}),'%')
         </if>
+        <if test="errorTypeNo != null and errorTypeNo != ''">
+            and et.no like  concat('',#{errorTypeNo},'%')
+        </if>
     </sql>
     <select id="selectList" parameterType="com.platform.dao.dto.repair.RepairSchemeDTO"
             resultType="com.platform.dao.vo.query.repair.RepairSchemeVO">
-        select repair.*,sb.name as sbName
-        from t_repair_scheme as repair join t_sb_info sb on repair.sb_id = sb.id
+        select repair.*,sb.name as sbName,et.name as errorTypeName from t_repair_scheme as repair
+        join t_sb_info sb on repair.sb_id = sb.id
+        join t_error_type et on repair.error_type_id = et.id
         <where>
             <include refid="List_Condition"/>
         </where>