Commit e93ba841e4263b3b8ee87272bc676f5519d840a0
1 parent
e43dcf37
✨ feat(mes): 新增库存物资记录编号字段及相关逻辑
Showing
4 changed files
with
14 additions
and
1 deletions
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/salesnotice/vo/line/MesWmSalesNoticeLineRespVO.java
| @@ -19,6 +19,9 @@ public class MesWmSalesNoticeLineRespVO { | @@ -19,6 +19,9 @@ public class MesWmSalesNoticeLineRespVO { | ||
| 19 | @Schema(description = "物料编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 19 | @Schema(description = "物料编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 20 | private Long itemId; | 20 | private Long itemId; |
| 21 | 21 | ||
| 22 | + @Schema(description = "库存物资记录编号", example = "1") | ||
| 23 | + private Long materialStockId; | ||
| 24 | + | ||
| 22 | @Schema(description = "物料编码", example = "M001") | 25 | @Schema(description = "物料编码", example = "M001") |
| 23 | private String itemCode; | 26 | private String itemCode; |
| 24 | 27 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/salesnotice/vo/line/MesWmSalesNoticeLineSaveReqVO.java
| @@ -22,6 +22,9 @@ public class MesWmSalesNoticeLineSaveReqVO { | @@ -22,6 +22,9 @@ public class MesWmSalesNoticeLineSaveReqVO { | ||
| 22 | @NotNull(message = "物料编号不能为空") | 22 | @NotNull(message = "物料编号不能为空") |
| 23 | private Long itemId; | 23 | private Long itemId; |
| 24 | 24 | ||
| 25 | + @Schema(description = "库存物资记录编号", example = "1") | ||
| 26 | + private Long materialStockId; | ||
| 27 | + | ||
| 25 | @Schema(description = "批次编号", example = "1") | 28 | @Schema(description = "批次编号", example = "1") |
| 26 | private Long batchId; | 29 | private Long batchId; |
| 27 | 30 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/wm/salesnotice/MesWmSalesNoticeLineDO.java
| @@ -40,6 +40,12 @@ public class MesWmSalesNoticeLineDO extends BaseDO { | @@ -40,6 +40,12 @@ public class MesWmSalesNoticeLineDO extends BaseDO { | ||
| 40 | */ | 40 | */ |
| 41 | private Long itemId; | 41 | private Long itemId; |
| 42 | /** | 42 | /** |
| 43 | + * 库存物资记录编号 | ||
| 44 | + * | ||
| 45 | + * 关联 {@link cn.iocoder.yudao.module.mes.dal.dataobject.wm.materialstock.MesWmMaterialStockDO#getId()} | ||
| 46 | + */ | ||
| 47 | + private Long materialStockId; | ||
| 48 | + /** | ||
| 43 | * 批次编号 | 49 | * 批次编号 |
| 44 | */ | 50 | */ |
| 45 | private Long batchId; | 51 | private Long batchId; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/salesnotice/MesWmSalesNoticeLineServiceImpl.java
| @@ -17,6 +17,7 @@ import java.util.List; | @@ -17,6 +17,7 @@ import java.util.List; | ||
| 17 | 17 | ||
| 18 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | 18 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
| 19 | import static cn.iocoder.yudao.module.mes.enums.ErrorCodeConstants.*; | 19 | import static cn.iocoder.yudao.module.mes.enums.ErrorCodeConstants.*; |
| 20 | +import static cn.iocoder.yudao.module.mes.enums.wm.MesWmSalesNoticeStatusEnum.PREPARE; | ||
| 20 | 21 | ||
| 21 | /** | 22 | /** |
| 22 | * MES 发货通知单行 Service 实现类 | 23 | * MES 发货通知单行 Service 实现类 |
| @@ -102,7 +103,7 @@ public class MesWmSalesNoticeLineServiceImpl implements MesWmSalesNoticeLineServ | @@ -102,7 +103,7 @@ public class MesWmSalesNoticeLineServiceImpl implements MesWmSalesNoticeLineServ | ||
| 102 | if (notice == null) { | 103 | if (notice == null) { |
| 103 | throw exception(WM_SALES_NOTICE_NOT_EXISTS); | 104 | throw exception(WM_SALES_NOTICE_NOT_EXISTS); |
| 104 | } | 105 | } |
| 105 | - if (ObjUtil.notEqual(0, notice.getStatus())) { | 106 | + if (ObjUtil.notEqual(PREPARE.getStatus(), notice.getStatus())) { |
| 106 | throw exception(WM_SALES_NOTICE_STATUS_NOT_ALLOW_UPDATE); | 107 | throw exception(WM_SALES_NOTICE_STATUS_NOT_ALLOW_UPDATE); |
| 107 | } | 108 | } |
| 108 | } | 109 | } |