From e35953c1bfc367498f38541bbca545df8c5c8a8a Mon Sep 17 00:00:00 2001 From: zouyx <1798599149@qq.com> Date: Sun, 1 Dec 2024 17:31:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppEnterpriseInformationController.java | 20 ++- .../dept/controller/DeptController.java | 1 + .../resources/mapper/system/DeptMapper.xml | 2 +- .../project/code/analysis/analysis.html | 141 +++++++++++++++--- .../project/code/ruleItemList/add.html | 31 +++- .../project/code/ruleItemList/edit.html | 31 +++- .../code/ruleItemList/ruleItemList.html | 4 +- .../project/code/statistical/statistical.html | 4 +- .../controller/StatisticalController.java | 64 ++++++++ .../EnterpriseInformationServiceImpl.java | 26 ++-- .../main/resources/mapper/RuleListMapper.xml | 2 +- .../resources/mapper/StatisticalMapper.xml | 33 ++++ 12 files changed, 321 insertions(+), 38 deletions(-) diff --git a/lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseInformationController.java b/lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseInformationController.java index 4b63e4d8..25468dd0 100644 --- a/lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseInformationController.java +++ b/lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseInformationController.java @@ -109,7 +109,25 @@ public class AppEnterpriseInformationController extends BaseController return enterpriseInformationService.updateEnterpriseInformation(enterpriseInformation) > 0 ? ZDResponse.success("修改成功"): ZDResponse.error("修改失败"); } - + @PostMapping("/editNotQX") + @ResponseBody + public ZDResponse editNotQX(@RequestBody EnterpriseInformation enterpriseInformation) + { + int i=enterpriseInformationService.updateEnterpriseInformation(enterpriseInformation); + return i > 0 ? + ZDResponse.success("修改成功"): ZDResponse.error("修改失败"); + } + @PostMapping("/unsubscribeNotQX") + @ResponseBody + public ZDResponse unsubscribeNotQX(@RequestBody EnterpriseInformation enterpriseInformation) + { + if(enterpriseInformation.getEnterpriseNumber()!=null&&!"".equals(enterpriseInformation.getEnterpriseNumber())){ + enterpriseInformation.setId(enterpriseInformationService.selectEnterpriseInformationByNum(enterpriseInformation.getEnterpriseNumber()).getId());enterpriseInformationService.selectEnterpriseInformationByNum(enterpriseInformation.getEnterpriseNumber()); + } + int i=enterpriseInformationService.updateEnterpriseInformation(enterpriseInformation); + return i > 0 ? + ZDResponse.success("注销成功"): ZDResponse.error("注销失败"); + } /** * 修改保存企业信息登记 diff --git a/lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/dept/controller/DeptController.java b/lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/dept/controller/DeptController.java index 65481c8a..9250c779 100644 --- a/lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/dept/controller/DeptController.java +++ b/lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/dept/controller/DeptController.java @@ -97,6 +97,7 @@ public class DeptController extends BaseController { { return error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在"); } + dept.setDeptId("111111111"); return toAjax(deptService.insertDept(dept)); } diff --git a/lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/DeptMapper.xml b/lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/DeptMapper.xml index 3538e0c2..3dc74e8a 100644 --- a/lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/DeptMapper.xml +++ b/lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/DeptMapper.xml @@ -223,7 +223,7 @@ select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{deptId}, ancestors) - + insert into sys_dept( dept_id, parent_id, diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/analysis/analysis.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/analysis/analysis.html index 31b209ae..3d845c22 100644 --- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/analysis/analysis.html +++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/analysis/analysis.html @@ -21,25 +21,27 @@

深圳市各类行政检查实施情况分析

- - 年度 - + 年度:年度 - + 季度: + 季度 - + 月度: + 月度 - + 领域:领域 - - + 类别: + 类别 +
分析模板:
+
@@ -22,10 +23,13 @@
-
+ + +
@@ -41,6 +45,11 @@ \ No newline at end of file diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/edit.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/edit.html index 1aa31c87..19531c88 100644 --- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/edit.html +++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/edit.html @@ -12,6 +12,7 @@
+
@@ -22,11 +23,14 @@
-
+ + +
@@ -42,6 +46,11 @@ \ No newline at end of file diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/ruleItemList.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/ruleItemList.html index bcbcebaf..7d34df14 100644 --- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/ruleItemList.html +++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/ruleItemList.html @@ -20,7 +20,7 @@
  • 告警级别:

    - @@ -29,6 +29,8 @@

    状态:

  • diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statistical.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statistical.html index 39c53ef8..c5fb7a2f 100644 --- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statistical.html +++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statistical.html @@ -153,6 +153,7 @@
  • + 企业数量总计:
    @@ -724,7 +725,8 @@ barDatas.push(list[i].total); tmpList.push({name: list[i].name, value: list[i].total}) } - + document.getElementById("enterprise_Total").innerText=data.data.length; + console.log(data) var tabStr = fillTable(tmpList); document.getElementById("echartSortTable").innerHTML = tabStr; diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalController.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalController.java index eae6294d..eeb47e89 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalController.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalController.java @@ -7,14 +7,17 @@ import com.zdxt.code.domain.LawEnforcerExcel; import com.zdxt.code.service.StatisticalService; import com.zdxt.common.ZDResponse; import com.zdxt.common.util.ExcelUtils; +import org.apache.poi.hssf.usermodel.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletResponse; +import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -122,4 +125,65 @@ public class StatisticalController { public String analysisModel() { return prefix2 + "/analysisModel"; } + + @PostMapping("/exportLawEnforcerExcel") + public void exportLawEnforcerExcel(HttpServletResponse httpServletResponse,StatisticalVo statisticalVo) throws IOException { + List statisticalVos = statisticalService.enforcerAnalysis(statisticalVo); + System.out.println(statisticalVos); + HSSFWorkbook workbook = new HSSFWorkbook(); + HSSFSheet sheet = workbook.createSheet("执法人员模板"); + //设置文件名称 + String fileName = "执法人员模板.xls"; + //设置表头 + String[] headerList = {"行政检查执法人员", "经办案件数量"}; + HSSFRow headerRow = sheet.createRow(0); + for (int i = 0; i < headerList.length; i++) { + HSSFCell cell = headerRow.createCell(i); + HSSFRichTextString text = new HSSFRichTextString(headerList[i]); + cell.setCellValue(text); + } + for(int i=0;i statisticalVos = statisticalService.enterpriseTableAnalysis(statisticalVo); + System.out.println(statisticalVos); + HSSFWorkbook workbook = new HSSFWorkbook(); + HSSFSheet sheet = workbook.createSheet("企业排序模板"); + //设置文件名称 + String fileName = "企业排序模板.xls"; + //设置表头 + String[] headerList = {"企业名称", "行政检查次数"}; + HSSFRow headerRow = sheet.createRow(0); + for (int i = 0; i < headerList.length; i++) { + HSSFCell cell = headerRow.createCell(i); + HSSFRichTextString text = new HSSFRichTextString(headerList[i]); + cell.setCellValue(text); + } + for(int i=0;i and rule_name like concat('%', #{ruleName}, '%') - and rule_code = #{ruleCode} + and rule_code like concat('%', #{ruleCode}, '%') and valid_begin_time = #{validBeginTime} and valid_end_time = #{validEndTime} and user_id = #{userId} diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalMapper.xml b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalMapper.xml index da9b6033..88a42405 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalMapper.xml +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalMapper.xml @@ -139,6 +139,12 @@ AND ei.industry = #{industry} + + AND er.law_field = #{lawField} + + + AND er.check_category = #{checkCategory} + ${params.dataScope} @@ -162,6 +168,12 @@ AND ei.industry = #{industry} + + AND er.law_field = #{lawField} + + + AND er.check_category = #{checkCategory} + ${params.dataScope} @@ -187,6 +199,12 @@ AND ei.industry = #{industry} + + AND r.law_field = #{lawField} + + + AND r.check_category = #{checkCategory} + ${params.dataScope} GROUP BY d.id ORDER BY total DESC limit 100 @@ -209,6 +227,12 @@ AND i.industry = #{industry} + + AND r.law_field = #{lawField} + + + AND r.check_category = #{checkCategory} + ${params.dataScope} @@ -277,6 +301,15 @@ AND DATE_FORMAT(er.enforcement_time, '%Y-%m') = #{params.yearMonth} + + AND ei.industry = #{industry} + + + AND er.law_field = #{lawField} + + + AND er.check_category = #{checkCategory} + ${params.dataScope}