Browse Source

开发行政检查计划统计

v4
chenrui 2 years ago
parent
commit
3ddc55cb39
  1. 2
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/static/css/stat1.css
  2. 244
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html
  3. 40
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementInspectionProgramController.java
  4. 95
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/dto/EnforcementInspectionProgramDto.java
  5. 28
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/EnforcementInspectionProgramMapper.java
  6. 29
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnforcementInspectionProgramService.java
  7. 13
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementInspectionProgramServiceImpl.java
  8. 45
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml

2
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/static/css/stat1.css

@ -39,7 +39,7 @@ body {
.seltime {
display: flex;
position: absolute;
top: 110px;
/*top: 110px;*/
right: 1%;
align-items: center;
}

244
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html

@ -0,0 +1,244 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="zdxtInclude :: header('检查计划统计')"/>
<link type="text/css" href="/css/stat1.css" rel="stylesheet"/>
</head>
<body>
<div class="statwrap">
<div class="seltime" id="seltime">
<i class="icsty"></i>
<span>
<select id="year" name="year" onchange="selectDate()">
<option value="2024">2024</option>
<option value="2023">2023</option>
<option value="2022">2022</option>
</select>年度
</span>
<span>
<select id="qorm" name="qorm" onchange="selectDate()">
<option value="q">季度</option>
<option value="m">月度</option>
</select>
</span>
<span>
<select id="quarter" name="quarter" onchange="selectDate()">
<option value="q1">1季度</option>
<option value="q2">2季度</option>
<option value="q3">3季度</option>
<option value="q4">4季度</option>
</select>
</span>
<span>
<select id="month" name="month" onchange="selectDate()" style="display: none;">
<option value="01">1月</option>
<option value="02">2月</option>
<option value="03">3月</option>
<option value="04">4月</option>
<option value="05">5月</option>
<option value="06">6月</option>
<option value="07">7月</option>
<option value="08">8月</option>
<option value="09">9月</option>
<option value="10">10月</option>
<option value="11">11月</option>
<option value="12">12月</option>
</select>
</span>
<span>
<span>所属行业:</span>
<select id="industry" name="industry" th:with="type=${@dict.getType('industryType')}" onchange="selectDate()">
<option value="">请选择</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</span>
</div>
<div class="statit">
<span id="one1" class="actit" onclick="setTab('one',1,5)">检查事项</span>
<span id="one2" onclick="setTab('one',2,5)">案件数量</span>
</div>
<div class="tab_box">
<div id="con_one_1" class="tab_item" style="z-index: 1;">
<!-- <div class="tab_cont">
<div class="listhead">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="desktab">
<colgroup>
<col width="60%"/>
<col width="25%"/>
</colgroup>
<tr class="trodd">
<th>行政检查事项</th>
<th>行政检查次数</th>
</tr>
</table>
</div>
<div class="listbody">
<div class="inner">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="desktab">
<colgroup>
<col width="60%"/>
<col width="25%"/>
</colgroup>
<tbody id="echartLineTable"></tbody>
</table>
</div>
</div>
</div>
<div class="chartbox" id="echartLine"></div>-->
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<p>执法部门:</p>
<input type="text" name=""/>
</li>
<li>
<p>时段:</p>
<input type="text" name="" id="timeType"/>
</li>
<li>
<p>企业类型:</p>
<select name="enterpriseType" th:with="type=${@dict.getType('enterpriseType')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<p>企业地址:</p>
<input type="text" name="enterpriseAddress"/>
</li>
<li>
<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-reset btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="col-sm-12 select-table table-bordered">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
</div>
<div id="con_one_2" class="tab_item">
<div class="tab_cont">
<div class="listhead">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="desktab">
<colgroup>
<col width="60%"/>
<col width="25%"/>
</colgroup>
<tr class="trodd">
<th>行政检查部门</th>
<th>行政检查案件数量</th>
</tr>
</table>
</div>
<div class="listbody">
<div class="inner">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="desktab">
<colgroup>
<col width="60%"/>
<col width="25%"/>
</colgroup>
<tbody id="echartRingTable"></tbody>
</table>
</div>
</div>
</div>
<div class="chartbox" id="echartRing"></div>
</div>
</div>
</div>
<script type="text/javascript" src="/js/echarts.min.js"></script>
<th:block th:include="zdxtInclude :: footer"/>
<script>
var prefix = ctx + "code/enforcementInspectionProgram";
window.onload = function () {
// selectDate();
staticAllProgram();
};
function setTab(name, cursel, n) {
for (i = 1; i <= n; i++) {
var menu = document.getElementById(name + i);
var con = document.getElementById("con_" + name + "_" + i);
menu.className = i == cursel ? "actit" : "";
con.style.zIndex = i == cursel ? "1" : "-999";
}
}
/** 检查事项 */
function staticAllProgram() {
$.ajax({
url: prefix + '/staticAllProgram', //后台url
data: {},
type: "POST",
dataType: 'json',
success: function (data) { //成功,回调函数
console.log(data.data)
},
error: function (er) { //失败,回调函数
}
});
}
$(function() {
var options = {
url: prefix + "/staticProgram",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "企业信息登记",
showHeader: false,
showFooter: false,
showColumns: false,
showRefresh: false,
showToggle: false,
columns: [{
checkbox: true
},
{
field : 'id',
title : '主键ID',
visible: false
},
{
field : 'bureauDeptName',
title : '执法部门'
},
{
field : 'yearTotal',
title : '年度计划',
align : 'center',
},
{
field : 'quarterTotal',
title : '季度计划',
align : 'center',
},
{
field : 'monthTotal',
title : '月度计划',
align : 'center',
}]
};
$.table.init(options);
});
</script>
</body>
</html>

40
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementInspectionProgramController.java

@ -5,6 +5,7 @@ import java.util.List;
import cn.hutool.core.bean.BeanUtil;
import com.zdxt.code.domain.LawEnforcementEnterprise;
import com.zdxt.code.domain.LawEnforcementEnterpriseExport;
import com.zdxt.code.domain.dto.EnforcementInspectionProgramDto;
import com.zdxt.code.service.ILawEnforcementEnterpriseService;
import com.zdxt.common.ZDResponse;
import com.zdxt.common.controller.BaseController;
@ -29,7 +30,8 @@ import org.springframework.web.multipart.MultipartFile;
@RequestMapping("/code/enforcementInspectionProgram")
public class EnforcementInspectionProgramController extends BaseController
{
private String prefix = "code/enforcementInspectionProgram";
private String prefix = "project/code/enforcementInspectionProgram";
private String prefix2 = "project/code/statistical";
@Autowired
private IEnforcementInspectionProgramService enforcementInspectionProgramService;
@ -43,6 +45,11 @@ public class EnforcementInspectionProgramController extends BaseController
return prefix + "/enforcementInspectionProgram";
}
@GetMapping("/staticProgramView")
public String staticProgramView()
{
return prefix2 + "/staticProgram";
}
/**
* 查询执法检查计划列表
*/
@ -83,6 +90,35 @@ public class EnforcementInspectionProgramController extends BaseController
return ZDResponse.success("查询成功",list);
}
/**
* 按照分类统计执法计划
* @param enforcementInspectionProgramDto
* @return
*/
@PostMapping("/staticProgram")
@ResponseBody
public TableDataInfo staticProgram(EnforcementInspectionProgramDto enforcementInspectionProgramDto)
{
// startPage();
List<EnforcementInspectionProgramDto> enforcementInspectionProgramDtos =
enforcementInspectionProgramService.staticProgram(enforcementInspectionProgramDto);
return getDataTable(enforcementInspectionProgramDtos);
}
/**
* 按照分类统计执法计划
* @param enforcementInspectionProgramDto
* @return
*/
@PostMapping("/staticAllProgram")
@ResponseBody
public ZDResponse staticAllProgram(EnforcementInspectionProgramDto enforcementInspectionProgramDto)
{
EnforcementInspectionProgramDto enforcementInspectionProgramDto1 =
enforcementInspectionProgramService.staticAllProgram(enforcementInspectionProgramDto);
return ZDResponse.success("执法计划分类统计总数查询成功",enforcementInspectionProgramDto1);
}
/**
* 新增执法检查计划
@ -151,4 +187,6 @@ public class EnforcementInspectionProgramController extends BaseController
lawEnforcementEnterpriseService.insertLawEnforcementEnterprise(lawEnforcementEnterprise);
}
}
}

95
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/dto/EnforcementInspectionProgramDto.java

@ -0,0 +1,95 @@
package com.zdxt.code.domain.dto;
import com.zdxt.common.BaseDomain;
public class EnforcementInspectionProgramDto extends BaseDomain {
/**
* 开始时间
*/
private String beginTime;
/**
* 结束时间
*/
private String endTime;
/**
* 局级部门ID
*/
private String bureauDeptId;
/**
* 局级部门名称
*/
private String bureauDeptName;
/**
* 年度总数
*/
private Integer yearTotal = 0;
/**
* 季度总数
*/
private Integer quarterTotal = 0;
/**
* 月度总数
*/
private Integer monthTotal = 0;
public String getBeginTime() {
return beginTime;
}
public void setBeginTime(String beginTime) {
this.beginTime = beginTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public String getBureauDeptId() {
return bureauDeptId;
}
public void setBureauDeptId(String bureauDeptId) {
this.bureauDeptId = bureauDeptId;
}
public String getBureauDeptName() {
return bureauDeptName;
}
public void setBureauDeptName(String bureauDeptName) {
this.bureauDeptName = bureauDeptName;
}
public Integer getYearTotal() {
return yearTotal;
}
public void setYearTotal(Integer yearTotal) {
this.yearTotal = yearTotal;
}
public Integer getQuarterTotal() {
return quarterTotal;
}
public void setQuarterTotal(Integer quarterTotal) {
this.quarterTotal = quarterTotal;
}
public Integer getMonthTotal() {
return monthTotal;
}
public void setMonthTotal(Integer monthTotal) {
this.monthTotal = monthTotal;
}
}

