From beaba1bf3a30053408a860479f9150b02169a7c8 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 24 八月 2026 17:04:16 +0800
Subject: [PATCH] feat(mes): 添加种子质检功能模块

---
 yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/scan/MesProScanEventController.java |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/scan/MesProScanEventController.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/scan/MesProScanEventController.java
new file mode 100644
index 0000000..4566021
--- /dev/null
+++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/scan/MesProScanEventController.java
@@ -0,0 +1,41 @@
+package cn.iocoder.yudao.module.mes.controller.admin.pro.scan;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.module.mes.controller.admin.pro.scan.vo.MesProScanEventCreateReqVO;
+import cn.iocoder.yudao.module.mes.controller.admin.pro.scan.vo.MesProScanEventRespVO;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.module.mes.controller.admin.pro.scan.vo.MesProScanEventPageReqVO;
+import java.util.List;
+import java.util.Map;
+import cn.iocoder.yudao.module.mes.dal.dataobject.pro.scan.MesProScanEventDO;
+import cn.iocoder.yudao.module.mes.service.pro.scan.MesProScanEventService;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.annotation.Resource;
+import jakarta.validation.Valid;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.security.access.prepost.PreAuthorize;
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
+
+@Tag(name = "绠$悊鍚庡彴 - MES 鎵爜鍏ュ簱")
+@RestController @RequestMapping("/mes/pro/scan-in")
+public class MesProScanEventController {
+    @Resource private MesProScanEventService service;
+    @PostMapping("/inbound") @PreAuthorize("@ss.hasPermission('mes:pro-scan-in:inbound')") @Operation(summary = "琚嬬爜鎵爜鍏ュ簱")
+    public CommonResult<MesProScanEventRespVO> inbound(@Valid @RequestBody MesProScanEventCreateReqVO req) {
+        return success(BeanUtils.toBean(service.createInbound(req), MesProScanEventRespVO.class));
+    }
+    @GetMapping("/page") @PreAuthorize("@ss.hasPermission('mes:pro-scan-in:query')") @Operation(summary = "鎵爜浜嬩欢鍒嗛〉")
+    public CommonResult<PageResult<MesProScanEventRespVO>> page(@Valid MesProScanEventPageReqVO req) {
+        PageResult<MesProScanEventDO> page = service.getPage(req);
+        return success(new PageResult<>(BeanUtils.toBean(page.getList(), MesProScanEventRespVO.class), page.getTotal()));
+    }
+    @GetMapping("/latest") @PreAuthorize("@ss.hasPermission('mes:pro-scan-in:query')") @Operation(summary = "鏈�鏂版壂鐮佷簨浠�")
+    public CommonResult<MesProScanEventRespVO> latest(@RequestParam(required = false) String deviceCode) {
+        return success(BeanUtils.toBean(service.getLatest(deviceCode), MesProScanEventRespVO.class));
+    }
+    @GetMapping("/dashboard") @PreAuthorize("@ss.hasPermission('mes:pro-scan-in:dashboard')") @Operation(summary = "鎵爜鍏ュ簱鐪嬫澘")
+    public CommonResult<Map<String, Object>> dashboard() { return success(service.getDashboard()); }
+}

--
Gitblit v1.9.3