From 5c9ab8087bcad795014436402f154fd7fed57796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=90=8D=E5=96=9C?= Date: Wed, 4 Dec 2024 09:57:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=85=A5=E5=BA=93=E4=BB=BB=E5=8A=A1):=20?= =?UTF-8?q?=E9=80=9A=E8=BF=87rfid=E5=85=A5=E5=BA=93=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ktg/mes/wm/controller/WmsInTaskController.java | 6 +++++- .../com/ktg/mes/wm/service/impl/WmsInTaskServiceImpl.java | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java index 2377ebc..761fb96 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java @@ -97,7 +97,11 @@ public class WmsInTaskController extends BaseController { */ @GetMapping("/open/rfid/{rfid}") public AjaxResult byRfid(@PathVariable String rfid) { - return AjaxResult.success(wmsInTaskService.selectWmsInTaskByRfid(rfid)); + WmsInTask wmsInTask = wmsInTaskService.selectWmsInTaskByRfid(rfid); + if (wmsInTask == null) { + return AjaxResult.error("查询不到相关的入库任务"); + } + return AjaxResult.success(); } /** diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInTaskServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInTaskServiceImpl.java index 93c3177..11982c1 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInTaskServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInTaskServiceImpl.java @@ -58,6 +58,7 @@ public class WmsInTaskServiceImpl implements IWmsInTaskService { public WmsInTask selectWmsInTaskByRfid(String rfid) { WmsInPlanDetailEntity wmsInPlanDetailEntity = new WmsInPlanDetailEntity(); WmsInTask wmsInTask = null; + wmsInPlanDetailEntity.setRfid(rfid); List wmsInPlanDetailEntityList = wmsInPlanDetailEntityService.selectWmsInPlanDetailEntityList(wmsInPlanDetailEntity); for (WmsInPlanDetailEntity entity : wmsInPlanDetailEntityList) { WmsInTask wmsInTaskQuery = new WmsInTask();