Commit 4da4ddc142507b7094edae42ab6f4c35ee67de3e
1 parent
f26fda33
✨ feat(mes): 新增计划编码、开始时间、结束日期及频率信息字段
Showing
4 changed files
with
51 additions
and
2 deletions
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 | 138 | // 2. 拼接 VO |
| 139 | 139 | return BeanUtils.toBean(list, MesDvCheckRecordRespVO.class, vo -> { |
| 140 | 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 | 144 | MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery -> vo |
| 143 | 145 | .setMachineryCode(machinery.getCode()).setMachineryName(machinery.getName()) |
| 144 | 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 | 26 | @ExcelProperty("计划名称") |
| 27 | 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 | 50 | @Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 30 | 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 | 138 | // 2. 拼接 VO |
| 139 | 139 | return BeanUtils.toBean(list, MesDvMaintenRecordRespVO.class, vo -> { |
| 140 | 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 | 147 | MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery -> vo |
| 143 | 148 | .setMachineryCode(machinery.getCode()).setMachineryName(machinery.getName()) |
| 144 | 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 | 26 | @ExcelProperty("计划名称") |
| 27 | 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 | 50 | @Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 30 | 51 | private Long machineryId; |
| 31 | 52 | ... | ... |