From 381e02b9eccbe953b31d09f2af1c2ce77c816140 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期六, 07 十一月 2026 14:51:05 +0800
Subject: [PATCH] fix(mes): 隔离设备物料并支持销售产品映射
---
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/feedback/MesProFeedbackController.java | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/feedback/MesProFeedbackController.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/feedback/MesProFeedbackController.java
index 3d2c6ab..d26fed6 100644
--- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/feedback/MesProFeedbackController.java
+++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/feedback/MesProFeedbackController.java
@@ -4,6 +4,9 @@
import cn.hutool.core.collection.ListUtil;
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
+import cn.iocoder.yudao.module.mes.service.pro.feedback.dto.MesTaskParamSnapshot;
+import cn.iocoder.yudao.module.mes.service.pro.feedback.dto.MesFeedbackParamSnapshot;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
@@ -143,7 +146,6 @@
@GetMapping("/get")
@Operation(summary = "鑾峰緱鐢熶骇鎶ュ伐")
@Parameter(name = "id", description = "缂栧彿", required = true, example = "1024")
- @PreAuthorize("@ss.hasPermission('mes:pro-feedback:query')")
public CommonResult<MesProFeedbackRespVO> getFeedback(@RequestParam("id") Long id) {
MesProFeedbackDO feedback = feedbackService.getFeedback(id);
if (feedback == null) {
@@ -154,16 +156,25 @@
@GetMapping("/page")
@Operation(summary = "鑾峰緱鐢熶骇鎶ュ伐鍒嗛〉")
- @PreAuthorize("@ss.hasPermission('mes:pro-feedback:query')")
public CommonResult<PageResult<MesProFeedbackRespVO>> getFeedbackPage(@Valid MesProFeedbackPageReqVO pageReqVO) {
PageResult<MesProFeedbackDO> pageResult = feedbackService.getFeedbackPage(pageReqVO);
return success(new PageResult<>(buildFeedbackRespVOList(pageResult.getList()), pageResult.getTotal()));
}
+ @GetMapping("/param-config")
+ @Operation(summary = "鑾峰緱鐢熶骇浠诲姟鍐荤粨鐨勫弬鏁伴噰闆嗛厤缃�")
+ public CommonResult<Map<String, Object>> getParamConfig(@RequestParam("taskId") Long taskId) {
+ MesProTaskDO task = taskService.validateTaskExists(taskId);
+ Map<String, Object> result = new LinkedHashMap<>();
+ result.put("mode", task.getParamCollectMode() == null ? 0 : task.getParamCollectMode());
+ result.put("template", JsonUtils.parseObject(task.getParamTemplateSnapshot(), MesTaskParamSnapshot.class));
+ result.put("shared", JsonUtils.parseObject(task.getParamSharedSnapshot(), MesFeedbackParamSnapshot.class));
+ return success(result);
+ }
+
@GetMapping("/list-by-task")
@Operation(summary = "鎸変换鍔¤幏寰楁姤宸ュ巻鍙插垪琛�")
@Parameter(name = "taskId", description = "浠诲姟缂栧彿", required = true, example = "1024")
- @PreAuthorize("@ss.hasPermission('mes:pro-feedback:query')")
public CommonResult<List<MesProFeedbackRespVO>> getFeedbackListByTask(@RequestParam("taskId") Long taskId) {
List<MesProFeedbackDO> list = feedbackService.getFeedbackListByTaskId(taskId);
return success(buildFeedbackRespVOList(list));
@@ -196,7 +207,7 @@
.remark("").build()
);
// 杈撳嚭
- ExcelUtils.write(response, "鐢熶骇鎶ュ伐瀵煎叆妯℃澘.xls", "鐢熶骇鎶ュ伐鍒楄〃", MesProFeedbackImportExcelVO.class, list);
+ ExcelUtils.writeTemplate(response, "鐢熶骇鎶ュ伐瀵煎叆妯℃澘.xls", "鐢熶骇鎶ュ伐鍒楄〃", MesProFeedbackImportExcelVO.class, list);
}
@PostMapping("/import")
@@ -267,7 +278,6 @@
@GetMapping("/trace/{id}")
@Operation(summary = "鑾峰緱鎶ュ伐杩芥函淇℃伅", description = "鎶ュ伐 + 浜у嚭/浜у嚭鏄庣粏 + 娑堣��/娑堣�楁槑缁� + IPQC妫�楠�")
@Parameter(name = "id", description = "鎶ュ伐缂栧彿", required = true, example = "1024")
- @PreAuthorize("@ss.hasPermission('mes:pro-feedback:query')")
public CommonResult<MesProFeedbackTraceRespVO> getFeedbackTrace(@PathVariable("id") Long id) {
MesProFeedbackDO feedback = feedbackService.getFeedback(id);
if (feedback == null) {
@@ -292,7 +302,6 @@
@GetMapping("/summary")
@Operation(summary = "浣滀笟鎴愭灉姹囨�荤粺璁�", description = "鎸夋椂闂磋寖鍥存眹鎬诲凡鎵瑰噯鎶ュ伐鏁伴噺/鍚堟牸鏁伴噺锛屾寜宸ュ崟绫诲瀷銆佹棩鏈熷垎缁�")
- @PreAuthorize("@ss.hasPermission('mes:pro-feedback:query')")
public CommonResult<MesProFeedbackSummaryRespVO> getFeedbackSummary(
@RequestParam(value = "beginDate", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate beginDate,
@RequestParam(value = "endDate", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate endDate,
--
Gitblit v1.9.3