From 42f4f2e741570f9c06d2fbbeb8e6f5fc49cbe575 Mon Sep 17 00:00:00 2001 From: yanyang Date: Thu, 23 Mar 2023 16:48:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=85=E8=A3=85=E7=AE=B1=E5=90=8D=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/service/impl/SysRoleServiceImpl.java | 3 +++ .../admin/service/impl/SysUserServiceImpl.java | 3 +++ .../controller/WoPackagingBoxController.java | 16 ++++++++++++++-- .../WoPackagingPrintHistoryServiceBizImpl.java | 15 ++++++++++----- 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/ym-admin/src/main/java/com/cnbm/admin/service/impl/SysRoleServiceImpl.java b/ym-admin/src/main/java/com/cnbm/admin/service/impl/SysRoleServiceImpl.java index c0671b2..0ac8c05 100644 --- a/ym-admin/src/main/java/com/cnbm/admin/service/impl/SysRoleServiceImpl.java +++ b/ym-admin/src/main/java/com/cnbm/admin/service/impl/SysRoleServiceImpl.java @@ -9,6 +9,7 @@ import com.cnbm.admin.entity.SysRoleEntity; import com.cnbm.admin.entity.SysUserEntity; import com.cnbm.admin.enums.SuperAdminEnum; import com.cnbm.admin.service.*; +import com.cnbm.admin.utils.BaseSupportUtils; import com.cnbm.common.constant.Constant; import com.cnbm.common.page.PageData; import com.cnbm.common.service.impl.BaseServiceImpl; @@ -89,6 +90,7 @@ public class SysRoleServiceImpl extends BaseServiceImpl insertSubstrateManual(@RequestBody WoPackagingBoxDTO dto){ - return woPackagingBoxService.insertSubstrateManual(dto); + //验证包装箱是否重名 + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(WoPackagingBox.BOX_NO, dto.getBoxNo()); + if(woPackagingBoxMapper.selectCount(wrapper)!= 0){ + return new Result().error(1,"BoxID已存在,请重新输入"); + } + else { + return new Result().ok(woPackagingBoxService.insertSubstrateManual(dto)); + } } diff --git a/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingPrintHistoryServiceBizImpl.java b/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingPrintHistoryServiceBizImpl.java index 99096cb..4b1d7fa 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingPrintHistoryServiceBizImpl.java +++ b/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingPrintHistoryServiceBizImpl.java @@ -106,15 +106,20 @@ public class WoPackagingPrintHistoryServiceBizImpl extends CrudServiceImpl