28
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/EnforcementInspectionProgramMapper.java

@ -1,7 +1,10 @@
package com.zdxt.code.mapper;
import com.zdxt.code.domain.EnforcementInspectionProgram;
import com.zdxt.code.domain.dto.EnforcementInspectionProgramDto;
import java.util.List;
import java.util.Map;
/**
* 执法检查计划Mapper接口
@ -17,7 +20,7 @@ public interface EnforcementInspectionProgramMapper
* @param id 执法检查计划ID
* @return 执法检查计划
*/
public EnforcementInspectionProgram selectEnforcementInspectionProgramById(String id);
EnforcementInspectionProgram selectEnforcementInspectionProgramById(String id);
/**
* 查询执法检查计划列表
@ -25,7 +28,7 @@ public interface EnforcementInspectionProgramMapper
* @param enforcementInspectionProgram 执法检查计划
* @return 执法检查计划集合
*/
public List<EnforcementInspectionProgram> selectEnforcementInspectionProgramList(EnforcementInspectionProgram enforcementInspectionProgram);
List<EnforcementInspectionProgram> selectEnforcementInspectionProgramList(EnforcementInspectionProgram enforcementInspectionProgram);
/**
* 新增执法检查计划
@ -33,7 +36,7 @@ public interface EnforcementInspectionProgramMapper
* @param enforcementInspectionProgram 执法检查计划
* @return 结果
*/
public int insertEnforcementInspectionProgram(EnforcementInspectionProgram enforcementInspectionProgram);
int insertEnforcementInspectionProgram(EnforcementInspectionProgram enforcementInspectionProgram);
/**
* 修改执法检查计划
@ -41,7 +44,7 @@ public interface EnforcementInspectionProgramMapper
* @param enforcementInspectionProgram 执法检查计划
* @return 结果
*/
public int updateEnforcementInspectionProgram(EnforcementInspectionProgram enforcementInspectionProgram);
int updateEnforcementInspectionProgram(EnforcementInspectionProgram enforcementInspectionProgram);
/**
* 删除执法检查计划
@ -49,7 +52,7 @@ public interface EnforcementInspectionProgramMapper
* @param id 执法检查计划ID
* @return 结果
*/
public int deleteEnforcementInspectionProgramById(String id);
int deleteEnforcementInspectionProgramById(String id);
/**
* 批量删除执法检查计划
@ -57,5 +60,18 @@ public interface EnforcementInspectionProgramMapper
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteEnforcementInspectionProgramByIds(String[] ids);
int deleteEnforcementInspectionProgramByIds(String[] ids);
/**
* 统计执法计划按照执法部门统计
* @return
*/
List<EnforcementInspectionProgramDto> staticProgram(EnforcementInspectionProgramDto enforcementInspectionProgramDto);
/**
* 统计总数
* @param enforcementInspectionProgramDto
* @return
*/
EnforcementInspectionProgramDto staticAllProgram(EnforcementInspectionProgramDto enforcementInspectionProgramDto);
}

