From da12cc622422da23b8a0ccf5b10f10df285ce8da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=98=89=E4=BC=9F?= <1724121454@qq.com> Date: Wed, 25 Aug 2021 16:47:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E5=B8=B8bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mesnac/production/controller/SfcScrapController.java | 7 ++++++- .../service/impl/InspectionTaskManageServiceImpl.java | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/production/src/main/java/com/foreverwin/mesnac/production/controller/SfcScrapController.java b/production/src/main/java/com/foreverwin/mesnac/production/controller/SfcScrapController.java index 907a4fda..eb582857 100644 --- a/production/src/main/java/com/foreverwin/mesnac/production/controller/SfcScrapController.java +++ b/production/src/main/java/com/foreverwin/mesnac/production/controller/SfcScrapController.java @@ -139,7 +139,12 @@ public class SfcScrapController { */ @GetMapping("/getScrapDtoBysfc") public R getScrapDtoBysfc(String site,String sfc){ - return R.ok(anomalyService.getScrapDtoBysfc(site,sfc)); + try{ + return R.ok(anomalyService.getScrapDtoBysfc(site,sfc)); + }catch (Exception e){ + return R.failed("产品报废检索报错"+e.getMessage()); + } + } /** diff --git a/quality/src/main/java/com/foreverwin/mesnac/quality/service/impl/InspectionTaskManageServiceImpl.java b/quality/src/main/java/com/foreverwin/mesnac/quality/service/impl/InspectionTaskManageServiceImpl.java index 2bfdee69..bf7588fa 100644 --- a/quality/src/main/java/com/foreverwin/mesnac/quality/service/impl/InspectionTaskManageServiceImpl.java +++ b/quality/src/main/java/com/foreverwin/mesnac/quality/service/impl/InspectionTaskManageServiceImpl.java @@ -116,7 +116,7 @@ public class InspectionTaskManageServiceImpl implements InspectionTaskManageServ } List inspectionItemDetailList = this.getInspectionTaskDetail(HandleEnum.INSPECTION_TASK.getHandle(taskNo)); - if (inspectionItemDetailList != null || inspectionItemDetailList.size() > 0) { + if (inspectionItemDetailList != null && inspectionItemDetailList.size() > 0) { throw BusinessException.build("检验任务:"+taskNo+"有检验项目,不允许执行合格操作"); }