|
@ -51,7 +51,6 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.util.CollectionUtils; |
|
|
import org.springframework.util.CollectionUtils; |
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.util.ArrayList; |
|
|
import java.util.Date; |
|
|
import java.util.Date; |
|
@ -107,10 +106,11 @@ public class DepartmentServiceImpl implements DepartmentService { |
|
|
Result<AddDepartmentResultDTO> result = new Result<AddDepartmentResultDTO>(); |
|
|
Result<AddDepartmentResultDTO> result = new Result<AddDepartmentResultDTO>(); |
|
|
AddDepartmentResultDTO addDepartmentResultDTO = new AddDepartmentResultDTO(); |
|
|
AddDepartmentResultDTO addDepartmentResultDTO = new AddDepartmentResultDTO(); |
|
|
CustomerDepartmentEntity entity = ConvertUtils.sourceToTarget(formDTO, CustomerDepartmentEntity.class); |
|
|
CustomerDepartmentEntity entity = ConvertUtils.sourceToTarget(formDTO, CustomerDepartmentEntity.class); |
|
|
if (formDTO.getTotalUser() > NumConstant.ZERO) { |
|
|
if (null != formDTO.getTotalUser() && formDTO.getTotalUser() > NumConstant.ZERO) { |
|
|
entity.setTotalUser(formDTO.getTotalUser()); |
|
|
entity.setTotalUser(formDTO.getTotalUser()); |
|
|
} |
|
|
}else{ |
|
|
entity.setTotalUser(NumConstant.ZERO); |
|
|
entity.setTotalUser(NumConstant.ZERO); |
|
|
|
|
|
} |
|
|
//1:查询当前组织机构信息,获取客户Id
|
|
|
//1:查询当前组织机构信息,获取客户Id
|
|
|
CustomerAgencyEntity parentEntity = customerAgencyDao.selectById(formDTO.getAgencyId()); |
|
|
CustomerAgencyEntity parentEntity = customerAgencyDao.selectById(formDTO.getAgencyId()); |
|
|
entity.setCustomerId(parentEntity.getCustomerId()); |
|
|
entity.setCustomerId(parentEntity.getCustomerId()); |
|
|