|
|
@ -844,7 +844,20 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu |
|
|
|
* @Date 2021/10/26 14:01 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<OptionResultDTO> getGridOption(String agencyId) { |
|
|
|
public List<OptionResultDTO> getGridOption(String agencyId, String purpose) { |
|
|
|
//查询条件和查看居民详情:query;新增或修改居民信息:addorupdate
|
|
|
|
if ("query".equals(purpose) || StringUtils.isEmpty(purpose)) { |
|
|
|
CustomerAgencyDTO customerAgencyDTO = customerAgencyService.get(agencyId); |
|
|
|
String gridPids = ""; |
|
|
|
if (null != customerAgencyDTO) { |
|
|
|
if (StringUtils.isEmpty(customerAgencyDTO.getPid()) || NumConstant.ZERO_STR.equals(customerAgencyDTO.getPid())) { |
|
|
|
gridPids = agencyId; |
|
|
|
} else { |
|
|
|
gridPids = customerAgencyDTO.getPids().concat(StrConstant.COLON).concat(agencyId); |
|
|
|
} |
|
|
|
} |
|
|
|
return baseDao.getGridOptionForQuery(gridPids); |
|
|
|
} |
|
|
|
LambdaQueryWrapper<CustomerGridEntity> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
wrapper.eq(CustomerGridEntity::getPid, agencyId); |
|
|
|
wrapper.last("ORDER BY CONVERT ( GRID_NAME USING gbk ) ASC"); |
|
|
@ -859,4 +872,5 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu |
|
|
|
return dto; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|