diff --git a/src/main/java/com/glxp/api/controller/auth/DeptUserController.java b/src/main/java/com/glxp/api/controller/auth/DeptUserController.java index a726a289..328d256e 100644 --- a/src/main/java/com/glxp/api/controller/auth/DeptUserController.java +++ b/src/main/java/com/glxp/api/controller/auth/DeptUserController.java @@ -66,12 +66,12 @@ public class DeptUserController { public BaseResponse delete(@RequestBody DeptUserEntity deptUserEntity) { // 判断此用户是否创建单据 List ioOrderEntities = ioOrderService.selectList(deptUserEntity.getUserId()); - if( ioOrderEntities != null){ + if( ioOrderEntities != null && ioOrderEntities.size() != 0 ){ return ResultVOUtils.error(500,"该用户已创建单据,不能移除!"); } //判断此用户是否与仓库有关联 List listWareHouse = warehouseUserService.selectCodeByUser(deptUserEntity.getUserId() + ""); - if( listWareHouse != null ){ + if( listWareHouse != null && listWareHouse.size() != 0){ return ResultVOUtils.error(500,"该用户已绑定仓库,不能移除!"); }