Browse Source

统计修改

v4
zouyx 2 years ago
parent
commit
3b03e5056f
  1. 4
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/registration.html
  2. 2
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementCheckStatisticsController.java
  3. 38
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java

4
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/registration.html

@ -401,7 +401,7 @@
formatter:function (value,row,index) {
for (i = 0; i < reson.length; i++) {
if (reson[i].dictValue == row.checkCss) {
return "<div style='text-align: left'>"+ reson[i].dictLabel +"</div>";
return "<span>"+ reson[i].dictLabel +"</span>";
}
}
}
@ -525,7 +525,7 @@
formatter:function (value,row,index) {
for (i = 0; i < reson.length; i++) {
if (reson[i].dictValue == row.checkCss) {
return "<div style='text-align: left'>"+ reson[i].dictLabel +"</div>";
return "<span>"+ reson[i].dictLabel +"</span>";
}
}
}

2
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementCheckStatisticsController.java

@ -89,7 +89,7 @@ public class EnforcementCheckStatisticsController extends BaseController {
System.out.println(enterpriseStreetList);
enforcementCheckStatisticsService.excelExport2(response,enterpriseStreetList,enterpriseAddress);
}
//http://localhost:85/enforcementCheckStatistics/queryAllList/2024-8-26/2024-8-28
//http://10.132.108.3:85/enforcementCheckStatistics/queryAllList/2024-8-24/2024-11-20
@GetMapping ("/queryAllList/{startTime}/{endTime}")
@ResponseBody
public void queryAllList(HttpServletResponse response, @PathVariable String startTime, @PathVariable String endTime) throws ParseException {//以企业维度统计

38
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java

@ -12,6 +12,7 @@ import java.util.function.Function;
import java.util.stream.Collectors;
import com.zdxt.auth.project.system.dept.service.IDeptService;
import com.zdxt.auth.project.system.dict.mapper.DictDataMapper;
import com.zdxt.auth.project.system.dict.service.IDictDataService;
import com.zdxt.code.domain.EnforceRegCount;
import com.zdxt.code.domain.EnterpriseLawEnforcement;
@ -62,6 +63,8 @@ public class EnforcementRegistrationController extends BaseController
private IDeptService iDeptService;
@Autowired
private EnforcementCheckStatisticsService enforcementCheckStatisticsService;
@Autowired
private DictDataMapper dictDataMapper;
@RequiresPermissions("code:registration:view")
@GetMapping()
@ -711,34 +714,33 @@ public class EnforcementRegistrationController extends BaseController
enforcementCheckStatistics.setNowTime(new Date());
List<EnforcementCheckStatistics> enforcementCheckStatisticsList=enforcementCheckStatisticsService.selectAllStatisticsList(enforcementCheckStatistics);
List<String> inOrderList=new ArrayList<>();
Collections.addAll(inOrderList,"福田区","罗湖区","盐田区","南山区","宝安区","龙岗区","龙华区",
"坪山区","光明区","大鹏新区","深汕特别合作区");
List<DictData> dictDataListQY=dictDataMapper.selectDictDataByType("address_type");
/*Collections.addAll(inOrderList,"福田区","罗湖区","盐田区","南山区","宝安区","龙岗区","龙华区",
"坪山区","光明区","大鹏新区","深汕特别合作区");*/
for(DictData d:dictDataListQY){
inOrderList.add(d.getDictLabel());
}
Map<String,List<EnforcementCheckStatistics>> enforcementCheckStatisticsMap=new HashMap<>();
for(int i=0;i<inOrderList.size();i++){
String area=inOrderList.get(i);
//List<EnforcementCheckStatistics> e1=enforcementCheckStatisticsList.stream().filter(item->item.getEnterpriseAddress().contains(area)).collect(Collectors.toList());
List<EnforcementCheckStatistics> e1=new ArrayList<>();
if(area.equals("光明区")){//光明区特殊处理
//e1 = enforcementCheckStatisticsList.stream().collect(Collectors.groupingBy(item -> ((item.getEnterpriseAddress().contains(area)||(item.getEnterpriseAddress().contains("光明新区")))? area : "其他")));
e1=enforcementCheckStatisticsList.stream().filter(item->(item.getEnterpriseAddress().contains(area)||item.getEnterpriseAddress().contains("光明新区"))).collect(Collectors.toList());
}else {
// e1 = enforcementCheckStatisticsList.stream().collect(Collectors.groupingBy(item -> (item.getEnterpriseAddress().contains(area)? area : "其他")));
e1=enforcementCheckStatisticsList.stream().filter(item->item.getEnterpriseAddress().contains(area)).collect(Collectors.toList());
}
List<EnforcementCheckStatistics> e1=enforcementCheckStatisticsList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + area.substring(0, area.indexOf("区")) + "区") || item.getEnterpriseAddress().startsWith("深圳市" + area.substring(0, area.indexOf("区")) + "新区")).collect(Collectors.toList());
enforcementCheckStatisticsMap.put(area,e1);
}
//将地址不属于各个区的筛出来放入执法记录map
List<EnforcementCheckStatistics> qt=enforcementCheckStatisticsList.stream().filter(item->!(
item.getEnterpriseAddress().contains("福田区")||item.getEnterpriseAddress().contains("罗湖区")||
item.getEnterpriseAddress().contains("盐田区")||item.getEnterpriseAddress().contains("南山区")||
item.getEnterpriseAddress().contains("宝安区")||item.getEnterpriseAddress().contains("龙岗区")||
item.getEnterpriseAddress().contains("龙华区")||item.getEnterpriseAddress().contains("坪山区")||
item.getEnterpriseAddress().contains("大鹏新区")||item.getEnterpriseAddress().contains("深汕特别合作区")||
item.getEnterpriseAddress().contains("光明区")||item.getEnterpriseAddress().contains("光明新区")))
.collect(Collectors.toList());
List<EnforcementCheckStatistics> qt=enforcementCheckStatisticsList.stream().filter(item->!qyqtMake(inOrderList,item.getEnterpriseAddress())).collect(Collectors.toList());
enforcementCheckStatisticsMap.put("其他",qt);
List<EnterpriseStreet> enterpriseStreet=enforcementCheckStatisticsService.selectEnterpriseStreetList();
inOrderList.add("其他");
enforcementCheckStatisticsService.ZFJDM(httpServletResponse,enforcementCheckStatistics,inOrderList,enforcementCheckStatisticsMap,enterpriseStreet);
}
public Boolean qyqtMake(List<String> strings,String s){
for (String string : strings) {
if (s.startsWith("深圳市" + string.substring(0, string.indexOf("区")) + "区")||s.startsWith("深圳市" + string.substring(0, string.indexOf("区")) + "新区")) {
return true;
}
}
return false;
}
}

Loading…
Cancel
Save