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();