diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/checkrecord/MesDvCheckRecordLineController.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/checkrecord/MesDvCheckRecordLineController.java index 080971c..7fb9b4c 100644 --- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/checkrecord/MesDvCheckRecordLineController.java +++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/checkrecord/MesDvCheckRecordLineController.java @@ -83,6 +83,16 @@ public class MesDvCheckRecordLineController { return success(new PageResult<>(buildCheckRecordLineRespVOList(pageResult.getList()), pageResult.getTotal())); } + @GetMapping("/list-by-record-id") + @Operation(summary = "获得指定点检记录的明细列表") + @Parameter(name = "recordId", description = "点检记录编号", required = true) + @PreAuthorize("@ss.hasPermission('mes:dv-check-record:query')") + public CommonResult> getCheckRecordLineListByRecordId( + @RequestParam("recordId") Long recordId) { + List list = checkRecordLineService.getCheckRecordLineListByRecordId(recordId); + return success(buildCheckRecordLineRespVOList(list)); + } + // ==================== 拼接 VO ==================== private List buildCheckRecordLineRespVOList(List list) { diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/maintenrecord/MesDvMaintenRecordLineController.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/maintenrecord/MesDvMaintenRecordLineController.java index 39e40c9..72742fd 100644 --- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/maintenrecord/MesDvMaintenRecordLineController.java +++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/maintenrecord/MesDvMaintenRecordLineController.java @@ -89,6 +89,16 @@ public class MesDvMaintenRecordLineController { return success(new PageResult<>(buildMaintenRecordLineRespVOList(pageResult.getList()), pageResult.getTotal())); } + @GetMapping("/list-by-record-id") + @Operation(summary = "获得指定保养记录的明细列表") + @Parameter(name = "recordId", description = "保养记录编号", required = true) + @PreAuthorize("@ss.hasPermission('mes:dv-mainten-record:query')") + public CommonResult> getMaintenRecordLineListByRecordId( + @RequestParam("recordId") Long recordId) { + List list = maintenRecordLineService.getMaintenRecordLineListByRecordId(recordId); + return success(buildMaintenRecordLineRespVOList(list)); + } + @GetMapping("/export-excel") @Operation(summary = "导出设备保养记录明细 Excel") @PreAuthorize("@ss.hasPermission('mes:dv-mainten-record:export')") diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/repair/MesDvRepairLineController.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/repair/MesDvRepairLineController.java index 18ec6cd..dbe3155 100644 --- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/repair/MesDvRepairLineController.java +++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/repair/MesDvRepairLineController.java @@ -89,6 +89,16 @@ public class MesDvRepairLineController { return success(new PageResult<>(buildRepairLineRespVOList(pageResult.getList()), pageResult.getTotal())); } + @GetMapping("/list-by-repair-id") + @Operation(summary = "获得指定维修工单的明细列表") + @Parameter(name = "repairId", description = "维修工单编号", required = true) + @PreAuthorize("@ss.hasPermission('mes:dv-repair:query')") + public CommonResult> getRepairLineListByRepairId( + @RequestParam("repairId") Long repairId) { + List list = repairLineService.getRepairLineListByRepairId(repairId); + return success(buildRepairLineRespVOList(list)); + } + @GetMapping("/export-excel") @Operation(summary = "导出维修工单行 Excel") @PreAuthorize("@ss.hasPermission('mes:dv-repair:export')") diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/workorder/MesProWorkOrderBomController.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/workorder/MesProWorkOrderBomController.java index c2d586c..8cfa634 100644 --- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/workorder/MesProWorkOrderBomController.java +++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/workorder/MesProWorkOrderBomController.java @@ -96,6 +96,16 @@ public class MesProWorkOrderBomController { return success(new PageResult<>(buildWorkOrderBomRespVOList(pageResult.getList()), pageResult.getTotal())); } + @GetMapping("/list-by-work-order-id") + @Operation(summary = "获得工单 BOM 列表") + @Parameter(name = "workOrderId", description = "工单编号", required = true) + @PreAuthorize("@ss.hasPermission('mes:pro-work-order:query')") + public CommonResult> getWorkOrderBomListByWorkOrderId( + @RequestParam("workOrderId") Long workOrderId) { + List list = workOrderBomService.getWorkOrderBomListByWorkOrderId(workOrderId); + return success(buildWorkOrderBomRespVOList(list)); + } + @GetMapping("/item-list-by-work-order-id") @Operation(summary = "获得工单物料需求列表") @Parameter(name = "workOrderId", description = "工单编号", required = true) diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/dv/repair/MesDvRepairLineService.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/dv/repair/MesDvRepairLineService.java index 5fdb0e8..3d2b981 100644 --- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/dv/repair/MesDvRepairLineService.java +++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/dv/repair/MesDvRepairLineService.java @@ -7,6 +7,8 @@ import cn.iocoder.yudao.module.mes.dal.dataobject.dv.repair.MesDvRepairLineDO; import jakarta.validation.Valid; +import java.util.List; + /** * MES 维修工单行 Service 接口 * @@ -53,6 +55,14 @@ public interface MesDvRepairLineService { PageResult getRepairLinePage(MesDvRepairLinePageReqVO pageReqVO); /** + * 获得指定维修工单的明细列表 + * + * @param repairId 维修工单编号 + * @return 明细列表 + */ + List getRepairLineListByRepairId(Long repairId); + + /** * 根据维修工单编号删除所有行 * * @param repairId 维修工单编号 diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/dv/repair/MesDvRepairLineServiceImpl.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/dv/repair/MesDvRepairLineServiceImpl.java index abd31fd..61dce77 100644 --- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/dv/repair/MesDvRepairLineServiceImpl.java +++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/dv/repair/MesDvRepairLineServiceImpl.java @@ -12,6 +12,8 @@ import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import java.util.List; + import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.mes.enums.ErrorCodeConstants.*; @@ -100,6 +102,11 @@ public class MesDvRepairLineServiceImpl implements MesDvRepairLineService { } @Override + public List getRepairLineListByRepairId(Long repairId) { + return repairLineMapper.selectListByRepairId(repairId); + } + + @Override public void deleteByRepairId(Long repairId) { repairLineMapper.deleteByRepairId(repairId); }