fix machine field

plp
chenshuichuan 2 years ago
parent 67b0b7c7d7
commit cfbb1be200

@ -61,4 +61,28 @@ public class MachineComponentListReqVO {
@Schema(description = "组织类型", example = "1") @Schema(description = "组织类型", example = "1")
private List<Integer> componentTypes; private List<Integer> componentTypes;
@Schema(description = "建议维保时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Long[] maintainTime;
@Schema(description = "建议维保类型(按使用时间,距离上次维保时间)", example = "1")
private String maintainType;
@Schema(description = "建议维保时间单位")
private String maintainTimeUnit;
@Schema(description = "实际维保时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Long[] trueMaintainTime;
@Schema(description = "实际维保时间单位")
private String trueMaintainTimeUnit;
@Schema(description = "实际维保类型", example = "1")
private String trueMaintainTimeType;
@Schema(description = "上次维保时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] lastMaitainTime;
} }

@ -80,4 +80,31 @@ public class MachineComponentRespVO {
@DictFormat("mes_org_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中 @DictFormat("mes_org_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private String machineType; private String machineType;
@Schema(description = "建议维保时间")
@ExcelProperty("建议维保时间")
private Long maintainTime;
@Schema(description = "建议维保类型(按使用时间,距离上次维保时间)", example = "1")
@ExcelProperty("建议维保类型(按使用时间,距离上次维保时间)")
private String maintainType;
@Schema(description = "建议维保时间单位")
@ExcelProperty("建议维保时间单位")
private String maintainTimeUnit;
@Schema(description = "实际维保时间")
@ExcelProperty("实际维保时间")
private Long trueMaintainTime;
@Schema(description = "实际维保时间单位")
@ExcelProperty("实际维保时间单位")
private String trueMaintainTimeUnit;
@Schema(description = "实际维保类型", example = "1")
@ExcelProperty("实际维保类型")
private String trueMaintainTimeType;
@Schema(description = "上次维保时间")
@ExcelProperty("上次维保时间")
private LocalDateTime lastMaitainTime;
} }

@ -59,4 +59,25 @@ public class MachineComponentSaveReqVO {
@Schema(description = "机台类型", example = "1") @Schema(description = "机台类型", example = "1")
private String machineType; private String machineType;
@Schema(description = "建议维保时间")
private Long maintainTime;
@Schema(description = "建议维保类型(按使用时间,距离上次维保时间)", example = "1")
private String maintainType;
@Schema(description = "建议维保时间单位")
private String maintainTimeUnit;
@Schema(description = "实际维保时间")
private Long trueMaintainTime;
@Schema(description = "实际维保时间单位")
private String trueMaintainTimeUnit;
@Schema(description = "实际维保类型", example = "1")
private String trueMaintainTimeType;
@Schema(description = "上次维保时间")
private LocalDateTime lastMaitainTime;
} }

@ -18,7 +18,6 @@ public class PlanSaveReqVO {
private String code; private String code;
@Schema(description = "产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21176") @Schema(description = "产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21176")
@NotNull(message = "产品ID不能为空")
private Long productId; private Long productId;
@Schema(description = "任务单明细ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18938") @Schema(description = "任务单明细ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18938")

@ -135,8 +135,8 @@ public class TaskController {
@Operation(summary = "获得生产任务单明细列表") @Operation(summary = "获得生产任务单明细列表")
@Parameter(name = "taskId", description = "task ID") @Parameter(name = "taskId", description = "task ID")
@PreAuthorize("@ss.hasPermission('mes:task:query')") @PreAuthorize("@ss.hasPermission('mes:task:query')")
public CommonResult<List<TaskDetailDO>> getTaskDetailListByTaskId(@RequestParam("taskId") Long taskId) { public CommonResult<List<TaskDetailRespVO>> getTaskDetailListByTaskId(@RequestParam("taskId") Long taskId) {
return success(taskService.getTaskDetailListByTaskId(taskId)); return success(taskService.buildDetailVOList(taskService.getTaskDetailListByTaskId(taskId)));
} }
// ==================== 子表(生产任务单明细) ==================== // ==================== 子表(生产任务单明细) ====================

@ -91,5 +91,32 @@ public class MachineComponentDO extends BaseDO {
* {@link TODO mes_org_type } * {@link TODO mes_org_type }
*/ */
private String machineType; private String machineType;
/**
*
*/
private Long maintainTime;
/**
* (使)
*/
private String maintainType;
/**
*
*/
private String maintainTimeUnit;
/**
*
*/
private Long trueMaintainTime;
/**
*
*/
private String trueMaintainTimeUnit;
/**
*
*/
private String trueMaintainTimeType;
/**
*
*/
private LocalDateTime lastMaitainTime;
} }

@ -33,6 +33,13 @@ public interface MachineComponentMapper extends BaseMapperX<MachineComponentDO>
.eqIfPresent(MachineComponentDO::getComponentType, reqVO.getComponentType()) .eqIfPresent(MachineComponentDO::getComponentType, reqVO.getComponentType())
.inIfPresent(MachineComponentDO::getComponentType, reqVO.getComponentTypes()) .inIfPresent(MachineComponentDO::getComponentType, reqVO.getComponentTypes())
.eqIfPresent(MachineComponentDO::getMachineType, reqVO.getMachineType()) .eqIfPresent(MachineComponentDO::getMachineType, reqVO.getMachineType())
.betweenIfPresent(MachineComponentDO::getMaintainTime, reqVO.getMaintainTime())
.eqIfPresent(MachineComponentDO::getMaintainType, reqVO.getMaintainType())
.eqIfPresent(MachineComponentDO::getMaintainTimeUnit, reqVO.getMaintainTimeUnit())
.betweenIfPresent(MachineComponentDO::getTrueMaintainTime, reqVO.getTrueMaintainTime())
.eqIfPresent(MachineComponentDO::getTrueMaintainTimeUnit, reqVO.getTrueMaintainTimeUnit())
.eqIfPresent(MachineComponentDO::getTrueMaintainTimeType, reqVO.getTrueMaintainTimeType())
.betweenIfPresent(MachineComponentDO::getLastMaitainTime, reqVO.getLastMaitainTime())
.orderByDesc(MachineComponentDO::getId)); .orderByDesc(MachineComponentDO::getId));
} }

@ -96,7 +96,7 @@ public interface TaskService {
* @return * @return
*/ */
List<TaskDetailDO> getTaskDetailListByTaskId(Long taskId); List<TaskDetailDO> getTaskDetailListByTaskId(Long taskId);
List<TaskDetailRespVO> buildDetailVOList(List<TaskDetailDO> list);
/** /**
* *
* *

@ -188,7 +188,8 @@ public class TaskServiceImpl implements TaskService {
return summaryList; return summaryList;
} }
private List<TaskDetailRespVO> buildDetailVOList(List<TaskDetailDO> list) { @Override
public List<TaskDetailRespVO> buildDetailVOList(List<TaskDetailDO> list) {
if (CollUtil.isEmpty(list)) { if (CollUtil.isEmpty(list)) {
return Collections.emptyList(); return Collections.emptyList();
} }

Loading…
Cancel
Save