Procházet zdrojové kódy

Merge remote-tracking branch 'origin/demo_' into demo_

408249787 před 2 roky
rodič
revize
ee15efc4b2

+ 20 - 20
platform-dao/src/main/java/com/platform/dao/vo/export/sb/ExportSbInfoVO.java

@@ -48,7 +48,7 @@ public class ExportSbInfoVO implements Serializable {
     /**
      * 设备等级
      */
-    @Excel(name = "设备等级(必填, 1:A级,2:B级,3:C级)", orderNum = "6", dicCode="SBINFO_LEVEL")
+    @Excel(name = "设备等级(必填;1:A级;2:B级;3:C级)", orderNum = "6")
     private Integer level;
     /**
      * 设备原值
@@ -58,105 +58,105 @@ public class ExportSbInfoVO implements Serializable {
     /**
      * 设备类别
      */
-    @Excel(name = "设备类别", orderNum = "8")
+    @Excel(name = "设备类别(必填)", orderNum = "8")
     private String typeName;
     /**
      * 自定义类型
      */
-    @Excel(name = "自定义类型(3:一般性设备,4:计量设备,5:特种设备)", orderNum = "9")
+    @Excel(name = "自定义类型(必填;3:生产设备;4:计量设备;5:特种设备)", orderNum = "9")
     private Integer useType;
     /**
      * 设备位置
      */
-    @Excel(name = "设备位置", orderNum = "11")
+    @Excel(name = "设备位置", orderNum = "10")
     private String positionName;
     /**
      * 使用位置
      */
-    @Excel(name = "出厂编号", orderNum = "12")
+    @Excel(name = "出厂编号", orderNum = "11")
     private String zzh;
     /**
      * 生产商
      */
-    @Excel(name = "生产商", orderNum = "13")
+    @Excel(name = "生产商", orderNum = "12")
     private String producerName;
     /**
      * 使用施工组名称
      */
-    @Excel(name = "使用人", orderNum = "14")
+    @Excel(name = "使用人", orderNum = "13")
     private String saveUserName;
     /**
      * 购置日期
      */
-    @Excel(name = "购置日期", orderNum = "15")
+    @Excel(name = "购置日期", orderNum = "14")
     private LocalDate buyDate;
     /**
      * 投用日期
      */
-    @Excel(name = "投用日期", orderNum = "16")
+    @Excel(name = "投用日期", orderNum = "15")
     private LocalDate startDate;
     /**
      * 状态
      */
-    @Excel(name = "状态(必填,1在库,2使用中)", orderNum = "17")
+    @Excel(name = "状态(必填;1在库;2使用中)", orderNum = "16")
     private Integer status;
     /**
      * 备注
      */
-    @Excel(name = "备注", orderNum = "18")
+    @Excel(name = "备注", orderNum = "17")
     private String remark;
     /**
      * 财务编码/固定资产编号
      */
-    @Excel(name = "是否固定资产", orderNum = "20")
+    @Excel(name = "固定资产编号", orderNum = "18")
     private String financingNo;
 
     /**
      * 固定资产
      */
-    @Excel(name = "是否固定资产(必填,0否,1是)", orderNum = "25")
+    @Excel(name = "是否固定资产(必填;0否;1是)", orderNum = "19")
     private Integer isFinancing;
 
     /**
      * 上次检定日期
      */
-    @Excel(name = "上次检定日期", orderNum = "21")
+    @Excel(name = "上次检定日期", orderNum = "20")
     private LocalDate checkDate;
 
     /**
      * 检定周期
      */
-    @Excel(name = "检定周期(月)", orderNum = "22")
+    @Excel(name = "检定周期(月)", orderNum = "21")
     private Integer checkPeriod;
 
     /**
      * 下次检定日期
      */
-    @Excel(name = "下次检定日期", orderNum = "23")
+    @Excel(name = "下次检定日期", orderNum = "22")
     private LocalDate nextCheckDate;
 
     /**
      * 预警天数
      */
-    @Excel(name = "预警天数", orderNum = "24")
+    @Excel(name = "预警天数", orderNum = "23")
     private Integer seatNumber;
 
     /**
      * 使用寿命
      */
-    @Excel(name = "使用寿命(年)", orderNum = "26")
+    @Excel(name = "使用寿命(年)", orderNum = "24")
     private Double workYear;
 
     /**
      * 检定单位
      */
-    @Excel(name = "检定单位", orderNum = "27")
+    @Excel(name = "检定单位", orderNum = "25")
     private String dph;
 
     /**
      * 是否需要检定
      */
-    @Excel(name = "是否需要检定(必填,0否,1是)", orderNum = "28")
+    @Excel(name = "是否需要检定(必填;0:否;1:是)", orderNum = "26")
     private Integer isMeasure;
 
 }

+ 11 - 0
platform-rest/src/main/java/com/platform/rest/controller/sb/SbInfoController.java

@@ -226,6 +226,17 @@ public class SbInfoController {
         return new R<>();
     }
 
+    /**
+     * 获取分页
+     *
+     * @return R
+     */
+    @GetMapping("/fill/position/list")
+    public R<List<SbInfoVO>> queryList(@RequestBody List<String> ids) {
+        return new R<>(sbInfoService.getChildSbByIds(ids));
+    }
+
+
     /**
      * 获取分页
      *

+ 7 - 0
platform-service/src/main/java/com/platform/service/sb/SbInfoService.java

@@ -320,4 +320,11 @@ public interface SbInfoService extends IBaseService<SbInfo, SbInfoDTO> {
     String updateImportUpdateForLongYan(MultipartFile file);
 
     void generateSbMeasureLog();
+
+    /**
+     * 获取所有子设备
+     * @param ids
+     * @return
+     */
+    List<SbInfoVO> getChildSbByIds(List<String> ids);
 }

+ 16 - 0
platform-service/src/main/java/com/platform/service/sb/impl/SbInfoServiceImpl.java

@@ -786,6 +786,22 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
         }
     }
 
+    @Override
+    public List<SbInfoVO> getChildSbByIds(List<String> ids) {
+        SbInfoDTO queryDTO = new SbInfoDTO();
+        queryDTO.setIds(ids);
+        List<SbInfoVO> list = mapper.selectVOList(queryDTO);
+        if(list != null && list.size() > 0){
+            list.forEach(item -> {
+                // 获取子设备
+                SbInfoDTO query = new SbInfoDTO();
+                query.setParentId(item.getId());
+                item.setChildren(mapper.selectVOList(query));
+            });
+        }
+        return list;
+    }
+
     /**
      * 更新和记录修改
      * @param sbInfos