From 8a44d9e4f192f961d7ef75762de516c2b33906db Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期四, 07 八月 2025 16:28:25 +0800 Subject: [PATCH] 组拖档功能优化 --- zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MatController.java | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MatController.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MatController.java index d327bc4..34718ae 100644 --- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MatController.java +++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MatController.java @@ -128,6 +128,13 @@ @PostMapping("/mat/save") public R save(@RequestBody HashMap<String,Object> param) { Mat mat = JSON.parseObject(JSON.toJSONString(param), Mat.class, Feature.DisableCircularReferenceDetect); + if (Objects.isNull(mat)) { + throw new CoolException("鐗╂枡涓嶈兘涓虹┖锛侊紒"); + } + Mat mat1 = matService.getOne(new LambdaQueryWrapper<Mat>().eq(Mat::getMatnr, mat.getMatnr())); + if (!Objects.isNull(mat1)) { + throw new CoolException("褰撳墠鐗╂枡缂栫爜宸插瓨鍦紝涓嶅彲閲嶅娣诲姞锛侊紒"); + } if (!matService.save(mat)) { return R.error("娣诲姞澶辫触"); } -- Gitblit v1.9.1