29
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnforcementInspectionProgramService.java

@ -1,7 +1,10 @@
package com.zdxt.code.service;
import com.zdxt.code.domain.EnforcementInspectionProgram;
import com.zdxt.code.domain.dto.EnforcementInspectionProgramDto;
import java.util.List;
import java.util.Map;
/**
* 执法检查计划Service接口
@ -17,7 +20,7 @@ public interface IEnforcementInspectionProgramService
* @param id 执法检查计划ID
* @return 执法检查计划
*/
public EnforcementInspectionProgram selectEnforcementInspectionProgramById(String id);
EnforcementInspectionProgram selectEnforcementInspectionProgramById(String id);
/**
* 查询执法检查计划列表
@ -25,7 +28,7 @@ public interface IEnforcementInspectionProgramService
* @param enforcementInspectionProgram 执法检查计划
* @return 执法检查计划集合
*/
public List<EnforcementInspectionProgram> selectEnforcementInspectionProgramList(EnforcementInspectionProgram enforcementInspectionProgram);
List<EnforcementInspectionProgram> selectEnforcementInspectionProgramList(EnforcementInspectionProgram enforcementInspectionProgram);
List<EnforcementInspectionProgram> selectEnforcementInspectionProgramListNoPermission(EnforcementInspectionProgram enforcementInspectionProgram);
/**
@ -34,7 +37,7 @@ public interface IEnforcementInspectionProgramService
* @param enforcementInspectionProgram 执法检查计划
* @return 结果
*/
public int insertEnforcementInspectionProgram(EnforcementInspectionProgram enforcementInspectionProgram);
int insertEnforcementInspectionProgram(EnforcementInspectionProgram enforcementInspectionProgram);
/**
* 修改执法检查计划
@ -42,7 +45,7 @@ public interface IEnforcementInspectionProgramService
* @param enforcementInspectionProgram 执法检查计划
* @return 结果
*/
public int updateEnforcementInspectionProgram(EnforcementInspectionProgram enforcementInspectionProgram);
int updateEnforcementInspectionProgram(EnforcementInspectionProgram enforcementInspectionProgram);
/**
* 批量删除执法检查计划
@ -50,7 +53,7 @@ public interface IEnforcementInspectionProgramService
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteEnforcementInspectionProgramByIds(String ids);
int deleteEnforcementInspectionProgramByIds(String ids);
/**
* 删除执法检查计划信息
@ -58,5 +61,19 @@ public interface IEnforcementInspectionProgramService
* @param id 执法检查计划ID
* @return 结果
*/
public int deleteEnforcementInspectionProgramById(String id);
int deleteEnforcementInspectionProgramById(String id);
/**
* 执法计划分类统计
* @param enforcementInspectionProgramDto
* @return
*/
List<EnforcementInspectionProgramDto> staticProgram(EnforcementInspectionProgramDto enforcementInspectionProgramDto);
/**
* 统计总数
* @param enforcementInspectionProgramDto
* @return
*/
EnforcementInspectionProgramDto staticAllProgram(EnforcementInspectionProgramDto enforcementInspectionProgramDto);
}

