diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html index 4b9cef62..a61a2fb4 100644 --- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html +++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html @@ -42,7 +42,7 @@
  • - @@ -59,6 +59,18 @@
  • + +
    + +
    @@ -143,7 +155,18 @@ type: "POST", dataType: 'json', success: function (data) { //成功,回调函数 - console.log(data.data) + console.log(data.data); + var e = data.data; + if(e != "undefined" && e != null){ + $("#yearTotal").text(e.yearTotal); + $("#quarterTotal").text(e.quarterTotal); + $("#monthTotal").text(e.monthTotal); + }else { + $("#yearTotal").text(0); + $("#quarterTotal").text(0); + $("#monthTotal").text(0); + } + }, error: function (er) { //失败,回调函数 } @@ -263,7 +286,6 @@ $("#yearDom").show(); $("#quarterDom").hide(); $("#monthDom").hide(); - $("input[name='year']").val(""); document.getElementById("quarter").selectedIndex = -1; $("input[name='month']").val("") }else if("quarter" == options.val()){ @@ -281,6 +303,11 @@ document.getElementById("quarter").selectedIndex = -1; $("input[name='month']").val("") } + if("year" != options.val()){ + $("input[name='year']").val(""); + var date = new Date(); + $("#yearDate").text(date.getFullYear()); + } } @@ -332,7 +359,13 @@ laydate.render({ elem: '#yearSearch', type: 'year', - trigger: 'click' + trigger: 'click', + change: function(value, date, endDate){ + console.log(value); //得到日期生成的值,如:2017-08-18 + console.log(date); //得到日期时间对象:{year: 2017, month: 8, date: 18, hours: 0, minutes: 0, seconds: 0} + console.log(endDate); //得结束的日期时间对象,开启范围选择(range: true)才会返回。对象成员同上。 + $("#yearDate").text(value) + } }); laydate.render({ elem: '#monthSearch', @@ -480,7 +513,6 @@ console.log(params); $("#bootstrap-table").bootstrapTable('refresh', params); this.changeEcharts(); - } function changeEcharts() { staticAllProgram(); diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statisticalPanel.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statisticalPanel.html index 096aee34..e2cf0c05 100644 --- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statisticalPanel.html +++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statisticalPanel.html @@ -9,9 +9,11 @@ -

    综合统计分析

      @@ -191,24 +192,30 @@
      执法部门数量
      -
      48个
      +
      --个
      - ↑2 + ↑ + ↓ + 2 +
      执法人员数量
      -
      1,969人
      +
      1,969人
      - ↓32 + ↓ + 32
      本单位执法人员数量
      -
      29人
      +
      29人
      - ↓2 + ↓ + -- +
      @@ -217,24 +224,35 @@
      企业数量
      -
      4,317,947家
      +
      家
      - ↑1.25万 + + ↑ + ↓ + 125000
      续存企业数量
      -
      3,568,481家
      +
      家
      - ↑0.63万 + + ↑ + ↓ +
      注销企业数量
      -
      79,962家
      +
      + -- + 家
      - ↓0.39万 + + ↑ + ↓ + 0.39万
      @@ -243,24 +261,24 @@
      检查计划数量
      -
      1,674个
      +
      1,674个
      - ↑35 + ↑35
      行政检查计划数量
      -
      1,005个
      +
      1,005个
      - ↓62 + ↓62
      本单位检查计划数量
      -
      597个
      +
      597个
      - ↑26 + ↑26
      @@ -269,24 +287,26 @@
      执法检查数量
      -
      14,457件
      +
      --件
      - ↑33 + ↑ + -- +
      本单位检查数量
      -
      2,356件
      +
      --件
      - ↑27 + ↑--
      联合检查数量
      -
      1,637件
      +
      --件
      - ↑21 + ↑--
      @@ -295,24 +315,26 @@
      执法预警数量
      -
      3,892次
      +
      --次
      - ↑199 + ↑--
      涉事单位数量
      -
      737家
      +
      --家
      - ↓32 + ↓--
      本单位发布预警数量
      -
      629次
      +
      次
      - ↓41 + + + --
      @@ -321,24 +343,24 @@
      执法投诉数量
      -
      445件
      +
      件
      - ↓26 + ↓--
      入企不扫码投诉数量
      -
      79件
      +
      件
      - ↓11 + ↓--
      被投诉部门数量
      -
      22个
      +
      个
      - ↓2 + ↓--
      @@ -348,11 +370,13 @@ \ No newline at end of file diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java index 9e0b9fe1..99798586 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java @@ -26,7 +26,7 @@ public class StatisticalPanelController extends BaseController { - @RequestMapping("/statisticalPanelDeptAndUser") + @GetMapping("/statisticalPanelDeptAndUser") @ResponseBody public ZDResponse statisticalPanelDeptAndUser(StatisticsIndicatorPart statisticsIndicatorPart){ StatisticalPanelDto statisticalPanelDto = @@ -55,6 +55,16 @@ public class StatisticalPanelController extends BaseController { public ZDResponse registration(StatisticsIndicatorPart statisticsIndicatorPart){ return ZDResponse.success("成功",statisticalPaneService.registration(statisticsIndicatorPart)); } + /** + * 登记 + * @param statisticsIndicatorPart + * @return + */ + @GetMapping("/statisticProgram") + @ResponseBody + public ZDResponse statisticProgram(StatisticsIndicatorPart statisticsIndicatorPart){ + return ZDResponse.success("成功",statisticalPaneService.statisticProgram(statisticsIndicatorPart)); + } /** * 预警 diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticalPaneServiceImpl.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticalPaneServiceImpl.java index 65962ca7..8c814d12 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticalPaneServiceImpl.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticalPaneServiceImpl.java @@ -1,5 +1,7 @@ package com.zdxt.code.service.impl; +import cn.hutool.core.bean.BeanUtil; +import com.zdxt.auth.common.utils.StringUtils; import com.zdxt.auth.dto.UserBean; import com.zdxt.auth.feign.DeptApi; import com.zdxt.auth.feign.UserApi; @@ -246,10 +248,13 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService { //查询双系统执法人员信息 Zfryjdm2405301 zfryjdm2405301 = iZfryjdm2405301Service.selectZfryByZfCode(user.getLawCertificateNum()); - //通过机构代码查询执法主体信息 - statisticsIndicatorPart.setCreditCode(zfryjdm2405301.getZzjgdm()); - //本单位执法人员数量 - Integer oneselfUserTotal = statisticalPanelMapper.statisticalPanelOneselfDeptUser(statisticsIndicatorPart); + Integer oneselfUserTotal = 0; + if(BeanUtil.isNotEmpty(zfryjdm2405301)){ + //通过机构代码查询执法主体信息 + statisticsIndicatorPart.setCreditCode(zfryjdm2405301.getZzjgdm()); + //本单位执法人员数量 + oneselfUserTotal = statisticalPanelMapper.statisticalPanelOneselfDeptUser(statisticsIndicatorPart); + } //默认今年 同比 对比上一年 上一个季度 上一个月 StatisticalPanelDto statisticalPanelDto = new StatisticalPanelDto(); @@ -288,32 +293,58 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService { //统计执法计划总数 Integer allTotal = statisticalPanelMapper.statisticalPanelProgramTotal(statisticsIndicatorPart); + //统计本单位执法计划总数 - Integer deptTotal = statisticalPanelMapper.statisticalPanelProgramWithDept(statisticsIndicatorPart); + Integer deptTotal = 0; + //获取执法部门ID + String s = this.takeDeptId(); + if(StringUtils.isNotEmpty(s)){ + statisticsIndicatorPart.setDeptId(s); + //统计本单位执法计划总数 + deptTotal = statisticalPanelMapper.statisticalPanelProgramWithDept(statisticsIndicatorPart); + statisticsIndicatorPart.setDeptId(""); + } //同比查询执法数据 + //设置同比时间 + //查询筛选条件-时间 + statisticsIndicatorPart.setBeginTime(statisticsIndicatorPart2.getBeginTime()); + statisticsIndicatorPart.setEndTime(statisticsIndicatorPart2.getEndTime()); //统计执法计划总数 Integer lastAllTotal = statisticalPanelMapper.statisticalPanelProgramTotal(statisticsIndicatorPart); - //统计本单位执法计划总数 - Integer lastDeptTotal = statisticalPanelMapper.statisticalPanelProgramWithDept(statisticsIndicatorPart); - - + Integer lastDeptTotal = 0; + if(StringUtils.isNotEmpty(s)){ + statisticsIndicatorPart.setDeptId(s); + //统计本单位执法计划总数 + lastDeptTotal = statisticalPanelMapper.statisticalPanelProgramWithDept(statisticsIndicatorPart); + statisticsIndicatorPart.setDeptId(""); + } List statisticsIndicatorParts = new ArrayList<>(); - //返回结果 //总检查计划数量结果 StatisticsIndicatorPart statisticsIndicatorPart3 = new StatisticsIndicatorPart(); statisticsIndicatorPart3.setTotal(allTotal); statisticsIndicatorPart3.setHuan((allTotal-lastAllTotal)); statisticsIndicatorParts.add(statisticsIndicatorPart3); + + //行政检查计划 + StatisticsIndicatorPart statisticsIndicatorPart5 = new StatisticsIndicatorPart(); + statisticsIndicatorPart5.setTotal(allTotal); + statisticsIndicatorPart5.setHuan((allTotal-lastAllTotal)); + statisticsIndicatorParts.add(statisticsIndicatorPart5); + //本单位检查计划统计 StatisticsIndicatorPart statisticsIndicatorPart4 = new StatisticsIndicatorPart(); statisticsIndicatorPart4.setTotal(deptTotal); statisticsIndicatorPart4.setHuan((deptTotal-lastDeptTotal)); + statisticsIndicatorParts.add(statisticsIndicatorPart4); - - return null; + //结果返回 + StatisticsIndicatorPart statisticsIndicatorPartResult = new StatisticsIndicatorPart(); + statisticsIndicatorPartResult.setName("执法检查计划统计"); + statisticsIndicatorPartResult.setStatisticsIndicatorPartList(statisticsIndicatorParts); + return statisticsIndicatorPartResult; } @@ -396,10 +427,13 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService { String lawCertificateNum=userApi.getCurrentUser().getLawCertificateNum(); if(lawCertificateNum!=null&&!"".equals(lawCertificateNum)){ //通过该帐号的执法证件号去查该帐号执法人员表中的信息 - String zzjgdm=iZfryjdm2405301Service.selectZfryByZfCode(lawCertificateNum).getZzjgdm(); - if(zzjgdm!=null&&!"".equals(zzjgdm)){ - //从信息中获取组织机构代码,以此查询sys_dept中的dept_Id - return iDeptService.selectDeptByCreditcode(zzjgdm).getDeptId(); + Zfryjdm2405301 zfryjdm2405301 = iZfryjdm2405301Service.selectZfryByZfCode(lawCertificateNum); + if(BeanUtil.isNotEmpty(zfryjdm2405301)){ + String zzjgdm= zfryjdm2405301.getZzjgdm(); + if(zzjgdm!=null&&!"".equals(zzjgdm)){ + //从信息中获取组织机构代码,以此查询sys_dept中的dept_Id + return iDeptService.selectDeptByCreditcode(zzjgdm).getDeptId(); + } } } return null; diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml index 21434d41..79981dd7 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml @@ -192,6 +192,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + and YEAR(create_time) = #{year} + + + and QUARTER(create_time) = #{quarter} + + + and DATE_FORMAT(create_time, '%Y-%m') = #{month} + AND bureau_dept_id is not null GROUP BY bureau_dept_id @@ -214,6 +223,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + and YEAR(create_time) = #{year} + + + and QUARTER(create_time) = #{quarter} + + + and DATE_FORMAT(create_time, '%Y-%m') = #{month} + AND bureau_dept_id is not null @@ -243,6 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and DATE_FORMAT(create_time, '%Y-%m') = #{month} AND bureau_dept_id is not null + AND time_type is not null GROUP BY bureau_dept_id order by total desc diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml index 7829949a..b6769344 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml @@ -61,8 +61,8 @@ ${params.dataScope} - - AND bureau_dept_id = #{bureauDeptId} + + AND bureau_dept_id = #{deptId} = #{beginTime} ]]>