Commit 92a5a2bd79b8150d7882d29772690608f4aed311
1 parent
8431b443
✨ feat(mes): 添加报工审批功能,优化状态管理
新增报工审批功能,包括审批通过和驳回的逻辑,优化了状态枚举和表单交互,提升用户体验。
Showing
1 changed file
with
22 additions
and
16 deletions
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/enums/pro/MesProFeedbackStatusEnum.java
| 1 | package cn.iocoder.yudao.module.mes.enums.pro; | 1 | package cn.iocoder.yudao.module.mes.enums.pro; |
| 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.enums.MesOrderStatusConstants; | ||
| 5 | +import cn.iocoder.yudao.module.mes.service.pro.feedback.MesProFeedbackService; | ||
| 4 | import lombok.AllArgsConstructor; | 6 | import lombok.AllArgsConstructor; |
| 5 | import lombok.Getter; | 7 | import lombok.Getter; |
| 6 | 8 | ||
| @@ -9,27 +11,32 @@ import java.util.Arrays; | @@ -9,27 +11,32 @@ import java.util.Arrays; | ||
| 9 | /** | 11 | /** |
| 10 | * MES 生产报工状态枚举 | 12 | * MES 生产报工状态枚举 |
| 11 | * | 13 | * |
| 12 | - * 状态流转: | ||
| 13 | - * 1. 创建 → 草稿(PREPARE) | ||
| 14 | - * 2. 草稿 → 提交 → 审批中(APPROVING) | ||
| 15 | - * 3. 审批中 → 驳回 → 草稿(PREPARE) | ||
| 16 | - * 4. 审批中 → 执行 → 待检验(UNCHECK)或已完成(FINISHED),取决于工序 checkFlag | ||
| 17 | - * | ||
| 18 | * @author 芋道源码 | 14 | * @author 芋道源码 |
| 19 | */ | 15 | */ |
| 20 | @Getter | 16 | @Getter |
| 21 | @AllArgsConstructor | 17 | @AllArgsConstructor |
| 22 | public enum MesProFeedbackStatusEnum implements ArrayValuable<Integer> { | 18 | public enum MesProFeedbackStatusEnum implements ArrayValuable<Integer> { |
| 23 | 19 | ||
| 24 | - // TODO @AI:数据库的字典,需要迁移; | ||
| 25 | - | ||
| 26 | - // TODO @AI:对齐下 /Users/yunai/Java/yudao-all-in-one/ruoyi-vue-pro/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/enums/MesOrderStatusConstants.java | ||
| 27 | - | ||
| 28 | - // TODO @AI:整体注释,变量注释,对齐 /Users/yunai/Java/yudao-all-in-one/ruoyi-vue-pro/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/enums/pro/MesProTaskStatusEnum.java | ||
| 29 | - PREPARE(0, "草稿"), | ||
| 30 | - APPROVING(1, "审批中"), | ||
| 31 | - UNCHECK(2, "待检验"), | ||
| 32 | - FINISHED(3, "已完成"); | 20 | + /** |
| 21 | + * 草稿 | ||
| 22 | + * | ||
| 23 | + * 对应方法:{@link MesProFeedbackService#createFeedback} | ||
| 24 | + */ | ||
| 25 | + PREPARE(MesOrderStatusConstants.PREPARE, "草稿"), | ||
| 26 | + /** | ||
| 27 | + * 审批中 | ||
| 28 | + */ | ||
| 29 | + APPROVING(MesOrderStatusConstants.APPROVING, "审批中"), | ||
| 30 | + /** | ||
| 31 | + * 待检验(质检工序特有) | ||
| 32 | + */ | ||
| 33 | + UNCHECK(MesOrderStatusConstants.APPROVED, "待检验"), | ||
| 34 | + /** | ||
| 35 | + * 已完成 | ||
| 36 | + * | ||
| 37 | + * 对应方法:{@link MesProFeedbackService#approveFeedback} | ||
| 38 | + */ | ||
| 39 | + FINISHED(MesOrderStatusConstants.FINISHED, "已完成"); | ||
| 33 | 40 | ||
| 34 | public static final Integer[] ARRAYS = Arrays.stream(values()).map(MesProFeedbackStatusEnum::getStatus).toArray(Integer[]::new); | 41 | public static final Integer[] ARRAYS = Arrays.stream(values()).map(MesProFeedbackStatusEnum::getStatus).toArray(Integer[]::new); |
| 35 | 42 | ||
| @@ -48,4 +55,3 @@ public enum MesProFeedbackStatusEnum implements ArrayValuable<Integer> { | @@ -48,4 +55,3 @@ public enum MesProFeedbackStatusEnum implements ArrayValuable<Integer> { | ||
| 48 | } | 55 | } |
| 49 | 56 | ||
| 50 | } | 57 | } |
| 51 | - |