13
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementInspectionProgramServiceImpl.java

@ -7,6 +7,7 @@ import cn.hutool.core.util.IdUtil;
import com.zdxt.auth.dto.UserBean;
import com.zdxt.auth.feign.UserApi;
import com.zdxt.auth.feign.ZdxtFileCommonApi;
import com.zdxt.code.domain.dto.EnforcementInspectionProgramDto;
import com.zdxt.common.annotation.DataScope;
import com.zdxt.common.util.DateUtils;
import com.zdxt.common.zdxtFile.ZdxtFileCommon;
@ -169,4 +170,16 @@ public class EnforcementInspectionProgramServiceImpl implements IEnforcementInsp
{
return enforcementInspectionProgramMapper.deleteEnforcementInspectionProgramById(id);
}
@Override
public List<EnforcementInspectionProgramDto> staticProgram(EnforcementInspectionProgramDto enforcementInspectionProgramDto) {
return enforcementInspectionProgramMapper.staticProgram(enforcementInspectionProgramDto);
}
@Override
public EnforcementInspectionProgramDto staticAllProgram(EnforcementInspectionProgramDto enforcementInspectionProgramDto) {
return enforcementInspectionProgramMapper.staticAllProgram(enforcementInspectionProgramDto);
}
}

45
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml

