From 487ff48c881b47b17973fbd28bc3762dcc4fc13a Mon Sep 17 00:00:00 2001 From: zouyx <1798599149@qq.com> Date: Wed, 11 Dec 2024 11:54:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=91=E7=9D=A3=E7=AB=AF-=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E4=BF=AE=E6=94=B9-1209=E5=AE=A2=E6=88=B7=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LawEnforcementWarningList.html | 109 +++++++++++------- .../registrationDetail.html | 109 ++++++++++++++++-- .../code/complaintStatic/complaintStatic.html | 27 ++++- .../project/code/deptStatic/deptStatic.html | 1 - .../code/registration/staticRegistration.html | 55 +++++++-- .../code/ruleItemList/ruleItemList.html | 8 +- .../code/statistical/staticProgram.html | 3 - .../controller/ComplaintStaticController.java | 31 ++++- .../code/controller/DeptStaticController.java | 46 +------- ...nforcementInspectionProgramController.java | 16 +-- .../EnforcementRegistrationController.java | 75 ++++++++++-- .../LawEnforcementWarningListController.java | 82 ++++++++++++- .../domain/EnforcementCheckStatistics.java | 6 + .../code/domain/EnforcementRegistration.java | 18 +++ .../LawEnforcementWarningListMapper.java | 7 ++ .../ILawEnforcementWarningListService.java | 2 + .../service/impl/ComplaintStatisticsImpl.java | 18 +-- .../impl/EnforcementCheckStatisticsImpl.java | 40 ++++++- .../LawEnforcementWarningListServiceImpl.java | 5 + .../EnforcementCheckStatisticsMapper.xml | 38 ++++++ .../mapper/EnforcementRegistrationMapper.xml | 6 + .../LawEnforcementWarningListMapper.xml | 55 +++++++++ 22 files changed, 596 insertions(+), 161 deletions(-) diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/LawEnforcementWarningList/LawEnforcementWarningList.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/LawEnforcementWarningList/LawEnforcementWarningList.html index 534d614d..336539c8 100644 --- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/LawEnforcementWarningList/LawEnforcementWarningList.html +++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/LawEnforcementWarningList/LawEnforcementWarningList.html @@ -2,6 +2,7 @@ + @@ -33,6 +34,7 @@
  •  搜索  重置 + 导出
  • @@ -43,7 +45,7 @@ 当月累计接受行政检查三至四次为黄色提示,五至六次为橙色提示,七次及以上为红色提示。
    -
    +
    ×
    @@ -71,54 +73,55 @@ removeUrl: prefix + "/remove", exportUrl: prefix + "/export", modalName: "执法预警列表", - showHeader: false, + showHeader: true, showFooter: false, showColumns: false, showRefresh: false, showToggle: false, + pagination: true, + pageSize: 10, + pageList: [10, 25, 50], columns: [ - { - field : 'id', - title : '主键ID', - visible: false - }, - { - field : 'warningTime', - title : '预警时间' - }, - { - field : 'enforcementNumber', - title : '检查次数', - formatter:function (value,row,index) { - return "" +value+ ""; - // ,' + row.beginTime + ',' + row.endTime +" - } - }, - { - field : 'enterpriseName', - title : '企业名称' - }, - { - field : 'warningLevel', - title : '预警等级', - formatter:function (value,row,index) { - var map=getColor(); - for (let i = 0; i < warnLevel.length; i++) { - // if(warnLevel[i].dictValue == value){ - // return warnLevel[i].dictLabel - // } - if(value == warnLevel[i].dictValue){ - var color=map.get(warnLevel[i].dictValue); - return ''+' '+warnLevel[i].dictLabel+'' + { + field : 'id', + title : '主键ID', + visible: false + }, + { + field : 'enterpriseName', + title : '企业名称' + }, + { + field : 'warningCause', + title : '预警原因', + formatter:function (value,row,index) { + return "" +value+ ""; + } + }, + { + field : 'warningLevel', + title : '预警等级', + formatter:function (value,row,index) { + var map=getColor(); + for (let i = 0; i < warnLevel.length; i++) { + // if(warnLevel[i].dictValue == value){ + // return warnLevel[i].dictLabel + // } + if(value == warnLevel[i].dictValue){ + var color=map.get(warnLevel[i].dictValue); + return ''+' '+warnLevel[i].dictLabel+'' + } } } - } - }, - { - field : 'warningCause', - title : '预警原因' - }, + }, + { + field : 'warningTime', + title : '预警时间', + formatter:function (value){ + return value.slice(0, -9); + } + }, { title: '操作', align: 'center', @@ -197,6 +200,28 @@ }; $("#bootstrap-table3").bootstrapTable(options); }); + function downloadRW(){ + var currentId=$('form').eq(0).attr('id'); + var params = $.common.formToJSON(currentId); + $.ajax({ + type: "POST", + data: JSON.stringify(params), + contentType: 'application/json', + //设置响应类型 + xhrFields: {responseType: "blob"}, + url: prefix+"/exportWarnList", + success: function (result) { + const link = document.createElement('a'); + let blob = new Blob([result], {type: 'application/vnd.ms-excel'}); + link.style.display = 'none'; + link.href = URL.createObjectURL(blob); + link.setAttribute('download', "预警列表.xls"); + document.body.appendChild(link); + link.click(); + document.body.removeChild(link) + } + }) + } \ No newline at end of file diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/LawEnforcementWarningList/registrationDetail.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/LawEnforcementWarningList/registrationDetail.html index d29f0c07..83050981 100644 --- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/LawEnforcementWarningList/registrationDetail.html +++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/LawEnforcementWarningList/registrationDetail.html @@ -15,8 +15,8 @@ - - + +
  • 执法人员:

    @@ -24,13 +24,13 @@
  • 检查时间:

    - + - - +
  • -  搜索 -  重置 +  搜索 +  重置
  • @@ -46,8 +46,101 @@ \ No newline at end of file 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 a33c4410..57df4ec3 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 @@ -281,7 +281,14 @@ }, { field : 'percentage', - title : '占比' + title : '占比', + formatter:function (value,row,index) { + if(row.numInt>0){ + return '' + value + ''; + }else { + return null; + } + } }, ] } @@ -307,7 +314,14 @@ }, { field : 'percentage', - title : '占比' + title : '占比', + formatter:function (value,row,index) { + if(row.numInt>0){ + return '' + value + ''; + }else { + return null; + } + } }, ] } @@ -333,7 +347,14 @@ }, { field : 'percentage', - title : '占比' + title : '占比', + formatter:function (value,row,index) { + if(row.numInt>0){ + return '' + value + ''; + }else { + return null; + } + } }, ] } diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/deptStatic/deptStatic.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/deptStatic/deptStatic.html index 88df8937..806684f2 100644 --- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/deptStatic/deptStatic.html +++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/deptStatic/deptStatic.html @@ -83,7 +83,6 @@ { field : 'zfdw', title : '部门名称', - align: 'left', }, { field : 'name', diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html index 21f693b7..71152f25 100644 --- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html +++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html @@ -446,24 +446,59 @@ } } function downloadzf1(){ + let beginDate=new Date(); + let endDate=new Date(); let params={ - beginTime:$('#startTime').val(), - endTime:$('#endTime').val() + startTime:$('#startTime').val(), + endTime:$('#endTime').val(), + bureauDeptName:$('#bureauDeptName').val(), + lawEnforcer:$('#lawEnforcer').val(), + enterpriseName:$('#enterpriseName').val(), + lawEnforcementItemText:$('#lawEnforcementItemText').val(), + year:$('#year').val(), + quarter:$('#quarter').val(), + month:$('#month').val(), + qy:$('#qy').val(), + jd:$('#jd').val(), + dateSearch:$('#dateSearch').val(), } - if($('#startTime').val()==null||$('#startTime').val()==""){ - params.beginTime="2024-08-24"; - } - if($('#endTime').val()==null||$('#endTime').val()==""){ - let now=new Date(); - params.endTime=now.getFullYear()+"-"+(now.getMonth()+1)+"-"+now.getDate(); + if($('#dateSearch').val()=="select-time"){ + if($('#startTime').val()==null||$('#startTime').val()==""){ + params.startTime="2024-08-24"; + beginDate=new Date("2024-08-24"); + } + if($('#endTime').val()==null||$('#endTime').val()==""){ + params.endTime=endDate.getFullYear()+"-"+(endDate.getMonth()+1)+"-"+endDate.getDate(); + } + }else{ + if($('#dateSearch').val()=="year"){ + beginDate=new Date(params.year,0,1); + endDate=new Date(params.year,11,31); + }else if($('#dateSearch').val()=="quarter"){ + if(params.quarter==""||params.quarter==null){ + beginDate=new Date(params.year,0,1); + endDate=new Date(params.year,11,31); + }else{ + beginDate=new Date(params.year,(params.quarter-1)*3,1); + endDate=new Date(params.year,(params.quarter)*3,0); + } + }else if($('#dateSearch').val()=="month"){ + if(params.month==""||params.month==null){ + beginDate=new Date(params.year,0,1); + endDate=new Date(params.year,11,31); + }else{ + beginDate=new Date(params.year,params.month-1,1); + endDate=new Date(params.year,params.month,0); + } + } } console.log(params); - let beginDate=new Date(params.beginTime); - let endDate=new Date(params.endTime); console.log(beginDate); console.log(endDate); let beginName=beginDate.getFullYear()+"年"+(beginDate.getMonth()+1)+"月"+beginDate.getDate()+"日"; let endName=endDate.getFullYear()+"年"+(endDate.getMonth()+1)+"月"+endDate.getDate()+"日"; + console.log(beginName); + console.log(endName); $.ajax({ type: "POST", contentType: 'application/json', 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 958929c9..2fc1a2d4 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 @@ -15,11 +15,11 @@
  • -

    告警次数:

    +

    检查次数:

  • -

    告警级别:

    +

    预警级别:

    +