From 5c4c81b0678566643895a4ebb27a2becef7e5b96 Mon Sep 17 00:00:00 2001
From: zouyx <1798599149@qq.com>
Date: Sat, 2 Nov 2024 20:29:34 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../code/StatisticsWarning/fragmentW.html | 6 +--
.../StatisticsWarning/statisticsWarning.html | 7 ----
.../code/complaintStatic/complaintA.html | 6 +--
.../code/complaintStatic/complaintB.html | 6 +--
.../code/complaintStatic/complaintStatic.html | 4 +-
.../project/code/registration/fragmentA.html | 7 +++-
.../code/registration/registration.html | 2 +-
.../code/statisticsEnterprise/fragmentE.html | 8 ++--
.../statisticsEnterprise.html | 2 +-
.../EnforcementRegistrationController.java | 37 ++++++++++++++++---
.../StatisticsEnterpriseController.java | 3 ++
.../StatisticsWarningController.java | 2 +-
12 files changed, 58 insertions(+), 32 deletions(-)
diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/StatisticsWarning/fragmentW.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/StatisticsWarning/fragmentW.html
index 8adcc1e0..c42f9b7f 100644
--- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/StatisticsWarning/fragmentW.html
+++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/StatisticsWarning/fragmentW.html
@@ -3,9 +3,9 @@
-
-
-
+
+
+
diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/StatisticsWarning/statisticsWarning.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/StatisticsWarning/statisticsWarning.html
index eb2fcaaf..d4413b93 100644
--- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/StatisticsWarning/statisticsWarning.html
+++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/StatisticsWarning/statisticsWarning.html
@@ -61,13 +61,6 @@
导出
-
-
diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintA.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintA.html
index e727079f..cad580e1 100644
--- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintA.html
+++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintA.html
@@ -3,9 +3,9 @@
-
-
-
-
+
+
+
diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintB.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintB.html
index 11095ca8..160095a2 100644
--- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintB.html
+++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintB.html
@@ -3,9 +3,9 @@
-
-
-
-
+
+
+
diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintStatic.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintStatic.html
index a062c1e6..363f6232 100644
--- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintStatic.html
+++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintStatic.html
@@ -390,9 +390,9 @@
var option3 = {
color:['#1874CD','#3A5FCD','#436EEE','#4876FF','#1E90FF','#63B8FF'],
tooltip: {},
- /*legend: {
+ legend: {
data: ['投诉类型统计']
- },*/
+ },
series: [
{
name: '投诉类型统计',
diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/fragmentA.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/fragmentA.html
index 1e00ee61..275fe6f0 100644
--- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/fragmentA.html
+++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/fragmentA.html
@@ -3,10 +3,13 @@
-
-
+
+
+
+
diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/registration.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/registration.html
index 99b772f6..a457b34a 100644
--- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/registration.html
+++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/registration.html
@@ -141,7 +141,7 @@
-->
-
-
2024年:
+
diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statisticsEnterprise/fragmentE.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statisticsEnterprise/fragmentE.html
index a5bc46bb..3456f6f4 100644
--- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statisticsEnterprise/fragmentE.html
+++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statisticsEnterprise/fragmentE.html
@@ -2,10 +2,10 @@
-
-
-
-
-
+
+
+
+
diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statisticsEnterprise/statisticsEnterprise.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statisticsEnterprise/statisticsEnterprise.html
index 363fd511..52b74fb2 100644
--- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statisticsEnterprise/statisticsEnterprise.html
+++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statisticsEnterprise/statisticsEnterprise.html
@@ -342,7 +342,7 @@
var currentId=$('form').eq(1).attr('id');
var params = $.common.formToJSON(currentId);
$.ajax({
- url:prefix+'/searchType',
+ url:prefix+'/search',
type:'GET',
data:params,
success: function (response) {
diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java
index 2f9e788b..955e1e87 100644
--- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java
+++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java
@@ -1,6 +1,7 @@
package com.zdxt.code.controller;
import java.lang.reflect.Array;
+import java.text.DecimalFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters;
@@ -61,7 +62,9 @@ public class EnforcementRegistrationController extends BaseController
@RequiresPermissions("code:registration:view")
@GetMapping()
public String registration(Model model)
- { LocalDate localDate=LocalDate.now();
+ {
+ DecimalFormat str1=new DecimalFormat("0.00%");
+ LocalDate localDate=LocalDate.now();
DateTimeFormatter str=DateTimeFormatter.ofPattern("yyyy-MM-dd");
EnforcementRegistration enforcementRegistration =new EnforcementRegistration();
LocalDate beginTime=localDate.withYear(Integer.valueOf(localDate.getYear())).withMonth(1).withDayOfMonth(1);
@@ -72,12 +75,25 @@ public class EnforcementRegistrationController extends BaseController
List uniteList=list.stream().filter(item->item.getUniteCheck()!=null&&!"".equals(item.getUniteCheck())).collect(Collectors.toList());
List checkList=list.stream().filter(item->item.getCheckCategory()!=null&&!"".equals(item.getCheckCategory())&&item.getCheckCategory().equals("01")).collect(Collectors.toList());
String checkName=iDictDataService.selectDictLabel("check_category","01");
+ model.addAttribute("year",localDate.getYear());
model.addAttribute("yearList",yearMake());
model.addAttribute("unite",uniteList.size());
- model.addAttribute("uniteDouble",String.format("%.3f",((double)uniteList.size()/list.size())));
+ /*model.addAttribute("uniteDouble",String.format("%.3f",((double)uniteList.size()/list.size())));*/
+ String uniteDouble=str1.format((double)uniteList.size()/list.size());
+ if(uniteDouble.equals("NaN")){
+ model.addAttribute("uniteDouble","-");
+ }else {
+ model.addAttribute("uniteDouble", uniteDouble);
+ }
model.addAttribute("check",checkName);//!!
model.addAttribute("checkNumber",checkList.size());
- model.addAttribute("checkDouble",String.format("%.3f",((double)checkList.size()/list.size())));
+ /*model.addAttribute("checkDouble",String.format("%.3f",((double)checkList.size()/list.size())));*/
+ String checkDouble=str1.format((double)checkList.size()/list.size());
+ if(checkDouble.equals("NaN")){
+ model.addAttribute("checkDouble","-");
+ }else {
+ model.addAttribute("checkDouble", checkDouble);
+ }
return prefix + "/registration";
}
@@ -132,6 +148,7 @@ public class EnforcementRegistrationController extends BaseController
@GetMapping("/searchType")
public String searchType(EnforcementRegistration enforcementRegistration,Model model)
{
+ model.addAttribute("year",enforcementRegistration.getYear());
List list = enforcementRegistrationService.selectEnforcementRegistrationList1(enforcementRegistration);
System.out.println(1);
List uniteList=list.stream().filter(item->item.getUniteCheck()!=null&&!"".equals(item.getUniteCheck())).collect(Collectors.toList());
@@ -145,10 +162,20 @@ public class EnforcementRegistrationController extends BaseController
checkName = iDictDataService.selectDictLabel("check_category", "01");
}
model.addAttribute("unite",uniteList.size());
- model.addAttribute("uniteDouble",String.format("%.3f",((double)uniteList.size()/list.size())));
+ String uniteDouble=String.format("%.3f",((double)uniteList.size()/list.size()));
+ if(uniteDouble.equals("NaN")){
+ model.addAttribute("uniteDouble","-");
+ }else {
+ model.addAttribute("uniteDouble", uniteDouble);
+ }
model.addAttribute("check",checkName);
model.addAttribute("checkNumber",checkList.size());
- model.addAttribute("checkDouble",String.format("%.3f",((double)checkList.size()/list.size())));
+ String checkDouble=String.format("%.3f",((double)checkList.size()/list.size()));
+ if(checkDouble.equals("NaN")){
+ model.addAttribute("checkDouble","-");
+ }else {
+ model.addAttribute("checkDouble", checkDouble);
+ }
return prefix+"/fragmentA";
}
diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsEnterpriseController.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsEnterpriseController.java
index 56720e90..5b268e08 100644
--- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsEnterpriseController.java
+++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsEnterpriseController.java
@@ -61,6 +61,8 @@ public class StatisticsEnterpriseController extends BaseController {
String jd = iDictDataService.selectDictLabel(searchType.getQy(), searchType.getJd());
enterpriseInformation.setEnterpriseAddress("深圳市" + qy + jd);
}
+ String qyJd=enterpriseInformation.getEnterpriseAddress().substring(3);
+ model.addAttribute("qyJd",enterpriseInformation.getEnterpriseAddress().substring(3));
if (qy.equals("光明区")) {
//光明区
enterpriseInformationList = iEnterpriseInformationService.selectEnterpriseInformationList1(enterpriseInformation);
@@ -77,6 +79,7 @@ public class StatisticsEnterpriseController extends BaseController {
enterpriseInformationList = iEnterpriseInformationService.selectEnterpriseInformationList1(enterpriseInformation);
}
}else {
+ model.addAttribute("qyJd", "全市");
enterpriseInformationList = iEnterpriseInformationService.selectEnterpriseInformationList1(new EnterpriseInformation());
}
List existList = enterpriseInformationList.stream().filter(item -> item.getIsDelete() == 0).collect(Collectors.toList());
diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsWarningController.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsWarningController.java
index f874b3f5..09e85f3c 100644
--- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsWarningController.java
+++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsWarningController.java
@@ -89,7 +89,7 @@ public class StatisticsWarningController extends BaseController {
List listList=iLawEnforcementWarningListService.selectLawEnforcementWarningListList2(lawEnforcementWarningList);
model.addAttribute("year",searchType.getYear());
/*model.addAttribute("Number1",Number1);*/
- model.addAttribute("Number1",listList);
+ model.addAttribute("Number1",listList.size());
/*model.addAttribute("Number2",lawEnforcementWarningListList.size());*/
Map map=lawEnforcementWarningListList.stream().collect(Collectors.groupingBy(LawEnforcementWarningList::getEnforcementDepartmentId,Collectors.counting()));
model.addAttribute("Number2",map.size());