|
|
@ -140,7 +140,11 @@ public class CustomerAgencyServiceImpl implements CustomerAgencyService { |
|
|
|
}else{ |
|
|
|
insertStreetEntity.setPids(pingYin.getId()); |
|
|
|
} |
|
|
|
insertStreetEntity.setAllParentName(pingYin.getOrganizationName()); |
|
|
|
if(org.apache.commons.lang3.StringUtils.isNotBlank(pingYin.getAllParentName())){ |
|
|
|
insertStreetEntity.setAllParentName(pingYin.getAllParentName().concat(StrConstant.HYPHEN).concat(pingYin.getOrganizationName())); |
|
|
|
}else { |
|
|
|
insertStreetEntity.setAllParentName(pingYin.getOrganizationName()); |
|
|
|
} |
|
|
|
insertStreetEntity.setOrganizationName(street.getAgencyName()); |
|
|
|
insertStreetEntity.setLevel("street"); |
|
|
|
insertStreetEntity.setAreaCode(street.getAreaCode()); |
|
|
@ -153,6 +157,8 @@ public class CustomerAgencyServiceImpl implements CustomerAgencyService { |
|
|
|
insertStreetEntity.setCommunity(StrConstant.EPMETY_STR); |
|
|
|
insertStreetEntity.setParentAreaCode(pingYin.getAreaCode()); |
|
|
|
insertStreetEntity.setId(street.getAgencyId()); |
|
|
|
insertStreetEntity.setCreatedBy("APP_USER"); |
|
|
|
insertStreetEntity.setUpdatedBy("APP_USER"); |
|
|
|
// 3、插入街道
|
|
|
|
if (null == customerAgencyDao.selectById(insertStreetEntity.getId())) { |
|
|
|
customerAgencyDao.insert(insertStreetEntity); |
|
|
@ -182,6 +188,8 @@ public class CustomerAgencyServiceImpl implements CustomerAgencyService { |
|
|
|
insertCommunityEntity.setCommunity(kcCommunity.getAgencyName()); |
|
|
|
insertCommunityEntity.setParentAreaCode(insertStreetEntity.getAreaCode()); |
|
|
|
insertCommunityEntity.setId(kcCommunity.getAgencyId()); |
|
|
|
insertCommunityEntity.setCreatedBy("APP_USER"); |
|
|
|
insertCommunityEntity.setUpdatedBy("APP_USER"); |
|
|
|
CustomerAgencyEntity customerAgencyEntity=customerAgencyDao.selectById(insertCommunityEntity.getId()); |
|
|
|
if(null==customerAgencyEntity){ |
|
|
|
// 4、插入社区
|
|
|
@ -213,6 +221,8 @@ public class CustomerAgencyServiceImpl implements CustomerAgencyService { |
|
|
|
insertCommunityEntity.setCommunity(community.getAgencyName()); |
|
|
|
insertCommunityEntity.setParentAreaCode(insertStreetEntity.getAreaCode()); |
|
|
|
insertCommunityEntity.setId(community.getAgencyId()); |
|
|
|
insertCommunityEntity.setCreatedBy("APP_USER"); |
|
|
|
insertCommunityEntity.setUpdatedBy("APP_USER"); |
|
|
|
CustomerAgencyEntity customerAgencyEntity=customerAgencyDao.selectById(insertCommunityEntity.getId()); |
|
|
|
if(null==customerAgencyEntity){ |
|
|
|
customerAgencyDao.insert(insertCommunityEntity); |
|
|
@ -247,6 +257,8 @@ public class CustomerAgencyServiceImpl implements CustomerAgencyService { |
|
|
|
insertGrid.setManageDistrict(gridEntity.getGridName()); |
|
|
|
insertGrid.setTotalUser(NumConstant.ZERO); |
|
|
|
insertGrid.setPid(gridEntity.getParentAgencyId()); |
|
|
|
insertGrid.setCreatedBy("APP_USER"); |
|
|
|
insertGrid.setUpdatedBy("APP_USER"); |
|
|
|
if(StringUtils.isEmpty(parentCustomerEntity.getPids())){ |
|
|
|
insertGrid.setPids(insertGrid.getPid()); |
|
|
|
}else{ |
|
|
|