lipenghui 4 сар өмнө
parent
commit
d6ac60585a

+ 2 - 2
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/information/vo/IotInformationDbPageReqVO.java

@@ -15,8 +15,8 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
 @ToString(callSuper = true)
 public class IotInformationDbPageReqVO extends PageParam {
 
-    @Schema(description = "设备分类", example = "2")
-    private String deviceType;
+    @Schema(description = "设备分类")
+    private Long deviceType;
 
     @Schema(description = "故障影响")
     private String failureInfluence;

+ 1 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/information/vo/IotInformationDbRespVO.java

@@ -18,7 +18,7 @@ public class IotInformationDbRespVO {
 
     @Schema(description = "设备分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
     @ExcelProperty("设备分类")
-    private String deviceType;
+    private Long deviceType;
 
     @Schema(description = "故障影响")
     @ExcelProperty("故障影响")

+ 2 - 3
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/information/vo/IotInformationDbSaveReqVO.java

@@ -12,9 +12,8 @@ public class IotInformationDbSaveReqVO {
     @Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "7433")
     private Long id;
 
-    @Schema(description = "设备分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
-    @NotEmpty(message = "设备分类不能为空")
-    private String deviceType;
+    @Schema(description = "设备分类" )
+    private Long deviceType;
 
     @Schema(description = "故障影响")
     private String failureInfluence;

+ 5 - 6
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/dataobject/information/IotInformationDbDO.java

@@ -1,11 +1,10 @@
 package cn.iocoder.yudao.module.pms.dal.dataobject.information;
 
-import lombok.*;
-import java.util.*;
-import java.time.LocalDateTime;
-import java.time.LocalDateTime;
-import com.baomidou.mybatisplus.annotation.*;
 import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
+import com.baomidou.mybatisplus.annotation.KeySequence;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.*;
 
 /**
  * 故障知识库 DO
@@ -30,7 +29,7 @@ public class IotInformationDbDO extends BaseDO {
     /**
      * 设备分类
      */
-    private String deviceType;
+    private Long deviceType;
     /**
      * 故障影响
      */

+ 1 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/information/IotInformationDbServiceImpl.java

@@ -34,6 +34,7 @@ public class IotInformationDbServiceImpl implements IotInformationDbService {
     public Long createIotInformationDb(IotInformationDbSaveReqVO createReqVO) {
         // 插入
         IotInformationDbDO iotInformationDb = BeanUtils.toBean(createReqVO, IotInformationDbDO.class);
+        iotInformationDb.setDeleted(false);
         iotInformationDbMapper.insert(iotInformationDb);
         // 返回
         return iotInformationDb.getId();