|
|
|
@ -110,80 +110,6 @@ public class StatisticsEnterpriseController extends BaseController { |
|
|
|
@GetMapping("/listQY") |
|
|
|
@ResponseBody |
|
|
|
public List<StatisticsIndicator> statisticsEnterpriseQY(SearchType searchType) { |
|
|
|
/*List<DictData>dictDataList=iDictDataService.selectDictDataByType("address_type");//有序->区
|
|
|
|
Map<String,String> dictDataMap=dictDataList.stream().collect(Collectors.toMap(DictData::getDictValue,DictData::getDictLabel)); |
|
|
|
List<String> list=new ArrayList<>();//无序->深圳市+区
|
|
|
|
for(String s:dictDataMap.keySet()){ |
|
|
|
list.add("深圳市"+dictDataMap.get(s)); |
|
|
|
} |
|
|
|
EnterpriseInformation enterpriseInformation=new EnterpriseInformation(); |
|
|
|
List<StatisticsIndicator> statisticsIndicatorList = new ArrayList<>(); |
|
|
|
if(searchType.getQy()!=null&&!"".equals(searchType.getQy())) { |
|
|
|
String qy=iDictDataService.selectDictLabel("address_type",searchType.getQy()); |
|
|
|
enterpriseInformation.setEnterpriseAddress("深圳市" + qy); |
|
|
|
if (searchType.getJd() != null && !"".equals(searchType.getJd())) { |
|
|
|
String jd=iDictDataService.selectDictLabel(searchType.getQy(),searchType.getJd()); |
|
|
|
enterpriseInformation.setEnterpriseAddress("深圳市" + qy + jd); |
|
|
|
} |
|
|
|
List<EnterpriseInformation> enterpriseInformationList=new ArrayList<>(); |
|
|
|
if(qy.equals("光明区")){ |
|
|
|
//光明区
|
|
|
|
enterpriseInformationList = iEnterpriseInformationService.selectEnterpriseInformationList1(enterpriseInformation); |
|
|
|
EnterpriseInformation e2=new EnterpriseInformation(); |
|
|
|
e2.setEnterpriseAddress("深圳市光明新区"); |
|
|
|
//光明新区
|
|
|
|
if (searchType.getJd() != null && !"".equals(searchType.getJd())) { |
|
|
|
String jd=iDictDataService.selectDictLabel(searchType.getQy(),searchType.getJd()); |
|
|
|
e2.setEnterpriseAddress("深圳市光明新区" + jd); |
|
|
|
} |
|
|
|
List<EnterpriseInformation> e2List = iEnterpriseInformationService.selectEnterpriseInformationList1(e2); |
|
|
|
enterpriseInformationList.addAll(e2List); |
|
|
|
}else { |
|
|
|
enterpriseInformationList = iEnterpriseInformationService.selectEnterpriseInformationList1(enterpriseInformation); |
|
|
|
} |
|
|
|
StatisticsIndicator s = new StatisticsIndicator(); |
|
|
|
List<EnterpriseInformation> existList = enterpriseInformationList.stream().filter(item -> item.getIsDelete() == 0).collect(Collectors.toList()); |
|
|
|
List<EnterpriseInformation> logoutList = enterpriseInformationList.stream().filter(item -> item.getIsDelete() == 1).collect(Collectors.toList()); |
|
|
|
s.setName(qy); |
|
|
|
s.setTotalNumber(enterpriseInformationList.size()); |
|
|
|
s.setNumInt(existList.size()); |
|
|
|
s.setValue(logoutList.size()); |
|
|
|
statisticsIndicatorList.add(s); |
|
|
|
return statisticsIndicatorList; |
|
|
|
|
|
|
|
}else { |
|
|
|
List<EnterpriseInformation> enterpriseInformationList = iEnterpriseInformationService.selectEnterpriseInformationList1(new EnterpriseInformation()); |
|
|
|
for (DictData d : dictDataList) { |
|
|
|
StatisticsIndicator s = new StatisticsIndicator(); |
|
|
|
String name = d.getDictLabel(); |
|
|
|
List<EnterpriseInformation> qyList = new ArrayList<>();//有序区--企业
|
|
|
|
if (name.equals("光明区")) { |
|
|
|
qyList = enterpriseInformationList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + name) || item.getEnterpriseAddress().startsWith("深圳市光明新区")).collect(Collectors.toList()); |
|
|
|
} else { |
|
|
|
qyList = enterpriseInformationList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + name)).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
List<EnterpriseInformation> existList = qyList.stream().filter(item -> item.getIsDelete() == 0).collect(Collectors.toList()); |
|
|
|
List<EnterpriseInformation> logoutList = qyList.stream().filter(item -> item.getIsDelete() == 1).collect(Collectors.toList()); |
|
|
|
s.setName(name); |
|
|
|
s.setTotalNumber(qyList.size()); |
|
|
|
s.setNumInt(existList.size()); |
|
|
|
s.setValue(logoutList.size()); |
|
|
|
statisticsIndicatorList.add(s); |
|
|
|
} |
|
|
|
List<EnterpriseInformation> qtList = enterpriseInformationList.stream().filter(item -> !qyMake(list, item.getEnterpriseAddress())).collect(Collectors.toList()); |
|
|
|
qtList = qtList.stream().filter(item -> !item.getEnterpriseAddress().startsWith("深圳市光明新区")).collect(Collectors.toList()); |
|
|
|
if (qtList != null && qtList.size() > 0) { |
|
|
|
List<EnterpriseInformation> existList = qtList.stream().filter(item -> item.getIsDelete() == 0).collect(Collectors.toList()); |
|
|
|
List<EnterpriseInformation> logoutList = qtList.stream().filter(item -> item.getIsDelete() == 1).collect(Collectors.toList()); |
|
|
|
StatisticsIndicator s = new StatisticsIndicator(); |
|
|
|
s.setName("其他"); |
|
|
|
s.setTotalNumber(qtList.size()); |
|
|
|
s.setNumInt(existList.size()); |
|
|
|
s.setValue(logoutList.size()); |
|
|
|
statisticsIndicatorList.add(s); |
|
|
|
} |
|
|
|
return statisticsIndicatorList; |
|
|
|
}*/ |
|
|
|
return iEnterpriseInformationService.enterpriseInformationAllListToQY(searchType); |
|
|
|
} |
|
|
|
|
|
|
|
@ -191,78 +117,8 @@ public class StatisticsEnterpriseController extends BaseController { |
|
|
|
@GetMapping("/listJD") |
|
|
|
@ResponseBody |
|
|
|
public List<StatisticsIndicator> statisticsEnterpriseJD(SearchType searchType) { |
|
|
|
/*List<DictData>dictDataList=iDictDataService.selectDictDataByType("address_type"); |
|
|
|
Map<String,String> qyMap=dictDataList.stream().collect(Collectors.toMap(DictData::getDictLabel,DictData::getDictValue)); |
|
|
|
EnterpriseInformation enterpriseInformation=new EnterpriseInformation(); |
|
|
|
if(searchType.getQy()!=null&&!"".equals(searchType.getQy())){ |
|
|
|
enterpriseInformation.setEnterpriseAddress("深圳市"+searchType.getQy()); |
|
|
|
if(searchType.getJd()!=null&&!"".equals(searchType.getJd())){ |
|
|
|
enterpriseInformation.setEnterpriseAddress("深圳市"+searchType.getQy()+searchType.getJd()); |
|
|
|
} |
|
|
|
} |
|
|
|
List<EnterpriseInformation> enterpriseInformationList = iEnterpriseInformationService.selectEnterpriseInformationList1(enterpriseInformation);//所有企业
|
|
|
|
List<StatisticsIndicator> statisticsIndicatorList = new ArrayList<>(); |
|
|
|
if(qyMap.containsKey(searchType.getName())) { |
|
|
|
List<DictData> jdDictList = iDictDataService.selectDictDataByType(qyMap.get(searchType.getName()));//有序街道
|
|
|
|
Map<String, String> jdMap = jdDictList.stream().collect(Collectors.toMap(DictData::getDictValue, DictData::getDictLabel)); |
|
|
|
if (searchType.getName().equals("光明区")) {//将该区内的过滤出来
|
|
|
|
enterpriseInformationList=enterpriseInformationList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市"+ searchType.getName())|| item.getEnterpriseAddress().startsWith("深圳市光明新区")).collect(Collectors.toList()); |
|
|
|
} else { |
|
|
|
enterpriseInformationList=enterpriseInformationList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市"+ searchType.getName())).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
for (DictData d : jdDictList) {//遍历按序版的区域list
|
|
|
|
StatisticsIndicator s = new StatisticsIndicator(); |
|
|
|
String name = d.getDictLabel(); |
|
|
|
List<EnterpriseInformation> qyList = new ArrayList<>(); |
|
|
|
if (searchType.getName().equals("光明区")) { |
|
|
|
qyList = enterpriseInformationList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市"+ searchType.getName() + name) || item.getEnterpriseAddress().startsWith("深圳市光明新区"+ name)).collect(Collectors.toList()); |
|
|
|
} else { |
|
|
|
qyList = enterpriseInformationList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市"+ searchType.getName() + name)).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
List<EnterpriseInformation> existList = qyList.stream().filter(item -> item.getIsDelete() == 0).collect(Collectors.toList()); |
|
|
|
List<EnterpriseInformation> logoutList = qyList.stream().filter(item -> item.getIsDelete() == 1).collect(Collectors.toList()); |
|
|
|
s.setName(name); |
|
|
|
s.setAddress(searchType.getName()); |
|
|
|
s.setTotalNumber(qyList.size()); |
|
|
|
s.setNumInt(existList.size()); |
|
|
|
s.setValue(logoutList.size()); |
|
|
|
statisticsIndicatorList.add(s); |
|
|
|
} |
|
|
|
List<EnterpriseInformation> qtList=enterpriseInformationList.stream().filter(item->!jdMake(searchType.getName(),jdDictList,item.getEnterpriseAddress())).collect(Collectors.toList()); |
|
|
|
if(qtList!=null&&qtList.size()>0) { |
|
|
|
List<EnterpriseInformation> existList = qtList.stream().filter(item -> item.getIsDelete() == 0).collect(Collectors.toList()); |
|
|
|
List<EnterpriseInformation> logoutList = qtList.stream().filter(item -> item.getIsDelete() == 1).collect(Collectors.toList()); |
|
|
|
StatisticsIndicator s = new StatisticsIndicator(); |
|
|
|
s.setName("其他"); |
|
|
|
s.setAddress(searchType.getName()); |
|
|
|
s.setTotalNumber(qtList.size()); |
|
|
|
s.setNumInt(existList.size()); |
|
|
|
s.setValue(logoutList.size()); |
|
|
|
statisticsIndicatorList.add(s); |
|
|
|
} |
|
|
|
return statisticsIndicatorList; |
|
|
|
}else { |
|
|
|
Map<String,String> dictDataMap=dictDataList.stream().collect(Collectors.toMap(DictData::getDictValue,DictData::getDictLabel)); |
|
|
|
List<String> list=new ArrayList<>();//无序->深圳市+区
|
|
|
|
for(String s:dictDataMap.keySet()){ |
|
|
|
list.add("深圳市"+dictDataMap.get(s)); |
|
|
|
} |
|
|
|
List<EnterpriseInformation> qtList=enterpriseInformationList.stream().filter(item->!qyMake(list,item.getEnterpriseAddress())).collect(Collectors.toList()); |
|
|
|
qtList = qtList.stream().filter(item -> !item.getEnterpriseAddress().startsWith("深圳市光明新区")).collect(Collectors.toList()); |
|
|
|
if(qtList!=null&&qtList.size()>0) { |
|
|
|
List<EnterpriseInformation> existList = qtList.stream().filter(item -> item.getIsDelete() == 0).collect(Collectors.toList()); |
|
|
|
List<EnterpriseInformation> logoutList = qtList.stream().filter(item -> item.getIsDelete() == 1).collect(Collectors.toList()); |
|
|
|
StatisticsIndicator s = new StatisticsIndicator(); |
|
|
|
s.setAddress("其他"); |
|
|
|
s.setTotalNumber(qtList.size()); |
|
|
|
s.setNumInt(existList.size()); |
|
|
|
s.setValue(logoutList.size()); |
|
|
|
statisticsIndicatorList.add(s); |
|
|
|
} |
|
|
|
return statisticsIndicatorList; |
|
|
|
}*/ |
|
|
|
return iEnterpriseInformationService.enterpriseInformationAllListToJD(searchType); |
|
|
|
} |
|
|
|
return iEnterpriseInformationService.enterpriseInformationAllListToJD(searchType); |
|
|
|
} |
|
|
|
@RequiresPermissions("code:statisticsEnterprise:list") |
|
|
|
@GetMapping("/type") |
|
|
|
@ResponseBody |
|
|
|
@ -335,13 +191,14 @@ public class StatisticsEnterpriseController extends BaseController { |
|
|
|
@PostMapping("/export1") |
|
|
|
@ResponseBody |
|
|
|
public void export1(HttpServletResponse httpServletResponse,@RequestBody SearchType searchType) throws IOException { |
|
|
|
if(searchType.getJd()!=null&&!"".equals(searchType.getJd())){ |
|
|
|
/*if(searchType.getJd()!=null&&!"".equals(searchType.getJd())){ |
|
|
|
searchType.setJd(iDictDataService.selectDictLabel(searchType.getQy(), searchType.getJd())); |
|
|
|
} |
|
|
|
if(searchType.getQy()!=null&&!"".equals(searchType.getQy())){ |
|
|
|
searchType.setQy(iDictDataService.selectDictLabel("address_type", searchType.getQy())); |
|
|
|
} |
|
|
|
statisticsEnterpriseService.qyAllList(httpServletResponse,searchType); |
|
|
|
statisticsEnterpriseService.qyAllList(httpServletResponse,searchType);*/ |
|
|
|
statisticsEnterpriseService.export1(httpServletResponse, searchType); |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("/export2") |
|
|
|
|