@ -173,5 +173,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<select id="staticProgram" resultType="com.zdxt.code.domain.dto.EnforcementInspectionProgramDto" >
SELECT
bureau_dept_name,
count(*) as total,
SUM(CASE WHEN time_type = 'year' THEN 1 ELSE 0 END ) as yearTotal,
SUM(CASE WHEN time_type = 'quarter' THEN 1 ELSE 0 END ) as quarterTotal,
SUM(CASE WHEN time_type = 'month' THEN 1 ELSE 0 END ) as mouthTotal
FROM enforcement_inspection_program
<where>
<if test="bureauDeptName != null and bureauDeptName != ''">
bureau_dept_name like concat('%', #{bureauDeptName}, '%')
</if>
<if test="beginTime != null and beginTime != ''">
<![CDATA[ create_time >= concat('%', #{beginTime}, '%') ]]>
</if>
<if test="endTime != null and endTime != ''">
<![CDATA[ create_time <= concat('%', #{endTime}, '%') ]]>
</if>
AND bureau_dept_id is not null
</where>
GROUP BY bureau_dept_id
order by total desc
</select>
<select id="staticAllProgram" resultType="com.zdxt.code.domain.dto.EnforcementInspectionProgramDto" >
SELECT
SUM(CASE WHEN time_type = 'year' THEN 1 ELSE 0 END ) as yearTotal,
SUM(CASE WHEN time_type = 'quarter' THEN 1 ELSE 0 END ) as quarterTotal,
SUM(CASE WHEN time_type = 'month' THEN 1 ELSE 0 END ) as mouthTotal
FROM enforcement_inspection_program
<where>
<if test="bureauDeptName != null and bureauDeptName != ''">
bureau_dept_name like concat('%', #{bureauDeptName}, '%')
</if>
<if test="beginTime != null and beginTime != ''">
<![CDATA[ create_time >= concat('%', #{beginTime}, '%') ]]>
</if>
<if test="endTime != null and endTime != ''">
<![CDATA[ create_time <= concat('%', #{endTime}, '%') ]]>
</if>
AND bureau_dept_id is not null
</where>
</select>
</mapper>
Loading…
Cancel
Save