diff --git a/src/main/java/com/zzjee/wm/controller/WmInQmIController.java b/src/main/java/com/zzjee/wm/controller/WmInQmIController.java index bf0aaa12..6bd3f4c5 100644 --- a/src/main/java/com/zzjee/wm/controller/WmInQmIController.java +++ b/src/main/java/com/zzjee/wm/controller/WmInQmIController.java @@ -454,11 +454,13 @@ public class WmInQmIController extends BaseController { if (Double.parseDouble(wmInQmI.getQmOkQuat()) <= 0) { j.setSuccess(false); message = "数量不能为0"; + j.setMsg(message); return j; } } catch (Exception e) { j.setSuccess(false); message = "数量 错误"; + j.setMsg(message); return j; // TODO: handle exception } @@ -466,6 +468,7 @@ public class WmInQmIController extends BaseController { if (!wmUtil.checkbin(wmInQmI.getBinId())) { j.setSuccess(false); message = wmInQmI.getBinId() + "储位不存在或已停用"; + j.setMsg(message); return j; } } @@ -481,17 +484,18 @@ public class WmInQmIController extends BaseController { } } //托盘占用判断 - + if(!wmUtil.checkys(wmInQmI.getGoodsId(),wmInQmI.getProData())){ + j.setSuccess(false); + message = "超过允收期"; + j.setMsg(message); + return j; + } String flagchsh = "y"; try { WmImNoticeIEntity wmImNoticeIEntity = systemService.get(WmImNoticeIEntity.class, wmInQmI.getImNoticeItem()); if (wmImNoticeIEntity != null) { - if(!wmUtil.checkys(wmImNoticeIEntity.getGoodsCode(),wmInQmI.getProData())){ - j.setSuccess(false); - message = "超过允收期"; - return j; - } + if ("n".equals(ResourceUtil.getConfigByName("chaoshou"))) { Long weiq = Long.parseLong(wmImNoticeIEntity @@ -511,6 +515,8 @@ public class WmInQmIController extends BaseController { if ("n".equals(flagchsh)) { j.setSuccess(false); message = "不允许超收"; + j.setMsg(message); + return j; } @@ -547,10 +553,14 @@ public class WmInQmIController extends BaseController { } else { j.setSuccess(false); message = "收货通知不存在"; + j.setMsg(message); + return j; } if (!flag.equals("X")) { j.setSuccess(false); message = "收货通知下此商品不存在或已经全部收货"; + j.setMsg(message); + return j; } if (flag.equals("X")) { MvGoodsEntity mvgoods = systemService.findUniqueByProperty( @@ -606,6 +616,15 @@ public class WmInQmIController extends BaseController { wminqm.setImNoticeItem(jeecgDemo.getId()); wminqm.setGoodsId(jeecgDemo.getGoodsCode()); wminqm.setProData(DateUtils.date2Str(jeecgDemo.getGoodsPrdData(), DateUtils.date_sdf)); + + + if(!wmUtil.checkys(wminqm.getGoodsId(),wminqm.getProData())){ + j.setSuccess(false); + message = "超过允收期"; + j.setMsg(message); + return j; + } + wminqm.setImNoticeId(jeecgDemo.getImNoticeId()); wminqm.setGoodsName(jeecgDemo.getGoodsName()); wminqm.setBinId(jeecgDemo.getBinPlan()); diff --git a/src/main/webapp/webpage/com/zzjee/wm/wmInQmI-add.jsp b/src/main/webapp/webpage/com/zzjee/wm/wmInQmI-add.jsp index e65d2eb4..e80e1144 100644 --- a/src/main/webapp/webpage/com/zzjee/wm/wmInQmI-add.jsp +++ b/src/main/webapp/webpage/com/zzjee/wm/wmInQmI-add.jsp @@ -73,7 +73,7 @@ window.onload = function() {
-