Browse Source

动态模板调整

lipenghui 5 months ago
parent
commit
e5657391a0

+ 6 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/IotDeviceController.java

@@ -6,8 +6,10 @@ import cn.iocoder.yudao.module.pms.controller.admin.vo.IotDeviceRespVO;
 import cn.iocoder.yudao.module.pms.controller.admin.vo.IotDeviceSaveReqVO;
 import cn.iocoder.yudao.module.pms.dal.dataobject.IotDeviceDO;
 import cn.iocoder.yudao.module.pms.dal.dataobject.IotProductClassifyDO;
+import cn.iocoder.yudao.module.pms.dal.dataobject.iotmodel.IotModelDO;
 import cn.iocoder.yudao.module.pms.service.IotDeviceService;
 import cn.iocoder.yudao.module.pms.service.IotProductClassifyService;
+import cn.iocoder.yudao.module.pms.service.iotmodel.IotModelService;
 import cn.iocoder.yudao.module.pms.util.IotDeviceConvert;
 import cn.iocoder.yudao.module.supplier.dal.dataobject.product.SupplierDO;
 import cn.iocoder.yudao.module.supplier.service.product.SupplierService;
@@ -60,6 +62,8 @@ public class IotDeviceController {
     private SupplierService supplierService;
     @Resource
     private IotProductClassifyService iotProductClassifyService;
+    @Resource
+    private IotModelService iotModelService;
 
     @PostMapping("/create")
     @Operation(summary = "创建设备台账")
@@ -103,6 +107,8 @@ public class IotDeviceController {
         iotDeviceRespVO.setDeptName(Objects.nonNull(dept)?dept.getName():"");
         IotProductClassifyDO iotProductClassify = iotProductClassifyService.getIotProductClassify(iotDevice.getAssetClass());
         iotDeviceRespVO.setAssetClassName(Objects.nonNull(iotProductClassify)?iotProductClassify.getName():"");
+        IotModelDO iotModel = iotModelService.getIotModel(iotDevice.getModel());
+        iotDeviceRespVO.setModelName(Objects.nonNull(iotModel)?iotModel.getName():"");
         return success(iotDeviceRespVO);
     }
 

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

@@ -59,7 +59,7 @@ public class IotDevicePageReqVO extends PageParam {
     private String nameplate;
 
     @Schema(description = "质保到期")
-    private Integer expires;
+    private LocalDateTime expires;
 
     @Schema(description = "采购/租赁价格", example = "14766")
     private Integer plPrice;
@@ -73,7 +73,7 @@ public class IotDevicePageReqVO extends PageParam {
 
     @Schema(description = "折旧开始日期")
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
-    private Integer[] plStartDate;
+    private LocalDateTime[] plStartDate;
 
     @Schema(description = "已提折旧月数")
     private Integer plMonthed;

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

@@ -87,7 +87,7 @@ public class IotDeviceRespVO {
 
     @Schema(description = "折旧开始日期")
     @ExcelProperty("折旧开始日期")
-    private Integer plStartDate;
+    private LocalDateTime plStartDate;
 
     @Schema(description = "已提折旧月数")
     @ExcelProperty("已提折旧月数")
@@ -142,4 +142,6 @@ public class IotDeviceRespVO {
     private String zzName;
     @Schema(description = "供应商名称")
     private String supplierName;
+    @Schema(description = "规格名称")
+    private String modelName;
 }

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

@@ -63,7 +63,7 @@ public class IotDeviceSaveReqVO {
     private String nameplate;
 
     @Schema(description = "质保到期")
-    private Integer expires;
+    private LocalDateTime expires;
 
     @Schema(description = "采购/租赁价格", example = "14766")
     private Integer plPrice;
@@ -75,7 +75,7 @@ public class IotDeviceSaveReqVO {
     private Integer plYear;
 
     @Schema(description = "折旧开始日期")
-    private Integer plStartDate;
+    private LocalDateTime plStartDate;
 
     @Schema(description = "已提折旧月数")
     private Integer plMonthed;

+ 2 - 2
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/dataobject/IotDeviceDO.java

@@ -84,7 +84,7 @@ public class IotDeviceDO extends BaseDO {
     /**
      * 质保到期
      */
-    private Integer expires;
+    private LocalDateTime expires;
     /**
      * 采购/租赁价格
      */
@@ -100,7 +100,7 @@ public class IotDeviceDO extends BaseDO {
     /**
      * 折旧开始日期
      */
-    private Integer plStartDate;
+    private LocalDateTime plStartDate;
     /**
      * 已提折旧月数
      */