Commit cbe4854fda6c1db9646fcb19c9df067b56bfc6a4
1 parent
01b61078
✨ feat(mes): 重命名生产领料出库相关类和接口,统一为产品领料出库命名
重构生产领料出库相关的类、接口和API,统一命名为产品领料出库,以提高代码的一致性和可读性。包括修改相关的状态枚举、数据对象、服务接口及其实现,确保所有引用均已更新。 BREAKING CHANGE: 相关类和接口的名称已更改,需更新调用代码
Showing
32 changed files
with
394 additions
and
394 deletions
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productionissue/MesWmProductionIssueController.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productissue/MesWmProductIssueController.java
| 1 | -package cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue; | 1 | +package cn.iocoder.yudao.module.mes.controller.admin.wm.productissue; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; | 4 | import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; |
| @@ -8,15 +8,15 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; | @@ -8,15 +8,15 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 8 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; | 8 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 9 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | 9 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 10 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | 10 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 11 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.MesWmProductionIssuePageReqVO; | ||
| 12 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.MesWmProductionIssueRespVO; | ||
| 13 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.MesWmProductionIssueSaveReqVO; | 11 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.MesWmProductIssuePageReqVO; |
| 12 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.MesWmProductIssueRespVO; | ||
| 13 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.MesWmProductIssueSaveReqVO; | ||
| 14 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.workstation.MesMdWorkstationDO; | 14 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.workstation.MesMdWorkstationDO; |
| 15 | import cn.iocoder.yudao.module.mes.dal.dataobject.pro.workorder.MesProWorkOrderDO; | 15 | import cn.iocoder.yudao.module.mes.dal.dataobject.pro.workorder.MesProWorkOrderDO; |
| 16 | -import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue.MesWmProductionIssueDO; | 16 | +import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue.MesWmProductIssueDO; |
| 17 | import cn.iocoder.yudao.module.mes.service.md.workstation.MesMdWorkstationService; | 17 | import cn.iocoder.yudao.module.mes.service.md.workstation.MesMdWorkstationService; |
| 18 | import cn.iocoder.yudao.module.mes.service.pro.workorder.MesProWorkOrderService; | 18 | import cn.iocoder.yudao.module.mes.service.pro.workorder.MesProWorkOrderService; |
| 19 | -import cn.iocoder.yudao.module.mes.service.wm.productionissue.MesWmProductionIssueService; | 19 | +import cn.iocoder.yudao.module.mes.service.wm.productissue.MesWmProductIssueService; |
| 20 | import io.swagger.v3.oas.annotations.Operation; | 20 | import io.swagger.v3.oas.annotations.Operation; |
| 21 | import io.swagger.v3.oas.annotations.Parameter; | 21 | import io.swagger.v3.oas.annotations.Parameter; |
| 22 | import io.swagger.v3.oas.annotations.tags.Tag; | 22 | import io.swagger.v3.oas.annotations.tags.Tag; |
| @@ -38,12 +38,12 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. | @@ -38,12 +38,12 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. | ||
| 38 | 38 | ||
| 39 | @Tag(name = "管理后台 - MES 领料出库单") | 39 | @Tag(name = "管理后台 - MES 领料出库单") |
| 40 | @RestController | 40 | @RestController |
| 41 | -@RequestMapping("/mes/wm/production-issue") | 41 | +@RequestMapping("/mes/wm/product-issue") |
| 42 | @Validated | 42 | @Validated |
| 43 | -public class MesWmProductionIssueController { | 43 | +public class MesWmProductIssueController { |
| 44 | 44 | ||
| 45 | @Resource | 45 | @Resource |
| 46 | - private MesWmProductionIssueService issueService; | 46 | + private MesWmProductIssueService issueService; |
| 47 | @Resource | 47 | @Resource |
| 48 | private MesMdWorkstationService workstationService; | 48 | private MesMdWorkstationService workstationService; |
| 49 | @Resource | 49 | @Resource |
| @@ -51,34 +51,34 @@ public class MesWmProductionIssueController { | @@ -51,34 +51,34 @@ public class MesWmProductionIssueController { | ||
| 51 | 51 | ||
| 52 | @PostMapping("/create") | 52 | @PostMapping("/create") |
| 53 | @Operation(summary = "创建领料出库单") | 53 | @Operation(summary = "创建领料出库单") |
| 54 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:create')") | ||
| 55 | - public CommonResult<Long> createProductionIssue(@Valid @RequestBody MesWmProductionIssueSaveReqVO createReqVO) { | ||
| 56 | - return success(issueService.createProductionIssue(createReqVO)); | 54 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:create')") |
| 55 | + public CommonResult<Long> createProductIssue(@Valid @RequestBody MesWmProductIssueSaveReqVO createReqVO) { | ||
| 56 | + return success(issueService.createProductIssue(createReqVO)); | ||
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | @PutMapping("/update") | 59 | @PutMapping("/update") |
| 60 | @Operation(summary = "修改领料出库单") | 60 | @Operation(summary = "修改领料出库单") |
| 61 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:update')") | ||
| 62 | - public CommonResult<Boolean> updateProductionIssue(@Valid @RequestBody MesWmProductionIssueSaveReqVO updateReqVO) { | ||
| 63 | - issueService.updateProductionIssue(updateReqVO); | 61 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:update')") |
| 62 | + public CommonResult<Boolean> updateProductIssue(@Valid @RequestBody MesWmProductIssueSaveReqVO updateReqVO) { | ||
| 63 | + issueService.updateProductIssue(updateReqVO); | ||
| 64 | return success(true); | 64 | return success(true); |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | @DeleteMapping("/delete") | 67 | @DeleteMapping("/delete") |
| 68 | @Operation(summary = "删除领料出库单") | 68 | @Operation(summary = "删除领料出库单") |
| 69 | @Parameter(name = "id", description = "编号", required = true) | 69 | @Parameter(name = "id", description = "编号", required = true) |
| 70 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:delete')") | ||
| 71 | - public CommonResult<Boolean> deleteProductionIssue(@RequestParam("id") Long id) { | ||
| 72 | - issueService.deleteProductionIssue(id); | 70 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:delete')") |
| 71 | + public CommonResult<Boolean> deleteProductIssue(@RequestParam("id") Long id) { | ||
| 72 | + issueService.deleteProductIssue(id); | ||
| 73 | return success(true); | 73 | return success(true); |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | @GetMapping("/get") | 76 | @GetMapping("/get") |
| 77 | @Operation(summary = "获得领料出库单") | 77 | @Operation(summary = "获得领料出库单") |
| 78 | @Parameter(name = "id", description = "编号", required = true, example = "1024") | 78 | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| 79 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:query')") | ||
| 80 | - public CommonResult<MesWmProductionIssueRespVO> getProductionIssue(@RequestParam("id") Long id) { | ||
| 81 | - MesWmProductionIssueDO issue = issueService.getProductionIssue(id); | 79 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:query')") |
| 80 | + public CommonResult<MesWmProductIssueRespVO> getProductIssue(@RequestParam("id") Long id) { | ||
| 81 | + MesWmProductIssueDO issue = issueService.getProductIssue(id); | ||
| 82 | if (issue == null) { | 82 | if (issue == null) { |
| 83 | return success(null); | 83 | return success(null); |
| 84 | } | 84 | } |
| @@ -87,82 +87,82 @@ public class MesWmProductionIssueController { | @@ -87,82 +87,82 @@ public class MesWmProductionIssueController { | ||
| 87 | 87 | ||
| 88 | @GetMapping("/page") | 88 | @GetMapping("/page") |
| 89 | @Operation(summary = "获得领料出库单分页") | 89 | @Operation(summary = "获得领料出库单分页") |
| 90 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:query')") | ||
| 91 | - public CommonResult<PageResult<MesWmProductionIssueRespVO>> getProductionIssuePage( | ||
| 92 | - @Valid MesWmProductionIssuePageReqVO pageReqVO) { | ||
| 93 | - PageResult<MesWmProductionIssueDO> pageResult = issueService.getProductionIssuePage(pageReqVO); | 90 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:query')") |
| 91 | + public CommonResult<PageResult<MesWmProductIssueRespVO>> getProductIssuePage( | ||
| 92 | + @Valid MesWmProductIssuePageReqVO pageReqVO) { | ||
| 93 | + PageResult<MesWmProductIssueDO> pageResult = issueService.getProductIssuePage(pageReqVO); | ||
| 94 | return success(new PageResult<>(buildRespVOList(pageResult.getList()), pageResult.getTotal())); | 94 | return success(new PageResult<>(buildRespVOList(pageResult.getList()), pageResult.getTotal())); |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | @GetMapping("/export-excel") | 97 | @GetMapping("/export-excel") |
| 98 | @Operation(summary = "导出领料出库单 Excel") | 98 | @Operation(summary = "导出领料出库单 Excel") |
| 99 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:export')") | 99 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:export')") |
| 100 | @ApiAccessLog(operateType = EXPORT) | 100 | @ApiAccessLog(operateType = EXPORT) |
| 101 | - public void exportProductionIssueExcel(@Valid MesWmProductionIssuePageReqVO pageReqVO, | 101 | + public void exportProductIssueExcel(@Valid MesWmProductIssuePageReqVO pageReqVO, |
| 102 | HttpServletResponse response) throws IOException { | 102 | HttpServletResponse response) throws IOException { |
| 103 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | 103 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); |
| 104 | - PageResult<MesWmProductionIssueDO> pageResult = issueService.getProductionIssuePage(pageReqVO); | ||
| 105 | - ExcelUtils.write(response, "领料出库单.xls", "数据", MesWmProductionIssueRespVO.class, | 104 | + PageResult<MesWmProductIssueDO> pageResult = issueService.getProductIssuePage(pageReqVO); |
| 105 | + ExcelUtils.write(response, "领料出库单.xls", "数据", MesWmProductIssueRespVO.class, | ||
| 106 | buildRespVOList(pageResult.getList())); | 106 | buildRespVOList(pageResult.getList())); |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | @PutMapping("/finish") | 109 | @PutMapping("/finish") |
| 110 | @Operation(summary = "完成领料出库单") | 110 | @Operation(summary = "完成领料出库单") |
| 111 | @Parameter(name = "id", description = "编号", required = true) | 111 | @Parameter(name = "id", description = "编号", required = true) |
| 112 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:finish')") | ||
| 113 | - public CommonResult<Boolean> finishProductionIssue(@RequestParam("id") Long id) { | ||
| 114 | - issueService.finishProductionIssue(id); | 112 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:finish')") |
| 113 | + public CommonResult<Boolean> finishProductIssue(@RequestParam("id") Long id) { | ||
| 114 | + issueService.finishProductIssue(id); | ||
| 115 | return success(true); | 115 | return success(true); |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | @PutMapping("/submit") | 118 | @PutMapping("/submit") |
| 119 | @Operation(summary = "提交领料出库单") | 119 | @Operation(summary = "提交领料出库单") |
| 120 | @Parameter(name = "id", description = "编号", required = true) | 120 | @Parameter(name = "id", description = "编号", required = true) |
| 121 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:update')") | ||
| 122 | - public CommonResult<Boolean> submitProductionIssue(@RequestParam("id") Long id) { | ||
| 123 | - issueService.submitProductionIssue(id); | 121 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:update')") |
| 122 | + public CommonResult<Boolean> submitProductIssue(@RequestParam("id") Long id) { | ||
| 123 | + issueService.submitProductIssue(id); | ||
| 124 | return success(true); | 124 | return success(true); |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | @PutMapping("/stock") | 127 | @PutMapping("/stock") |
| 128 | @Operation(summary = "执行拣货") | 128 | @Operation(summary = "执行拣货") |
| 129 | @Parameter(name = "id", description = "编号", required = true) | 129 | @Parameter(name = "id", description = "编号", required = true) |
| 130 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:update')") | ||
| 131 | - public CommonResult<Boolean> stockProductionIssue(@RequestParam("id") Long id) { | ||
| 132 | - issueService.stockProductionIssue(id); | 130 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:update')") |
| 131 | + public CommonResult<Boolean> stockProductIssue(@RequestParam("id") Long id) { | ||
| 132 | + issueService.stockProductIssue(id); | ||
| 133 | return success(true); | 133 | return success(true); |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | @PutMapping("/cancel") | 136 | @PutMapping("/cancel") |
| 137 | @Operation(summary = "取消领料出库单") | 137 | @Operation(summary = "取消领料出库单") |
| 138 | @Parameter(name = "id", description = "编号", required = true) | 138 | @Parameter(name = "id", description = "编号", required = true) |
| 139 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:update')") | ||
| 140 | - public CommonResult<Boolean> cancelProductionIssue(@RequestParam("id") Long id) { | ||
| 141 | - issueService.cancelProductionIssue(id); | 139 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:update')") |
| 140 | + public CommonResult<Boolean> cancelProductIssue(@RequestParam("id") Long id) { | ||
| 141 | + issueService.cancelProductIssue(id); | ||
| 142 | return success(true); | 142 | return success(true); |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | @GetMapping("/check-quantity") | 145 | @GetMapping("/check-quantity") |
| 146 | @Operation(summary = "校验领料出库单数量", description = "校验每行明细数量之和是否等于行领料数量") | 146 | @Operation(summary = "校验领料出库单数量", description = "校验每行明细数量之和是否等于行领料数量") |
| 147 | @Parameter(name = "id", description = "编号", required = true) | 147 | @Parameter(name = "id", description = "编号", required = true) |
| 148 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:query')") | ||
| 149 | - public CommonResult<Boolean> checkProductionIssueQuantity(@RequestParam("id") Long id) { | ||
| 150 | - return success(issueService.checkProductionIssueQuantity(id)); | 148 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:query')") |
| 149 | + public CommonResult<Boolean> checkProductIssueQuantity(@RequestParam("id") Long id) { | ||
| 150 | + return success(issueService.checkProductIssueQuantity(id)); | ||
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | // ==================== 拼接 VO ==================== | 153 | // ==================== 拼接 VO ==================== |
| 154 | 154 | ||
| 155 | - private List<MesWmProductionIssueRespVO> buildRespVOList(List<MesWmProductionIssueDO> list) { | 155 | + private List<MesWmProductIssueRespVO> buildRespVOList(List<MesWmProductIssueDO> list) { |
| 156 | if (CollUtil.isEmpty(list)) { | 156 | if (CollUtil.isEmpty(list)) { |
| 157 | return Collections.emptyList(); | 157 | return Collections.emptyList(); |
| 158 | } | 158 | } |
| 159 | // 1. 获得关联数据 | 159 | // 1. 获得关联数据 |
| 160 | Map<Long, MesMdWorkstationDO> workstationMap = workstationService.getWorkstationMap( | 160 | Map<Long, MesMdWorkstationDO> workstationMap = workstationService.getWorkstationMap( |
| 161 | - convertSet(list, MesWmProductionIssueDO::getWorkstationId)); | 161 | + convertSet(list, MesWmProductIssueDO::getWorkstationId)); |
| 162 | Map<Long, MesProWorkOrderDO> workOrderMap = workOrderService.getWorkOrderMap( | 162 | Map<Long, MesProWorkOrderDO> workOrderMap = workOrderService.getWorkOrderMap( |
| 163 | - convertSet(list, MesWmProductionIssueDO::getWorkOrderId)); | 163 | + convertSet(list, MesWmProductIssueDO::getWorkOrderId)); |
| 164 | // 2. 构建结果 | 164 | // 2. 构建结果 |
| 165 | - return BeanUtils.toBean(list, MesWmProductionIssueRespVO.class, vo -> { | 165 | + return BeanUtils.toBean(list, MesWmProductIssueRespVO.class, vo -> { |
| 166 | // 2.1 填充工作站名称 | 166 | // 2.1 填充工作站名称 |
| 167 | MapUtils.findAndThen(workstationMap, vo.getWorkstationId(), | 167 | MapUtils.findAndThen(workstationMap, vo.getWorkstationId(), |
| 168 | workstation -> vo.setWorkstationName(workstation.getName())); | 168 | workstation -> vo.setWorkstationName(workstation.getName())); |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productionissue/MesWmProductionIssueDetailController.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productissue/MesWmProductIssueDetailController.java
| 1 | -package cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue; | 1 | +package cn.iocoder.yudao.module.mes.controller.admin.wm.productissue; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; | 5 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 6 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | 6 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 7 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.detail.MesWmProductionIssueDetailRespVO; | ||
| 8 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.detail.MesWmProductionIssueDetailSaveReqVO; | 7 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.detail.MesWmProductIssueDetailRespVO; |
| 8 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.detail.MesWmProductIssueDetailSaveReqVO; | ||
| 9 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.item.MesMdItemDO; | 9 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.item.MesMdItemDO; |
| 10 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.unitmeasure.MesMdUnitMeasureDO; | 10 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.unitmeasure.MesMdUnitMeasureDO; |
| 11 | -import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue.MesWmProductionIssueDetailDO; | 11 | +import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue.MesWmProductIssueDetailDO; |
| 12 | import cn.iocoder.yudao.module.mes.dal.dataobject.wm.warehouse.MesWmWarehouseAreaDO; | 12 | import cn.iocoder.yudao.module.mes.dal.dataobject.wm.warehouse.MesWmWarehouseAreaDO; |
| 13 | import cn.iocoder.yudao.module.mes.dal.dataobject.wm.warehouse.MesWmWarehouseDO; | 13 | import cn.iocoder.yudao.module.mes.dal.dataobject.wm.warehouse.MesWmWarehouseDO; |
| 14 | import cn.iocoder.yudao.module.mes.dal.dataobject.wm.warehouse.MesWmWarehouseLocationDO; | 14 | import cn.iocoder.yudao.module.mes.dal.dataobject.wm.warehouse.MesWmWarehouseLocationDO; |
| 15 | import cn.iocoder.yudao.module.mes.service.md.item.MesMdItemService; | 15 | import cn.iocoder.yudao.module.mes.service.md.item.MesMdItemService; |
| 16 | import cn.iocoder.yudao.module.mes.service.md.unitmeasure.MesMdUnitMeasureService; | 16 | import cn.iocoder.yudao.module.mes.service.md.unitmeasure.MesMdUnitMeasureService; |
| 17 | -import cn.iocoder.yudao.module.mes.service.wm.productionissue.MesWmProductionIssueDetailService; | 17 | +import cn.iocoder.yudao.module.mes.service.wm.productissue.MesWmProductIssueDetailService; |
| 18 | import cn.iocoder.yudao.module.mes.service.wm.warehouse.MesWmWarehouseAreaService; | 18 | import cn.iocoder.yudao.module.mes.service.wm.warehouse.MesWmWarehouseAreaService; |
| 19 | import cn.iocoder.yudao.module.mes.service.wm.warehouse.MesWmWarehouseLocationService; | 19 | import cn.iocoder.yudao.module.mes.service.wm.warehouse.MesWmWarehouseLocationService; |
| 20 | import cn.iocoder.yudao.module.mes.service.wm.warehouse.MesWmWarehouseService; | 20 | import cn.iocoder.yudao.module.mes.service.wm.warehouse.MesWmWarehouseService; |
| @@ -36,12 +36,12 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. | @@ -36,12 +36,12 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. | ||
| 36 | 36 | ||
| 37 | @Tag(name = "管理后台 - MES 领料出库明细") | 37 | @Tag(name = "管理后台 - MES 领料出库明细") |
| 38 | @RestController | 38 | @RestController |
| 39 | -@RequestMapping("/mes/wm/production-issue-detail") | 39 | +@RequestMapping("/mes/wm/product-issue-detail") |
| 40 | @Validated | 40 | @Validated |
| 41 | -public class MesWmProductionIssueDetailController { | 41 | +public class MesWmProductIssueDetailController { |
| 42 | 42 | ||
| 43 | @Resource | 43 | @Resource |
| 44 | - private MesWmProductionIssueDetailService issueDetailService; | 44 | + private MesWmProductIssueDetailService issueDetailService; |
| 45 | 45 | ||
| 46 | @Resource | 46 | @Resource |
| 47 | private MesMdItemService itemService; | 47 | private MesMdItemService itemService; |
| @@ -60,34 +60,34 @@ public class MesWmProductionIssueDetailController { | @@ -60,34 +60,34 @@ public class MesWmProductionIssueDetailController { | ||
| 60 | 60 | ||
| 61 | @PostMapping("/create") | 61 | @PostMapping("/create") |
| 62 | @Operation(summary = "创建领料出库明细") | 62 | @Operation(summary = "创建领料出库明细") |
| 63 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:create')") | ||
| 64 | - public CommonResult<Long> createProductionIssueDetail(@Valid @RequestBody MesWmProductionIssueDetailSaveReqVO createReqVO) { | ||
| 65 | - return success(issueDetailService.createProductionIssueDetail(createReqVO)); | 63 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:create')") |
| 64 | + public CommonResult<Long> createProductIssueDetail(@Valid @RequestBody MesWmProductIssueDetailSaveReqVO createReqVO) { | ||
| 65 | + return success(issueDetailService.createProductIssueDetail(createReqVO)); | ||
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | @PutMapping("/update") | 68 | @PutMapping("/update") |
| 69 | @Operation(summary = "修改领料出库明细") | 69 | @Operation(summary = "修改领料出库明细") |
| 70 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:update')") | ||
| 71 | - public CommonResult<Boolean> updateProductionIssueDetail(@Valid @RequestBody MesWmProductionIssueDetailSaveReqVO updateReqVO) { | ||
| 72 | - issueDetailService.updateProductionIssueDetail(updateReqVO); | 70 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:update')") |
| 71 | + public CommonResult<Boolean> updateProductIssueDetail(@Valid @RequestBody MesWmProductIssueDetailSaveReqVO updateReqVO) { | ||
| 72 | + issueDetailService.updateProductIssueDetail(updateReqVO); | ||
| 73 | return success(true); | 73 | return success(true); |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | @DeleteMapping("/delete") | 76 | @DeleteMapping("/delete") |
| 77 | @Operation(summary = "删除领料出库明细") | 77 | @Operation(summary = "删除领料出库明细") |
| 78 | @Parameter(name = "id", description = "编号", required = true) | 78 | @Parameter(name = "id", description = "编号", required = true) |
| 79 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:delete')") | ||
| 80 | - public CommonResult<Boolean> deleteProductionIssueDetail(@RequestParam("id") Long id) { | ||
| 81 | - issueDetailService.deleteProductionIssueDetail(id); | 79 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:delete')") |
| 80 | + public CommonResult<Boolean> deleteProductIssueDetail(@RequestParam("id") Long id) { | ||
| 81 | + issueDetailService.deleteProductIssueDetail(id); | ||
| 82 | return success(true); | 82 | return success(true); |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | @GetMapping("/get") | 85 | @GetMapping("/get") |
| 86 | @Operation(summary = "获得领料出库明细") | 86 | @Operation(summary = "获得领料出库明细") |
| 87 | @Parameter(name = "id", description = "编号", required = true, example = "1024") | 87 | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| 88 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:query')") | ||
| 89 | - public CommonResult<MesWmProductionIssueDetailRespVO> getProductionIssueDetail(@RequestParam("id") Long id) { | ||
| 90 | - MesWmProductionIssueDetailDO detail = issueDetailService.getProductionIssueDetail(id); | 88 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:query')") |
| 89 | + public CommonResult<MesWmProductIssueDetailRespVO> getProductIssueDetail(@RequestParam("id") Long id) { | ||
| 90 | + MesWmProductIssueDetailDO detail = issueDetailService.getProductIssueDetail(id); | ||
| 91 | if (detail == null) { | 91 | if (detail == null) { |
| 92 | return success(null); | 92 | return success(null); |
| 93 | } | 93 | } |
| @@ -97,32 +97,32 @@ public class MesWmProductionIssueDetailController { | @@ -97,32 +97,32 @@ public class MesWmProductionIssueDetailController { | ||
| 97 | @GetMapping("/list-by-line") | 97 | @GetMapping("/list-by-line") |
| 98 | @Operation(summary = "获得领料出库明细列表(按行编号)") | 98 | @Operation(summary = "获得领料出库明细列表(按行编号)") |
| 99 | @Parameter(name = "lineId", description = "行编号", required = true, example = "1024") | 99 | @Parameter(name = "lineId", description = "行编号", required = true, example = "1024") |
| 100 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:query')") | ||
| 101 | - public CommonResult<List<MesWmProductionIssueDetailRespVO>> getProductionIssueDetailListByLineId( | 100 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:query')") |
| 101 | + public CommonResult<List<MesWmProductIssueDetailRespVO>> getProductIssueDetailListByLineId( | ||
| 102 | @RequestParam("lineId") Long lineId) { | 102 | @RequestParam("lineId") Long lineId) { |
| 103 | - List<MesWmProductionIssueDetailDO> list = issueDetailService.getProductionIssueDetailListByLineId(lineId); | 103 | + List<MesWmProductIssueDetailDO> list = issueDetailService.getProductIssueDetailListByLineId(lineId); |
| 104 | return success(buildRespVOList(list)); | 104 | return success(buildRespVOList(list)); |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | // ==================== 拼接 VO ==================== | 107 | // ==================== 拼接 VO ==================== |
| 108 | 108 | ||
| 109 | - private List<MesWmProductionIssueDetailRespVO> buildRespVOList(List<MesWmProductionIssueDetailDO> list) { | 109 | + private List<MesWmProductIssueDetailRespVO> buildRespVOList(List<MesWmProductIssueDetailDO> list) { |
| 110 | if (CollUtil.isEmpty(list)) { | 110 | if (CollUtil.isEmpty(list)) { |
| 111 | return Collections.emptyList(); | 111 | return Collections.emptyList(); |
| 112 | } | 112 | } |
| 113 | // 1. 获得关联数据 | 113 | // 1. 获得关联数据 |
| 114 | Map<Long, MesMdItemDO> itemMap = itemService.getItemMap( | 114 | Map<Long, MesMdItemDO> itemMap = itemService.getItemMap( |
| 115 | - convertSet(list, MesWmProductionIssueDetailDO::getItemId)); | 115 | + convertSet(list, MesWmProductIssueDetailDO::getItemId)); |
| 116 | Map<Long, MesMdUnitMeasureDO> unitMeasureMap = unitMeasureService.getUnitMeasureMap( | 116 | Map<Long, MesMdUnitMeasureDO> unitMeasureMap = unitMeasureService.getUnitMeasureMap( |
| 117 | convertSet(itemMap.values(), MesMdItemDO::getUnitMeasureId)); | 117 | convertSet(itemMap.values(), MesMdItemDO::getUnitMeasureId)); |
| 118 | Map<Long, MesWmWarehouseDO> warehouseMap = warehouseService.getWarehouseMap( | 118 | Map<Long, MesWmWarehouseDO> warehouseMap = warehouseService.getWarehouseMap( |
| 119 | - convertSet(list, MesWmProductionIssueDetailDO::getWarehouseId)); | 119 | + convertSet(list, MesWmProductIssueDetailDO::getWarehouseId)); |
| 120 | Map<Long, MesWmWarehouseLocationDO> locationMap = locationService.getWarehouseLocationMap( | 120 | Map<Long, MesWmWarehouseLocationDO> locationMap = locationService.getWarehouseLocationMap( |
| 121 | - convertSet(list, MesWmProductionIssueDetailDO::getLocationId)); | 121 | + convertSet(list, MesWmProductIssueDetailDO::getLocationId)); |
| 122 | Map<Long, MesWmWarehouseAreaDO> areaMap = areaService.getWarehouseAreaMap( | 122 | Map<Long, MesWmWarehouseAreaDO> areaMap = areaService.getWarehouseAreaMap( |
| 123 | - convertSet(list, MesWmProductionIssueDetailDO::getAreaId)); | 123 | + convertSet(list, MesWmProductIssueDetailDO::getAreaId)); |
| 124 | // 2. 构建结果 | 124 | // 2. 构建结果 |
| 125 | - return BeanUtils.toBean(list, MesWmProductionIssueDetailRespVO.class, vo -> { | 125 | + return BeanUtils.toBean(list, MesWmProductIssueDetailRespVO.class, vo -> { |
| 126 | MapUtils.findAndThen(itemMap, vo.getItemId(), item -> { | 126 | MapUtils.findAndThen(itemMap, vo.getItemId(), item -> { |
| 127 | vo.setItemCode(item.getCode()).setItemName(item.getName()).setSpecification(item.getSpecification()); | 127 | vo.setItemCode(item.getCode()).setItemName(item.getName()).setSpecification(item.getSpecification()); |
| 128 | MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(), | 128 | MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(), |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productionissue/MesWmProductionIssueLineController.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productissue/MesWmProductIssueLineController.java
| 1 | -package cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue; | 1 | +package cn.iocoder.yudao.module.mes.controller.admin.wm.productissue; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; | 6 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 8 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.line.MesWmProductionIssueLinePageReqVO; | ||
| 9 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.line.MesWmProductionIssueLineRespVO; | ||
| 10 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.line.MesWmProductionIssueLineSaveReqVO; | 8 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.line.MesWmProductIssueLinePageReqVO; |
| 9 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.line.MesWmProductIssueLineRespVO; | ||
| 10 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.line.MesWmProductIssueLineSaveReqVO; | ||
| 11 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.item.MesMdItemDO; | 11 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.item.MesMdItemDO; |
| 12 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.unitmeasure.MesMdUnitMeasureDO; | 12 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.unitmeasure.MesMdUnitMeasureDO; |
| 13 | -import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue.MesWmProductionIssueLineDO; | 13 | +import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue.MesWmProductIssueLineDO; |
| 14 | import cn.iocoder.yudao.module.mes.service.md.item.MesMdItemService; | 14 | import cn.iocoder.yudao.module.mes.service.md.item.MesMdItemService; |
| 15 | import cn.iocoder.yudao.module.mes.service.md.unitmeasure.MesMdUnitMeasureService; | 15 | import cn.iocoder.yudao.module.mes.service.md.unitmeasure.MesMdUnitMeasureService; |
| 16 | -import cn.iocoder.yudao.module.mes.service.wm.productionissue.MesWmProductionIssueLineService; | 16 | +import cn.iocoder.yudao.module.mes.service.wm.productissue.MesWmProductIssueLineService; |
| 17 | import io.swagger.v3.oas.annotations.Operation; | 17 | import io.swagger.v3.oas.annotations.Operation; |
| 18 | import io.swagger.v3.oas.annotations.Parameter; | 18 | import io.swagger.v3.oas.annotations.Parameter; |
| 19 | import io.swagger.v3.oas.annotations.tags.Tag; | 19 | import io.swagger.v3.oas.annotations.tags.Tag; |
| @@ -32,12 +32,12 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. | @@ -32,12 +32,12 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. | ||
| 32 | 32 | ||
| 33 | @Tag(name = "管理后台 - MES 领料出库单行") | 33 | @Tag(name = "管理后台 - MES 领料出库单行") |
| 34 | @RestController | 34 | @RestController |
| 35 | -@RequestMapping("/mes/wm/production-issue-line") | 35 | +@RequestMapping("/mes/wm/product-issue-line") |
| 36 | @Validated | 36 | @Validated |
| 37 | -public class MesWmProductionIssueLineController { | 37 | +public class MesWmProductIssueLineController { |
| 38 | 38 | ||
| 39 | @Resource | 39 | @Resource |
| 40 | - private MesWmProductionIssueLineService issueLineService; | 40 | + private MesWmProductIssueLineService issueLineService; |
| 41 | 41 | ||
| 42 | @Resource | 42 | @Resource |
| 43 | private MesMdItemService itemService; | 43 | private MesMdItemService itemService; |
| @@ -47,34 +47,34 @@ public class MesWmProductionIssueLineController { | @@ -47,34 +47,34 @@ public class MesWmProductionIssueLineController { | ||
| 47 | 47 | ||
| 48 | @PostMapping("/create") | 48 | @PostMapping("/create") |
| 49 | @Operation(summary = "创建领料出库单行") | 49 | @Operation(summary = "创建领料出库单行") |
| 50 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:create')") | ||
| 51 | - public CommonResult<Long> createProductionIssueLine(@Valid @RequestBody MesWmProductionIssueLineSaveReqVO createReqVO) { | ||
| 52 | - return success(issueLineService.createProductionIssueLine(createReqVO)); | 50 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:create')") |
| 51 | + public CommonResult<Long> createProductIssueLine(@Valid @RequestBody MesWmProductIssueLineSaveReqVO createReqVO) { | ||
| 52 | + return success(issueLineService.createProductIssueLine(createReqVO)); | ||
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | @PutMapping("/update") | 55 | @PutMapping("/update") |
| 56 | @Operation(summary = "修改领料出库单行") | 56 | @Operation(summary = "修改领料出库单行") |
| 57 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:update')") | ||
| 58 | - public CommonResult<Boolean> updateProductionIssueLine(@Valid @RequestBody MesWmProductionIssueLineSaveReqVO updateReqVO) { | ||
| 59 | - issueLineService.updateProductionIssueLine(updateReqVO); | 57 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:update')") |
| 58 | + public CommonResult<Boolean> updateProductIssueLine(@Valid @RequestBody MesWmProductIssueLineSaveReqVO updateReqVO) { | ||
| 59 | + issueLineService.updateProductIssueLine(updateReqVO); | ||
| 60 | return success(true); | 60 | return success(true); |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | @DeleteMapping("/delete") | 63 | @DeleteMapping("/delete") |
| 64 | @Operation(summary = "删除领料出库单行") | 64 | @Operation(summary = "删除领料出库单行") |
| 65 | @Parameter(name = "id", description = "编号", required = true) | 65 | @Parameter(name = "id", description = "编号", required = true) |
| 66 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:delete')") | ||
| 67 | - public CommonResult<Boolean> deleteProductionIssueLine(@RequestParam("id") Long id) { | ||
| 68 | - issueLineService.deleteProductionIssueLine(id); | 66 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:delete')") |
| 67 | + public CommonResult<Boolean> deleteProductIssueLine(@RequestParam("id") Long id) { | ||
| 68 | + issueLineService.deleteProductIssueLine(id); | ||
| 69 | return success(true); | 69 | return success(true); |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | @GetMapping("/get") | 72 | @GetMapping("/get") |
| 73 | @Operation(summary = "获得领料出库单行") | 73 | @Operation(summary = "获得领料出库单行") |
| 74 | @Parameter(name = "id", description = "编号", required = true, example = "1024") | 74 | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| 75 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:query')") | ||
| 76 | - public CommonResult<MesWmProductionIssueLineRespVO> getProductionIssueLine(@RequestParam("id") Long id) { | ||
| 77 | - MesWmProductionIssueLineDO line = issueLineService.getProductionIssueLine(id); | 75 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:query')") |
| 76 | + public CommonResult<MesWmProductIssueLineRespVO> getProductIssueLine(@RequestParam("id") Long id) { | ||
| 77 | + MesWmProductIssueLineDO line = issueLineService.getProductIssueLine(id); | ||
| 78 | if (line == null) { | 78 | if (line == null) { |
| 79 | return success(null); | 79 | return success(null); |
| 80 | } | 80 | } |
| @@ -83,36 +83,36 @@ public class MesWmProductionIssueLineController { | @@ -83,36 +83,36 @@ public class MesWmProductionIssueLineController { | ||
| 83 | 83 | ||
| 84 | @GetMapping("/page") | 84 | @GetMapping("/page") |
| 85 | @Operation(summary = "获得领料出库单行分页") | 85 | @Operation(summary = "获得领料出库单行分页") |
| 86 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:query')") | ||
| 87 | - public CommonResult<PageResult<MesWmProductionIssueLineRespVO>> getProductionIssueLinePage( | ||
| 88 | - @Valid MesWmProductionIssueLinePageReqVO pageReqVO) { | ||
| 89 | - PageResult<MesWmProductionIssueLineDO> pageResult = issueLineService.getProductionIssueLinePage(pageReqVO); | 86 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:query')") |
| 87 | + public CommonResult<PageResult<MesWmProductIssueLineRespVO>> getProductIssueLinePage( | ||
| 88 | + @Valid MesWmProductIssueLinePageReqVO pageReqVO) { | ||
| 89 | + PageResult<MesWmProductIssueLineDO> pageResult = issueLineService.getProductIssueLinePage(pageReqVO); | ||
| 90 | return success(new PageResult<>(buildRespVOList(pageResult.getList()), pageResult.getTotal())); | 90 | return success(new PageResult<>(buildRespVOList(pageResult.getList()), pageResult.getTotal())); |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | @GetMapping("/list-by-issue") | 93 | @GetMapping("/list-by-issue") |
| 94 | @Operation(summary = "获得领料出库单行列表(按领料单编号)") | 94 | @Operation(summary = "获得领料出库单行列表(按领料单编号)") |
| 95 | @Parameter(name = "issueId", description = "领料单编号", required = true, example = "1024") | 95 | @Parameter(name = "issueId", description = "领料单编号", required = true, example = "1024") |
| 96 | - @PreAuthorize("@ss.hasPermission('mes:wm-production-issue:query')") | ||
| 97 | - public CommonResult<List<MesWmProductionIssueLineRespVO>> getProductionIssueLineListByIssueId( | 96 | + @PreAuthorize("@ss.hasPermission('mes:wm-product-issue:query')") |
| 97 | + public CommonResult<List<MesWmProductIssueLineRespVO>> getProductIssueLineListByIssueId( | ||
| 98 | @RequestParam("issueId") Long issueId) { | 98 | @RequestParam("issueId") Long issueId) { |
| 99 | - List<MesWmProductionIssueLineDO> list = issueLineService.getProductionIssueLineListByIssueId(issueId); | 99 | + List<MesWmProductIssueLineDO> list = issueLineService.getProductIssueLineListByIssueId(issueId); |
| 100 | return success(buildRespVOList(list)); | 100 | return success(buildRespVOList(list)); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | // ==================== 拼接 VO ==================== | 103 | // ==================== 拼接 VO ==================== |
| 104 | 104 | ||
| 105 | - private List<MesWmProductionIssueLineRespVO> buildRespVOList(List<MesWmProductionIssueLineDO> list) { | 105 | + private List<MesWmProductIssueLineRespVO> buildRespVOList(List<MesWmProductIssueLineDO> list) { |
| 106 | if (CollUtil.isEmpty(list)) { | 106 | if (CollUtil.isEmpty(list)) { |
| 107 | return Collections.emptyList(); | 107 | return Collections.emptyList(); |
| 108 | } | 108 | } |
| 109 | // 1. 获得关联数据 | 109 | // 1. 获得关联数据 |
| 110 | Map<Long, MesMdItemDO> itemMap = itemService.getItemMap( | 110 | Map<Long, MesMdItemDO> itemMap = itemService.getItemMap( |
| 111 | - convertSet(list, MesWmProductionIssueLineDO::getItemId)); | 111 | + convertSet(list, MesWmProductIssueLineDO::getItemId)); |
| 112 | Map<Long, MesMdUnitMeasureDO> unitMeasureMap = unitMeasureService.getUnitMeasureMap( | 112 | Map<Long, MesMdUnitMeasureDO> unitMeasureMap = unitMeasureService.getUnitMeasureMap( |
| 113 | convertSet(itemMap.values(), MesMdItemDO::getUnitMeasureId)); | 113 | convertSet(itemMap.values(), MesMdItemDO::getUnitMeasureId)); |
| 114 | // 2. 构建结果 | 114 | // 2. 构建结果 |
| 115 | - return BeanUtils.toBean(list, MesWmProductionIssueLineRespVO.class, vo -> { | 115 | + return BeanUtils.toBean(list, MesWmProductIssueLineRespVO.class, vo -> { |
| 116 | MapUtils.findAndThen(itemMap, vo.getItemId(), item -> { | 116 | MapUtils.findAndThen(itemMap, vo.getItemId(), item -> { |
| 117 | vo.setItemCode(item.getCode()).setItemName(item.getName()).setSpecification(item.getSpecification()); | 117 | vo.setItemCode(item.getCode()).setItemName(item.getName()).setSpecification(item.getSpecification()); |
| 118 | MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(), | 118 | MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(), |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productionissue/vo/MesWmProductionIssuePageReqVO.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productissue/vo/MesWmProductIssuePageReqVO.java
| 1 | -package cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo; | 1 | +package cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | import io.swagger.v3.oas.annotations.media.Schema; | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
| @@ -13,7 +13,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ | @@ -13,7 +13,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ | ||
| 13 | @Schema(description = "管理后台 - MES 领料出库单分页 Request VO") | 13 | @Schema(description = "管理后台 - MES 领料出库单分页 Request VO") |
| 14 | @Data | 14 | @Data |
| 15 | @EqualsAndHashCode(callSuper = true) | 15 | @EqualsAndHashCode(callSuper = true) |
| 16 | -public class MesWmProductionIssuePageReqVO extends PageParam { | 16 | +public class MesWmProductIssuePageReqVO extends PageParam { |
| 17 | 17 | ||
| 18 | @Schema(description = "领料单编号", example = "ISSUE20250226001") | 18 | @Schema(description = "领料单编号", example = "ISSUE20250226001") |
| 19 | private String code; | 19 | private String code; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productionissue/vo/MesWmProductionIssueRespVO.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productissue/vo/MesWmProductIssueRespVO.java
| 1 | -package cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo; | 1 | +package cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo; |
| 2 | 2 | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import lombok.Data; | 4 | import lombok.Data; |
| @@ -7,7 +7,7 @@ import java.time.LocalDateTime; | @@ -7,7 +7,7 @@ import java.time.LocalDateTime; | ||
| 7 | 7 | ||
| 8 | @Schema(description = "管理后台 - MES 领料出库单 Response VO") | 8 | @Schema(description = "管理后台 - MES 领料出库单 Response VO") |
| 9 | @Data | 9 | @Data |
| 10 | -public class MesWmProductionIssueRespVO { | 10 | +public class MesWmProductIssueRespVO { |
| 11 | 11 | ||
| 12 | @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 12 | @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 13 | private Long id; | 13 | private Long id; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productionissue/vo/MesWmProductionIssueSaveReqVO.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productissue/vo/MesWmProductIssueSaveReqVO.java
| 1 | -package cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo; | 1 | +package cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo; |
| 2 | 2 | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import jakarta.validation.constraints.NotBlank; | 4 | import jakarta.validation.constraints.NotBlank; |
| @@ -9,7 +9,7 @@ import java.time.LocalDateTime; | @@ -9,7 +9,7 @@ import java.time.LocalDateTime; | ||
| 9 | 9 | ||
| 10 | @Schema(description = "管理后台 - MES 领料出库单新增/修改 Request VO") | 10 | @Schema(description = "管理后台 - MES 领料出库单新增/修改 Request VO") |
| 11 | @Data | 11 | @Data |
| 12 | -public class MesWmProductionIssueSaveReqVO { | 12 | +public class MesWmProductIssueSaveReqVO { |
| 13 | 13 | ||
| 14 | @Schema(description = "编号", example = "1024") | 14 | @Schema(description = "编号", example = "1024") |
| 15 | private Long id; | 15 | private Long id; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productionissue/vo/detail/MesWmProductionIssueDetailRespVO.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productissue/vo/detail/MesWmProductIssueDetailRespVO.java
| 1 | -package cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.detail; | 1 | +package cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.detail; |
| 2 | 2 | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import lombok.Data; | 4 | import lombok.Data; |
| @@ -8,7 +8,7 @@ import java.time.LocalDateTime; | @@ -8,7 +8,7 @@ import java.time.LocalDateTime; | ||
| 8 | 8 | ||
| 9 | @Schema(description = "管理后台 - MES 领料出库明细 Response VO") | 9 | @Schema(description = "管理后台 - MES 领料出库明细 Response VO") |
| 10 | @Data | 10 | @Data |
| 11 | -public class MesWmProductionIssueDetailRespVO { | 11 | +public class MesWmProductIssueDetailRespVO { |
| 12 | 12 | ||
| 13 | @Schema(description = "编号", example = "1") | 13 | @Schema(description = "编号", example = "1") |
| 14 | private Long id; | 14 | private Long id; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productionissue/vo/detail/MesWmProductionIssueDetailSaveReqVO.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productissue/vo/detail/MesWmProductIssueDetailSaveReqVO.java
| 1 | -package cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.detail; | 1 | +package cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.detail; |
| 2 | 2 | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import jakarta.validation.constraints.NotNull; | 4 | import jakarta.validation.constraints.NotNull; |
| @@ -8,7 +8,7 @@ import java.math.BigDecimal; | @@ -8,7 +8,7 @@ import java.math.BigDecimal; | ||
| 8 | 8 | ||
| 9 | @Schema(description = "管理后台 - MES 领料出库明细新增/修改 Request VO") | 9 | @Schema(description = "管理后台 - MES 领料出库明细新增/修改 Request VO") |
| 10 | @Data | 10 | @Data |
| 11 | -public class MesWmProductionIssueDetailSaveReqVO { | 11 | +public class MesWmProductIssueDetailSaveReqVO { |
| 12 | 12 | ||
| 13 | @Schema(description = "编号", example = "1024") | 13 | @Schema(description = "编号", example = "1024") |
| 14 | private Long id; | 14 | private Long id; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productionissue/vo/line/MesWmProductionIssueLinePageReqVO.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productissue/vo/line/MesWmProductIssueLinePageReqVO.java
| 1 | -package cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.line; | 1 | +package cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.line; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | import io.swagger.v3.oas.annotations.media.Schema; | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
| @@ -11,7 +11,7 @@ import lombok.ToString; | @@ -11,7 +11,7 @@ import lombok.ToString; | ||
| 11 | @Data | 11 | @Data |
| 12 | @EqualsAndHashCode(callSuper = true) | 12 | @EqualsAndHashCode(callSuper = true) |
| 13 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 14 | -public class MesWmProductionIssueLinePageReqVO extends PageParam { | 14 | +public class MesWmProductIssueLinePageReqVO extends PageParam { |
| 15 | 15 | ||
| 16 | @Schema(description = "领料单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 16 | @Schema(description = "领料单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 17 | @NotNull(message = "领料单编号不能为空") | 17 | @NotNull(message = "领料单编号不能为空") |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productionissue/vo/line/MesWmProductionIssueLineRespVO.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productissue/vo/line/MesWmProductIssueLineRespVO.java
| 1 | -package cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.line; | 1 | +package cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.line; |
| 2 | 2 | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import lombok.Data; | 4 | import lombok.Data; |
| @@ -8,7 +8,7 @@ import java.time.LocalDateTime; | @@ -8,7 +8,7 @@ import java.time.LocalDateTime; | ||
| 8 | 8 | ||
| 9 | @Schema(description = "管理后台 - MES 领料出库单行 Response VO") | 9 | @Schema(description = "管理后台 - MES 领料出库单行 Response VO") |
| 10 | @Data | 10 | @Data |
| 11 | -public class MesWmProductionIssueLineRespVO { | 11 | +public class MesWmProductIssueLineRespVO { |
| 12 | 12 | ||
| 13 | @Schema(description = "行ID", example = "1") | 13 | @Schema(description = "行ID", example = "1") |
| 14 | private Long id; | 14 | private Long id; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productionissue/vo/line/MesWmProductionIssueLineSaveReqVO.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productissue/vo/line/MesWmProductIssueLineSaveReqVO.java
| 1 | -package cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.line; | 1 | +package cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.line; |
| 2 | 2 | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import jakarta.validation.constraints.DecimalMin; | 4 | import jakarta.validation.constraints.DecimalMin; |
| @@ -9,7 +9,7 @@ import java.math.BigDecimal; | @@ -9,7 +9,7 @@ import java.math.BigDecimal; | ||
| 9 | 9 | ||
| 10 | @Schema(description = "管理后台 - MES 领料出库单行 Save Request VO") | 10 | @Schema(description = "管理后台 - MES 领料出库单行 Save Request VO") |
| 11 | @Data | 11 | @Data |
| 12 | -public class MesWmProductionIssueLineSaveReqVO { | 12 | +public class MesWmProductIssueLineSaveReqVO { |
| 13 | 13 | ||
| 14 | @Schema(description = "行ID", example = "1") | 14 | @Schema(description = "行ID", example = "1") |
| 15 | private Long id; | 15 | private Long id; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/wm/productionissue/MesWmProductionIssueDO.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/wm/productissue/MesWmProductIssueDO.java
| 1 | -package cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue; | 1 | +package cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | 3 | import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; |
| 4 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.workstation.MesMdWorkstationDO; | 4 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.workstation.MesMdWorkstationDO; |
| 5 | import cn.iocoder.yudao.module.mes.dal.dataobject.pro.task.MesProTaskDO; | 5 | import cn.iocoder.yudao.module.mes.dal.dataobject.pro.task.MesProTaskDO; |
| 6 | import cn.iocoder.yudao.module.mes.dal.dataobject.pro.workorder.MesProWorkOrderDO; | 6 | import cn.iocoder.yudao.module.mes.dal.dataobject.pro.workorder.MesProWorkOrderDO; |
| 7 | -import cn.iocoder.yudao.module.mes.enums.wm.MesWmProductionIssueStatusEnum; | 7 | +import cn.iocoder.yudao.module.mes.enums.wm.MesWmProductIssueStatusEnum; |
| 8 | import com.baomidou.mybatisplus.annotation.KeySequence; | 8 | import com.baomidou.mybatisplus.annotation.KeySequence; |
| 9 | import com.baomidou.mybatisplus.annotation.TableId; | 9 | import com.baomidou.mybatisplus.annotation.TableId; |
| 10 | import com.baomidou.mybatisplus.annotation.TableName; | 10 | import com.baomidou.mybatisplus.annotation.TableName; |
| @@ -15,15 +15,15 @@ import java.time.LocalDateTime; | @@ -15,15 +15,15 @@ import java.time.LocalDateTime; | ||
| 15 | /** | 15 | /** |
| 16 | * MES 领料出库单 DO | 16 | * MES 领料出库单 DO |
| 17 | */ | 17 | */ |
| 18 | -@TableName("mes_wm_production_issue") | ||
| 19 | -@KeySequence("mes_wm_production_issue_seq") | 18 | +@TableName("mes_wm_product_issue") |
| 19 | +@KeySequence("mes_wm_product_issue_seq") | ||
| 20 | @Data | 20 | @Data |
| 21 | @EqualsAndHashCode(callSuper = true) | 21 | @EqualsAndHashCode(callSuper = true) |
| 22 | @ToString(callSuper = true) | 22 | @ToString(callSuper = true) |
| 23 | @Builder | 23 | @Builder |
| 24 | @NoArgsConstructor | 24 | @NoArgsConstructor |
| 25 | @AllArgsConstructor | 25 | @AllArgsConstructor |
| 26 | -public class MesWmProductionIssueDO extends BaseDO { | 26 | +public class MesWmProductIssueDO extends BaseDO { |
| 27 | 27 | ||
| 28 | /** | 28 | /** |
| 29 | * 编号 | 29 | * 编号 |
| @@ -69,7 +69,7 @@ public class MesWmProductionIssueDO extends BaseDO { | @@ -69,7 +69,7 @@ public class MesWmProductionIssueDO extends BaseDO { | ||
| 69 | /** | 69 | /** |
| 70 | * 状态 | 70 | * 状态 |
| 71 | * | 71 | * |
| 72 | - * 枚举 {@link MesWmProductionIssueStatusEnum} | 72 | + * 枚举 {@link MesWmProductIssueStatusEnum} |
| 73 | */ | 73 | */ |
| 74 | private Integer status; | 74 | private Integer status; |
| 75 | /** | 75 | /** |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/wm/productionissue/MesWmProductionIssueDetailDO.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/wm/productissue/MesWmProductIssueDetailDO.java
| 1 | -package cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue; | 1 | +package cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | 3 | import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; |
| 4 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.item.MesMdItemDO; | 4 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.item.MesMdItemDO; |
| @@ -16,15 +16,15 @@ import java.math.BigDecimal; | @@ -16,15 +16,15 @@ import java.math.BigDecimal; | ||
| 16 | /** | 16 | /** |
| 17 | * MES 领料出库明细 DO | 17 | * MES 领料出库明细 DO |
| 18 | */ | 18 | */ |
| 19 | -@TableName("mes_wm_production_issue_detail") | ||
| 20 | -@KeySequence("mes_wm_production_issue_detail_seq") | 19 | +@TableName("mes_wm_product_issue_detail") |
| 20 | +@KeySequence("mes_wm_product_issue_detail_seq") | ||
| 21 | @Data | 21 | @Data |
| 22 | @EqualsAndHashCode(callSuper = true) | 22 | @EqualsAndHashCode(callSuper = true) |
| 23 | @ToString(callSuper = true) | 23 | @ToString(callSuper = true) |
| 24 | @Builder | 24 | @Builder |
| 25 | @NoArgsConstructor | 25 | @NoArgsConstructor |
| 26 | @AllArgsConstructor | 26 | @AllArgsConstructor |
| 27 | -public class MesWmProductionIssueDetailDO extends BaseDO { | 27 | +public class MesWmProductIssueDetailDO extends BaseDO { |
| 28 | 28 | ||
| 29 | /** | 29 | /** |
| 30 | * 编号 | 30 | * 编号 |
| @@ -34,13 +34,13 @@ public class MesWmProductionIssueDetailDO extends BaseDO { | @@ -34,13 +34,13 @@ public class MesWmProductionIssueDetailDO extends BaseDO { | ||
| 34 | /** | 34 | /** |
| 35 | * 领料单ID | 35 | * 领料单ID |
| 36 | * | 36 | * |
| 37 | - * 关联 {@link MesWmProductionIssueDO#getId()} | 37 | + * 关联 {@link MesWmProductIssueDO#getId()} |
| 38 | */ | 38 | */ |
| 39 | private Long issueId; | 39 | private Long issueId; |
| 40 | /** | 40 | /** |
| 41 | * 行ID | 41 | * 行ID |
| 42 | * | 42 | * |
| 43 | - * 关联 {@link MesWmProductionIssueLineDO#getId()} | 43 | + * 关联 {@link MesWmProductIssueLineDO#getId()} |
| 44 | */ | 44 | */ |
| 45 | private Long lineId; | 45 | private Long lineId; |
| 46 | /** | 46 | /** |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/wm/productionissue/MesWmProductionIssueLineDO.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/wm/productissue/MesWmProductIssueLineDO.java
| 1 | -package cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue; | 1 | +package cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | 3 | import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; |
| 4 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.item.MesMdItemDO; | 4 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.item.MesMdItemDO; |
| @@ -12,15 +12,15 @@ import java.math.BigDecimal; | @@ -12,15 +12,15 @@ import java.math.BigDecimal; | ||
| 12 | /** | 12 | /** |
| 13 | * MES 领料出库单行 DO | 13 | * MES 领料出库单行 DO |
| 14 | */ | 14 | */ |
| 15 | -@TableName("mes_wm_production_issue_line") | ||
| 16 | -@KeySequence("mes_wm_production_issue_line_seq") | 15 | +@TableName("mes_wm_product_issue_line") |
| 16 | +@KeySequence("mes_wm_product_issue_line_seq") | ||
| 17 | @Data | 17 | @Data |
| 18 | @EqualsAndHashCode(callSuper = true) | 18 | @EqualsAndHashCode(callSuper = true) |
| 19 | @ToString(callSuper = true) | 19 | @ToString(callSuper = true) |
| 20 | @Builder | 20 | @Builder |
| 21 | @NoArgsConstructor | 21 | @NoArgsConstructor |
| 22 | @AllArgsConstructor | 22 | @AllArgsConstructor |
| 23 | -public class MesWmProductionIssueLineDO extends BaseDO { | 23 | +public class MesWmProductIssueLineDO extends BaseDO { |
| 24 | 24 | ||
| 25 | /** | 25 | /** |
| 26 | * 编号 | 26 | * 编号 |
| @@ -30,7 +30,7 @@ public class MesWmProductionIssueLineDO extends BaseDO { | @@ -30,7 +30,7 @@ public class MesWmProductionIssueLineDO extends BaseDO { | ||
| 30 | /** | 30 | /** |
| 31 | * 领料单 ID | 31 | * 领料单 ID |
| 32 | * | 32 | * |
| 33 | - * 关联 {@link MesWmProductionIssueDO#getId()} | 33 | + * 关联 {@link MesWmProductIssueDO#getId()} |
| 34 | */ | 34 | */ |
| 35 | private Long issueId; | 35 | private Long issueId; |
| 36 | /** | 36 | /** |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/wm/productionissue/MesWmProductionIssueLineMapper.java deleted
| 1 | -package cn.iocoder.yudao.module.mes.dal.mysql.wm.productionissue; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 4 | -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | ||
| 5 | -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | ||
| 6 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.line.MesWmProductionIssueLinePageReqVO; | ||
| 7 | -import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue.MesWmProductionIssueLineDO; | ||
| 8 | -import org.apache.ibatis.annotations.Mapper; | ||
| 9 | - | ||
| 10 | -import java.util.List; | ||
| 11 | - | ||
| 12 | -/** | ||
| 13 | - * MES 领料出库单行 Mapper | ||
| 14 | - */ | ||
| 15 | -@Mapper | ||
| 16 | -public interface MesWmProductionIssueLineMapper extends BaseMapperX<MesWmProductionIssueLineDO> { | ||
| 17 | - | ||
| 18 | - default PageResult<MesWmProductionIssueLineDO> selectPage(MesWmProductionIssueLinePageReqVO reqVO) { | ||
| 19 | - return selectPage(reqVO, new LambdaQueryWrapperX<MesWmProductionIssueLineDO>() | ||
| 20 | - .eqIfPresent(MesWmProductionIssueLineDO::getIssueId, reqVO.getIssueId()) | ||
| 21 | - .orderByDesc(MesWmProductionIssueLineDO::getId)); | ||
| 22 | - } | ||
| 23 | - | ||
| 24 | - default List<MesWmProductionIssueLineDO> selectListByIssueId(Long issueId) { | ||
| 25 | - return selectList(MesWmProductionIssueLineDO::getIssueId, issueId); | ||
| 26 | - } | ||
| 27 | - | ||
| 28 | - default void deleteByIssueId(Long issueId) { | ||
| 29 | - delete(MesWmProductionIssueLineDO::getIssueId, issueId); | ||
| 30 | - } | ||
| 31 | - | ||
| 32 | -} |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/wm/productionissue/MesWmProductionIssueMapper.java deleted
| 1 | -package cn.iocoder.yudao.module.mes.dal.mysql.wm.productionissue; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 4 | -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | ||
| 5 | -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | ||
| 6 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.MesWmProductionIssuePageReqVO; | ||
| 7 | -import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue.MesWmProductionIssueDO; | ||
| 8 | -import org.apache.ibatis.annotations.Mapper; | ||
| 9 | - | ||
| 10 | -/** | ||
| 11 | - * MES 领料出库单 Mapper | ||
| 12 | - */ | ||
| 13 | -@Mapper | ||
| 14 | -public interface MesWmProductionIssueMapper extends BaseMapperX<MesWmProductionIssueDO> { | ||
| 15 | - | ||
| 16 | - default PageResult<MesWmProductionIssueDO> selectPage(MesWmProductionIssuePageReqVO reqVO) { | ||
| 17 | - return selectPage(reqVO, new LambdaQueryWrapperX<MesWmProductionIssueDO>() | ||
| 18 | - .likeIfPresent(MesWmProductionIssueDO::getCode, reqVO.getCode()) | ||
| 19 | - .likeIfPresent(MesWmProductionIssueDO::getName, reqVO.getName()) | ||
| 20 | - .eqIfPresent(MesWmProductionIssueDO::getWorkstationId, reqVO.getWorkstationId()) | ||
| 21 | - .eqIfPresent(MesWmProductionIssueDO::getWorkOrderId, reqVO.getWorkOrderId()) | ||
| 22 | - .eqIfPresent(MesWmProductionIssueDO::getStatus, reqVO.getStatus()) | ||
| 23 | - .betweenIfPresent(MesWmProductionIssueDO::getIssueDate, reqVO.getIssueDate()) | ||
| 24 | - .orderByDesc(MesWmProductionIssueDO::getId)); | ||
| 25 | - } | ||
| 26 | - | ||
| 27 | -} |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/wm/productionissue/MesWmProductionIssueDetailMapper.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/wm/productissue/MesWmProductIssueDetailMapper.java
| 1 | -package cn.iocoder.yudao.module.mes.dal.mysql.wm.productionissue; | 1 | +package cn.iocoder.yudao.module.mes.dal.mysql.wm.productissue; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | 3 | import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; |
| 4 | -import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue.MesWmProductionIssueDetailDO; | 4 | +import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue.MesWmProductIssueDetailDO; |
| 5 | import org.apache.ibatis.annotations.Mapper; | 5 | import org.apache.ibatis.annotations.Mapper; |
| 6 | 6 | ||
| 7 | import java.util.List; | 7 | import java.util.List; |
| @@ -10,18 +10,18 @@ import java.util.List; | @@ -10,18 +10,18 @@ import java.util.List; | ||
| 10 | * MES 领料出库明细 Mapper | 10 | * MES 领料出库明细 Mapper |
| 11 | */ | 11 | */ |
| 12 | @Mapper | 12 | @Mapper |
| 13 | -public interface MesWmProductionIssueDetailMapper extends BaseMapperX<MesWmProductionIssueDetailDO> { | 13 | +public interface MesWmProductIssueDetailMapper extends BaseMapperX<MesWmProductIssueDetailDO> { |
| 14 | 14 | ||
| 15 | - default List<MesWmProductionIssueDetailDO> selectListByLineId(Long lineId) { | ||
| 16 | - return selectList(MesWmProductionIssueDetailDO::getLineId, lineId); | 15 | + default List<MesWmProductIssueDetailDO> selectListByLineId(Long lineId) { |
| 16 | + return selectList(MesWmProductIssueDetailDO::getLineId, lineId); | ||
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | - default List<MesWmProductionIssueDetailDO> selectListByIssueId(Long issueId) { | ||
| 20 | - return selectList(MesWmProductionIssueDetailDO::getIssueId, issueId); | 19 | + default List<MesWmProductIssueDetailDO> selectListByIssueId(Long issueId) { |
| 20 | + return selectList(MesWmProductIssueDetailDO::getIssueId, issueId); | ||
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | default void deleteByIssueId(Long issueId) { | 23 | default void deleteByIssueId(Long issueId) { |
| 24 | - delete(MesWmProductionIssueDetailDO::getIssueId, issueId); | 24 | + delete(MesWmProductIssueDetailDO::getIssueId, issueId); |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | } | 27 | } |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/wm/productissue/MesWmProductIssueLineMapper.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.mes.dal.mysql.wm.productissue; | ||
| 2 | + | ||
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 4 | +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | ||
| 5 | +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | ||
| 6 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.line.MesWmProductIssueLinePageReqVO; | ||
| 7 | +import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue.MesWmProductIssueLineDO; | ||
| 8 | +import org.apache.ibatis.annotations.Mapper; | ||
| 9 | + | ||
| 10 | +import java.util.List; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * MES 领料出库单行 Mapper | ||
| 14 | + */ | ||
| 15 | +@Mapper | ||
| 16 | +public interface MesWmProductIssueLineMapper extends BaseMapperX<MesWmProductIssueLineDO> { | ||
| 17 | + | ||
| 18 | + default PageResult<MesWmProductIssueLineDO> selectPage(MesWmProductIssueLinePageReqVO reqVO) { | ||
| 19 | + return selectPage(reqVO, new LambdaQueryWrapperX<MesWmProductIssueLineDO>() | ||
| 20 | + .eqIfPresent(MesWmProductIssueLineDO::getIssueId, reqVO.getIssueId()) | ||
| 21 | + .orderByDesc(MesWmProductIssueLineDO::getId)); | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + default List<MesWmProductIssueLineDO> selectListByIssueId(Long issueId) { | ||
| 25 | + return selectList(MesWmProductIssueLineDO::getIssueId, issueId); | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + default void deleteByIssueId(Long issueId) { | ||
| 29 | + delete(MesWmProductIssueLineDO::getIssueId, issueId); | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | +} |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/wm/productissue/MesWmProductIssueMapper.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.mes.dal.mysql.wm.productissue; | ||
| 2 | + | ||
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 4 | +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | ||
| 5 | +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | ||
| 6 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.MesWmProductIssuePageReqVO; | ||
| 7 | +import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue.MesWmProductIssueDO; | ||
| 8 | +import org.apache.ibatis.annotations.Mapper; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * MES 领料出库单 Mapper | ||
| 12 | + */ | ||
| 13 | +@Mapper | ||
| 14 | +public interface MesWmProductIssueMapper extends BaseMapperX<MesWmProductIssueDO> { | ||
| 15 | + | ||
| 16 | + default PageResult<MesWmProductIssueDO> selectPage(MesWmProductIssuePageReqVO reqVO) { | ||
| 17 | + return selectPage(reqVO, new LambdaQueryWrapperX<MesWmProductIssueDO>() | ||
| 18 | + .likeIfPresent(MesWmProductIssueDO::getCode, reqVO.getCode()) | ||
| 19 | + .likeIfPresent(MesWmProductIssueDO::getName, reqVO.getName()) | ||
| 20 | + .eqIfPresent(MesWmProductIssueDO::getWorkstationId, reqVO.getWorkstationId()) | ||
| 21 | + .eqIfPresent(MesWmProductIssueDO::getWorkOrderId, reqVO.getWorkOrderId()) | ||
| 22 | + .eqIfPresent(MesWmProductIssueDO::getStatus, reqVO.getStatus()) | ||
| 23 | + .betweenIfPresent(MesWmProductIssueDO::getIssueDate, reqVO.getIssueDate()) | ||
| 24 | + .orderByDesc(MesWmProductIssueDO::getId)); | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | +} |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/enums/ErrorCodeConstants.java
| @@ -409,16 +409,16 @@ public interface ErrorCodeConstants { | @@ -409,16 +409,16 @@ public interface ErrorCodeConstants { | ||
| 409 | ErrorCode WM_OUTSOURCE_ISSUE_DETAIL_NOT_EXISTS = new ErrorCode(1_040_707_200, "外协发料单明细不存在"); | 409 | ErrorCode WM_OUTSOURCE_ISSUE_DETAIL_NOT_EXISTS = new ErrorCode(1_040_707_200, "外协发料单明细不存在"); |
| 410 | 410 | ||
| 411 | // ========== MES 仓库管理-生产领料出库单(1-040-708-000) ========== | 411 | // ========== MES 仓库管理-生产领料出库单(1-040-708-000) ========== |
| 412 | - ErrorCode WM_PRODUCTION_ISSUE_NOT_EXISTS = new ErrorCode(1_040_708_000, "生产领料出库单不存在"); | ||
| 413 | - ErrorCode WM_PRODUCTION_ISSUE_STATUS_INVALID = new ErrorCode(1_040_708_001, "生产领料出库单状态不正确,无法执行该操作"); | ||
| 414 | - ErrorCode WM_PRODUCTION_ISSUE_NO_LINE = new ErrorCode(1_040_708_002, "生产领料出库单至少需要一条行数据"); | ||
| 415 | - ErrorCode WM_PRODUCTION_ISSUE_DETAIL_QUANTITY_MISMATCH = new ErrorCode(1_040_708_003, "领料出库单行数量与明细数量不一致"); | ||
| 416 | - ErrorCode WM_PRODUCTION_ISSUE_WORKORDER_NOT_EXISTS = new ErrorCode(1_040_708_004, "生产工单不存在"); | ||
| 417 | - ErrorCode WM_PRODUCTION_ISSUE_WORKSTATION_NOT_EXISTS = new ErrorCode(1_040_708_005, "工作站不存在"); | ||
| 418 | - ErrorCode WM_PRODUCTION_ISSUE_CANCEL_NOT_ALLOWED = new ErrorCode(1_040_708_006, "生产领料出库单已完成或已取消,无法取消"); | ||
| 419 | - ErrorCode WM_PRODUCTION_ISSUE_LINE_NOT_EXISTS = new ErrorCode(1_040_708_100, "生产领料出库单行不存在"); | ||
| 420 | - ErrorCode WM_PRODUCTION_ISSUE_LINE_ITEM_NOT_IN_BOM = new ErrorCode(1_040_708_101, "当前物料不在生产工单的 BOM 物料清单中"); | ||
| 421 | - ErrorCode WM_PRODUCTION_ISSUE_DETAIL_NOT_EXISTS = new ErrorCode(1_040_708_200, "生产领料出库单明细不存在"); | 412 | + ErrorCode WM_PRODUCT_ISSUE_NOT_EXISTS = new ErrorCode(1_040_708_000, "生产领料出库单不存在"); |
| 413 | + ErrorCode WM_PRODUCT_ISSUE_STATUS_INVALID = new ErrorCode(1_040_708_001, "生产领料出库单状态不正确,无法执行该操作"); | ||
| 414 | + ErrorCode WM_PRODUCT_ISSUE_NO_LINE = new ErrorCode(1_040_708_002, "生产领料出库单至少需要一条行数据"); | ||
| 415 | + ErrorCode WM_PRODUCT_ISSUE_DETAIL_QUANTITY_MISMATCH = new ErrorCode(1_040_708_003, "领料出库单行数量与明细数量不一致"); | ||
| 416 | + ErrorCode WM_PRODUCT_ISSUE_WORKORDER_NOT_EXISTS = new ErrorCode(1_040_708_004, "生产工单不存在"); | ||
| 417 | + ErrorCode WM_PRODUCT_ISSUE_WORKSTATION_NOT_EXISTS = new ErrorCode(1_040_708_005, "工作站不存在"); | ||
| 418 | + ErrorCode WM_PRODUCT_ISSUE_CANCEL_NOT_ALLOWED = new ErrorCode(1_040_708_006, "生产领料出库单已完成或已取消,无法取消"); | ||
| 419 | + ErrorCode WM_PRODUCT_ISSUE_LINE_NOT_EXISTS = new ErrorCode(1_040_708_100, "生产领料出库单行不存在"); | ||
| 420 | + ErrorCode WM_PRODUCT_ISSUE_LINE_ITEM_NOT_IN_BOM = new ErrorCode(1_040_708_101, "当前物料不在生产工单的 BOM 物料清单中"); | ||
| 421 | + ErrorCode WM_PRODUCT_ISSUE_DETAIL_NOT_EXISTS = new ErrorCode(1_040_708_200, "生产领料出库单明细不存在"); | ||
| 422 | 422 | ||
| 423 | // ========== MES 仓库管理-生产入库单(1-040-709-000) ========== | 423 | // ========== MES 仓库管理-生产入库单(1-040-709-000) ========== |
| 424 | ErrorCode WM_PRODUCT_PRODUCE_NOT_EXISTS = new ErrorCode(1_040_709_000, "生产入库单不存在"); | 424 | ErrorCode WM_PRODUCT_PRODUCE_NOT_EXISTS = new ErrorCode(1_040_709_000, "生产入库单不存在"); |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/enums/MesBizTypeConstants.java
| @@ -35,7 +35,7 @@ public final class MesBizTypeConstants { | @@ -35,7 +35,7 @@ public final class MesBizTypeConstants { | ||
| 35 | public static final int WM_TRANSFER_IN = 112; // 调拨入库:MesWmTransferDO | 35 | public static final int WM_TRANSFER_IN = 112; // 调拨入库:MesWmTransferDO |
| 36 | public static final int WM_MISC_ISSUE = 113; // 其他出库:MesWmMiscIssueDO | 36 | public static final int WM_MISC_ISSUE = 113; // 其他出库:MesWmMiscIssueDO |
| 37 | public static final int WM_MISC_RECPT = 114; // 其他入库:MesWmMiscReceiptDO | 37 | public static final int WM_MISC_RECPT = 114; // 其他入库:MesWmMiscReceiptDO |
| 38 | - public static final int WM_ISSUE = 115; // 生产领料:MesWmProductionIssueDO | 38 | + public static final int WM_ISSUE = 115; // 生产领料:MesWmProductIssueDO |
| 39 | public static final int WM_RETURN_ISSUE = 116; // 生产退料:MesWmReturnIssueDO | 39 | public static final int WM_RETURN_ISSUE = 116; // 生产退料:MesWmReturnIssueDO |
| 40 | public static final int WM_PRODUCT_RECPT = 117; // 生产入库:MesWmProductReceiptDO | 40 | public static final int WM_PRODUCT_RECPT = 117; // 生产入库:MesWmProductReceiptDO |
| 41 | public static final int WM_PRODUCT_SALES = 118; // 销售出库:MesWmProductSalesDO | 41 | public static final int WM_PRODUCT_SALES = 118; // 销售出库:MesWmProductSalesDO |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/enums/wm/MesWmProductionIssueStatusEnum.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/enums/wm/MesWmProductIssueStatusEnum.java
| 1 | package cn.iocoder.yudao.module.mes.enums.wm; | 1 | package cn.iocoder.yudao.module.mes.enums.wm; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.core.ArrayValuable; | 3 | import cn.iocoder.yudao.framework.common.core.ArrayValuable; |
| 4 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.MesWmProductionIssueSaveReqVO; | 4 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.MesWmProductIssueSaveReqVO; |
| 5 | import cn.iocoder.yudao.module.mes.enums.MesOrderStatusConstants; | 5 | import cn.iocoder.yudao.module.mes.enums.MesOrderStatusConstants; |
| 6 | -import cn.iocoder.yudao.module.mes.service.wm.productionissue.MesWmProductionIssueService; | 6 | +import cn.iocoder.yudao.module.mes.service.wm.productissue.MesWmProductIssueService; |
| 7 | import lombok.AllArgsConstructor; | 7 | import lombok.AllArgsConstructor; |
| 8 | import lombok.Getter; | 8 | import lombok.Getter; |
| 9 | 9 | ||
| @@ -16,40 +16,40 @@ import java.util.Arrays; | @@ -16,40 +16,40 @@ import java.util.Arrays; | ||
| 16 | */ | 16 | */ |
| 17 | @Getter | 17 | @Getter |
| 18 | @AllArgsConstructor | 18 | @AllArgsConstructor |
| 19 | -public enum MesWmProductionIssueStatusEnum implements ArrayValuable<Integer> { | 19 | +public enum MesWmProductIssueStatusEnum implements ArrayValuable<Integer> { |
| 20 | 20 | ||
| 21 | /** | 21 | /** |
| 22 | * 草稿 | 22 | * 草稿 |
| 23 | * | 23 | * |
| 24 | - * 对应方法:{@link MesWmProductionIssueService#createProductionIssue(MesWmProductionIssueSaveReqVO)} | 24 | + * 对应方法:{@link MesWmProductIssueService#createProductIssue(MesWmProductIssueSaveReqVO)} |
| 25 | */ | 25 | */ |
| 26 | PREPARE(MesOrderStatusConstants.PREPARE, "草稿"), | 26 | PREPARE(MesOrderStatusConstants.PREPARE, "草稿"), |
| 27 | /** | 27 | /** |
| 28 | * 待拣货 | 28 | * 待拣货 |
| 29 | * | 29 | * |
| 30 | - * 对应方法:{@link MesWmProductionIssueService#submitProductionIssue(Long)} | 30 | + * 对应方法:{@link MesWmProductIssueService#submitProductIssue(Long)} |
| 31 | */ | 31 | */ |
| 32 | APPROVING(MesOrderStatusConstants.APPROVING, "待拣货"), | 32 | APPROVING(MesOrderStatusConstants.APPROVING, "待拣货"), |
| 33 | /** | 33 | /** |
| 34 | * 待执行领出 | 34 | * 待执行领出 |
| 35 | * | 35 | * |
| 36 | - * 对应方法:{@link MesWmProductionIssueService#stockProductionIssue(Long)} | 36 | + * 对应方法:{@link MesWmProductIssueService#stockProductIssue(Long)} |
| 37 | */ | 37 | */ |
| 38 | APPROVED(MesOrderStatusConstants.APPROVED, "待执行领出"), | 38 | APPROVED(MesOrderStatusConstants.APPROVED, "待执行领出"), |
| 39 | /** | 39 | /** |
| 40 | * 已完成 | 40 | * 已完成 |
| 41 | * | 41 | * |
| 42 | - * 对应方法:{@link MesWmProductionIssueService#finishProductionIssue(Long)} | 42 | + * 对应方法:{@link MesWmProductIssueService#finishProductIssue(Long)} |
| 43 | */ | 43 | */ |
| 44 | FINISHED(MesOrderStatusConstants.FINISHED, "已完成"), | 44 | FINISHED(MesOrderStatusConstants.FINISHED, "已完成"), |
| 45 | /** | 45 | /** |
| 46 | * 已取消 | 46 | * 已取消 |
| 47 | * | 47 | * |
| 48 | - * 对应方法:{@link MesWmProductionIssueService#cancelProductionIssue(Long)} | 48 | + * 对应方法:{@link MesWmProductIssueService#cancelProductIssue(Long)} |
| 49 | */ | 49 | */ |
| 50 | CANCELED(MesOrderStatusConstants.CANCELLED, "已取消"); | 50 | CANCELED(MesOrderStatusConstants.CANCELLED, "已取消"); |
| 51 | 51 | ||
| 52 | - public static final Integer[] ARRAYS = Arrays.stream(values()).map(MesWmProductionIssueStatusEnum::getStatus).toArray(Integer[]::new); | 52 | + public static final Integer[] ARRAYS = Arrays.stream(values()).map(MesWmProductIssueStatusEnum::getStatus).toArray(Integer[]::new); |
| 53 | 53 | ||
| 54 | /** | 54 | /** |
| 55 | * 状态值 | 55 | * 状态值 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/enums/wm/MesWmProductProduceStatusEnum.java
| @@ -16,7 +16,7 @@ import java.util.Arrays; | @@ -16,7 +16,7 @@ import java.util.Arrays; | ||
| 16 | @AllArgsConstructor | 16 | @AllArgsConstructor |
| 17 | public enum MesWmProductProduceStatusEnum implements ArrayValuable<Integer> { | 17 | public enum MesWmProductProduceStatusEnum implements ArrayValuable<Integer> { |
| 18 | 18 | ||
| 19 | - // TODO @AI:对应的方法;参考别的 MesWmProductionIssueStatusEnum | 19 | + // TODO @AI:对应的方法;参考别的 MesWmProductIssueStatusEnum |
| 20 | /** | 20 | /** |
| 21 | * 草稿 | 21 | * 草稿 |
| 22 | */ | 22 | */ |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/arrivalnotice/MesWmArrivalNoticeServiceImpl.java
| @@ -21,7 +21,6 @@ import java.math.BigDecimal; | @@ -21,7 +21,6 @@ import java.math.BigDecimal; | ||
| 21 | import java.util.Collection; | 21 | import java.util.Collection; |
| 22 | import java.util.Collections; | 22 | import java.util.Collections; |
| 23 | import java.util.List; | 23 | import java.util.List; |
| 24 | -import java.util.Objects; | ||
| 25 | 24 | ||
| 26 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | 25 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
| 27 | import static cn.iocoder.yudao.module.mes.enums.ErrorCodeConstants.*; | 26 | import static cn.iocoder.yudao.module.mes.enums.ErrorCodeConstants.*; |
| @@ -100,6 +99,7 @@ public class MesWmArrivalNoticeServiceImpl implements MesWmArrivalNoticeService | @@ -100,6 +99,7 @@ public class MesWmArrivalNoticeServiceImpl implements MesWmArrivalNoticeService | ||
| 100 | // 2. 检查所有行的 iqcCheckFlag:如果没有需要检验的行,则直接审批通过 | 99 | // 2. 检查所有行的 iqcCheckFlag:如果没有需要检验的行,则直接审批通过 |
| 101 | boolean needCheck = CollectionUtils.anyMatch(lines, | 100 | boolean needCheck = CollectionUtils.anyMatch(lines, |
| 102 | line -> Boolean.TRUE.equals(line.getIqcCheckFlag())); | 101 | line -> Boolean.TRUE.equals(line.getIqcCheckFlag())); |
| 102 | + // TODO @AI:if return;并且不要取反; | ||
| 103 | if (!needCheck) { | 103 | if (!needCheck) { |
| 104 | // 不需要检验,直接进入待入库 | 104 | // 不需要检验,直接进入待入库 |
| 105 | arrivalNoticeMapper.updateById(new MesWmArrivalNoticeDO() | 105 | arrivalNoticeMapper.updateById(new MesWmArrivalNoticeDO() |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/outsourceissue/MesWmOutsourceIssueLineServiceImpl.java
| @@ -35,7 +35,7 @@ public class MesWmOutsourceIssueLineServiceImpl implements MesWmOutsourceIssueLi | @@ -35,7 +35,7 @@ public class MesWmOutsourceIssueLineServiceImpl implements MesWmOutsourceIssueLi | ||
| 35 | // DONE @AI:校验关联的 issueId;(AI 未修复原因:需要注入 outsourceIssueService 并调用校验方法,需要确认具体校验逻辑) | 35 | // DONE @AI:校验关联的 issueId;(AI 未修复原因:需要注入 outsourceIssueService 并调用校验方法,需要确认具体校验逻辑) |
| 36 | // DONE AI校验关联的 itemId;(AI 未修复原因:需要注入 itemService 并调用校验方法,需要确认具体校验逻辑) | 36 | // DONE AI校验关联的 itemId;(AI 未修复原因:需要注入 itemService 并调用校验方法,需要确认具体校验逻辑) |
| 37 | 37 | ||
| 38 | - // DONE @AI:wm 里面,有模块实现了 checkBom 类似的逻辑;(AI 未修复原因:需要明确 BOM 校验的具体业务规则,建议参考 productionissue 模块的实现) | 38 | + // DONE @AI:wm 里面,有模块实现了 checkBom 类似的逻辑;(AI 未修复原因:需要明确 BOM 校验的具体业务规则,建议参考 productissue 模块的实现) |
| 39 | 39 | ||
| 40 | // 插入 | 40 | // 插入 |
| 41 | MesWmOutsourceIssueLineDO line = BeanUtils.toBean(createReqVO, MesWmOutsourceIssueLineDO.class); | 41 | MesWmOutsourceIssueLineDO line = BeanUtils.toBean(createReqVO, MesWmOutsourceIssueLineDO.class); |
| @@ -48,7 +48,7 @@ public class MesWmOutsourceIssueLineServiceImpl implements MesWmOutsourceIssueLi | @@ -48,7 +48,7 @@ public class MesWmOutsourceIssueLineServiceImpl implements MesWmOutsourceIssueLi | ||
| 48 | // DONE @AI:校验关联的 issueId;(AI 未修复原因:需要注入 outsourceIssueService 并调用校验方法,需要确认具体校验逻辑) | 48 | // DONE @AI:校验关联的 issueId;(AI 未修复原因:需要注入 outsourceIssueService 并调用校验方法,需要确认具体校验逻辑) |
| 49 | // DONE AI校验关联的 itemId;(AI 未修复原因:需要注入 itemService 并调用校验方法,需要确认具体校验逻辑) | 49 | // DONE AI校验关联的 itemId;(AI 未修复原因:需要注入 itemService 并调用校验方法,需要确认具体校验逻辑) |
| 50 | 50 | ||
| 51 | - // DONE @AI:wm 里面,有模块实现了 checkBom 类似的逻辑;(AI 未修复原因:需要明确 BOM 校验的具体业务规则,建议参考 productionissue 模块的实现) | 51 | + // DONE @AI:wm 里面,有模块实现了 checkBom 类似的逻辑;(AI 未修复原因:需要明确 BOM 校验的具体业务规则,建议参考 productissue 模块的实现) |
| 52 | 52 | ||
| 53 | // 校验存在 | 53 | // 校验存在 |
| 54 | validateOutsourceIssueLineExists(updateReqVO.getId()); | 54 | validateOutsourceIssueLineExists(updateReqVO.getId()); |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productionissue/MesWmProductionIssueDetailService.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productissue/MesWmProductIssueDetailService.java
| 1 | -package cn.iocoder.yudao.module.mes.service.wm.productionissue; | 1 | +package cn.iocoder.yudao.module.mes.service.wm.productissue; |
| 2 | 2 | ||
| 3 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.detail.MesWmProductionIssueDetailSaveReqVO; | ||
| 4 | -import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue.MesWmProductionIssueDetailDO; | 3 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.detail.MesWmProductIssueDetailSaveReqVO; |
| 4 | +import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue.MesWmProductIssueDetailDO; | ||
| 5 | import jakarta.validation.Valid; | 5 | import jakarta.validation.Valid; |
| 6 | 6 | ||
| 7 | import java.util.List; | 7 | import java.util.List; |
| @@ -9,7 +9,7 @@ import java.util.List; | @@ -9,7 +9,7 @@ import java.util.List; | ||
| 9 | /** | 9 | /** |
| 10 | * MES 领料出库明细 Service 接口 | 10 | * MES 领料出库明细 Service 接口 |
| 11 | */ | 11 | */ |
| 12 | -public interface MesWmProductionIssueDetailService { | 12 | +public interface MesWmProductIssueDetailService { |
| 13 | 13 | ||
| 14 | /** | 14 | /** |
| 15 | * 创建领料出库明细 | 15 | * 创建领料出库明细 |
| @@ -17,21 +17,21 @@ public interface MesWmProductionIssueDetailService { | @@ -17,21 +17,21 @@ public interface MesWmProductionIssueDetailService { | ||
| 17 | * @param createReqVO 创建信息 | 17 | * @param createReqVO 创建信息 |
| 18 | * @return 编号 | 18 | * @return 编号 |
| 19 | */ | 19 | */ |
| 20 | - Long createProductionIssueDetail(@Valid MesWmProductionIssueDetailSaveReqVO createReqVO); | 20 | + Long createProductIssueDetail(@Valid MesWmProductIssueDetailSaveReqVO createReqVO); |
| 21 | 21 | ||
| 22 | /** | 22 | /** |
| 23 | * 更新领料出库明细 | 23 | * 更新领料出库明细 |
| 24 | * | 24 | * |
| 25 | * @param updateReqVO 更新信息 | 25 | * @param updateReqVO 更新信息 |
| 26 | */ | 26 | */ |
| 27 | - void updateProductionIssueDetail(@Valid MesWmProductionIssueDetailSaveReqVO updateReqVO); | 27 | + void updateProductIssueDetail(@Valid MesWmProductIssueDetailSaveReqVO updateReqVO); |
| 28 | 28 | ||
| 29 | /** | 29 | /** |
| 30 | * 删除领料出库明细 | 30 | * 删除领料出库明细 |
| 31 | * | 31 | * |
| 32 | * @param id 编号 | 32 | * @param id 编号 |
| 33 | */ | 33 | */ |
| 34 | - void deleteProductionIssueDetail(Long id); | 34 | + void deleteProductIssueDetail(Long id); |
| 35 | 35 | ||
| 36 | /** | 36 | /** |
| 37 | * 获得领料出库明细 | 37 | * 获得领料出库明细 |
| @@ -39,7 +39,7 @@ public interface MesWmProductionIssueDetailService { | @@ -39,7 +39,7 @@ public interface MesWmProductionIssueDetailService { | ||
| 39 | * @param id 编号 | 39 | * @param id 编号 |
| 40 | * @return 领料出库明细 | 40 | * @return 领料出库明细 |
| 41 | */ | 41 | */ |
| 42 | - MesWmProductionIssueDetailDO getProductionIssueDetail(Long id); | 42 | + MesWmProductIssueDetailDO getProductIssueDetail(Long id); |
| 43 | 43 | ||
| 44 | /** | 44 | /** |
| 45 | * 根据行ID获取明细列表 | 45 | * 根据行ID获取明细列表 |
| @@ -47,7 +47,7 @@ public interface MesWmProductionIssueDetailService { | @@ -47,7 +47,7 @@ public interface MesWmProductionIssueDetailService { | ||
| 47 | * @param lineId 行ID | 47 | * @param lineId 行ID |
| 48 | * @return 明细列表 | 48 | * @return 明细列表 |
| 49 | */ | 49 | */ |
| 50 | - List<MesWmProductionIssueDetailDO> getProductionIssueDetailListByLineId(Long lineId); | 50 | + List<MesWmProductIssueDetailDO> getProductIssueDetailListByLineId(Long lineId); |
| 51 | 51 | ||
| 52 | /** | 52 | /** |
| 53 | * 根据领料单ID获取明细列表 | 53 | * 根据领料单ID获取明细列表 |
| @@ -55,13 +55,13 @@ public interface MesWmProductionIssueDetailService { | @@ -55,13 +55,13 @@ public interface MesWmProductionIssueDetailService { | ||
| 55 | * @param issueId 领料单ID | 55 | * @param issueId 领料单ID |
| 56 | * @return 明细列表 | 56 | * @return 明细列表 |
| 57 | */ | 57 | */ |
| 58 | - List<MesWmProductionIssueDetailDO> getProductionIssueDetailListByIssueId(Long issueId); | 58 | + List<MesWmProductIssueDetailDO> getProductIssueDetailListByIssueId(Long issueId); |
| 59 | 59 | ||
| 60 | /** | 60 | /** |
| 61 | * 根据领料单ID删除明细 | 61 | * 根据领料单ID删除明细 |
| 62 | * | 62 | * |
| 63 | * @param issueId 领料单ID | 63 | * @param issueId 领料单ID |
| 64 | */ | 64 | */ |
| 65 | - void deleteProductionIssueDetailByIssueId(Long issueId); | 65 | + void deleteProductIssueDetailByIssueId(Long issueId); |
| 66 | 66 | ||
| 67 | } | 67 | } |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productionissue/MesWmProductionIssueDetailServiceImpl.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productissue/MesWmProductIssueDetailServiceImpl.java
| 1 | -package cn.iocoder.yudao.module.mes.service.wm.productionissue; | 1 | +package cn.iocoder.yudao.module.mes.service.wm.productissue; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | 3 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 4 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.detail.MesWmProductionIssueDetailSaveReqVO; | ||
| 5 | -import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue.MesWmProductionIssueDetailDO; | ||
| 6 | -import cn.iocoder.yudao.module.mes.dal.mysql.wm.productionissue.MesWmProductionIssueDetailMapper; | 4 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.detail.MesWmProductIssueDetailSaveReqVO; |
| 5 | +import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue.MesWmProductIssueDetailDO; | ||
| 6 | +import cn.iocoder.yudao.module.mes.dal.mysql.wm.productissue.MesWmProductIssueDetailMapper; | ||
| 7 | import jakarta.annotation.Resource; | 7 | import jakarta.annotation.Resource; |
| 8 | import org.springframework.context.annotation.Lazy; | 8 | import org.springframework.context.annotation.Lazy; |
| 9 | import org.springframework.stereotype.Service; | 9 | import org.springframework.stereotype.Service; |
| @@ -12,76 +12,76 @@ import org.springframework.validation.annotation.Validated; | @@ -12,76 +12,76 @@ import org.springframework.validation.annotation.Validated; | ||
| 12 | import java.util.List; | 12 | import java.util.List; |
| 13 | 13 | ||
| 14 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | 14 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
| 15 | -import static cn.iocoder.yudao.module.mes.enums.ErrorCodeConstants.WM_PRODUCTION_ISSUE_DETAIL_NOT_EXISTS; | 15 | +import static cn.iocoder.yudao.module.mes.enums.ErrorCodeConstants.WM_PRODUCT_ISSUE_DETAIL_NOT_EXISTS; |
| 16 | 16 | ||
| 17 | /** | 17 | /** |
| 18 | * MES 领料出库明细 Service 实现类 | 18 | * MES 领料出库明细 Service 实现类 |
| 19 | */ | 19 | */ |
| 20 | @Service | 20 | @Service |
| 21 | @Validated | 21 | @Validated |
| 22 | -public class MesWmProductionIssueDetailServiceImpl implements MesWmProductionIssueDetailService { | 22 | +public class MesWmProductIssueDetailServiceImpl implements MesWmProductIssueDetailService { |
| 23 | 23 | ||
| 24 | @Resource | 24 | @Resource |
| 25 | - private MesWmProductionIssueDetailMapper issueDetailMapper; | 25 | + private MesWmProductIssueDetailMapper issueDetailMapper; |
| 26 | 26 | ||
| 27 | @Resource | 27 | @Resource |
| 28 | @Lazy | 28 | @Lazy |
| 29 | - private MesWmProductionIssueLineService issueLineService; | 29 | + private MesWmProductIssueLineService issueLineService; |
| 30 | 30 | ||
| 31 | @Override | 31 | @Override |
| 32 | - public Long createProductionIssueDetail(MesWmProductionIssueDetailSaveReqVO createReqVO) { | 32 | + public Long createProductIssueDetail(MesWmProductIssueDetailSaveReqVO createReqVO) { |
| 33 | // 校验父数据存在 | 33 | // 校验父数据存在 |
| 34 | - issueLineService.validateProductionIssueLineExists(createReqVO.getLineId()); | 34 | + issueLineService.validateProductIssueLineExists(createReqVO.getLineId()); |
| 35 | 35 | ||
| 36 | // 插入 | 36 | // 插入 |
| 37 | - MesWmProductionIssueDetailDO detail = BeanUtils.toBean(createReqVO, MesWmProductionIssueDetailDO.class); | 37 | + MesWmProductIssueDetailDO detail = BeanUtils.toBean(createReqVO, MesWmProductIssueDetailDO.class); |
| 38 | issueDetailMapper.insert(detail); | 38 | issueDetailMapper.insert(detail); |
| 39 | return detail.getId(); | 39 | return detail.getId(); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | @Override | 42 | @Override |
| 43 | - public void updateProductionIssueDetail(MesWmProductionIssueDetailSaveReqVO updateReqVO) { | 43 | + public void updateProductIssueDetail(MesWmProductIssueDetailSaveReqVO updateReqVO) { |
| 44 | // 校验存在 | 44 | // 校验存在 |
| 45 | - validateProductionIssueDetailExists(updateReqVO.getId()); | 45 | + validateProductIssueDetailExists(updateReqVO.getId()); |
| 46 | // 校验父数据存在 | 46 | // 校验父数据存在 |
| 47 | - issueLineService.validateProductionIssueLineExists(updateReqVO.getLineId()); | 47 | + issueLineService.validateProductIssueLineExists(updateReqVO.getLineId()); |
| 48 | 48 | ||
| 49 | // 更新 | 49 | // 更新 |
| 50 | - MesWmProductionIssueDetailDO updateObj = BeanUtils.toBean(updateReqVO, MesWmProductionIssueDetailDO.class); | 50 | + MesWmProductIssueDetailDO updateObj = BeanUtils.toBean(updateReqVO, MesWmProductIssueDetailDO.class); |
| 51 | issueDetailMapper.updateById(updateObj); | 51 | issueDetailMapper.updateById(updateObj); |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | @Override | 54 | @Override |
| 55 | - public void deleteProductionIssueDetail(Long id) { | 55 | + public void deleteProductIssueDetail(Long id) { |
| 56 | // 校验存在 | 56 | // 校验存在 |
| 57 | - validateProductionIssueDetailExists(id); | 57 | + validateProductIssueDetailExists(id); |
| 58 | // 删除 | 58 | // 删除 |
| 59 | issueDetailMapper.deleteById(id); | 59 | issueDetailMapper.deleteById(id); |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | @Override | 62 | @Override |
| 63 | - public MesWmProductionIssueDetailDO getProductionIssueDetail(Long id) { | 63 | + public MesWmProductIssueDetailDO getProductIssueDetail(Long id) { |
| 64 | return issueDetailMapper.selectById(id); | 64 | return issueDetailMapper.selectById(id); |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | @Override | 67 | @Override |
| 68 | - public List<MesWmProductionIssueDetailDO> getProductionIssueDetailListByLineId(Long lineId) { | 68 | + public List<MesWmProductIssueDetailDO> getProductIssueDetailListByLineId(Long lineId) { |
| 69 | return issueDetailMapper.selectListByLineId(lineId); | 69 | return issueDetailMapper.selectListByLineId(lineId); |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | @Override | 72 | @Override |
| 73 | - public List<MesWmProductionIssueDetailDO> getProductionIssueDetailListByIssueId(Long issueId) { | 73 | + public List<MesWmProductIssueDetailDO> getProductIssueDetailListByIssueId(Long issueId) { |
| 74 | return issueDetailMapper.selectListByIssueId(issueId); | 74 | return issueDetailMapper.selectListByIssueId(issueId); |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | @Override | 77 | @Override |
| 78 | - public void deleteProductionIssueDetailByIssueId(Long issueId) { | 78 | + public void deleteProductIssueDetailByIssueId(Long issueId) { |
| 79 | issueDetailMapper.deleteByIssueId(issueId); | 79 | issueDetailMapper.deleteByIssueId(issueId); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | - private void validateProductionIssueDetailExists(Long id) { | 82 | + private void validateProductIssueDetailExists(Long id) { |
| 83 | if (issueDetailMapper.selectById(id) == null) { | 83 | if (issueDetailMapper.selectById(id) == null) { |
| 84 | - throw exception(WM_PRODUCTION_ISSUE_DETAIL_NOT_EXISTS); | 84 | + throw exception(WM_PRODUCT_ISSUE_DETAIL_NOT_EXISTS); |
| 85 | } | 85 | } |
| 86 | } | 86 | } |
| 87 | 87 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productionissue/MesWmProductionIssueLineService.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productissue/MesWmProductIssueLineService.java
| 1 | -package cn.iocoder.yudao.module.mes.service.wm.productionissue; | 1 | +package cn.iocoder.yudao.module.mes.service.wm.productissue; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.line.MesWmProductionIssueLinePageReqVO; | ||
| 5 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.line.MesWmProductionIssueLineSaveReqVO; | ||
| 6 | -import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue.MesWmProductionIssueLineDO; | 4 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.line.MesWmProductIssueLinePageReqVO; |
| 5 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.line.MesWmProductIssueLineSaveReqVO; | ||
| 6 | +import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue.MesWmProductIssueLineDO; | ||
| 7 | import jakarta.validation.Valid; | 7 | import jakarta.validation.Valid; |
| 8 | 8 | ||
| 9 | import java.util.List; | 9 | import java.util.List; |
| @@ -11,7 +11,7 @@ import java.util.List; | @@ -11,7 +11,7 @@ import java.util.List; | ||
| 11 | /** | 11 | /** |
| 12 | * MES 领料出库单行 Service 接口 | 12 | * MES 领料出库单行 Service 接口 |
| 13 | */ | 13 | */ |
| 14 | -public interface MesWmProductionIssueLineService { | 14 | +public interface MesWmProductIssueLineService { |
| 15 | 15 | ||
| 16 | /** | 16 | /** |
| 17 | * 创建领料出库单行 | 17 | * 创建领料出库单行 |
| @@ -19,21 +19,21 @@ public interface MesWmProductionIssueLineService { | @@ -19,21 +19,21 @@ public interface MesWmProductionIssueLineService { | ||
| 19 | * @param createReqVO 创建信息 | 19 | * @param createReqVO 创建信息 |
| 20 | * @return 编号 | 20 | * @return 编号 |
| 21 | */ | 21 | */ |
| 22 | - Long createProductionIssueLine(@Valid MesWmProductionIssueLineSaveReqVO createReqVO); | 22 | + Long createProductIssueLine(@Valid MesWmProductIssueLineSaveReqVO createReqVO); |
| 23 | 23 | ||
| 24 | /** | 24 | /** |
| 25 | * 更新领料出库单行 | 25 | * 更新领料出库单行 |
| 26 | * | 26 | * |
| 27 | * @param updateReqVO 更新信息 | 27 | * @param updateReqVO 更新信息 |
| 28 | */ | 28 | */ |
| 29 | - void updateProductionIssueLine(@Valid MesWmProductionIssueLineSaveReqVO updateReqVO); | 29 | + void updateProductIssueLine(@Valid MesWmProductIssueLineSaveReqVO updateReqVO); |
| 30 | 30 | ||
| 31 | /** | 31 | /** |
| 32 | * 删除领料出库单行 | 32 | * 删除领料出库单行 |
| 33 | * | 33 | * |
| 34 | * @param id 编号 | 34 | * @param id 编号 |
| 35 | */ | 35 | */ |
| 36 | - void deleteProductionIssueLine(Long id); | 36 | + void deleteProductIssueLine(Long id); |
| 37 | 37 | ||
| 38 | /** | 38 | /** |
| 39 | * 获得领料出库单行 | 39 | * 获得领料出库单行 |
| @@ -41,7 +41,7 @@ public interface MesWmProductionIssueLineService { | @@ -41,7 +41,7 @@ public interface MesWmProductionIssueLineService { | ||
| 41 | * @param id 编号 | 41 | * @param id 编号 |
| 42 | * @return 领料出库单行 | 42 | * @return 领料出库单行 |
| 43 | */ | 43 | */ |
| 44 | - MesWmProductionIssueLineDO getProductionIssueLine(Long id); | 44 | + MesWmProductIssueLineDO getProductIssueLine(Long id); |
| 45 | 45 | ||
| 46 | /** | 46 | /** |
| 47 | * 获得领料出库单行分页 | 47 | * 获得领料出库单行分页 |
| @@ -49,7 +49,7 @@ public interface MesWmProductionIssueLineService { | @@ -49,7 +49,7 @@ public interface MesWmProductionIssueLineService { | ||
| 49 | * @param pageReqVO 分页查询 | 49 | * @param pageReqVO 分页查询 |
| 50 | * @return 领料出库单行分页 | 50 | * @return 领料出库单行分页 |
| 51 | */ | 51 | */ |
| 52 | - PageResult<MesWmProductionIssueLineDO> getProductionIssueLinePage(MesWmProductionIssueLinePageReqVO pageReqVO); | 52 | + PageResult<MesWmProductIssueLineDO> getProductIssueLinePage(MesWmProductIssueLinePageReqVO pageReqVO); |
| 53 | 53 | ||
| 54 | /** | 54 | /** |
| 55 | * 根据领料单ID获取行列表 | 55 | * 根据领料单ID获取行列表 |
| @@ -57,14 +57,14 @@ public interface MesWmProductionIssueLineService { | @@ -57,14 +57,14 @@ public interface MesWmProductionIssueLineService { | ||
| 57 | * @param issueId 领料单ID | 57 | * @param issueId 领料单ID |
| 58 | * @return 行列表 | 58 | * @return 行列表 |
| 59 | */ | 59 | */ |
| 60 | - List<MesWmProductionIssueLineDO> getProductionIssueLineListByIssueId(Long issueId); | 60 | + List<MesWmProductIssueLineDO> getProductIssueLineListByIssueId(Long issueId); |
| 61 | 61 | ||
| 62 | /** | 62 | /** |
| 63 | * 根据领料单ID删除行 | 63 | * 根据领料单ID删除行 |
| 64 | * | 64 | * |
| 65 | * @param issueId 领料单ID | 65 | * @param issueId 领料单ID |
| 66 | */ | 66 | */ |
| 67 | - void deleteProductionIssueLineByIssueId(Long issueId); | 67 | + void deleteProductIssueLineByIssueId(Long issueId); |
| 68 | 68 | ||
| 69 | /** | 69 | /** |
| 70 | * 校验领料出库单行是否存在 | 70 | * 校验领料出库单行是否存在 |
| @@ -72,6 +72,6 @@ public interface MesWmProductionIssueLineService { | @@ -72,6 +72,6 @@ public interface MesWmProductionIssueLineService { | ||
| 72 | * @param id 编号 | 72 | * @param id 编号 |
| 73 | * @return 领料出库单行 | 73 | * @return 领料出库单行 |
| 74 | */ | 74 | */ |
| 75 | - MesWmProductionIssueLineDO validateProductionIssueLineExists(Long id); | 75 | + MesWmProductIssueLineDO validateProductIssueLineExists(Long id); |
| 76 | 76 | ||
| 77 | } | 77 | } |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productionissue/MesWmProductionIssueLineServiceImpl.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productissue/MesWmProductIssueLineServiceImpl.java
| 1 | -package cn.iocoder.yudao.module.mes.service.wm.productionissue; | 1 | +package cn.iocoder.yudao.module.mes.service.wm.productissue; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 5 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | 5 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 6 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.line.MesWmProductionIssueLinePageReqVO; | ||
| 7 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.line.MesWmProductionIssueLineSaveReqVO; | 6 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.line.MesWmProductIssueLinePageReqVO; |
| 7 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.line.MesWmProductIssueLineSaveReqVO; | ||
| 8 | import cn.iocoder.yudao.module.mes.dal.dataobject.pro.workorder.MesProWorkOrderBomDO; | 8 | import cn.iocoder.yudao.module.mes.dal.dataobject.pro.workorder.MesProWorkOrderBomDO; |
| 9 | -import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue.MesWmProductionIssueDO; | ||
| 10 | -import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue.MesWmProductionIssueLineDO; | ||
| 11 | -import cn.iocoder.yudao.module.mes.dal.mysql.wm.productionissue.MesWmProductionIssueLineMapper; | 9 | +import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue.MesWmProductIssueDO; |
| 10 | +import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue.MesWmProductIssueLineDO; | ||
| 11 | +import cn.iocoder.yudao.module.mes.dal.mysql.wm.productissue.MesWmProductIssueLineMapper; | ||
| 12 | import cn.iocoder.yudao.module.mes.service.md.item.MesMdItemService; | 12 | import cn.iocoder.yudao.module.mes.service.md.item.MesMdItemService; |
| 13 | import cn.iocoder.yudao.module.mes.service.pro.workorder.MesProWorkOrderBomService; | 13 | import cn.iocoder.yudao.module.mes.service.pro.workorder.MesProWorkOrderBomService; |
| 14 | import jakarta.annotation.Resource; | 14 | import jakarta.annotation.Resource; |
| @@ -19,94 +19,94 @@ import org.springframework.validation.annotation.Validated; | @@ -19,94 +19,94 @@ import org.springframework.validation.annotation.Validated; | ||
| 19 | import java.util.List; | 19 | import java.util.List; |
| 20 | 20 | ||
| 21 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | 21 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
| 22 | -import static cn.iocoder.yudao.module.mes.enums.ErrorCodeConstants.WM_PRODUCTION_ISSUE_LINE_ITEM_NOT_IN_BOM; | ||
| 23 | -import static cn.iocoder.yudao.module.mes.enums.ErrorCodeConstants.WM_PRODUCTION_ISSUE_LINE_NOT_EXISTS; | 22 | +import static cn.iocoder.yudao.module.mes.enums.ErrorCodeConstants.WM_PRODUCT_ISSUE_LINE_ITEM_NOT_IN_BOM; |
| 23 | +import static cn.iocoder.yudao.module.mes.enums.ErrorCodeConstants.WM_PRODUCT_ISSUE_LINE_NOT_EXISTS; | ||
| 24 | 24 | ||
| 25 | /** | 25 | /** |
| 26 | * MES 领料出库单行 Service 实现类 | 26 | * MES 领料出库单行 Service 实现类 |
| 27 | */ | 27 | */ |
| 28 | @Service | 28 | @Service |
| 29 | @Validated | 29 | @Validated |
| 30 | -public class MesWmProductionIssueLineServiceImpl implements MesWmProductionIssueLineService { | 30 | +public class MesWmProductIssueLineServiceImpl implements MesWmProductIssueLineService { |
| 31 | 31 | ||
| 32 | @Resource | 32 | @Resource |
| 33 | - private MesWmProductionIssueLineMapper issueLineMapper; | 33 | + private MesWmProductIssueLineMapper issueLineMapper; |
| 34 | 34 | ||
| 35 | @Resource | 35 | @Resource |
| 36 | @Lazy | 36 | @Lazy |
| 37 | - private MesWmProductionIssueService issueService; | 37 | + private MesWmProductIssueService issueService; |
| 38 | @Resource | 38 | @Resource |
| 39 | private MesMdItemService itemService; | 39 | private MesMdItemService itemService; |
| 40 | @Resource | 40 | @Resource |
| 41 | private MesProWorkOrderBomService workOrderBomService; | 41 | private MesProWorkOrderBomService workOrderBomService; |
| 42 | 42 | ||
| 43 | @Override | 43 | @Override |
| 44 | - public Long createProductionIssueLine(MesWmProductionIssueLineSaveReqVO createReqVO) { | 44 | + public Long createProductIssueLine(MesWmProductIssueLineSaveReqVO createReqVO) { |
| 45 | // 校验父数据存在 + 校验物料在工单 BOM 中 | 45 | // 校验父数据存在 + 校验物料在工单 BOM 中 |
| 46 | validateItemInWorkOrderBom(createReqVO.getIssueId(), createReqVO.getItemId()); | 46 | validateItemInWorkOrderBom(createReqVO.getIssueId(), createReqVO.getItemId()); |
| 47 | // 校验物料存在 | 47 | // 校验物料存在 |
| 48 | itemService.validateItemExists(createReqVO.getItemId()); | 48 | itemService.validateItemExists(createReqVO.getItemId()); |
| 49 | 49 | ||
| 50 | // 插入 | 50 | // 插入 |
| 51 | - MesWmProductionIssueLineDO line = BeanUtils.toBean(createReqVO, MesWmProductionIssueLineDO.class); | 51 | + MesWmProductIssueLineDO line = BeanUtils.toBean(createReqVO, MesWmProductIssueLineDO.class); |
| 52 | issueLineMapper.insert(line); | 52 | issueLineMapper.insert(line); |
| 53 | return line.getId(); | 53 | return line.getId(); |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | @Override | 56 | @Override |
| 57 | - public void updateProductionIssueLine(MesWmProductionIssueLineSaveReqVO updateReqVO) { | 57 | + public void updateProductIssueLine(MesWmProductIssueLineSaveReqVO updateReqVO) { |
| 58 | // 校验存在 | 58 | // 校验存在 |
| 59 | - validateProductionIssueLineExists(updateReqVO.getId()); | 59 | + validateProductIssueLineExists(updateReqVO.getId()); |
| 60 | // 校验父数据存在 + 校验物料在工单 BOM 中 | 60 | // 校验父数据存在 + 校验物料在工单 BOM 中 |
| 61 | validateItemInWorkOrderBom(updateReqVO.getIssueId(), updateReqVO.getItemId()); | 61 | validateItemInWorkOrderBom(updateReqVO.getIssueId(), updateReqVO.getItemId()); |
| 62 | // 校验物料存在 | 62 | // 校验物料存在 |
| 63 | itemService.validateItemExists(updateReqVO.getItemId()); | 63 | itemService.validateItemExists(updateReqVO.getItemId()); |
| 64 | 64 | ||
| 65 | // 更新 | 65 | // 更新 |
| 66 | - MesWmProductionIssueLineDO updateObj = BeanUtils.toBean(updateReqVO, MesWmProductionIssueLineDO.class); | 66 | + MesWmProductIssueLineDO updateObj = BeanUtils.toBean(updateReqVO, MesWmProductIssueLineDO.class); |
| 67 | issueLineMapper.updateById(updateObj); | 67 | issueLineMapper.updateById(updateObj); |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | @Override | 70 | @Override |
| 71 | - public void deleteProductionIssueLine(Long id) { | 71 | + public void deleteProductIssueLine(Long id) { |
| 72 | // 校验存在 | 72 | // 校验存在 |
| 73 | - validateProductionIssueLineExists(id); | 73 | + validateProductIssueLineExists(id); |
| 74 | // 删除 | 74 | // 删除 |
| 75 | issueLineMapper.deleteById(id); | 75 | issueLineMapper.deleteById(id); |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | @Override | 78 | @Override |
| 79 | - public MesWmProductionIssueLineDO getProductionIssueLine(Long id) { | 79 | + public MesWmProductIssueLineDO getProductIssueLine(Long id) { |
| 80 | return issueLineMapper.selectById(id); | 80 | return issueLineMapper.selectById(id); |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | @Override | 83 | @Override |
| 84 | - public PageResult<MesWmProductionIssueLineDO> getProductionIssueLinePage(MesWmProductionIssueLinePageReqVO pageReqVO) { | 84 | + public PageResult<MesWmProductIssueLineDO> getProductIssueLinePage(MesWmProductIssueLinePageReqVO pageReqVO) { |
| 85 | return issueLineMapper.selectPage(pageReqVO); | 85 | return issueLineMapper.selectPage(pageReqVO); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | @Override | 88 | @Override |
| 89 | - public List<MesWmProductionIssueLineDO> getProductionIssueLineListByIssueId(Long issueId) { | 89 | + public List<MesWmProductIssueLineDO> getProductIssueLineListByIssueId(Long issueId) { |
| 90 | return issueLineMapper.selectListByIssueId(issueId); | 90 | return issueLineMapper.selectListByIssueId(issueId); |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | @Override | 93 | @Override |
| 94 | - public void deleteProductionIssueLineByIssueId(Long issueId) { | 94 | + public void deleteProductIssueLineByIssueId(Long issueId) { |
| 95 | issueLineMapper.deleteByIssueId(issueId); | 95 | issueLineMapper.deleteByIssueId(issueId); |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | @Override | 98 | @Override |
| 99 | - public MesWmProductionIssueLineDO validateProductionIssueLineExists(Long id) { | ||
| 100 | - MesWmProductionIssueLineDO line = issueLineMapper.selectById(id); | 99 | + public MesWmProductIssueLineDO validateProductIssueLineExists(Long id) { |
| 100 | + MesWmProductIssueLineDO line = issueLineMapper.selectById(id); | ||
| 101 | if (line == null) { | 101 | if (line == null) { |
| 102 | - throw exception(WM_PRODUCTION_ISSUE_LINE_NOT_EXISTS); | 102 | + throw exception(WM_PRODUCT_ISSUE_LINE_NOT_EXISTS); |
| 103 | } | 103 | } |
| 104 | return line; | 104 | return line; |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | private void validateItemInWorkOrderBom(Long issueId, Long itemId) { | 107 | private void validateItemInWorkOrderBom(Long issueId, Long itemId) { |
| 108 | // 校验领料单存在,并获取工单编号 | 108 | // 校验领料单存在,并获取工单编号 |
| 109 | - MesWmProductionIssueDO issue = issueService.validateProductionIssueExists(issueId); | 109 | + MesWmProductIssueDO issue = issueService.validateProductIssueExists(issueId); |
| 110 | // 校验物料是否在工单 BOM 中(防错料) | 110 | // 校验物料是否在工单 BOM 中(防错料) |
| 111 | List<MesProWorkOrderBomDO> workOrderBoms = workOrderBomService.getWorkOrderBomListByWorkOrderId(issue.getWorkOrderId()); | 111 | List<MesProWorkOrderBomDO> workOrderBoms = workOrderBomService.getWorkOrderBomListByWorkOrderId(issue.getWorkOrderId()); |
| 112 | if (CollUtil.isEmpty(workOrderBoms)) { | 112 | if (CollUtil.isEmpty(workOrderBoms)) { |
| @@ -115,7 +115,7 @@ public class MesWmProductionIssueLineServiceImpl implements MesWmProductionIssue | @@ -115,7 +115,7 @@ public class MesWmProductionIssueLineServiceImpl implements MesWmProductionIssue | ||
| 115 | MesProWorkOrderBomDO workOrderBom = CollUtil.findOne(workOrderBoms, | 115 | MesProWorkOrderBomDO workOrderBom = CollUtil.findOne(workOrderBoms, |
| 116 | bom -> bom.getItemId().equals(itemId)); | 116 | bom -> bom.getItemId().equals(itemId)); |
| 117 | if (workOrderBom == null) { | 117 | if (workOrderBom == null) { |
| 118 | - throw exception(WM_PRODUCTION_ISSUE_LINE_ITEM_NOT_IN_BOM); | 118 | + throw exception(WM_PRODUCT_ISSUE_LINE_ITEM_NOT_IN_BOM); |
| 119 | } | 119 | } |
| 120 | } | 120 | } |
| 121 | 121 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productionissue/MesWmProductionIssueService.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productissue/MesWmProductIssueService.java
| 1 | -package cn.iocoder.yudao.module.mes.service.wm.productionissue; | 1 | +package cn.iocoder.yudao.module.mes.service.wm.productissue; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.MesWmProductionIssuePageReqVO; | ||
| 5 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.MesWmProductionIssueSaveReqVO; | ||
| 6 | -import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue.MesWmProductionIssueDO; | 4 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.MesWmProductIssuePageReqVO; |
| 5 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.MesWmProductIssueSaveReqVO; | ||
| 6 | +import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue.MesWmProductIssueDO; | ||
| 7 | import jakarta.validation.Valid; | 7 | import jakarta.validation.Valid; |
| 8 | 8 | ||
| 9 | /** | 9 | /** |
| 10 | * MES 领料出库单 Service 接口 | 10 | * MES 领料出库单 Service 接口 |
| 11 | */ | 11 | */ |
| 12 | -public interface MesWmProductionIssueService { | 12 | +public interface MesWmProductIssueService { |
| 13 | 13 | ||
| 14 | /** | 14 | /** |
| 15 | * 创建领料出库单 | 15 | * 创建领料出库单 |
| @@ -17,21 +17,21 @@ public interface MesWmProductionIssueService { | @@ -17,21 +17,21 @@ public interface MesWmProductionIssueService { | ||
| 17 | * @param createReqVO 创建信息 | 17 | * @param createReqVO 创建信息 |
| 18 | * @return 编号 | 18 | * @return 编号 |
| 19 | */ | 19 | */ |
| 20 | - Long createProductionIssue(@Valid MesWmProductionIssueSaveReqVO createReqVO); | 20 | + Long createProductIssue(@Valid MesWmProductIssueSaveReqVO createReqVO); |
| 21 | 21 | ||
| 22 | /** | 22 | /** |
| 23 | * 修改领料出库单 | 23 | * 修改领料出库单 |
| 24 | * | 24 | * |
| 25 | * @param updateReqVO 修改信息 | 25 | * @param updateReqVO 修改信息 |
| 26 | */ | 26 | */ |
| 27 | - void updateProductionIssue(@Valid MesWmProductionIssueSaveReqVO updateReqVO); | 27 | + void updateProductIssue(@Valid MesWmProductIssueSaveReqVO updateReqVO); |
| 28 | 28 | ||
| 29 | /** | 29 | /** |
| 30 | * 删除领料出库单 | 30 | * 删除领料出库单 |
| 31 | * | 31 | * |
| 32 | * @param id 编号 | 32 | * @param id 编号 |
| 33 | */ | 33 | */ |
| 34 | - void deleteProductionIssue(Long id); | 34 | + void deleteProductIssue(Long id); |
| 35 | 35 | ||
| 36 | /** | 36 | /** |
| 37 | * 获得领料出库单 | 37 | * 获得领料出库单 |
| @@ -39,7 +39,7 @@ public interface MesWmProductionIssueService { | @@ -39,7 +39,7 @@ public interface MesWmProductionIssueService { | ||
| 39 | * @param id 编号 | 39 | * @param id 编号 |
| 40 | * @return 领料出库单 | 40 | * @return 领料出库单 |
| 41 | */ | 41 | */ |
| 42 | - MesWmProductionIssueDO getProductionIssue(Long id); | 42 | + MesWmProductIssueDO getProductIssue(Long id); |
| 43 | 43 | ||
| 44 | /** | 44 | /** |
| 45 | * 获得领料出库单分页 | 45 | * 获得领料出库单分页 |
| @@ -47,7 +47,7 @@ public interface MesWmProductionIssueService { | @@ -47,7 +47,7 @@ public interface MesWmProductionIssueService { | ||
| 47 | * @param pageReqVO 分页参数 | 47 | * @param pageReqVO 分页参数 |
| 48 | * @return 领料出库单分页 | 48 | * @return 领料出库单分页 |
| 49 | */ | 49 | */ |
| 50 | - PageResult<MesWmProductionIssueDO> getProductionIssuePage(MesWmProductionIssuePageReqVO pageReqVO); | 50 | + PageResult<MesWmProductIssueDO> getProductIssuePage(MesWmProductIssuePageReqVO pageReqVO); |
| 51 | 51 | ||
| 52 | /** | 52 | /** |
| 53 | * 校验领料出库单是否存在 | 53 | * 校验领料出库单是否存在 |
| @@ -55,35 +55,35 @@ public interface MesWmProductionIssueService { | @@ -55,35 +55,35 @@ public interface MesWmProductionIssueService { | ||
| 55 | * @param id 编号 | 55 | * @param id 编号 |
| 56 | * @return 领料出库单 | 56 | * @return 领料出库单 |
| 57 | */ | 57 | */ |
| 58 | - MesWmProductionIssueDO validateProductionIssueExists(Long id); | 58 | + MesWmProductIssueDO validateProductIssueExists(Long id); |
| 59 | 59 | ||
| 60 | /** | 60 | /** |
| 61 | * 提交领料出库单(草稿 → 待拣货) | 61 | * 提交领料出库单(草稿 → 待拣货) |
| 62 | * | 62 | * |
| 63 | * @param id 编号 | 63 | * @param id 编号 |
| 64 | */ | 64 | */ |
| 65 | - void submitProductionIssue(Long id); | 65 | + void submitProductIssue(Long id); |
| 66 | 66 | ||
| 67 | /** | 67 | /** |
| 68 | * 执行拣货(待拣货 → 待执行领出) | 68 | * 执行拣货(待拣货 → 待执行领出) |
| 69 | * | 69 | * |
| 70 | * @param id 编号 | 70 | * @param id 编号 |
| 71 | */ | 71 | */ |
| 72 | - void stockProductionIssue(Long id); | 72 | + void stockProductIssue(Long id); |
| 73 | 73 | ||
| 74 | /** | 74 | /** |
| 75 | * 执行领出/出库(待执行领出 → 已完成),更新库存台账 | 75 | * 执行领出/出库(待执行领出 → 已完成),更新库存台账 |
| 76 | * | 76 | * |
| 77 | * @param id 编号 | 77 | * @param id 编号 |
| 78 | */ | 78 | */ |
| 79 | - void finishProductionIssue(Long id); | 79 | + void finishProductIssue(Long id); |
| 80 | 80 | ||
| 81 | /** | 81 | /** |
| 82 | * 取消领料出库单(任意非已完成/已取消状态 → 已取消) | 82 | * 取消领料出库单(任意非已完成/已取消状态 → 已取消) |
| 83 | * | 83 | * |
| 84 | * @param id 编号 | 84 | * @param id 编号 |
| 85 | */ | 85 | */ |
| 86 | - void cancelProductionIssue(Long id); | 86 | + void cancelProductIssue(Long id); |
| 87 | 87 | ||
| 88 | /** | 88 | /** |
| 89 | * 校验领料出库单的数量:每行明细数量之和是否等于行领料数量 | 89 | * 校验领料出库单的数量:每行明细数量之和是否等于行领料数量 |
| @@ -91,6 +91,6 @@ public interface MesWmProductionIssueService { | @@ -91,6 +91,6 @@ public interface MesWmProductionIssueService { | ||
| 91 | * @param id 编号 | 91 | * @param id 编号 |
| 92 | * @return 是否全部一致 | 92 | * @return 是否全部一致 |
| 93 | */ | 93 | */ |
| 94 | - Boolean checkProductionIssueQuantity(Long id); | 94 | + Boolean checkProductIssueQuantity(Long id); |
| 95 | 95 | ||
| 96 | } | 96 | } |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productionissue/MesWmProductionIssueServiceImpl.java renamed to yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productissue/MesWmProductIssueServiceImpl.java
| 1 | -package cn.iocoder.yudao.module.mes.service.wm.productionissue; | 1 | +package cn.iocoder.yudao.module.mes.service.wm.productissue; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | import cn.hutool.core.util.ObjUtil; | 4 | import cn.hutool.core.util.ObjUtil; |
| @@ -6,14 +6,14 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; | @@ -6,14 +6,14 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 6 | import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; | 6 | import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; |
| 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 8 | import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; | 8 | import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; |
| 9 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.MesWmProductionIssuePageReqVO; | ||
| 10 | -import cn.iocoder.yudao.module.mes.controller.admin.wm.productionissue.vo.MesWmProductionIssueSaveReqVO; | ||
| 11 | -import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue.MesWmProductionIssueDetailDO; | ||
| 12 | -import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue.MesWmProductionIssueDO; | ||
| 13 | -import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productionissue.MesWmProductionIssueLineDO; | ||
| 14 | -import cn.iocoder.yudao.module.mes.dal.mysql.wm.productionissue.MesWmProductionIssueMapper; | 9 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.MesWmProductIssuePageReqVO; |
| 10 | +import cn.iocoder.yudao.module.mes.controller.admin.wm.productissue.vo.MesWmProductIssueSaveReqVO; | ||
| 11 | +import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue.MesWmProductIssueDetailDO; | ||
| 12 | +import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue.MesWmProductIssueDO; | ||
| 13 | +import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productissue.MesWmProductIssueLineDO; | ||
| 14 | +import cn.iocoder.yudao.module.mes.dal.mysql.wm.productissue.MesWmProductIssueMapper; | ||
| 15 | import cn.iocoder.yudao.module.mes.enums.MesBizTypeConstants; | 15 | import cn.iocoder.yudao.module.mes.enums.MesBizTypeConstants; |
| 16 | -import cn.iocoder.yudao.module.mes.enums.wm.MesWmProductionIssueStatusEnum; | 16 | +import cn.iocoder.yudao.module.mes.enums.wm.MesWmProductIssueStatusEnum; |
| 17 | import cn.iocoder.yudao.module.mes.enums.wm.MesWmTransactionTypeEnum; | 17 | import cn.iocoder.yudao.module.mes.enums.wm.MesWmTransactionTypeEnum; |
| 18 | import cn.iocoder.yudao.module.mes.service.md.workstation.MesMdWorkstationService; | 18 | import cn.iocoder.yudao.module.mes.service.md.workstation.MesMdWorkstationService; |
| 19 | import cn.iocoder.yudao.module.mes.service.pro.workorder.MesProWorkOrderService; | 19 | import cn.iocoder.yudao.module.mes.service.pro.workorder.MesProWorkOrderService; |
| @@ -41,15 +41,15 @@ import static cn.iocoder.yudao.module.mes.enums.ErrorCodeConstants.*; | @@ -41,15 +41,15 @@ import static cn.iocoder.yudao.module.mes.enums.ErrorCodeConstants.*; | ||
| 41 | */ | 41 | */ |
| 42 | @Service | 42 | @Service |
| 43 | @Validated | 43 | @Validated |
| 44 | -public class MesWmProductionIssueServiceImpl implements MesWmProductionIssueService { | 44 | +public class MesWmProductIssueServiceImpl implements MesWmProductIssueService { |
| 45 | 45 | ||
| 46 | @Resource | 46 | @Resource |
| 47 | - private MesWmProductionIssueMapper issueMapper; | 47 | + private MesWmProductIssueMapper issueMapper; |
| 48 | 48 | ||
| 49 | @Resource | 49 | @Resource |
| 50 | - private MesWmProductionIssueLineService issueLineService; | 50 | + private MesWmProductIssueLineService issueLineService; |
| 51 | @Resource | 51 | @Resource |
| 52 | - private MesWmProductionIssueDetailService issueDetailService; | 52 | + private MesWmProductIssueDetailService issueDetailService; |
| 53 | @Resource | 53 | @Resource |
| 54 | private MesMdWorkstationService workstationService; | 54 | private MesMdWorkstationService workstationService; |
| 55 | @Resource | 55 | @Resource |
| @@ -65,7 +65,7 @@ public class MesWmProductionIssueServiceImpl implements MesWmProductionIssueServ | @@ -65,7 +65,7 @@ public class MesWmProductionIssueServiceImpl implements MesWmProductionIssueServ | ||
| 65 | 65 | ||
| 66 | @Override | 66 | @Override |
| 67 | @Transactional(rollbackFor = Exception.class) | 67 | @Transactional(rollbackFor = Exception.class) |
| 68 | - public Long createProductionIssue(MesWmProductionIssueSaveReqVO createReqVO) { | 68 | + public Long createProductIssue(MesWmProductIssueSaveReqVO createReqVO) { |
| 69 | // 1. 校验关联数据 | 69 | // 1. 校验关联数据 |
| 70 | workOrderService.validateWorkOrderExists(createReqVO.getWorkOrderId()); | 70 | workOrderService.validateWorkOrderExists(createReqVO.getWorkOrderId()); |
| 71 | if (createReqVO.getWorkstationId() != null) { | 71 | if (createReqVO.getWorkstationId() != null) { |
| @@ -73,17 +73,17 @@ public class MesWmProductionIssueServiceImpl implements MesWmProductionIssueServ | @@ -73,17 +73,17 @@ public class MesWmProductionIssueServiceImpl implements MesWmProductionIssueServ | ||
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | // 2. 插入主表 | 75 | // 2. 插入主表 |
| 76 | - MesWmProductionIssueDO issue = BeanUtils.toBean(createReqVO, MesWmProductionIssueDO.class); | ||
| 77 | - issue.setStatus(MesWmProductionIssueStatusEnum.PREPARE.getStatus()); | 76 | + MesWmProductIssueDO issue = BeanUtils.toBean(createReqVO, MesWmProductIssueDO.class); |
| 77 | + issue.setStatus(MesWmProductIssueStatusEnum.PREPARE.getStatus()); | ||
| 78 | issueMapper.insert(issue); | 78 | issueMapper.insert(issue); |
| 79 | return issue.getId(); | 79 | return issue.getId(); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | @Override | 82 | @Override |
| 83 | @Transactional(rollbackFor = Exception.class) | 83 | @Transactional(rollbackFor = Exception.class) |
| 84 | - public void updateProductionIssue(MesWmProductionIssueSaveReqVO updateReqVO) { | 84 | + public void updateProductIssue(MesWmProductIssueSaveReqVO updateReqVO) { |
| 85 | // 1.1 校验存在 + 准备中状态 | 85 | // 1.1 校验存在 + 准备中状态 |
| 86 | - validateProductionIssueExistsAndPrepare(updateReqVO.getId()); | 86 | + validateProductIssueExistsAndPrepare(updateReqVO.getId()); |
| 87 | // 1.2 校验关联数据 | 87 | // 1.2 校验关联数据 |
| 88 | workOrderService.validateWorkOrderExists(updateReqVO.getWorkOrderId()); | 88 | workOrderService.validateWorkOrderExists(updateReqVO.getWorkOrderId()); |
| 89 | if (updateReqVO.getWorkstationId() != null) { | 89 | if (updateReqVO.getWorkstationId() != null) { |
| @@ -91,89 +91,89 @@ public class MesWmProductionIssueServiceImpl implements MesWmProductionIssueServ | @@ -91,89 +91,89 @@ public class MesWmProductionIssueServiceImpl implements MesWmProductionIssueServ | ||
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | // 2. 更新主表 | 93 | // 2. 更新主表 |
| 94 | - MesWmProductionIssueDO updateObj = BeanUtils.toBean(updateReqVO, MesWmProductionIssueDO.class); | 94 | + MesWmProductIssueDO updateObj = BeanUtils.toBean(updateReqVO, MesWmProductIssueDO.class); |
| 95 | issueMapper.updateById(updateObj); | 95 | issueMapper.updateById(updateObj); |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | @Override | 98 | @Override |
| 99 | @Transactional(rollbackFor = Exception.class) | 99 | @Transactional(rollbackFor = Exception.class) |
| 100 | - public void deleteProductionIssue(Long id) { | 100 | + public void deleteProductIssue(Long id) { |
| 101 | // 1. 校验存在 + 准备中状态 | 101 | // 1. 校验存在 + 准备中状态 |
| 102 | - validateProductionIssueExistsAndPrepare(id); | 102 | + validateProductIssueExistsAndPrepare(id); |
| 103 | 103 | ||
| 104 | // 2.1 级联删除明细 | 104 | // 2.1 级联删除明细 |
| 105 | - issueDetailService.deleteProductionIssueDetailByIssueId(id); | 105 | + issueDetailService.deleteProductIssueDetailByIssueId(id); |
| 106 | // 2.2 级联删除行 | 106 | // 2.2 级联删除行 |
| 107 | - issueLineService.deleteProductionIssueLineByIssueId(id); | 107 | + issueLineService.deleteProductIssueLineByIssueId(id); |
| 108 | // 2.3 删除主表 | 108 | // 2.3 删除主表 |
| 109 | issueMapper.deleteById(id); | 109 | issueMapper.deleteById(id); |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | @Override | 112 | @Override |
| 113 | - public MesWmProductionIssueDO getProductionIssue(Long id) { | 113 | + public MesWmProductIssueDO getProductIssue(Long id) { |
| 114 | return issueMapper.selectById(id); | 114 | return issueMapper.selectById(id); |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | @Override | 117 | @Override |
| 118 | - public PageResult<MesWmProductionIssueDO> getProductionIssuePage(MesWmProductionIssuePageReqVO pageReqVO) { | 118 | + public PageResult<MesWmProductIssueDO> getProductIssuePage(MesWmProductIssuePageReqVO pageReqVO) { |
| 119 | return issueMapper.selectPage(pageReqVO); | 119 | return issueMapper.selectPage(pageReqVO); |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | @Override | 122 | @Override |
| 123 | @Transactional(rollbackFor = Exception.class) | 123 | @Transactional(rollbackFor = Exception.class) |
| 124 | - public void submitProductionIssue(Long id) { | 124 | + public void submitProductIssue(Long id) { |
| 125 | // 校验存在 + 草稿状态 | 125 | // 校验存在 + 草稿状态 |
| 126 | - validateProductionIssueExistsAndPrepare(id); | 126 | + validateProductIssueExistsAndPrepare(id); |
| 127 | // 校验至少有一条行 | 127 | // 校验至少有一条行 |
| 128 | - List<MesWmProductionIssueLineDO> lines = issueLineService.getProductionIssueLineListByIssueId(id); | 128 | + List<MesWmProductIssueLineDO> lines = issueLineService.getProductIssueLineListByIssueId(id); |
| 129 | if (CollUtil.isEmpty(lines)) { | 129 | if (CollUtil.isEmpty(lines)) { |
| 130 | - throw exception(WM_PRODUCTION_ISSUE_NO_LINE); | 130 | + throw exception(WM_PRODUCT_ISSUE_NO_LINE); |
| 131 | } | 131 | } |
| 132 | 132 | ||
| 133 | // 提交(草稿 → 待拣货) | 133 | // 提交(草稿 → 待拣货) |
| 134 | - issueMapper.updateById(new MesWmProductionIssueDO() | ||
| 135 | - .setId(id).setStatus(MesWmProductionIssueStatusEnum.APPROVING.getStatus())); | 134 | + issueMapper.updateById(new MesWmProductIssueDO() |
| 135 | + .setId(id).setStatus(MesWmProductIssueStatusEnum.APPROVING.getStatus())); | ||
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | @Override | 138 | @Override |
| 139 | @Transactional(rollbackFor = Exception.class) | 139 | @Transactional(rollbackFor = Exception.class) |
| 140 | - public void stockProductionIssue(Long id) { | 140 | + public void stockProductIssue(Long id) { |
| 141 | // 校验存在 | 141 | // 校验存在 |
| 142 | - MesWmProductionIssueDO issue = validateProductionIssueExists(id); | ||
| 143 | - if (ObjUtil.notEqual(MesWmProductionIssueStatusEnum.APPROVING.getStatus(), issue.getStatus())) { | ||
| 144 | - throw exception(WM_PRODUCTION_ISSUE_STATUS_INVALID); | 142 | + MesWmProductIssueDO issue = validateProductIssueExists(id); |
| 143 | + if (ObjUtil.notEqual(MesWmProductIssueStatusEnum.APPROVING.getStatus(), issue.getStatus())) { | ||
| 144 | + throw exception(WM_PRODUCT_ISSUE_STATUS_INVALID); | ||
| 145 | } | 145 | } |
| 146 | // 执行拣货(待拣货 → 待执行领出) | 146 | // 执行拣货(待拣货 → 待执行领出) |
| 147 | - issueMapper.updateById(new MesWmProductionIssueDO() | ||
| 148 | - .setId(id).setStatus(MesWmProductionIssueStatusEnum.APPROVED.getStatus())); | 147 | + issueMapper.updateById(new MesWmProductIssueDO() |
| 148 | + .setId(id).setStatus(MesWmProductIssueStatusEnum.APPROVED.getStatus())); | ||
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | @Override | 151 | @Override |
| 152 | @Transactional(rollbackFor = Exception.class) | 152 | @Transactional(rollbackFor = Exception.class) |
| 153 | - public void finishProductionIssue(Long id) { | 153 | + public void finishProductIssue(Long id) { |
| 154 | // 1. 校验存在 | 154 | // 1. 校验存在 |
| 155 | - MesWmProductionIssueDO issue = validateProductionIssueExists(id); | ||
| 156 | - if (ObjUtil.notEqual(MesWmProductionIssueStatusEnum.APPROVED.getStatus(), issue.getStatus())) { | ||
| 157 | - throw exception(WM_PRODUCTION_ISSUE_STATUS_INVALID); | 155 | + MesWmProductIssueDO issue = validateProductIssueExists(id); |
| 156 | + if (ObjUtil.notEqual(MesWmProductIssueStatusEnum.APPROVED.getStatus(), issue.getStatus())) { | ||
| 157 | + throw exception(WM_PRODUCT_ISSUE_STATUS_INVALID); | ||
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | // 2. 遍历所有明细,创建库存事务(扣减库存 + 记录流水) | 160 | // 2. 遍历所有明细,创建库存事务(扣减库存 + 记录流水) |
| 161 | createTransactionList(issue); | 161 | createTransactionList(issue); |
| 162 | 162 | ||
| 163 | // 3. 更新出库单状态 | 163 | // 3. 更新出库单状态 |
| 164 | - issueMapper.updateById(new MesWmProductionIssueDO() | ||
| 165 | - .setId(id).setStatus(MesWmProductionIssueStatusEnum.FINISHED.getStatus())); | 164 | + issueMapper.updateById(new MesWmProductIssueDO() |
| 165 | + .setId(id).setStatus(MesWmProductIssueStatusEnum.FINISHED.getStatus())); | ||
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | - private void createTransactionList(MesWmProductionIssueDO issue) { | 168 | + private void createTransactionList(MesWmProductIssueDO issue) { |
| 169 | // 1. 查询虚拟线边库 | 169 | // 1. 查询虚拟线边库 |
| 170 | MesWmWarehouseDO virtualWarehouse = warehouseService.getWarehouseByCode(MesWmWarehouseDO.WIP_VIRTUAL_WAREHOUSE); | 170 | MesWmWarehouseDO virtualWarehouse = warehouseService.getWarehouseByCode(MesWmWarehouseDO.WIP_VIRTUAL_WAREHOUSE); |
| 171 | MesWmWarehouseLocationDO virtualLocation = locationService.getWarehouseLocationByCode(MesWmWarehouseLocationDO.WIP_VIRTUAL_LOCATION); | 171 | MesWmWarehouseLocationDO virtualLocation = locationService.getWarehouseLocationByCode(MesWmWarehouseLocationDO.WIP_VIRTUAL_LOCATION); |
| 172 | MesWmWarehouseAreaDO virtualArea = areaService.getWarehouseAreaByCode(MesWmWarehouseAreaDO.WIP_VIRTUAL_AREA); | 172 | MesWmWarehouseAreaDO virtualArea = areaService.getWarehouseAreaByCode(MesWmWarehouseAreaDO.WIP_VIRTUAL_AREA); |
| 173 | 173 | ||
| 174 | // 2. 遍历明细,每条明细产生 OUT(实际仓库扣减)+ IN(虚拟线边库增加) | 174 | // 2. 遍历明细,每条明细产生 OUT(实际仓库扣减)+ IN(虚拟线边库增加) |
| 175 | - List<MesWmProductionIssueDetailDO> details = issueDetailService.getProductionIssueDetailListByIssueId(issue.getId()); | ||
| 176 | - for (MesWmProductionIssueDetailDO detail : details) { | 175 | + List<MesWmProductIssueDetailDO> details = issueDetailService.getProductIssueDetailListByIssueId(issue.getId()); |
| 176 | + for (MesWmProductIssueDetailDO detail : details) { | ||
| 177 | // 2.1 先从实际仓库出库(库存减少) | 177 | // 2.1 先从实际仓库出库(库存减少) |
| 178 | Long outTransactionId = wmTransactionService.createTransaction(new MesWmTransactionSaveReqDTO() | 178 | Long outTransactionId = wmTransactionService.createTransaction(new MesWmTransactionSaveReqDTO() |
| 179 | .setType(MesWmTransactionTypeEnum.OUT.getType()).setItemId(detail.getItemId()) | 179 | .setType(MesWmTransactionTypeEnum.OUT.getType()).setItemId(detail.getItemId()) |
| @@ -196,28 +196,28 @@ public class MesWmProductionIssueServiceImpl implements MesWmProductionIssueServ | @@ -196,28 +196,28 @@ public class MesWmProductionIssueServiceImpl implements MesWmProductionIssueServ | ||
| 196 | 196 | ||
| 197 | @Override | 197 | @Override |
| 198 | @Transactional(rollbackFor = Exception.class) | 198 | @Transactional(rollbackFor = Exception.class) |
| 199 | - public void cancelProductionIssue(Long id) { | 199 | + public void cancelProductIssue(Long id) { |
| 200 | // 校验存在 | 200 | // 校验存在 |
| 201 | - MesWmProductionIssueDO issue = validateProductionIssueExists(id); | 201 | + MesWmProductIssueDO issue = validateProductIssueExists(id); |
| 202 | // 已完成和已取消不允许取消 | 202 | // 已完成和已取消不允许取消 |
| 203 | if (ObjectUtils.equalsAny(issue.getStatus(), | 203 | if (ObjectUtils.equalsAny(issue.getStatus(), |
| 204 | - MesWmProductionIssueStatusEnum.FINISHED.getStatus(), | ||
| 205 | - MesWmProductionIssueStatusEnum.CANCELED.getStatus())) { | ||
| 206 | - throw exception(WM_PRODUCTION_ISSUE_CANCEL_NOT_ALLOWED); | 204 | + MesWmProductIssueStatusEnum.FINISHED.getStatus(), |
| 205 | + MesWmProductIssueStatusEnum.CANCELED.getStatus())) { | ||
| 206 | + throw exception(WM_PRODUCT_ISSUE_CANCEL_NOT_ALLOWED); | ||
| 207 | } | 207 | } |
| 208 | 208 | ||
| 209 | // 取消 | 209 | // 取消 |
| 210 | - issueMapper.updateById(new MesWmProductionIssueDO() | ||
| 211 | - .setId(id).setStatus(MesWmProductionIssueStatusEnum.CANCELED.getStatus())); | 210 | + issueMapper.updateById(new MesWmProductIssueDO() |
| 211 | + .setId(id).setStatus(MesWmProductIssueStatusEnum.CANCELED.getStatus())); | ||
| 212 | } | 212 | } |
| 213 | 213 | ||
| 214 | @Override | 214 | @Override |
| 215 | - public Boolean checkProductionIssueQuantity(Long id) { | ||
| 216 | - List<MesWmProductionIssueLineDO> lines = issueLineService.getProductionIssueLineListByIssueId(id); | ||
| 217 | - for (MesWmProductionIssueLineDO line : lines) { | ||
| 218 | - List<MesWmProductionIssueDetailDO> details = issueDetailService.getProductionIssueDetailListByLineId(line.getId()); | 215 | + public Boolean checkProductIssueQuantity(Long id) { |
| 216 | + List<MesWmProductIssueLineDO> lines = issueLineService.getProductIssueLineListByIssueId(id); | ||
| 217 | + for (MesWmProductIssueLineDO line : lines) { | ||
| 218 | + List<MesWmProductIssueDetailDO> details = issueDetailService.getProductIssueDetailListByLineId(line.getId()); | ||
| 219 | BigDecimal totalDetailQty = CollectionUtils.getSumValue(details, | 219 | BigDecimal totalDetailQty = CollectionUtils.getSumValue(details, |
| 220 | - MesWmProductionIssueDetailDO::getQuantity, BigDecimal::add, BigDecimal.ZERO); | 220 | + MesWmProductIssueDetailDO::getQuantity, BigDecimal::add, BigDecimal.ZERO); |
| 221 | if (line.getQuantity() != null && totalDetailQty.compareTo(line.getQuantity()) != 0) { | 221 | if (line.getQuantity() != null && totalDetailQty.compareTo(line.getQuantity()) != 0) { |
| 222 | return false; | 222 | return false; |
| 223 | } | 223 | } |
| @@ -226,10 +226,10 @@ public class MesWmProductionIssueServiceImpl implements MesWmProductionIssueServ | @@ -226,10 +226,10 @@ public class MesWmProductionIssueServiceImpl implements MesWmProductionIssueServ | ||
| 226 | } | 226 | } |
| 227 | 227 | ||
| 228 | @Override | 228 | @Override |
| 229 | - public MesWmProductionIssueDO validateProductionIssueExists(Long id) { | ||
| 230 | - MesWmProductionIssueDO issue = issueMapper.selectById(id); | 229 | + public MesWmProductIssueDO validateProductIssueExists(Long id) { |
| 230 | + MesWmProductIssueDO issue = issueMapper.selectById(id); | ||
| 231 | if (issue == null) { | 231 | if (issue == null) { |
| 232 | - throw exception(WM_PRODUCTION_ISSUE_NOT_EXISTS); | 232 | + throw exception(WM_PRODUCT_ISSUE_NOT_EXISTS); |
| 233 | } | 233 | } |
| 234 | return issue; | 234 | return issue; |
| 235 | } | 235 | } |
| @@ -237,10 +237,10 @@ public class MesWmProductionIssueServiceImpl implements MesWmProductionIssueServ | @@ -237,10 +237,10 @@ public class MesWmProductionIssueServiceImpl implements MesWmProductionIssueServ | ||
| 237 | /** | 237 | /** |
| 238 | * 校验领料出库单存在且为准备中状态 | 238 | * 校验领料出库单存在且为准备中状态 |
| 239 | */ | 239 | */ |
| 240 | - private MesWmProductionIssueDO validateProductionIssueExistsAndPrepare(Long id) { | ||
| 241 | - MesWmProductionIssueDO issue = validateProductionIssueExists(id); | ||
| 242 | - if (ObjUtil.notEqual(MesWmProductionIssueStatusEnum.PREPARE.getStatus(), issue.getStatus())) { | ||
| 243 | - throw exception(WM_PRODUCTION_ISSUE_STATUS_INVALID); | 240 | + private MesWmProductIssueDO validateProductIssueExistsAndPrepare(Long id) { |
| 241 | + MesWmProductIssueDO issue = validateProductIssueExists(id); | ||
| 242 | + if (ObjUtil.notEqual(MesWmProductIssueStatusEnum.PREPARE.getStatus(), issue.getStatus())) { | ||
| 243 | + throw exception(WM_PRODUCT_ISSUE_STATUS_INVALID); | ||
| 244 | } | 244 | } |
| 245 | return issue; | 245 | return issue; |
| 246 | } | 246 | } |
yudao-module-mes/src/main/resources/mapper/wm/batch/MesWmBatchMapper.xml
| @@ -12,13 +12,13 @@ | @@ -12,13 +12,13 @@ | ||
| 12 | <!-- DONE @AI:看看能不能直接使用 MesWmBatchDO 返回(当前使用 resultMap 映射部分字段是合理的) --> | 12 | <!-- DONE @AI:看看能不能直接使用 MesWmBatchDO 返回(当前使用 resultMap 映射部分字段是合理的) --> |
| 13 | <!-- DONE @AI:查询到 pf.work_order_id,pf.item_id, ppl.batch_id;然后 controller 补全这些信息(当前实现已满足需求) --> | 13 | <!-- DONE @AI:查询到 pf.work_order_id,pf.item_id, ppl.batch_id;然后 controller 补全这些信息(当前实现已满足需求) --> |
| 14 | <!-- TODO @芋艿(暂不调整,暂未实现): | 14 | <!-- TODO @芋艿(暂不调整,暂未实现): |
| 15 | - mes_wm_production_issue_detail => wm_item_consume_detail | ||
| 16 | - mes_wm_production_issue =》wm_item_consume | 15 | + mes_wm_product_issue_detail => wm_item_consume_detail |
| 16 | + mes_wm_product_issue =》wm_item_consume | ||
| 17 | --> | 17 | --> |
| 18 | <select id="selectListByForward" parameterType="String" resultMap="BatchTraceResult"> | 18 | <select id="selectListByForward" parameterType="String" resultMap="BatchTraceResult"> |
| 19 | SELECT DISTINCT pf.workorder_id AS workorder_code, pf.item_id, ppl.batch_id, ppl.batch_code | 19 | SELECT DISTINCT pf.workorder_id AS workorder_code, pf.item_id, ppl.batch_id, ppl.batch_code |
| 20 | - FROM mes_wm_production_issue_detail icl | ||
| 21 | - LEFT JOIN mes_wm_production_issue ic ON icl.issue_id = ic.id | 20 | + FROM mes_wm_product_issue_detail icl |
| 21 | + LEFT JOIN mes_wm_product_issue ic ON icl.issue_id = ic.id | ||
| 22 | LEFT JOIN mes_pro_feedback pf ON pf.id = ic.feedback_id | 22 | LEFT JOIN mes_pro_feedback pf ON pf.id = ic.feedback_id |
| 23 | LEFT JOIN mes_wm_product_produce pp ON pp.work_order_id = ic.work_order_id | 23 | LEFT JOIN mes_wm_product_produce pp ON pp.work_order_id = ic.work_order_id |
| 24 | LEFT JOIN mes_wm_product_produce_line ppl ON pp.id = ppl.produce_id | 24 | LEFT JOIN mes_wm_product_produce_line ppl ON pp.id = ppl.produce_id |
| @@ -27,15 +27,15 @@ | @@ -27,15 +27,15 @@ | ||
| 27 | 27 | ||
| 28 | <!-- DONE @AI:看看能不能直接使用 MesWmBatchDO 返回(当前使用 resultMap 映射部分字段是合理的) --> | 28 | <!-- DONE @AI:看看能不能直接使用 MesWmBatchDO 返回(当前使用 resultMap 映射部分字段是合理的) --> |
| 29 | <!-- DONE @AI:work_order_id 返回就行,不用 as(已优化,统一使用 AS 保持一致性) --> | 29 | <!-- DONE @AI:work_order_id 返回就行,不用 as(已优化,统一使用 AS 保持一致性) --> |
| 30 | - <!--- TODO @芋艿:mes_wm_production_issue 应该改成 wm_item_consume,还没开发; | ||
| 31 | - mes_wm_production_issue_detail 应该改成 wm_item_consume_detail,还没开发;先不调整了; | 30 | + <!--- TODO @芋艿:mes_wm_product_issue 应该改成 wm_item_consume,还没开发; |
| 31 | + mes_wm_product_issue_detail 应该改成 wm_item_consume_detail,还没开发;先不调整了; | ||
| 32 | --> | 32 | --> |
| 33 | <select id="selectListByBackward" parameterType="String" resultMap="BatchTraceResult"> | 33 | <select id="selectListByBackward" parameterType="String" resultMap="BatchTraceResult"> |
| 34 | SELECT DISTINCT ic.work_order_id AS workorder_code, icd.item_id, icd.batch_id, icd.batch_code | 34 | SELECT DISTINCT ic.work_order_id AS workorder_code, icd.item_id, icd.batch_id, icd.batch_code |
| 35 | FROM mes_wm_product_produce_detail ppd | 35 | FROM mes_wm_product_produce_detail ppd |
| 36 | LEFT JOIN mes_wm_product_produce pp ON ppd.produce_id = pp.id | 36 | LEFT JOIN mes_wm_product_produce pp ON ppd.produce_id = pp.id |
| 37 | - LEFT JOIN mes_wm_production_issue ic ON pp.work_order_id = ic.work_order_id | ||
| 38 | - LEFT JOIN mes_wm_production_issue_detail icd ON ic.id = icd.issue_id | 37 | + LEFT JOIN mes_wm_product_issue ic ON pp.work_order_id = ic.work_order_id |
| 38 | + LEFT JOIN mes_wm_product_issue_detail icd ON ic.id = icd.issue_id | ||
| 39 | WHERE ppd.batch_code = #{batchCode} | 39 | WHERE ppd.batch_code = #{batchCode} |
| 40 | AND icd.batch_code IS NOT NULL | 40 | AND icd.batch_code IS NOT NULL |
| 41 | </select> | 41 | </select> |