Commit 92188651 authored by suhuiguang's avatar suhuiguang

feat(statis):行政审批局

1.区域统计适配行政审批
parent c1b909b8
...@@ -32,9 +32,7 @@ public class YwblpjsxtjServiceImpl implements IZBGLService { ...@@ -32,9 +32,7 @@ public class YwblpjsxtjServiceImpl implements IZBGLService {
public Map<String, Object> getChart(DPFilterParamForDetailDto dpFilterParamForDetailDto) { public Map<String, Object> getChart(DPFilterParamForDetailDto dpFilterParamForDetailDto) {
List<RegionModel> regionModels = stCommonService.setRegionIfRootParent(dpFilterParamForDetailDto.getCityCode()); List<RegionModel> regionModels = stCommonService.setRegionIfRootParent(dpFilterParamForDetailDto.getCityCode());
String orgCodeP = stCommonService.getAndSetOrgCode(dpFilterParamForDetailDto.getCityCode()); String orgCodeP = stCommonService.getAndSetOrgCode(dpFilterParamForDetailDto.getCityCode());
DPFilterParamDto dpFilterParamDto = new DPFilterParamDto(); DPFilterParamDto dpFilterParamDto = buildAreaFilter(dpFilterParamForDetailDto);
dpFilterParamDto.setCityCode(dpFilterParamForDetailDto.getCityCode());
stCommonService.setChildCompanyCodeByRegion(dpFilterParamForDetailDto.getCityCode(), dpFilterParamDto);
//安装告知、维修告知、改造告知、移装告知 //安装告知、维修告知、改造告知、移装告知
List<CountDto> noticeCount = jgStatisticsMapper.queryNoticeAvgDayByReceiveCompany(dpFilterParamDto, orgCodeP); List<CountDto> noticeCount = jgStatisticsMapper.queryNoticeAvgDayByReceiveCompany(dpFilterParamDto, orgCodeP);
//使用登记、车用气瓶使用登记 //使用登记、车用气瓶使用登记
...@@ -112,9 +110,9 @@ public class YwblpjsxtjServiceImpl implements IZBGLService { ...@@ -112,9 +110,9 @@ public class YwblpjsxtjServiceImpl implements IZBGLService {
public Page<Map<String, Object>> getPage(Page page,DPFilterParamForDetailDto dpFilterParamForDetailDto) { public Page<Map<String, Object>> getPage(Page page,DPFilterParamForDetailDto dpFilterParamForDetailDto) {
List<RegionModel> regionModels = stCommonService.setRegionIfRootParent(dpFilterParamForDetailDto.getCityCode()); List<RegionModel> regionModels = stCommonService.setRegionIfRootParent(dpFilterParamForDetailDto.getCityCode());
String orgCodeP = stCommonService.getAndSetOrgCode(dpFilterParamForDetailDto.getCityCode()); String orgCodeP = stCommonService.getAndSetOrgCode(dpFilterParamForDetailDto.getCityCode());
DPFilterParamDto dpFilterParamDto = new DPFilterParamDto(); DPFilterParamDto dpFilterParamDto = buildAreaFilter(dpFilterParamForDetailDto);
//安装告知、维修告知、改造告知、移装告知 //安装告知、维修告知、改造告知、移装告知
List<CountDto> noticCount = jgStatisticsMapper.queryNoticeAvgDayByReceiveCompany(dpFilterParamDto, orgCodeP); List<CountDto> noticeCount = jgStatisticsMapper.queryNoticeAvgDayByReceiveCompany(dpFilterParamDto, orgCodeP);
//使用登记、车用气瓶使用登记 //使用登记、车用气瓶使用登记
List<CountDto> useCount = jgStatisticsMapper.queryUseAvgDayByReceiveCompany(dpFilterParamDto, orgCodeP); List<CountDto> useCount = jgStatisticsMapper.queryUseAvgDayByReceiveCompany(dpFilterParamDto, orgCodeP);
//更名变更登记、改造变更登记、移装变更登记、单位变更登记、气瓶单位变更登记 //更名变更登记、改造变更登记、移装变更登记、单位变更登记、气瓶单位变更登记
...@@ -123,16 +121,16 @@ public class YwblpjsxtjServiceImpl implements IZBGLService { ...@@ -123,16 +121,16 @@ public class YwblpjsxtjServiceImpl implements IZBGLService {
List<CountDto> disableCount = jgStatisticsMapper.queryDisableAvgDayByReceiveCompany(dpFilterParamDto, orgCodeP); List<CountDto> disableCount = jgStatisticsMapper.queryDisableAvgDayByReceiveCompany(dpFilterParamDto, orgCodeP);
//注销报废 //注销报废
List<CountDto> cancelCount = jgStatisticsMapper.queryCancelAvgDayByReceiveCompany(dpFilterParamDto, orgCodeP); List<CountDto> cancelCount = jgStatisticsMapper.queryCancelAvgDayByReceiveCompany(dpFilterParamDto, orgCodeP);
List list = new ArrayList(); List<Map<String,Object>> list = new ArrayList<>();
regionModels.forEach(r -> { regionModels.forEach(r -> {
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
map.put("regionName",r.getRegionName()); map.put("regionName",r.getRegionName());
String orgCode = stCommonService.getAndSetOrgCode(r.getRegionCode().toString()); String selfAndChildRegion = stCommonService.getSelfAndChildRegion(r);
map.put("notic",this.avgAndSumDealDate(noticCount.stream().filter(c -> c.getKeyStr().contains(orgCode)).collect(Collectors.toList()))); map.put("notic",this.avgAndSumDealDate(noticeCount.stream().filter(c -> selfAndChildRegion.contains(stCommonService.castCompanyCode2RegionCode(c.getKeyStr()))).collect(Collectors.toList())));
map.put("use",this.avgAndSumDealDate(useCount.stream().filter(c -> c.getKeyStr().contains(orgCode)).collect(Collectors.toList()))); map.put("use",this.avgAndSumDealDate(useCount.stream().filter(c -> selfAndChildRegion.contains(stCommonService.castCompanyCode2RegionCode(c.getKeyStr()))).collect(Collectors.toList())));
map.put("change",this.avgAndSumDealDate(changeCount.stream().filter(c -> c.getKeyStr().contains(orgCode)).collect(Collectors.toList()))); map.put("change",this.avgAndSumDealDate(changeCount.stream().filter(c -> selfAndChildRegion.contains(stCommonService.castCompanyCode2RegionCode(c.getKeyStr()))).collect(Collectors.toList())));
map.put("disable",this.avgAndSumDealDate(disableCount.stream().filter(c -> c.getKeyStr().contains(orgCode)).collect(Collectors.toList()))); map.put("disable",this.avgAndSumDealDate(disableCount.stream().filter(c -> selfAndChildRegion.contains(stCommonService.castCompanyCode2RegionCode(c.getKeyStr()))).collect(Collectors.toList())));
map.put("cancel",this.avgAndSumDealDate(cancelCount.stream().filter(c -> c.getKeyStr().contains(orgCode)).collect(Collectors.toList()))); map.put("cancel",this.avgAndSumDealDate(cancelCount.stream().filter(c -> selfAndChildRegion.contains(stCommonService.castCompanyCode2RegionCode(c.getKeyStr()))).collect(Collectors.toList())));
list.add(map); list.add(map);
}); });
page.setRecords(list); page.setRecords(list);
...@@ -140,6 +138,13 @@ public class YwblpjsxtjServiceImpl implements IZBGLService { ...@@ -140,6 +138,13 @@ public class YwblpjsxtjServiceImpl implements IZBGLService {
return page; return page;
} }
private DPFilterParamDto buildAreaFilter(DPFilterParamForDetailDto dpFilterParamForDetailDto) {
DPFilterParamDto dpFilterParamDto = new DPFilterParamDto();
dpFilterParamDto.setCityCode(dpFilterParamForDetailDto.getCityCode());
stCommonService.setChildCompanyCodeByRegion(dpFilterParamForDetailDto.getCityCode(), dpFilterParamDto);
return dpFilterParamDto;
}
@Override @Override
public List<Map<String, String>> getTitle(DPFilterParamForDetailDto dpFilterParamForDetailDto) { public List<Map<String, String>> getTitle(DPFilterParamForDetailDto dpFilterParamForDetailDto) {
List<Map<String, String>> list = new ArrayList<>(); List<Map<String, String>> list = new ArrayList<>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment