Commit 3783a26f1a961d1460e1d2685bcafba8e1b85305

Authored by YunaiV
1 parent caade90f

feat(mes): 新增业务明细关联列表接口

yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/checkrecord/MesDvCheckRecordLineController.java
... ... @@ -83,6 +83,16 @@ public class MesDvCheckRecordLineController {
83 83 return success(new PageResult<>(buildCheckRecordLineRespVOList(pageResult.getList()), pageResult.getTotal()));
84 84 }
85 85  
  86 + @GetMapping("/list-by-record-id")
  87 + @Operation(summary = "获得指定点检记录的明细列表")
  88 + @Parameter(name = "recordId", description = "点检记录编号", required = true)
  89 + @PreAuthorize("@ss.hasPermission('mes:dv-check-record:query')")
  90 + public CommonResult<List<MesDvCheckRecordLineRespVO>> getCheckRecordLineListByRecordId(
  91 + @RequestParam("recordId") Long recordId) {
  92 + List<MesDvCheckRecordLineDO> list = checkRecordLineService.getCheckRecordLineListByRecordId(recordId);
  93 + return success(buildCheckRecordLineRespVOList(list));
  94 + }
  95 +
86 96 // ==================== 拼接 VO ====================
87 97  
88 98 private List<MesDvCheckRecordLineRespVO> buildCheckRecordLineRespVOList(List<MesDvCheckRecordLineDO> list) {
... ...
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/maintenrecord/MesDvMaintenRecordLineController.java
... ... @@ -89,6 +89,16 @@ public class MesDvMaintenRecordLineController {
89 89 return success(new PageResult<>(buildMaintenRecordLineRespVOList(pageResult.getList()), pageResult.getTotal()));
90 90 }
91 91  
  92 + @GetMapping("/list-by-record-id")
  93 + @Operation(summary = "获得指定保养记录的明细列表")
  94 + @Parameter(name = "recordId", description = "保养记录编号", required = true)
  95 + @PreAuthorize("@ss.hasPermission('mes:dv-mainten-record:query')")
  96 + public CommonResult<List<MesDvMaintenRecordLineRespVO>> getMaintenRecordLineListByRecordId(
  97 + @RequestParam("recordId") Long recordId) {
  98 + List<MesDvMaintenRecordLineDO> list = maintenRecordLineService.getMaintenRecordLineListByRecordId(recordId);
  99 + return success(buildMaintenRecordLineRespVOList(list));
  100 + }
  101 +
92 102 @GetMapping("/export-excel")
93 103 @Operation(summary = "导出设备保养记录明细 Excel")
94 104 @PreAuthorize("@ss.hasPermission('mes:dv-mainten-record:export')")
... ...
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/repair/MesDvRepairLineController.java
... ... @@ -89,6 +89,16 @@ public class MesDvRepairLineController {
89 89 return success(new PageResult<>(buildRepairLineRespVOList(pageResult.getList()), pageResult.getTotal()));
90 90 }
91 91  
  92 + @GetMapping("/list-by-repair-id")
  93 + @Operation(summary = "获得指定维修工单的明细列表")
  94 + @Parameter(name = "repairId", description = "维修工单编号", required = true)
  95 + @PreAuthorize("@ss.hasPermission('mes:dv-repair:query')")
  96 + public CommonResult<List<MesDvRepairLineRespVO>> getRepairLineListByRepairId(
  97 + @RequestParam("repairId") Long repairId) {
  98 + List<MesDvRepairLineDO> list = repairLineService.getRepairLineListByRepairId(repairId);
  99 + return success(buildRepairLineRespVOList(list));
  100 + }
  101 +
92 102 @GetMapping("/export-excel")
93 103 @Operation(summary = "导出维修工单行 Excel")
94 104 @PreAuthorize("@ss.hasPermission('mes:dv-repair:export')")
... ...
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/workorder/MesProWorkOrderBomController.java
... ... @@ -96,6 +96,16 @@ public class MesProWorkOrderBomController {
96 96 return success(new PageResult<>(buildWorkOrderBomRespVOList(pageResult.getList()), pageResult.getTotal()));
97 97 }
98 98  
  99 + @GetMapping("/list-by-work-order-id")
  100 + @Operation(summary = "获得工单 BOM 列表")
  101 + @Parameter(name = "workOrderId", description = "工单编号", required = true)
  102 + @PreAuthorize("@ss.hasPermission('mes:pro-work-order:query')")
  103 + public CommonResult<List<MesProWorkOrderBomRespVO>> getWorkOrderBomListByWorkOrderId(
  104 + @RequestParam("workOrderId") Long workOrderId) {
  105 + List<MesProWorkOrderBomDO> list = workOrderBomService.getWorkOrderBomListByWorkOrderId(workOrderId);
  106 + return success(buildWorkOrderBomRespVOList(list));
  107 + }
  108 +
99 109 @GetMapping("/item-list-by-work-order-id")
100 110 @Operation(summary = "获得工单物料需求列表")
101 111 @Parameter(name = "workOrderId", description = "工单编号", required = true)
... ...
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;
7 7  
8 8 import jakarta.validation.Valid;
9 9  
  10 +import java.util.List;
  11 +
10 12 /**
11 13 * MES 维修工单行 Service 接口
12 14 *
... ... @@ -53,6 +55,14 @@ public interface MesDvRepairLineService {
53 55 PageResult<MesDvRepairLineDO> getRepairLinePage(MesDvRepairLinePageReqVO pageReqVO);
54 56  
55 57 /**
  58 + * 获得指定维修工单的明细列表
  59 + *
  60 + * @param repairId 维修工单编号
  61 + * @return 明细列表
  62 + */
  63 + List<MesDvRepairLineDO> getRepairLineListByRepairId(Long repairId);
  64 +
  65 + /**
56 66 * 根据维修工单编号删除所有行
57 67 *
58 68 * @param repairId 维修工单编号
... ...
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;
12 12 import org.springframework.stereotype.Service;
13 13 import org.springframework.validation.annotation.Validated;
14 14  
  15 +import java.util.List;
  16 +
15 17 import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
16 18 import static cn.iocoder.yudao.module.mes.enums.ErrorCodeConstants.*;
17 19  
... ... @@ -100,6 +102,11 @@ public class MesDvRepairLineServiceImpl implements MesDvRepairLineService {
100 102 }
101 103  
102 104 @Override
  105 + public List<MesDvRepairLineDO> getRepairLineListByRepairId(Long repairId) {
  106 + return repairLineMapper.selectListByRepairId(repairId);
  107 + }
  108 +
  109 + @Override
103 110 public void deleteByRepairId(Long repairId) {
104 111 repairLineMapper.deleteByRepairId(repairId);
105 112 }
... ...