From da807b127d6493422d9f4990fac1f595a19b0bca Mon Sep 17 00:00:00 2001 From: cez Date: Fri, 8 Jul 2022 10:45:14 +0800 Subject: [PATCH] https://gitee.com/erzhongxmu/jeewms/issues/I4Z93N --- .../java/com/zzjee/wm/controller/WmImNoticeHController.java | 5 +++++ .../java/com/zzjee/wm/controller/WmOmNoticeHController.java | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/main/java/com/zzjee/wm/controller/WmImNoticeHController.java b/src/main/java/com/zzjee/wm/controller/WmImNoticeHController.java index 8e7bbc7b..4c5e114e 100644 --- a/src/main/java/com/zzjee/wm/controller/WmImNoticeHController.java +++ b/src/main/java/com/zzjee/wm/controller/WmImNoticeHController.java @@ -42,6 +42,7 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; +import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; @@ -2301,6 +2302,10 @@ public class WmImNoticeHController extends BaseController { .getWmImNoticeIList(); AjaxJson j = new AjaxJson(); String message = "进货通知添加成功"; + if(CollectionUtils.isEmpty(wmImNoticeIList)){ + message = "进货通知明细不能为空"; + throw new BusinessException(message); + } try { String noticeid = wmUtil.getNextNoticeid(wmImNoticeH.getOrderTypeCode()) ; diff --git a/src/main/java/com/zzjee/wm/controller/WmOmNoticeHController.java b/src/main/java/com/zzjee/wm/controller/WmOmNoticeHController.java index 9024e942..ad14f1c4 100644 --- a/src/main/java/com/zzjee/wm/controller/WmOmNoticeHController.java +++ b/src/main/java/com/zzjee/wm/controller/WmOmNoticeHController.java @@ -936,6 +936,10 @@ public class WmOmNoticeHController extends BaseController { List wmOmNoticeIList = wmOmNoticeHPage.getWmOmNoticeIList(); AjaxJson j = new AjaxJson(); String message = "添加成功"; + if(org.springframework.util.CollectionUtils.isEmpty(wmOmNoticeIList)){ + message = "出货通知明细不能为空"; + throw new BusinessException(message); + } try{ String noticeid = wmUtil.getNextomNoticeId(wmOmNoticeH.getOrderTypeCode()); WmPlatIoEntity wmPlatIo = new WmPlatIoEntity();