|
|
@ -95,6 +95,31 @@ public class GovOrgCoverageServiceImpl implements GovOrgCoverageService { |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<IcCityManagementEntity> searchCityResourceEntities(String customerId, String agencyIdPath, String search, String category, Boolean isPage, Integer pageNo, Integer pageSize) { |
|
|
|
if (isPage) { |
|
|
|
PageHelper.startPage(pageNo ,pageSize); |
|
|
|
} |
|
|
|
|
|
|
|
LambdaQueryWrapper<IcCityManagementEntity> query = constructQueryWrapper(customerId, agencyIdPath, search, category); |
|
|
|
query.orderByAsc(IcCityManagementEntity::getCreatedTime); |
|
|
|
return cityManagementDao.selectList(query); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Integer countCityResourceEntities(String customerId, String agencyIdPath, String search, String category) { |
|
|
|
LambdaQueryWrapper<IcCityManagementEntity> query = constructQueryWrapper(customerId, agencyIdPath, search, category); |
|
|
|
query.orderByAsc(IcCityManagementEntity::getCreatedTime); |
|
|
|
return cityManagementDao.selectCount(query); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 构造动态查询 |
|
|
|
* @param customerId |
|
|
|
* @param agencyIdPath |
|
|
|
* @param search |
|
|
|
* @param category |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
private LambdaQueryWrapper<IcCityManagementEntity> constructQueryWrapper(String customerId, String agencyIdPath, String search, String category) { |
|
|
|
LambdaQueryWrapper<IcCityManagementEntity> query = new LambdaQueryWrapper<>(); |
|
|
|
query.eq(IcCityManagementEntity::getCustomerId, customerId); |
|
|
|
query.eq(IcCityManagementEntity::getCategory, category); |
|
|
@ -102,12 +127,15 @@ public class GovOrgCoverageServiceImpl implements GovOrgCoverageService { |
|
|
|
if (StringUtils.isNotBlank(search)) { |
|
|
|
query.like(IcCityManagementEntity::getName, search); |
|
|
|
} |
|
|
|
return query; |
|
|
|
} |
|
|
|
|
|
|
|
if (isPage) { |
|
|
|
PageHelper.startPage(pageNo ,pageSize); |
|
|
|
} |
|
|
|
query.orderByAsc(IcCityManagementEntity::getCreatedTime); |
|
|
|
return cityManagementDao.selectList(query); |
|
|
|
@Override |
|
|
|
public Integer countDangerousChemicalEntities(String customerId, String agencyIdPath, String search, String categoryKey) { |
|
|
|
|
|
|
|
LambdaQueryWrapper<IcDangerousChemicalsEntity> query = constructDangerousChemicalQueryWrapper(customerId, agencyIdPath, search, categoryKey); |
|
|
|
|
|
|
|
return dangerousChemicalsDao.selectCount(query); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -123,6 +151,19 @@ public class GovOrgCoverageServiceImpl implements GovOrgCoverageService { |
|
|
|
@Override |
|
|
|
public List<IcDangerousChemicalsEntity> searchDangerousChemicalEntities( |
|
|
|
String customerId, String agencyIdPath, String search, String categoryKey, Boolean isPage, Integer pageNo, Integer pageSize) { |
|
|
|
|
|
|
|
LambdaQueryWrapper<IcDangerousChemicalsEntity> query = constructDangerousChemicalQueryWrapper(customerId, agencyIdPath, search, categoryKey); |
|
|
|
|
|
|
|
if (isPage) { |
|
|
|
PageHelper.startPage(pageNo ,pageSize); |
|
|
|
} |
|
|
|
query.orderByAsc(IcDangerousChemicalsEntity::getCreatedTime); |
|
|
|
return dangerousChemicalsDao.selectList(query); |
|
|
|
} |
|
|
|
|
|
|
|
private LambdaQueryWrapper<IcDangerousChemicalsEntity> constructDangerousChemicalQueryWrapper( |
|
|
|
String customerId, String agencyIdPath, String search, String categoryKey) { |
|
|
|
|
|
|
|
LambdaQueryWrapper<IcDangerousChemicalsEntity> query = new LambdaQueryWrapper<>(); |
|
|
|
query.eq(IcDangerousChemicalsEntity::getCustomerId, customerId); |
|
|
|
query.eq(IcDangerousChemicalsEntity::getCategory, categoryKey); |
|
|
@ -130,12 +171,7 @@ public class GovOrgCoverageServiceImpl implements GovOrgCoverageService { |
|
|
|
if (StringUtils.isNotBlank(search)) { |
|
|
|
query.like(IcDangerousChemicalsEntity::getName, search); |
|
|
|
} |
|
|
|
|
|
|
|
if (isPage) { |
|
|
|
PageHelper.startPage(pageNo ,pageSize); |
|
|
|
} |
|
|
|
query.orderByAsc(IcDangerousChemicalsEntity::getCreatedTime); |
|
|
|
return dangerousChemicalsDao.selectList(query); |
|
|
|
return query; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
@ -144,6 +180,18 @@ public class GovOrgCoverageServiceImpl implements GovOrgCoverageService { |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询公共服务个数 |
|
|
|
* @param customerId |
|
|
|
* @param staffOrgIds 查询人所属的组织ID路径,包含他本身所在的组织 |
|
|
|
* @param search |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public Integer countPublicServiceEntities(String customerId, String staffOrgIds, String search, String categoryKey) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 搜索公共服务 |
|
|
|
* @param customerId |
|
|
@ -157,6 +205,25 @@ public class GovOrgCoverageServiceImpl implements GovOrgCoverageService { |
|
|
|
@Override |
|
|
|
public List<IcPublicServiceEntity> searchPublicServiceEntities(String customerId, String staffOrgIds, String search, |
|
|
|
String categoryKey, Boolean isPage, Integer pageNo, Integer pageSize) { |
|
|
|
|
|
|
|
LambdaQueryWrapper<IcPublicServiceEntity> query = constructPublicServiceQueryWrapper(customerId, staffOrgIds, search, categoryKey); |
|
|
|
if (isPage) { |
|
|
|
PageHelper.startPage(pageNo ,pageSize); |
|
|
|
} |
|
|
|
query.orderByAsc(IcPublicServiceEntity::getCreatedTime); |
|
|
|
return publicServiceDao.selectList(query); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 构造LambdaQueryWrapper |
|
|
|
* @param customerId |
|
|
|
* @param staffOrgIds |
|
|
|
* @param search |
|
|
|
* @param categoryKey |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
LambdaQueryWrapper<IcPublicServiceEntity> constructPublicServiceQueryWrapper( |
|
|
|
String customerId, String staffOrgIds, String search, String categoryKey) { |
|
|
|
LambdaQueryWrapper<IcPublicServiceEntity> query = new LambdaQueryWrapper<>(); |
|
|
|
query.eq(IcPublicServiceEntity::getCustomerId, customerId); |
|
|
|
query.likeRight(IcPublicServiceEntity::getAgencyIdPath, staffOrgIds); |
|
|
@ -164,17 +231,28 @@ public class GovOrgCoverageServiceImpl implements GovOrgCoverageService { |
|
|
|
if (StringUtils.isNotBlank(search)) { |
|
|
|
query.like(IcPublicServiceEntity::getName, search); |
|
|
|
} |
|
|
|
return query; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<IcSuperiorResourceEntity> searchSuporiorResourceEntities(String customerId, String staffOrgIds, String search, |
|
|
|
String categoryKey, Boolean isPage, Integer pageNo, Integer pageSize) { |
|
|
|
LambdaQueryWrapper<IcSuperiorResourceEntity> query = constructSuporiorResourceQueryWrapper(customerId, staffOrgIds, search, categoryKey); |
|
|
|
|
|
|
|
if (isPage) { |
|
|
|
PageHelper.startPage(pageNo ,pageSize); |
|
|
|
} |
|
|
|
query.orderByAsc(IcPublicServiceEntity::getCreatedTime); |
|
|
|
return publicServiceDao.selectList(query); |
|
|
|
query.orderByAsc(IcSuperiorResourceEntity::getCreatedTime); |
|
|
|
return superiorResourceDao.selectList(query); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<IcSuperiorResourceEntity> searchSuporiorResourceEntities(String customerId, String staffOrgIds, String search, |
|
|
|
String categoryKey, Boolean isPage, Integer pageNo, Integer pageSize) { |
|
|
|
public Integer countSuporiorResourceEntities(String customerId, String staffOrgIds, String search, String categoryKey) { |
|
|
|
LambdaQueryWrapper<IcSuperiorResourceEntity> query = constructSuporiorResourceQueryWrapper(customerId, staffOrgIds, search, categoryKey); |
|
|
|
return superiorResourceDao.selectCount(query); |
|
|
|
} |
|
|
|
|
|
|
|
LambdaQueryWrapper<IcSuperiorResourceEntity> constructSuporiorResourceQueryWrapper(String customerId, String staffOrgIds, String search, String categoryKey) { |
|
|
|
LambdaQueryWrapper<IcSuperiorResourceEntity> query = new LambdaQueryWrapper<>(); |
|
|
|
query.eq(IcSuperiorResourceEntity::getCustomerId, customerId); |
|
|
|
query.eq(IcSuperiorResourceEntity::getCategory, categoryKey); |
|
|
@ -183,10 +261,6 @@ public class GovOrgCoverageServiceImpl implements GovOrgCoverageService { |
|
|
|
query.like(IcSuperiorResourceEntity::getName, search); |
|
|
|
} |
|
|
|
|
|
|
|
if (isPage) { |
|
|
|
PageHelper.startPage(pageNo ,pageSize); |
|
|
|
} |
|
|
|
query.orderByAsc(IcSuperiorResourceEntity::getCreatedTime); |
|
|
|
return superiorResourceDao.selectList(query); |
|
|
|
return query; |
|
|
|
} |
|
|
|
} |
|
|
|