|
|
@ -208,11 +208,12 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu |
|
|
|
String areaCode = customerAgencyDao.selectAreaCodeByAgencyId(addGridFormDTO.getAgencyId()); |
|
|
|
CustomerGridEntity customerGridEntity = new CustomerGridEntity(); |
|
|
|
customerGridEntity.setAreaCode(areaCode); |
|
|
|
customerGridEntity.setCustomerId(baseDao.selectCustomerIdByUserId(tokenDto.getUserId()));//查询customerId
|
|
|
|
CustomerAgencyDTO customerAgencyDTO=customerAgencyService.get(addGridFormDTO.getAgencyId()); |
|
|
|
customerGridEntity.setCustomerId(customerAgencyDTO.getCustomerId());//查询customerId
|
|
|
|
customerGridEntity.setGridName(addGridFormDTO.getGridName()); |
|
|
|
customerGridEntity.setManageDistrict(addGridFormDTO.getManageDistrict()); |
|
|
|
customerGridEntity.setPid(addGridFormDTO.getAgencyId()); |
|
|
|
customerGridEntity.setPids(baseDao.selectPidsByPid(addGridFormDTO.getAgencyId()));//查询所有上级组织id
|
|
|
|
customerGridEntity.setPids(customerAgencyDTO.getPids());//查询所有上级组织id
|
|
|
|
baseDao.insert(customerGridEntity); |
|
|
|
//查询刚刚添加的gridId
|
|
|
|
String gridId = baseDao.selectGridIdByGridName(addGridFormDTO.getGridName(),addGridFormDTO.getAgencyId(),null); |
|
|
|