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+"有检验项目,不允许执行合格操作"); }