From b0db08200a42216e475cd6aed0fbe9826cc1f6ba Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 5 Aug 2022 16:57:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=83=A8=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/DepartmentServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/DepartmentServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/DepartmentServiceImpl.java index e5cd12fdf8..5aad1c9b59 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/DepartmentServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/DepartmentServiceImpl.java @@ -51,7 +51,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import org.springframework.web.bind.annotation.RequestBody; import java.util.ArrayList; import java.util.Date; @@ -107,10 +106,11 @@ public class DepartmentServiceImpl implements DepartmentService { Result result = new Result(); AddDepartmentResultDTO addDepartmentResultDTO = new AddDepartmentResultDTO(); CustomerDepartmentEntity entity = ConvertUtils.sourceToTarget(formDTO, CustomerDepartmentEntity.class); - if (formDTO.getTotalUser() > NumConstant.ZERO) { + if (null != formDTO.getTotalUser() && formDTO.getTotalUser() > NumConstant.ZERO) { entity.setTotalUser(formDTO.getTotalUser()); + }else{ + entity.setTotalUser(NumConstant.ZERO); } - entity.setTotalUser(NumConstant.ZERO); //1:查询当前组织机构信息,获取客户Id CustomerAgencyEntity parentEntity = customerAgencyDao.selectById(formDTO.getAgencyId()); entity.setCustomerId(parentEntity.getCustomerId());