Browse Source

综合分析

v6
yanyan 1 year ago
parent
commit
c0dc69ca84
  1. 190
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/overall-analysis.html
  2. 135
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/single-analysis.html
  3. 75
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java
  4. 247
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml

190
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/overall-analysis.html

@ -43,7 +43,7 @@
<span>街道</span>
</div>
<div class="tabcont">
<div class="selcont deptcont" id="districtDetail">
<div class="selcont" id="districtDetail">
<!-- <a class="selitem">发展和改革委员会</a>-->
<!-- <a class="selitem">人力资源和社会保障局</a>-->
<!-- <a class="selitem">文化广电旅游体育局</a>-->
@ -288,6 +288,10 @@
<script type="text/javascript" src="/statistical/scripts/charts-analyov.js"></script>
<script>
var ctx="/"
var deptId = null;
var deptName = null;
var beginTime = null;
var endTime = null;
layui.use('laydate',function(){
var laydate = layui.laydate;
@ -299,9 +303,21 @@
max: '2099-06-16', // 最大可选日期
trigger: 'click', // 选择器触发方式,可选值:click, hover等
done: function(value, date, endDate){ // 选择日期后的回调函数
console.log(value); // 得到日期生成的值,格式取决于设置的 format 参数
console.log(date); // 得到日期时间对象:{year:..., month:..., date:..., etc.}
console.log(endDate); // 得到日期时间对象,结束日期的
//选择了清空
if (value ===''){
searchDate(null,null);
}
//选择了确定
if (value !==null && value !==''){
var month1 = 10 > date.month?"0"+date.month:date.month
var date1 = 10 > date.date?"0"+date.date:date.date
let beginTime = date.year+"-"+month1+"-"+date1
var month2 = 10 > endDate.month?"0"+endDate.month:endDate.month
var date2 = 10 > endDate.date?"0"+endDate.date:endDate.date
let endTime = endDate.year+"-"+month2+"-"+date2
searchDate(beginTime,endTime);
}
}
})
@ -311,55 +327,6 @@
queryDept();
});
function sixIndicators(deptId, area) {
$.ajax({
url: ctx + "code/statisticalPanel/sixIndicators",
type: "get",
data: {dateType: "year", year:"2025", deptId: deptId, qy: area},
success: function(res) {
if(res.success) {
const indicators = res.data;
html = "";
for(var i=0; i < indicators.length; i++) {
var indicator = indicators[i];
html += '<div class="data_item">';
html += ' <div class="cont-title">'+indicator.title+'</div>';
html += ' <div class="cont-total"><b><span id="regis-total">'+indicator.num+'</span></b>';
html += ' <div class="nece-data">';
html += ' <div class="percent-tag">';
html += ' <label id="">昨日</label>';
html += ' <span class="data-change" id="">'+indicator.yesterday_num+'</span>'
html += ' </div>';
html += ' <div class="percent-tag">';
html += ' <label id="">本月</label>';
html += ' <span class="data-change" id="">'+indicator.current_month_num+'</span>'
html += ' </div>';
html += ' </div>';
html += ' </div>';
html += ' <div class="percent-tag">';
html += ' <label id="">同比</label>';
html += ' <span class="data-rise" id=""><i class="fa fa fa-long-arrow-up"></i></span>';
html += ' <span class="data-fall" id="" style="display: none;"><i class="fa fa fa-long-arrow-down"></i></span>';
html += ' <span class="data-change" id="">'+indicator.yoy+'%</span>';
html += ' </div>'
html += ' <div class="percent-tag">';
html += ' <label id="">环比</label>';
html += ' <span class="data-rise" id="" style="display: none;"><i class="fa fa fa-long-arrow-up"></i></span>';
html += ' <span class="data-fall" id=""><i class="fa fa fa-long-arrow-down"></i></span>';
html += ' <span class="data-change" id="">'+indicator.ring_ratio+'%</span>';
html += ' </div>';
html += '</div>';
}
console.log(html.length);
$("#sixIndicators").html(html);
}
},
error: function (error) {
$.modal.alertWarning("获取分析数据失败。");
}
});
}
/** 获取区列表 */
function queryDept() {
$.ajax({
@ -373,16 +340,17 @@
const datas = res.data;
var html = '';
if(datas.length >= 11) {
html += '<dd class="check_label" onclick="changeArea(null, null)">全区<i id="showArrow" class="fa fa-angle-right"></i></dd>';
html += '<dd class="check_label" onclick="changeArea(null, \'全区\',\'1\')">全区<i id="showArrow" class="fa fa-angle-right"></i></dd>';
$("#dept_flag").html('全区')
changeArea(null, null)
deptId = null; deptName='全区';
changeArea(null, '全区','1')
} else {
var area = datas[0].deptName;
$("#dept_flag").html(area)
changeArea(datas[0].deptId, area)
$("#dept_flag").html(datas[0].deptName)
deptId = datas[0].deptId; deptName= datas[0].deptName;
changeArea(datas[0].deptId, datas[0].deptName,'1')
}
for(var i=0; i<datas.length; i++) {
html += '<dd class="check_label" onclick="changeArea(\''+datas[i].deptId+'\',\''+datas[i].deptName+'\')">'+datas[i].deptName+'<i class="fa fa-angle-right"></i></dd>'
html += '<dd class="check_label" onclick="changeArea(\''+datas[i].deptId+'\',\''+datas[i].deptName+'\',\'1\')">'+datas[i].deptName+'<i class="fa fa-angle-right"></i></dd>'
}
$("#depts").html(html);
@ -449,10 +417,10 @@
const datas = res.data;
for(var i=0; i<datas.length; i++) {
if (datas[i].zone===4) {
streetHtml += '<a class="selitem">'+datas[i].deptName+'</a>'
streetHtml += '<a class="selitem" onclick="changeArea(\''+datas[i].deptId+'\',\''+datas[i].deptName+'\',\'2\')">'+datas[i].deptName+'</a>'
}
if (datas[i].zone===3) {
districtHtml += '<a class="selitem">'+datas[i].deptName+'</a>'
districtHtml += '<a class="selitem" onclick="changeArea(\''+datas[i].deptId+'\',\''+datas[i].deptName+'\',\'2\')">'+datas[i].deptName+'</a>'
}
}
}
@ -475,21 +443,97 @@
}
}
function changeArea(id, area) {
queryStreetAndDistrict(id,area);
sixIndicators(id, area)
sixIndicators_area(id, area);
reg_type(id);
enterprise_type(id);
complaint_type(id);
reg_order(id);
complaint_order(id);
bureau_order(id);
if (null == area) area = "全区<a></a>"
$("#dept_flag").html(area+"<a></a>")
function changeArea(id, name,type) {
deptId = id;
deptName = name;
if (type === "1") {
queryStreetAndDistrict(id,name);
}
if (type === "2"){
//gouxuan
//bgouxuan
}
sixIndicators(deptId, deptName,beginTime,endTime)
sixIndicators_area(deptId, deptName,beginTime,endTime);
reg_type(deptId,beginTime,endTime);
enterprise_type(deptId,beginTime,endTime);
complaint_type(deptId,beginTime,endTime);
reg_order(deptId,beginTime,endTime);
complaint_order(deptId,beginTime,endTime);
bureau_order(deptId,beginTime,endTime);
if (null == name) name = "全区<a></a>"
$("#dept_flag").html(name+"<a></a>")
}
function searchDate(time1, time2) {
beginTime = time1;
endTime = time2;
sixIndicators(deptId, deptName,beginTime,endTime)
sixIndicators_area(deptId, deptName,beginTime,endTime);
reg_type(deptId,beginTime,endTime);
enterprise_type(deptId,beginTime,endTime);
complaint_type(deptId,beginTime,endTime);
reg_order(deptId,beginTime,endTime);
complaint_order(deptId,beginTime,endTime);
bureau_order(deptId,beginTime,endTime);
if (null == name) name = "全区<a></a>"
$("#dept_flag").html(name+"<a></a>")
}
function sixIndicators(deptId, area,beginTime,endTime) {
$.ajax({
url: ctx + "code/statisticalPanel/sixIndicators",
type: "get",
data: {deptId: deptId, qy: area,beginTime: beginTime,endTime: endTime},
success: function(res) {
if(res.success) {
const indicators = res.data;
html = "";
for(var i=0; i < indicators.length; i++) {
var indicator = indicators[i];
html += '<div class="data_item">';
html += ' <div class="cont-title">'+indicator.title+'</div>';
html += ' <div class="cont-total"><b><span id="regis-total">'+indicator.num+'</span></b>';
html += ' <div class="nece-data">';
html += ' <div class="percent-tag">';
html += ' <label id="">昨日</label>';
html += ' <span class="data-change" id="">'+indicator.yesterday_num+'</span>'
html += ' </div>';
html += ' <div class="percent-tag">';
html += ' <label id="">本月</label>';
html += ' <span class="data-change" id="">'+indicator.current_month_num+'</span>'
html += ' </div>';
html += ' </div>';
html += ' </div>';
html += ' <div class="percent-tag">';
html += ' <label id="">同比</label>';
html += ' <span class="data-rise" id=""><i class="fa fa fa-long-arrow-up"></i></span>';
html += ' <span class="data-fall" id="" style="display: none;"><i class="fa fa fa-long-arrow-down"></i></span>';
html += ' <span class="data-change" id="">'+indicator.yoy+'%</span>';
html += ' </div>'
html += ' <div class="percent-tag">';
html += ' <label id="">环比</label>';
html += ' <span class="data-rise" id="" style="display: none;"><i class="fa fa fa-long-arrow-up"></i></span>';
html += ' <span class="data-fall" id=""><i class="fa fa fa-long-arrow-down"></i></span>';
html += ' <span class="data-change" id="">'+indicator.ring_ratio+'%</span>';
html += ' </div>';
html += '</div>';
}
console.log(html.length);
$("#sixIndicators").html(html);
}
},
error: function (error) {
$.modal.alertWarning("获取分析数据失败。");
}
});
}
/**********数据子项折叠************/
$(".select_item > label").each(function (i) {

135
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/single-analysis.html

@ -270,6 +270,10 @@
var ctx="/"
var totalSize = 0;
var deptId = null;
var deptName = null;
var beginTime = null;
var endTime = null;
$.ajax({
url: ctx + "code/statisticalPanel/queryDeptLength",
type: "get",
@ -291,7 +295,7 @@
done: function(value, date, endDate){ // 选择日期后的回调函数
//选择了清空
if (value ===''){
changeData(null,null,2);
changeDate(null,null);
}
//选择了确定
if (value !==null && value !==''){
@ -302,27 +306,86 @@
var month2 = 10 > endDate.month?"0"+endDate.month:endDate.month
var date2 = 10 > endDate.date?"0"+endDate.date:endDate.date
let endTime = endDate.year+"-"+month2+"-"+date2
changeData(beginTime,endTime,2);
changeDate(beginTime,endTime);
}
}
})
});
function changeData(beginTime,endTime,deptId){
$(function(){
queryDept();
});
/** 获取市值列表 */
function queryDept() {
$.ajax({
url: ctx + "code/statisticalPanel/queryDept",
type: "post",
data: JSON.stringify({"zone": 1}),
dataType: 'json',
contentType: "application/json",
success: function(res) {
if(res.success) {
const datas = res.data;
var html = '';
if(datas.length === totalSize) {
html += '<dd class="check_label" onclick="changeArea(\'2\', \'全市直\')">全市直</dd>';
$("#dept_flag").html('全市直')
deptId = '2'; deptName='全市直';
changeArea('2', '全市直')
} else {
$("#dept_flag").html(datas[0].deptName)
deptId = datas[0].deptId; deptName= datas[0].deptName;
changeArea(datas[0].deptId, datas[0].deptName)
}
for(var i=0; i<datas.length; i++) {
html += '<dd class="check_label" onclick="changeArea(\''+datas[i].deptId+'\',\''+datas[i].deptName+'\')">'+datas[i].deptName+'</dd>'
}
$("#depts").html(html);
$('.fold_cont dd:first').addClass('selchk');//给第一个dd追加
//each遍历元素
$(".fold_cont dd").each(function () {
$(this).click(function () { //点击事件
//当点击自身的时候添加,及删除同级的
$(this).addClass('selchk').siblings().removeClass('selchk')
})
});
}
},
error: function (error) {
$.modal.alertWarning("获取分析数据失败。");
}
});
}
function changeArea(id, name) {
deptId = id;
deptName = name;
sixIndicators(beginTime,endTime,deptId);
checkCategory(beginTime,endTime,deptId);
evaluateCategory(beginTime,endTime,deptId);
complaintCategory(beginTime,endTime,deptId);
enforceType(beginTime,endTime,deptId);
if (null == deptName) deptName = "全市直<a></a>"
$("#dept_flag").html(deptName+"<a></a>")
}
function changeDate(time1, time2) {
beginTime = time1;
endTime = time2;
sixIndicators(beginTime,endTime,deptId);
checkCategory(beginTime,endTime,deptId);
evaluateCategory(beginTime,endTime,deptId);
complaintCategory(beginTime,endTime,deptId);
enforceType(beginTime,endTime,deptId);
if (null == deptName) deptName = "全市直<a></a>"
$("#dept_flag").html(deptName+"<a></a>")
}
$(function(){
queryDept();
});
/** 检查环比分析 */
function sixIndicators(beginTime,endTime,deptId) {
$.ajax({
url: ctx + "code/statisticalPanel/sixIndicators",
@ -477,62 +540,6 @@
});
}
/** 获取市值列表 */
function queryDept() {
$.ajax({
url: ctx + "code/statisticalPanel/queryDept",
type: "post",
data: JSON.stringify({"zone": 1}),
dataType: 'json',
contentType: "application/json",
success: function(res) {
if(res.success) {
const datas = res.data;
var html = '';
if(datas.length === totalSize) {
html += '<dd class="check_label" onclick="changeArea(\'2\', \'全市直\')">全市直</dd>';
$("#dept_flag").html('全市直')
changeArea('2', null)
} else {
var area = datas[0].deptName;
$("#dept_flag").html(area)
changeArea(datas[0].deptId, area)
}
for(var i=0; i<datas.length; i++) {
html += '<dd class="check_label" onclick="changeArea(\''+datas[i].deptId+'\',\''+datas[i].deptName+'\')">'+datas[i].deptName+'</dd>'
}
$("#depts").html(html);
$('.fold_cont dd:first').addClass('selchk');//给第一个dd追加
//each遍历元素
$(".fold_cont dd").each(function () {
$(this).click(function () { //点击事件
//当点击自身的时候添加,及删除同级的
$(this).addClass('selchk').siblings().removeClass('selchk')
})
});
}
},
error: function (error) {
$.modal.alertWarning("获取分析数据失败。");
}
});
}
function changeArea(id, area) {
sixIndicators(null,null,id);
checkCategory(null,null,id);
evaluateCategory(null,null,id);
complaintCategory(null,null,id);
enforceType(null,null,id);
if (null == area) area = "全市直<a></a>"
$("#dept_flag").html(area+"<a></a>")
}
/**********数据子项折叠************/

75
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java

@ -1,30 +1,20 @@
package com.zdxt.code.controller;
import com.zdxt.auth.common.utils.StringUtils;
import com.zdxt.auth.dto.DeptBean;
import com.zdxt.auth.feign.DeptApi;
import com.zdxt.auth.project.system.dict.service.IDictDataService;
import com.zdxt.code.domain.ComprehensiveAnalysis;
import com.zdxt.code.domain.SixAnalysis;
import com.zdxt.code.domain.SixAnalysisParams;
import com.zdxt.code.domain.StatisticsIndicatorPart;
import com.zdxt.code.domain.dto.StatisticalPanelDto;
import com.zdxt.code.service.StatisticalPaneService;
import com.zdxt.common.ZDResponse;
import com.zdxt.common.controller.BaseController;
import com.zdxt.domain.auth.Dept;
import com.zdxt.domain.auth.DictData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDate;
import java.time.temporal.TemporalAdjusters;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 综合统计
@ -107,17 +97,6 @@ public class StatisticalPanelController extends BaseController {
/*------------------------------------------综合分析-新版--------------------------------*/
@GetMapping("/registrationNew")
@ResponseBody
public ZDResponse registrationNew(StatisticsIndicatorPart statisticsIndicatorPart){
return ZDResponse.success("涉企检查数据统计",statisticalPaneService.registrationNew(statisticsIndicatorPart));
}
@GetMapping("/overall-analysis")
public String overallAnalysis(Model model)
{
@ -129,18 +108,33 @@ public class StatisticalPanelController extends BaseController {
return "project/code/statistical/single-analysis";
}
/**
* 综合分析查询全市全区最顶部企业同环比数据
*/
@GetMapping("/sixIndicators")
@ResponseBody
public ZDResponse sixIndicators(SixAnalysisParams params){
return ZDResponse.success("总数据统计", statisticalPaneService.sixIndicators(params));
}
/**
* 综合分析查询全区页面接口
*/
@GetMapping("/sixIndicators_area")
@ResponseBody
public ZDResponse sixIndicators_area(SixAnalysisParams params){
return ZDResponse.success("各区数据统计", statisticalPaneService.sixIndicators_area(params));
}
@GetMapping("/registrationNew")
@ResponseBody
public ZDResponse registrationNew(StatisticsIndicatorPart statisticsIndicatorPart){
return ZDResponse.success("涉企检查数据统计",statisticalPaneService.registrationNew(statisticsIndicatorPart));
}
@GetMapping("/staisticalRegistration_order")
@ResponseBody
public ZDResponse staisticalRegistration_order(SixAnalysisParams params){
@ -149,20 +143,37 @@ public class StatisticalPanelController extends BaseController {
@GetMapping("/staisticalComplaint_order")
@ResponseBody
public ZDResponse staisticalComplaint_order(SixAnalysisParams params){
return ZDResponse.success("被检查企业次数排行", statisticalPaneService.staisticalComplaint_order(params));
return ZDResponse.success("被投诉单位次数排行", statisticalPaneService.staisticalComplaint_order(params));
}
@GetMapping("/staisticalBureau_order")
@ResponseBody
public ZDResponse staisticalBureau_order(SixAnalysisParams params){
return ZDResponse.success("被检查企业次数排行", statisticalPaneService.staisticalBureau_order(params));
return ZDResponse.success("执法检查单位次数排行", statisticalPaneService.staisticalBureau_order(params));
}
@GetMapping("/staisticalEnterprise_category")
@ResponseBody
public ZDResponse staisticalEnterprise_category(SixAnalysisParams params){
return ZDResponse.success("企业类别及占比", statisticalPaneService.staisticalEnterprise_category(params));
}
/**
* 综合分析查询全市页面接口
*/
@GetMapping("/staisticalCheck_category")
@ResponseBody
public ZDResponse staisticalCheck_category(SixAnalysisParams params){
return ZDResponse.success("行政检查类别及占比", statisticalPaneService.staisticalCheck_category(params));
}
@GetMapping("/staisticalEnforce_type")
@ResponseBody
public ZDResponse staisticalEnforce_type(SixAnalysisParams params){
return ZDResponse.success("行政执法投诉类别及占比", statisticalPaneService.staisticalEnforce_type(params));
}
@GetMapping("/staisticalEvaluate_category")
@ResponseBody
public ZDResponse staisticalEvaluate_category(SixAnalysisParams params){
@ -175,17 +186,9 @@ public class StatisticalPanelController extends BaseController {
return ZDResponse.success("投诉类别及占比", statisticalPaneService.staisticalComplaint_category(params));
}
@GetMapping("/staisticalEnterprise_category")
@ResponseBody
public ZDResponse staisticalEnterprise_category(SixAnalysisParams params){
return ZDResponse.success("企业类别及占比", statisticalPaneService.staisticalEnterprise_category(params));
}
@GetMapping("/staisticalEnforce_type")
@ResponseBody
public ZDResponse staisticalEnforce_type(SixAnalysisParams params){
return ZDResponse.success("行政执法投诉类别及占比", statisticalPaneService.staisticalEnforce_type(params));
}
/**
* 查询部门接口
*/
@PostMapping("/queryDept")
@ResponseBody
@ -197,14 +200,14 @@ public class StatisticalPanelController extends BaseController {
@GetMapping("/queryDeptLength")
@ResponseBody
public ZDResponse queryDeptLength(DeptBean deptParams){
return ZDResponse.success("部门列表", deptApi.queryDeptLength(deptParams));
return ZDResponse.success("部门列表长度", deptApi.queryDeptLength(deptParams));
}
@PostMapping("/queryStreetAndDistrict")
@ResponseBody
public ZDResponse queryStreetAndDistrict(@RequestBody DeptBean deptParams){
List<DeptBean> deptBeans = deptApi.getStreetAndDistrictList(deptParams);
return ZDResponse.success("部门列表", deptBeans);
return ZDResponse.success("部门列表-街道和区直", deptBeans);
}
}

247
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml

@ -166,6 +166,10 @@
and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')
</if>
<if test="dateType != null and dateType != 'day' and beginTime != null and beginTime != '' and endTime != null and endTime != ''">
and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')
</if>
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -218,6 +222,10 @@
and DATE_FORMAT(r.create_time,'%Y-%m-%d')>=DATE_SUB(STR_TO_DATE(#{beginTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime},"%Y-%m-%d"))+1 day)
and DATE_SUB(STR_TO_DATE(#{endTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime},"%Y-%m-%d"))+1 day)>=DATE_FORMAT(r.create_time,'%Y-%m-%d')
</if>
<if test="dateType != null and dateType != 'day' and beginTime != null and beginTime != '' and endTime != null and endTime != ''">
and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')
</if>
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -270,6 +278,10 @@
and DATE_FORMAT(DATE_SUB(r.create_time,INTERVAL -1 year),'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(DATE_SUB(r.create_time,INTERVAL -1 year),'%Y-%m-%d')
</if>
<if test="dateType != null and dateType != 'day' and beginTime != null and beginTime != '' and endTime != null and endTime != ''">
and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')
</if>
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -355,6 +367,10 @@
and DATE_FORMAT(n.create_time,'%Y-%m-%d')>=DATE_SUB(STR_TO_DATE(#{beginTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime},"%Y-%m-%d"))+1 day)
and DATE_SUB(STR_TO_DATE(#{endTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime}),"%Y-%m-%d")+1 day)>=DATE_FORMAT(n.create_time,'%Y-%m-%d')
</if>
<if test="dateType != null and dateType != 'day' and beginTime != null and beginTime != '' and endTime != null and endTime != ''">
and DATE_FORMAT(n.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(n.create_time,'%Y-%m-%d')
</if>
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -397,6 +413,10 @@
and DATE_FORMAT(DATE_SUB(n.create_time,INTERVAL -1 year),'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(DATE_SUB(n.create_time,INTERVAL -1 year),'%Y-%m-%d')
</if>
<if test="dateType != null and dateType != 'day' and beginTime != null and beginTime != '' and endTime != null and endTime != ''">
and DATE_FORMAT(n.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(n.create_time,'%Y-%m-%d')
</if>
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -485,6 +505,10 @@
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d')>=DATE_SUB(STR_TO_DATE(#{beginTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime},"%Y-%m-%d"))+1 day)
and DATE_SUB(STR_TO_DATE(#{endTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime},"%Y-%m-%d"))+1 day)>=DATE_FORMAT(c.complaint_time,'%Y-%m-%d')
</if>
<if test="dateType != null and dateType != 'day' and beginTime != null and beginTime != '' and endTime != null and endTime != ''">
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(c.complaint_time,'%Y-%m-%d')
</if>
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -528,6 +552,10 @@
and DATE_FORMAT(DATE_SUB(c.complaint_time,INTERVAL -1 year),'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(DATE_SUB(c.complaint_time,INTERVAL -1 year),'%Y-%m-%d')
</if>
<if test="dateType != null and dateType != 'day' and beginTime != null and beginTime != '' and endTime != null and endTime != ''">
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(c.complaint_time,'%Y-%m-%d')
</if>
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -608,6 +636,10 @@
and DATE_FORMAT(w.create_time,'%Y-%m-%d')>=DATE_SUB(STR_TO_DATE(#{beginTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime},"%Y-%m-%d"))+1 day)
and DATE_SUB(STR_TO_DATE(#{endTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime},"%Y-%m-%d"))+1 day)>=DATE_FORMAT(w.create_time,'%Y-%m-%d')
</if>
<if test="dateType != null and dateType != 'day' and beginTime != null and beginTime != '' and endTime != null and endTime != ''">
and DATE_FORMAT(w.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(w.create_time,'%Y-%m-%d')
</if>
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -647,6 +679,10 @@
and DATE_FORMAT(DATE_SUB(w.create_time,INTERVAL -1 year),'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(DATE_SUB(w.create_time,INTERVAL -1 year),'%Y-%m-%d')
</if>
<if test="dateType != null and dateType != 'day' and beginTime != null and beginTime != '' and endTime != null and endTime != ''">
and DATE_FORMAT(w.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(w.create_time,'%Y-%m-%d')
</if>
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -717,6 +753,10 @@
and DATE_FORMAT(e.create_time,'%Y-%m-%d')>=DATE_SUB(STR_TO_DATE(#{e.beginTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{e.endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{e.beginTime},"%Y-%m-%d"))+1 day)
and DATE_SUB(STR_TO_DATE(#{e.endTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{e.endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{e.beginTime}),"%Y-%m-%d")+1 day)>=DATE_FORMAT(e.create_time,'%Y-%m-%d')
</if>
<if test="dateType != null and dateType != 'day' and beginTime != null and beginTime != '' and endTime != null and endTime != ''">
and DATE_FORMAT(e.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(e.create_time,'%Y-%m-%d')
</if>
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -753,6 +793,10 @@
and DATE_FORMAT(DATE_SUB(e.create_time,INTERVAL -1 year),'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(DATE_SUB(e.create_time,INTERVAL -1 year),'%Y-%m-%d')
</if>
<if test="dateType != null and dateType != 'day' and beginTime != null and beginTime != '' and endTime != null and endTime != ''">
and DATE_FORMAT(e.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(e.create_time,'%Y-%m-%d')
</if>
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -789,21 +833,28 @@
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))
</if>
</if>
<if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(r.create_time)=#{year}
</if>
<if test="dateType != null and dateType != '' and dateType == 'quarter' ">
and YEAR(r.create_time)=#{year}
and QUARTER(r.create_time)=#{quarter}
</if>
<if test="dateType != null and dateType != '' and dateType == 'month' ">
and YEAR(r.create_time)=#{year}
and MONTH(r.create_time)=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')
<if test="beginTime != null and beginTime != ''">
and DATE_FORMAT(r.create_time,'%Y-%m-%d') >=#{beginTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(r.create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime}
</if>
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- and QUARTER(r.create_time)=#{quarter}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- and MONTH(r.create_time)=#{month}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">-->
<!-- and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')-->
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')-->
<!-- </if>-->
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -831,21 +882,27 @@
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))
</if>
</if>
<if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(c.complaint_time)=#{year}
</if>
<if test="dateType != null and dateType != '' and dateType == 'quarter' ">
and YEAR(c.complaint_time)=#{year}
and QUARTER(c.complaint_time)=#{quarter}
</if>
<if test="dateType != null and dateType != '' and dateType == 'month' ">
and YEAR(c.complaint_time)=#{year}
and MONTH(c.complaint_time)=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(c.complaint_time,'%Y-%m-%d')
<if test="beginTime != null and beginTime != ''">
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >=#{beginTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime}
</if>
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">-->
<!-- and YEAR(c.complaint_time)=#{year}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">-->
<!-- and YEAR(c.complaint_time)=#{year}-->
<!-- and QUARTER(c.complaint_time)=#{quarter}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">-->
<!-- and YEAR(c.complaint_time)=#{year}-->
<!-- and MONTH(c.complaint_time)=#{month}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">-->
<!-- and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')-->
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(c.complaint_time,'%Y-%m-%d')-->
<!-- </if>-->
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -881,21 +938,27 @@
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))
</if>
</if>
<if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(r.create_time)=#{year}
</if>
<if test="dateType != null and dateType != '' and dateType == 'quarter' ">
and YEAR(r.create_time)=#{year}
and QUARTER(r.create_time)=#{quarter}
</if>
<if test="dateType != null and dateType != '' and dateType == 'month' ">
and YEAR(r.create_time)=#{year}
and MONTH(r.create_time)=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')
<if test="beginTime != null and beginTime != ''">
and DATE_FORMAT(r.create_time,'%Y-%m-%d') >=#{beginTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(r.create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime}
</if>
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- and QUARTER(r.create_time)=#{quarter}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- and MONTH(r.create_time)=#{month}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">-->
<!-- and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')-->
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')-->
<!-- </if>-->
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -936,21 +999,27 @@
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))
</if>
</if>
<if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(r.create_time)=#{year}
</if>
<if test="dateType != null and dateType != '' and dateType == 'quarter' ">
and YEAR(r.create_time)=#{year}
and QUARTER(r.create_time)=#{quarter}
</if>
<if test="dateType != null and dateType != '' and dateType == 'month' ">
and YEAR(r.create_time)=#{year}
and MONTH(r.create_time)=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')
<if test="beginTime != null and beginTime != ''">
and DATE_FORMAT(r.create_time,'%Y-%m-%d') >=#{beginTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(r.create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime}
</if>
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- and QUARTER(r.create_time)=#{quarter}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- and MONTH(r.create_time)=#{month}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">-->
<!-- and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')-->
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')-->
<!-- </if>-->
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -991,20 +1060,26 @@
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))
</if>
</if>
<if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(r.create_time)=#{year}
</if>
<if test="dateType != null and dateType != '' and dateType == 'quarter' ">
and YEAR(r.create_time)=#{year}
and QUARTER(r.create_time)=#{quarter}
</if>
<if test="dateType != null and dateType != '' and dateType == 'month' ">
and YEAR(r.create_time)=#{year}
and MONTH(r.create_time)=#{month}
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- and QUARTER(r.create_time)=#{quarter}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- and MONTH(r.create_time)=#{month}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">-->
<!-- and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')-->
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')-->
<!-- </if>-->
<if test="beginTime != null and beginTime != ''">
and DATE_FORMAT(r.create_time,'%Y-%m-%d') >=#{beginTime}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(r.create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime}
</if>
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
@ -1036,21 +1111,27 @@
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))
</if>
</if>
<if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(c.complaint_time)=#{year}
</if>
<if test="dateType != null and dateType != '' and dateType == 'quarter' ">
and YEAR(c.complaint_time)=#{year}
and QUARTER(c.complaint_time)=#{quarter}
</if>
<if test="dateType != null and dateType != '' and dateType == 'month' ">
and YEAR(c.complaint_time)=#{year}
and MONTH(c.complaint_time)=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(c.complaint_time,'%Y-%m-%d')
<if test="beginTime != null and beginTime != ''">
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >=#{beginTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime}
</if>
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">-->
<!-- and YEAR(c.complaint_time)=#{year}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">-->
<!-- and YEAR(c.complaint_time)=#{year}-->
<!-- and QUARTER(c.complaint_time)=#{quarter}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">-->
<!-- and YEAR(c.complaint_time)=#{year}-->
<!-- and MONTH(c.complaint_time)=#{month}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">-->
<!-- and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')-->
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(c.complaint_time,'%Y-%m-%d')-->
<!-- </if>-->
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}

Loading…
Cancel
Save