Commit 4da4ddc142507b7094edae42ab6f4c35ee67de3e

Authored by YunaiV
1 parent f26fda33

✨ feat(mes): 新增计划编码、开始时间、结束日期及频率信息字段

yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/checkrecord/MesDvCheckRecordController.java
@@ -138,7 +138,9 @@ public class MesDvCheckRecordController { @@ -138,7 +138,9 @@ public class MesDvCheckRecordController {
138 // 2. 拼接 VO 138 // 2. 拼接 VO
139 return BeanUtils.toBean(list, MesDvCheckRecordRespVO.class, vo -> { 139 return BeanUtils.toBean(list, MesDvCheckRecordRespVO.class, vo -> {
140 MapUtils.findAndThen(planMap, vo.getPlanId(), 140 MapUtils.findAndThen(planMap, vo.getPlanId(),
141 - plan -> vo.setPlanName(plan.getName())); 141 + plan -> vo.setPlanName(plan.getName()).setPlanCode(plan.getCode())
  142 + .setPlanStartDate(plan.getStartDate()).setPlanEndDate(plan.getEndDate())
  143 + .setPlanCycleType(plan.getCycleType()).setPlanCycleCount(plan.getCycleCount()));
142 MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery -> vo 144 MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery -> vo
143 .setMachineryCode(machinery.getCode()).setMachineryName(machinery.getName()) 145 .setMachineryCode(machinery.getCode()).setMachineryName(machinery.getName())
144 .setMachineryBrand(machinery.getBrand()).setMachinerySpec(machinery.getSpec())); 146 .setMachineryBrand(machinery.getBrand()).setMachinerySpec(machinery.getSpec()));
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/checkrecord/vo/MesDvCheckRecordRespVO.java
@@ -26,6 +26,27 @@ public class MesDvCheckRecordRespVO { @@ -26,6 +26,27 @@ public class MesDvCheckRecordRespVO {
26 @ExcelProperty("计划名称") 26 @ExcelProperty("计划名称")
27 private String planName; 27 private String planName;
28 28
  29 + @Schema(description = "计划编码", example = "P001")
  30 + @ExcelProperty("计划编码")
  31 + private String planCode;
  32 +
  33 + @Schema(description = "开始时间")
  34 + @ExcelProperty("开始时间")
  35 + private LocalDateTime planStartDate;
  36 +
  37 + @Schema(description = "结束日期")
  38 + @ExcelProperty("结束日期")
  39 + private LocalDateTime planEndDate;
  40 +
  41 + @Schema(description = "频率类型", example = "1")
  42 + @ExcelProperty(value = "频率类型", converter = DictConvert.class)
  43 + @DictFormat(DictTypeConstants.MES_DV_CYCLE_TYPE)
  44 + private Integer planCycleType;
  45 +
  46 + @Schema(description = "频率数量", example = "5")
  47 + @ExcelProperty(value = "频率数量")
  48 + private Integer planCycleCount;
  49 +
29 @Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") 50 @Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
30 private Long machineryId; 51 private Long machineryId;
31 52
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/maintenrecord/MesDvMaintenRecordController.java
@@ -138,7 +138,12 @@ public class MesDvMaintenRecordController { @@ -138,7 +138,12 @@ public class MesDvMaintenRecordController {
138 // 2. 拼接 VO 138 // 2. 拼接 VO
139 return BeanUtils.toBean(list, MesDvMaintenRecordRespVO.class, vo -> { 139 return BeanUtils.toBean(list, MesDvMaintenRecordRespVO.class, vo -> {
140 MapUtils.findAndThen(planMap, vo.getPlanId(), 140 MapUtils.findAndThen(planMap, vo.getPlanId(),
141 - plan -> vo.setPlanName(plan.getName())); 141 + plan -> vo.setPlanName(plan.getName())
  142 + .setPlanCode(plan.getCode())
  143 + .setPlanStartDate(plan.getStartDate())
  144 + .setPlanEndDate(plan.getEndDate())
  145 + .setPlanCycleType(plan.getCycleType())
  146 + .setPlanCycleCount(plan.getCycleCount()));
142 MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery -> vo 147 MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery -> vo
143 .setMachineryCode(machinery.getCode()).setMachineryName(machinery.getName()) 148 .setMachineryCode(machinery.getCode()).setMachineryName(machinery.getName())
144 .setMachineryBrand(machinery.getBrand()).setMachinerySpec(machinery.getSpec())); 149 .setMachineryBrand(machinery.getBrand()).setMachinerySpec(machinery.getSpec()));
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/maintenrecord/vo/MesDvMaintenRecordRespVO.java
@@ -26,6 +26,27 @@ public class MesDvMaintenRecordRespVO { @@ -26,6 +26,27 @@ public class MesDvMaintenRecordRespVO {
26 @ExcelProperty("计划名称") 26 @ExcelProperty("计划名称")
27 private String planName; 27 private String planName;
28 28
  29 + @Schema(description = "计划编码", example = "P001")
  30 + @ExcelProperty("计划编码")
  31 + private String planCode;
  32 +
  33 + @Schema(description = "开始时间")
  34 + @ExcelProperty("开始时间")
  35 + private LocalDateTime planStartDate;
  36 +
  37 + @Schema(description = "结束日期")
  38 + @ExcelProperty("结束日期")
  39 + private LocalDateTime planEndDate;
  40 +
  41 + @Schema(description = "频率类型", example = "1")
  42 + @ExcelProperty(value = "频率类型", converter = DictConvert.class)
  43 + @DictFormat(DictTypeConstants.MES_DV_CYCLE_TYPE)
  44 + private Integer planCycleType;
  45 +
  46 + @Schema(description = "频率数量", example = "5")
  47 + @ExcelProperty(value = "频率数量")
  48 + private Integer planCycleCount;
  49 +
29 @Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") 50 @Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
30 private Long machineryId; 51 private Long machineryId;
31 52