From 227eff61120aaca63e068035d745d86452e6499a Mon Sep 17 00:00:00 2001
From: hsy <1029150275@qq.com>
Date: 星期一, 17 八月 2026 09:35:12 +0800
Subject: [PATCH] feat(mes): 优化生产订单与排产任务列表显示,新增启停工及校验逻辑 1. 生产订单列表展示优化 (WorkOrder) - 新增「生产状态」列,全局注册 `ORDER_PRODUCTION_STATUS` 常量并绑定系统动态字典。 - 彻底重构「工序生产进度」单元格显示:弃用臃肿的 Steps 组件,改为极简横向布局(彩色状态圆点 + 进度百分比),解决表格行高被强行撑开及内容截断问题,支持横向滚动。 - 优化「完成进度」列宽及展示样式,将百分比数值外置同行显示,更加直观。 2. 排产任务列表改造 (Task) - 顶部表头重构,由单一标题重构为「全部 / 未完成 / 已完成」的 Tabs 标签页切换结构。 - 重写数据过滤逻辑,剥离写死的 status 查询,改为使用 `scheduleStatus` 字段动态响应 Tabs 切换 (0: 未完成, 1: 已完成)。 3. 工单业务逻辑增强与状态流转 - 落实「工单查询逻辑设计方案」,优化底层的工单条件检索逻辑。 - 实现「添加工单启停功能」与「停工状态」,支持工单在执行过程中的暂停与恢复业务流转。 - 强化容错与防呆设计:操作「完成订单」时增加前置校验 `handleCheckFinish`,若生产状态为未完成,强制弹出二次确认 Modal,避免误操作。 # 相关讨论/参考方案 # - 添加工单启停功能 # - 停工状态功能设计方案 # - 工单查询逻辑设计方案 # - 工单完成进度显示优化
---
yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/controller/admin/category/MdmItemCategoryController.java | 99 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 99 insertions(+), 0 deletions(-)
diff --git a/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/controller/admin/category/MdmItemCategoryController.java b/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/controller/admin/category/MdmItemCategoryController.java
new file mode 100644
index 0000000..e964cf3
--- /dev/null
+++ b/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/controller/admin/category/MdmItemCategoryController.java
@@ -0,0 +1,99 @@
+package cn.iocoder.yudao.module.mdm.controller.admin.category;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+import cn.iocoder.yudao.module.mdm.controller.admin.category.vo.MdmItemCategoryPageReqVO;
+import cn.iocoder.yudao.module.mdm.controller.admin.category.vo.MdmItemCategoryRespVO;
+import cn.iocoder.yudao.module.mdm.controller.admin.category.vo.MdmItemCategorySaveReqVO;
+import cn.iocoder.yudao.module.mdm.dal.dataobject.category.MdmItemCategoryDO;
+import cn.iocoder.yudao.module.mdm.service.category.MdmItemCategoryService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.annotation.Resource;
+import jakarta.validation.Valid;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+@Tag(name = "绠$悊鍚庡彴 - MDM 鐗╂枡鍒嗙被")
+@RestController
+@RequestMapping("/mdm/category")
+@Validated
+public class MdmItemCategoryController {
+
+ @Resource
+ private MdmItemCategoryService itemCategoryService;
+
+ @PostMapping("/create")
+ @Operation(summary = "鍒涘缓鐗╂枡鍒嗙被")
+ @PreAuthorize("@ss.hasPermission('mdm:item-category:create')")
+ public CommonResult<Long> createItemCategory(@Valid @RequestBody MdmItemCategorySaveReqVO createReqVO) {
+ return success(itemCategoryService.createItemCategory(createReqVO));
+ }
+
+ @PutMapping("/update")
+ @Operation(summary = "鏇存柊鐗╂枡鍒嗙被")
+ @PreAuthorize("@ss.hasPermission('mdm:item-category:update')")
+ public CommonResult<Boolean> updateItemCategory(@Valid @RequestBody MdmItemCategorySaveReqVO updateReqVO) {
+ itemCategoryService.updateItemCategory(updateReqVO);
+ return success(true);
+ }
+
+ @PutMapping("/update-status")
+ @Operation(summary = "鏇存柊鐗╂枡鍒嗙被鐘舵��")
+ @Parameter(name = "id", description = "缂栧彿", required = true, example = "1")
+ @Parameter(name = "status", description = "鐘舵��", required = true, example = "0")
+ @PreAuthorize("@ss.hasPermission('mdm:item-category:update')")
+ public CommonResult<Boolean> updateItemCategoryStatus(@RequestParam("id") Long id, @RequestParam("status") Integer status) {
+ itemCategoryService.updateItemCategoryStatus(id, status);
+ return success(true);
+ }
+
+ @DeleteMapping("/delete")
+ @Operation(summary = "鍒犻櫎鐗╂枡鍒嗙被")
+ @Parameter(name = "id", description = "缂栧彿", required = true, example = "1")
+ @PreAuthorize("@ss.hasPermission('mdm:item-category:delete')")
+ public CommonResult<Boolean> deleteItemCategory(@RequestParam("id") Long id) {
+ itemCategoryService.deleteItemCategory(id);
+ return success(true);
+ }
+
+ @GetMapping("/get")
+ @Operation(summary = "鑾峰緱鐗╂枡鍒嗙被")
+ @Parameter(name = "id", description = "缂栧彿", required = true, example = "1")
+ @PreAuthorize("@ss.hasPermission('mdm:item-category:query')")
+ public CommonResult<MdmItemCategoryRespVO> getItemCategory(@RequestParam("id") Long id) {
+ MdmItemCategoryDO itemCategory = itemCategoryService.getItemCategory(id);
+ return success(BeanUtils.toBean(itemCategory, MdmItemCategoryRespVO.class));
+ }
+
+ @GetMapping("/page")
+ @Operation(summary = "鑾峰緱鐗╂枡鍒嗙被鍒嗛〉")
+ @PreAuthorize("@ss.hasPermission('mdm:item-category:query')")
+ public CommonResult<PageResult<MdmItemCategoryRespVO>> getItemCategoryPage(@Valid MdmItemCategoryPageReqVO pageReqVO) {
+ PageResult<MdmItemCategoryDO> pageResult = itemCategoryService.getItemCategoryPage(pageReqVO);
+ return success(BeanUtils.toBean(pageResult, MdmItemCategoryRespVO.class));
+ }
+
+ @GetMapping("/list")
+ @Operation(summary = "鑾峰緱鐗╂枡鍒嗙被鍒楄〃")
+ @PreAuthorize("@ss.hasPermission('mdm:item-category:query')")
+ public CommonResult<List<MdmItemCategoryRespVO>> getItemCategoryList() {
+ List<MdmItemCategoryDO> list = itemCategoryService.getItemCategoryList(null);
+ return success(BeanUtils.toBean(list, MdmItemCategoryRespVO.class));
+ }
+
+ @GetMapping("/list-all-simple")
+ @Operation(summary = "鑾峰緱鍚敤鐨勫垎绫诲垪琛�")
+ public CommonResult<List<MdmItemCategoryRespVO>> getSimpleItemList() {
+ List<MdmItemCategoryDO> list = itemCategoryService.getSimpleItemList();
+ return success(BeanUtils.toBean(list, MdmItemCategoryRespVO.class));
+ }
+
+}
\ No newline at end of file
--
Gitblit v1.9.3