蟑螂恶霸 1 year ago
parent
commit
0047e3205c
  1. 17
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppComprehensiveAnalysisController.java
  2. 696
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/static/statistical/styles/home.css
  3. 57
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java
  4. 5
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/StatisticalPanelMapper.java
  5. 5
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/StatisticalPaneService.java
  6. 16
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticalPaneServiceImpl.java
  7. 83
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml

17
lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppComprehensiveAnalysisController.java

@ -1,9 +1,16 @@
package com.zdxt.app.controller;
import com.zdxt.auth.dto.DeptBean;
import com.zdxt.auth.dto.UserBean;
import com.zdxt.auth.feign.DeptApi;
import com.zdxt.auth.feign.UserApi;
import com.zdxt.code.domain.ComprehensiveAnalysis;
import com.zdxt.code.service.ComprehensiveAnalysisService;
import com.zdxt.common.controller.BaseController;
import com.zdxt.domain.auth.Dept;
import com.zdxt.domain.auth.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -14,6 +21,10 @@ import org.springframework.web.bind.annotation.ResponseBody;
public class AppComprehensiveAnalysisController extends BaseController {
@Autowired
private ComprehensiveAnalysisService comprehensiveAnalysisService;
@Autowired
private DeptApi deptApi;
@Autowired
private UserApi userApi;
@GetMapping("/whole")
@ResponseBody
@ -21,7 +32,11 @@ public class AppComprehensiveAnalysisController extends BaseController {
if(comprehensiveAnalysis.getSearchType().equals("user")){
return comprehensiveAnalysisService.whole(comprehensiveAnalysis);
} else if (comprehensiveAnalysis.getSearchType().equals("bureauDept")) {
String s=comprehensiveAnalysisService.getBureauDeptId(comprehensiveAnalysis);
Long userId = comprehensiveAnalysis.getUserId();
UserBean user = userApi.getUserByUserId(userId);
DeptBean dept = deptApi.iterationDeptParentToBureau(user.getDeptId());
String s = dept.getDeptId();
// String s=comprehensiveAnalysisService.getBureauDeptId(comprehensiveAnalysis);
if(s!=null&&!s.equals("")){
comprehensiveAnalysis.setUserId(null);
comprehensiveAnalysis.setBureauDeptId(s);

696
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/static/statistical/styles/home.css

@ -0,0 +1,696 @@
@charset "utf-8";
/* CSS Document */
* {
margin: 0;
padding: 0;
color: rgba(255, 255, 255, .8);
font-family: 'Microsoft Yahei', Arial, Verdana, sans-serif;
}
a {
text-decoration: none;
outline: none;
cursor: pointer;
}
a, a:focus {
color: rgba(255, 255, 255, .8);
}
a:hover {
color: rgba(255, 255, 255, 1);
}
ul, ol, li {
list-style: outside none none;
}
img {
border: 0 none;
}
table {
border-collapse: collapse;
}
hr {
margin: 10px 0;
border: 0;
border-top: 1px solid #eee;
height: 0;
}
.clearfix::before, .clearfix::after {
content: '.';
display: block;
overflow: hidden;
visibility: hidden;
font-size: 0;
line-height: 0;
width: 0;
height: 0;
clear: both;
}
html, body {
width: 100%;
height: 100%;
font-size: 14px;
overflow: hidden;
}
.wrap_all {
width: 100%;
height: 100%;
background: url(../images/bg_homebody.jpg) no-repeat;
background-size: cover;
box-sizing: border-box;
overflow: hidden;
}
.wrap_left, .wrap_right, .wrap_cent, .wrap_bottom {
position: absolute;
top: 1%;
left: 0.5%;
z-index: 99;
margin: 0;
height: 98%;
width: 20.5%;
overflow: hidden;
}
.wrap_right {
left: auto;
right: 0.5%;
}
.wrap_cent {
left: 20%;
width: 60%;
}
.wrap_bottom {
top: auto;
bottom: 1%;
left: 21.5%;
width: 57%;
height: 22%;
}
.cont_left {
width: 100%;
height: 100%;
background: rgba(16, 46, 112, .3);
border-radius: 5px;
}
.select_set {
float: left;
margin: 0.5% 0.5% 0.6% 5%;
padding-left: 2.5rem;
background: url(../images/icon_posit.png) no-repeat left;
background-size: auto 100%;
}
.select_item {
margin: 0 0 0 5px;
font-size: 1.2rem;
white-space: nowrap;
}
.select_item > label {
position: relative;
display: inline-block;
margin: 0 5px 0 0;
padding: 0 2.5rem 0 0.85rem;
height: 2.15rem;
line-height: 1.75;
font-weight: 500;
background: rgba(59, 145, 253, 0.12);
letter-spacing: 0;
text-align: center;
border-radius: 6px;
cursor: pointer;
}
.select_item > label > a {
display: inline-block;
position: absolute;
right: 0;
width: 18px;
height: 100%;
}
.select_item > label > a::after {
position: absolute;
top: 0.45rem;
right: -0.2rem;
transform: rotate(90deg);
width: 18px;
height: 18px;
content: "\f105";
color: #678dfe;
font-family: "FontAwesome";
font-size: 1.25rem;
}
.link_btn {
float: right;
margin: 0.45% 5% 2%;
min-width: 26.5rem;
height: 2rem;
font-size: 1.2rem;
line-height: 2;
white-space: nowrap;
}
.link_btn a {
position: relative;
margin: 3% 5%;
padding-left: 2.25rem;
opacity: .8;
}
.link_btn a:hover {
opacity: 1;
}
.link_btn a::before {
position: absolute;
left: 0;
top: 0;
content: "";
width: 1.75rem;
height: 1.75rem;
background: url(../images/icon_dist50.png) no-repeat;
background-size: 100% auto;
}
.link_btn a:last-child::before {
background: url(../images/icon_dept50.png) no-repeat;
background-size: 100% auto;
}
.link_btn a::after {
position: absolute;
top: -0.35rem;
right: -1.1rem;
content: "\f105";
color: #1ab5e0;
font-family: "FontAwesome";
font-size: 1.25rem;
opacity: .75;
}
.count_box {
display: flex;
justify-content: space-between;
margin: 2% 5%;
height: 8rem;
clear: both;
}
.count_box .count_item {
display: flex;
min-width: 37.5%;
height: 100%;
}
.count_box .count_item .count_tit {
position: relative;
width: 30%;
height: 100%;
background: url(../images/icon_data2.png) no-repeat;
background-size: auto 80%;
}
.count_box .count_tit label {
position: absolute;
top: 5.65rem;
left: 0;
display: block;
margin: 0;
padding: 2% 5% 2% 18%;
width: auto;
background: url(../images/bg_tit3.png) no-repeat;
background-size: auto 100%;
color: rgba(255, 255, 255, .6);
font-size: 1.25rem;
white-space: nowrap;
}
.count_num_all {
background-image: linear-gradient(to right, #f7fbfd, #26bef9);
-webkit-background-clip: text;
color: transparent;
font-size: 3.15rem;
font-weight: 550;
line-height: 1.75;
text-align: center;
}
.count_num_sub {
font-size: 1.25rem;
text-align: center;
white-space: nowrap;
}
.count_num_sub span {
margin: 0 10% 0 0;
line-height: 1.75;
text-align: center;
}
.count_num_sub span b {
background-image: linear-gradient(to right, #f7fbfd, #26bef9);
-webkit-background-clip: text;
color: transparent;
font-size: 1.25rem;
font-weight: 550;
line-height: 1.75;
text-align: center;
}
.count_box .count_item.non_admin .count_tit {
background: url(../images/icon_data1.png) no-repeat;
background-size: auto 80%;
}
.count_box .count_item.admin .count_num {
margin-left: -3.5%;
}
.count_box .count_item:last-child .count_num_all, .count_box .count_item:last-child .count_num_sub span b {
background-image: linear-gradient(to right, #d2f5ff, #0394f9);
}
.map_box {
position: relative;
top: -3.5%;
width: 100%;
}
.map_box > img.szmap {
margin-top: 0;
max-width: 100%;
/* max-height: 100%; */
height: auto;
}
.label_wrap {
position: absolute;
top: 0;
left: 0;
z-index: 10;
width: 100%;
height: 100%;
}
.label_item {
position: absolute;
display: inline-block;
}
.label_item > a {
cursor: pointer;
}
.label_item > a > label {
color: rgba(255, 255, 255, .6);
font-size: 0.85rem;
}
@keyframes blink {
0%, 100% {
opacity: 1;
} /* 完全不透明 */
50% {
opacity: 0;
} /* 完全透明 */
}
/* 应用动画到元素 */
.label_item > a.active {
animation: blink 1000ms infinite; /* 动画名称 持续时间 迭代次数 */
}
.admin_inspect {
margin: -1.5rem 0 0 2.75rem;
}
.non_admin_inspect {
margin: 0.5rem 0 0 2.75rem;
}
.admin_inspect span, .non_admin_inspect span {
position: relative;
display: flex;
margin: 5% 0;
padding: 0 0 0 1.5rem;
color: #2e90fd;
font-size: 0.85rem;/* font-weight: 550; */
}
.non_admin_inspect span {
color: #04cafc;
}
.admin_inspect span::before, .non_admin_inspect span::before {
position: absolute;
left: 0;
width: 1.25rem;
height: 1.25rem;
background-color: rgba(46, 97, 241, .8);
border-radius: 50%;
content: "检";
color: rgba(255, 255, 255, .6);
text-align: center;
}
.admin_inspect span:last-child::before, .non_admin_inspect span:last-child::before {
/*background: rgba(46, 97, 241, .8) url(../images/icon_qi.png) no-repeat center center;
background-size: 90% auto;*/
content: "企";
}
.non_admin_inspect span::before, .non_admin_inspect span:last-child::before {
background-color: rgba(7, 147, 209, .8);
}
.fold_cont {
display: none;
position: absolute;
top: -18rem;
left: -13.5rem;
z-index: 99;
width: 23rem;
height: 17.5rem;
background: url(../images/bg_tip.png) no-repeat;
background-size: 100% 100%;
}
.fold_cont::before {
position: absolute;
left: 43%;
bottom: -4rem;
z-index: -1;
width: 6rem;
height: 5rem;
background: url(../images/bg_tip_line.png) no-repeat;
background-size: auto 80%;
content: "";
}
#districtGM .fold_cont {
left: -11rem;
}
#districtGM .fold_cont::before {
left: 30%;
}
#districtBA .fold_cont {
left: -6rem;
}
#districtBA .fold_cont::before {
left: 7.5%;
}
#districtNS .fold_cont {
left: -11rem;
}
#districtNS .fold_cont::before {
left: 30%;
}
#districtSS .admin_inspect, #districtSS .non_admin_inspect {
margin-left: 4.5rem;
}
.tab_switch {
position: relative;
top: 12%;
left: 10%;
width: 65%;
height: 1.75rem;
background-color: rgba(25, 64, 88, .35);
border-radius: 3rem;
}
.tab_switch a {
padding: 0 1.25rem;
color: rgba(255, 255, 255, .5);
font-size: 1rem;
line-height: 1.75;
white-space: nowrap;
text-align: center;
}
.tab_switch a.active {
/*background-color: #02a3ab;*/
background-image: linear-gradient(to bottom, transparent, #26bef9);
border-radius: 3rem;
box-shadow: 0 0 5px #1ce9f3;
color: #fff;
}
.tab_inspect {
margin: 10% 10% 0;
}
.tab_inspect_item {
width: 100%;
height: calc(100% - 8rem);
overflow-y: auto;
}
.tab_inspect_item > ul > li {
display: flex;
justify-content: space-between;
position: relative;
margin: 3% 0;
padding: 0 0 0 1.25rem;
}
.tab_inspect_item > ul > li::before {
position: absolute;
top: 0.25rem;
left: 0;
content: "\f111";
color: #1ab5e0;
font-family: "FontAwesome";
font-size: 0.85rem;
}
.tab_inspect_item > ul > li > label {
color: #92b3d3;
}
.tab_inspect_item > ul > li > span {
color: #06b8f8;
font-weight: 550;
}
.legend_box {
display: flex;
justify-content: center;
position: absolute;
left: 22%;
bottom: 8%;
min-width: 50%;
white-space: nowrap;
}
.legend_box label {
position: relative;
margin: 0 6.5% 0 0;
padding: 0 0 0 1.75rem;
color: rgba(255, 255, 255, .5);
font-size: 0.85rem;
}
.legend_box label::before {
position: absolute;
left: 0;
width: 1.25rem;
height: 1.25rem;
border: 1px solid rgba(255, 255, 255, .5);
border-radius: 50%;
content: "检";
color: rgba(255, 255, 255, .6);
text-align: center;
}
.legend_box label:nth-child(2)::before {
content: "企";
}
.legend_box label:nth-child(3)::before, .legend_box label:nth-child(4)::before {
top: 0.1rem;
height: 1rem;
content: "";
background: #2e90fd;
border: 0;
border-radius: 3px;
}
.legend_box label:nth-child(4)::before {
background: #0882ae;
}
.wrap_bottom h3 {
margin: 1% 0 -3% 1%;
height: 2.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 2;
text-shadow: 2px 1px 5px rgba(255, 255, 255, .5);
}
.tab_chart {
position: relative;
margin: 2% 1%;
clear: both;
overflow: auto;
width: 98%;
height: calc(96% - 3rem);
}
.chartbox {
width: 100%;
height: 100%;
}
.tab_tit {
position: absolute;
top: 8%;
left: 10rem;
font-size: 1rem;
white-space: nowrap;
}
.tab_tit a {
margin: 0 5%;
padding: 1% 2%;
color: rgba(255, 255, 255, .5);
}
.tab_tit a.active {
color: #2e82fd;
border-bottom: 2px solid #2e82fd;
}
.block_tit {
margin: 0 0 1% 0;
padding: 0 0 0 4rem;
height: 2.5rem;
background: url(../images/bg_tit.png) no-repeat;
background-size: 100% 100%;
font-size: 1.2rem;
font-weight: 500;
line-height: 2;
text-shadow: 2px 1px 5px rgba(255, 255, 255, .5);
}
.count_wrap {
/* display: flex; */
/* flex-wrap: wrap; */
height: 100%;
width: 100%;
}
.count_wrap .count_item {
float: left;
position: relative;
margin: 0.5% 5% 1.5%;
width: 45%;
height: 15%;
border-radius: 10px;
font-size: 1rem;
text-align: center;
}
/*.count_wrap .count_item:last-child {
width: 90%;
}*/
.count_wrap .count_item:nth-child(even) {
margin-left: -5%;
}
.count_wrap .count_item::before {
display: block;
position: absolute;
top: 30%;
right: 0;
content: "";
width: 100%;
height: 60%;
background: linear-gradient(to bottom, transparent 50%, rgba(20,138,156,.3));
}
.count_wrap .count_item:nth-child(odd)::after {
display: inline-block;
position: absolute;
top: 30%;
right: -2.5%;
content: "";
width: 2px;
height: 35%;
background: url(../images/line_vert.png) no-repeat right center;
background-size: 100% 100%;
}
.count_wrap .count_item:last-child::after {
background: none;
}
.count_wrap .count_item label {
display: inline-flex;
justify-content: center;
margin: 7% 2% 0;
width: 96%;
color: rgba(255, 255, 255, .6);
font-size: 1rem;
}
.number_count {
display: block;
background-image: linear-gradient(to right, #f7fbfd, #26bef9);
-webkit-background-clip: text;
color: transparent;
font-size: 2.0rem;
font-weight: 550;
line-height: 1.85;
}
.number_percent {
color: rgba(243, 153, 98, .8);
font-size: 1.15rem;
}
.number_percent > i {
margin-left: 2%;
color: #f39962;
font-size: 0.8rem;
}
.count_admin {
display: flex;
align-items: center;
justify-content: space-around;
margin: 5% 0 0;
width: 97%;
}
.count_admin > label {
width: 5rem;
height: 5rem;
background: linear-gradient(to bottom, transparent 50%, rgba(20,138,156,.5));
border: 1px solid rgba(20, 103, 103, .6);
border-radius: 5px;
color: rgba(255, 255, 255, .6);
font-size: 0.85rem;
line-height: 2;
text-align: center;
}
.count_admin:nth-child(2) > label {
background: linear-gradient(to bottom, transparent 50%, rgba(34, 125, 223, .5));
border: 1px solid rgba(26, 86, 151, .6);
}
.count_admin:nth-child(3) > label {
background: linear-gradient(to bottom, transparent 50%, rgba(247, 125, 169, .5));
border: 1px solid rgba(103, 46, 43, .6);
}
.count_admin > label > img {
display: block;
margin: 10% auto 5%;
width: auto;
height: 50%;
}
.count_admin_num {
text-align: center;
}
.count_admin_num > b {
display: block;
background-image: linear-gradient(to right, #d2f5ff, #0394f9);
-webkit-background-clip: text;
color: transparent;
font-size: 2.0rem;
font-weight: 550;
line-height: 1.5;
}
.percent-tag {
display: flex;
align-items: center;
margin: 20% 3%;
white-space: nowrap;
}
.percent-tag span {
margin: 0 5%;
color: rgba(255, 255, 255, .5);
font-size: 1.15rem;
line-height: 1;
}
.percent-tag span.data-rise, .percent-tag span.data-fall {
margin: 0.75% 2% 1% 0.5%;
font-size: 1.0rem;
}
.percent-tag span.data-rise i {
color: #67dc53;
}
.percent-tag span.data-fall i {
color: #fd7c7c;
}
.percent-tag label {
margin: 0 2% 0 10%;
color: rgba(255, 255, 255, .5);
font-size: 0.85rem;
}
.chartbox_right {
margin: 15% 0 0;
width: 100%;
height: 35%;
}
/** 滚动条样式 **/
::-webkit-scrollbar { /*滚动条整体样式*/
width: 0.5rem; /*高宽分别对应横竖滚动条的尺寸*/
height: 0.5rem;
}
::-webkit-scrollbar-thumb { /*滚动条里面小方块*/
border-radius: 0.5rem;
background-color: #02206d;
box-shadow: inset 0 0 10px rgba(5, 172, 254, 0.6);
}
::-webkit-scrollbar-track { /*滚动条里面轨道*/
box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.2);
border-radius: 0;
background: rgba(0, 0, 0, 0.15);
}

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

@ -257,9 +257,9 @@ public class StatisticalPanelController extends BaseController {
double ent_yoy_num = statisticalPaneService.analysisInsNoticeYoy(params);
params.setIsReg(1);
Integer isnum = statisticalPaneService.analysisInsNotice(params);
String per = this.setPercentage((double)isnum / num);
String rr = this.setPercentage((num - ent_rr_num) / ent_rr_num);
String yoy = this.setPercentage((num - ent_yoy_num) / ent_yoy_num);
String per = this.setPercentage((double)isnum / num);
Map<String, Object> resMap = new HashMap<String, Object>();
resMap.put("num", num);
resMap.put("rr", rr);
@ -275,12 +275,16 @@ public class StatisticalPanelController extends BaseController {
Integer num = statisticalPaneService.analysisEnterprisesComplaint(params);
double ent_rr_num = statisticalPaneService.analysisEnterprisesComplaintRr(params);
double ent_yoy_num = statisticalPaneService.analysisEnterprisesComplaintYoy(params);
params.setUniteCheck(null);
Integer regnum = statisticalPaneService.analysisEnterprisesIns(params);
String rr = this.setPercentage((num - ent_rr_num) / ent_rr_num);
String yoy = this.setPercentage((num - ent_yoy_num) / ent_yoy_num);
String per = this.setPercentage((double)num / regnum);
Map<String, Object> resMap = new HashMap<String, Object>();
resMap.put("num", num);
resMap.put("rr", rr);
resMap.put("yoy", yoy);
resMap.put("per", per);
return ZDResponse.success("涉企投诉", resMap);
}
@ -291,20 +295,36 @@ public class StatisticalPanelController extends BaseController {
Integer num = statisticalPaneService.analysisEnterprises(params);
double ent_rr_num = statisticalPaneService.analysisEnterprisesRr(params);
double ent_yoy_num = statisticalPaneService.analysisEnterprisesYoy(params);
Integer allnum = statisticalPaneService.analysisEnterprisesCountAll(params);
String rr = this.setPercentage((num - ent_rr_num) / ent_rr_num);
String yoy = this.setPercentage((num - ent_yoy_num) / ent_yoy_num);
String per = this.setPercentage((double)num / allnum);
Map<String, Object> resMap = new HashMap<String, Object>();
resMap.put("num", num);
resMap.put("rr", rr);
resMap.put("yoy", yoy);
resMap.put("per", per);
return ZDResponse.success("被查企业", resMap);
}
/** 非行政检查类型 - 统计 */
@PostMapping("/analysisNonRegistration")
@PostMapping("/analysisNonRegistrationType")
@ResponseBody
public ZDResponse analysisNonRegistration(@RequestBody SixAnalysisParams params){
List<Map<String, Object>> resMaps = statisticalPaneService.analysisNonRegistration(params);
public ZDResponse analysisNonRegistrationType(@RequestBody SixAnalysisParams params){
List<Map<String, Object>> resMaps = statisticalPaneService.analysisNonRegistrationType(params);
Integer nonAll = statisticalPaneService.analysis_non_enterprisesIns(params);
for (Map<String, Object> resMap : resMaps) {
double num = Double.parseDouble(resMap.get("num").toString());
String per = this.setPercentage((num / nonAll));
resMap.put("per", per);
}
return ZDResponse.success("被查企业", resMaps);
}
/** 非行政检查类型 - 统计 */
@PostMapping("/analysisRegistrationType")
@ResponseBody
public ZDResponse analysisRegistrationType(@RequestBody SixAnalysisParams params){
List<Map<String, Object>> resMaps = statisticalPaneService.analysisRegistrationType(params);
return ZDResponse.success("被查企业", resMaps);
}
@ -379,6 +399,35 @@ public class StatisticalPanelController extends BaseController {
resMap.put("ent", ent);
return ZDResponse.success("被查企业", resMap);
}
@PostMapping("/nonAnalysisTime")
@ResponseBody
public ZDResponse analysisNonEnterprisesInsTime(@RequestBody SixAnalysisParams params){
List<Map<String, Object>> insMaps = statisticalPaneService.analysisNonEnterprisesInsTime(params);
List<Map<String, Object>> entMaps = statisticalPaneService.analysisEnterprisesTime(params);
List<String> times = new ArrayList<>();
List<String> ins = new ArrayList<>();
List<String> ent = new ArrayList<>();
if (insMaps.size()<=entMaps.size()) {
for(int i=0 ; i<insMaps.size() ; i++) {
times.add(insMaps.get(i).get("time").toString());
ins.add(insMaps.get(i).get("num").toString());
ent.add(entMaps.get(i).get("num").toString());
}
} else {
for(int i=0 ; i<entMaps.size() ; i++) {
times.add(insMaps.get(i).get("time").toString());
ins.add(insMaps.get(i).get("num").toString());
ent.add(entMaps.get(i).get("num").toString());
}
}
Map<String, Object> resMap = new HashMap<>();
resMap.put("times", times);
resMap.put("ins", ins);
resMap.put("ent", ent);
return ZDResponse.success("被查企业", resMap);
}
private String setPercentage(Double percentage) {

5
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/StatisticalPanelMapper.java

@ -139,11 +139,14 @@ public interface StatisticalPanelMapper {
Double analysis_enterprises_rr(SixAnalysisParams params);
Double analysis_enterprises_yoy(SixAnalysisParams params);
Integer analysis_non_enterprises(SixAnalysisParams params);
Integer analysis_enterprises_countAll(SixAnalysisParams params);
/** 时间维度 */
List<Map<String, Object>> analysis_enterprisesIns_time(SixAnalysisParams params);
List<Map<String, Object>> analysis_non_enterprisesIns_time(SixAnalysisParams params);
List<Map<String, Object>> analysis_enterprises_time(SixAnalysisParams params);
/** 非行政检查类型 */
List<Map<String, Object>> analysis_non_registration(SixAnalysisParams params);
List<Map<String, Object>> analysis_non_registration_type(SixAnalysisParams params);
List<Map<String, Object>> analysis_registration_type(SixAnalysisParams params);
}

5
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/StatisticalPaneService.java

@ -95,10 +95,13 @@ public interface StatisticalPaneService {
Double analysisEnterprisesRr(SixAnalysisParams params);
Double analysisEnterprisesYoy(SixAnalysisParams params);
Integer analysis_non_enterprises(SixAnalysisParams params);
Integer analysisEnterprisesCountAll(SixAnalysisParams params);
/** 非行政检查类型 */
List<Map<String, Object>> analysisNonRegistration(SixAnalysisParams params);
List<Map<String, Object>> analysisNonRegistrationType(SixAnalysisParams params);
List<Map<String, Object>> analysisRegistrationType(SixAnalysisParams params);
/** 时间维度 */
List<Map<String, Object>> analysisEnterprisesInsTime(SixAnalysisParams params);
List<Map<String, Object>> analysisNonEnterprisesInsTime(SixAnalysisParams params);
List<Map<String, Object>> analysisEnterprisesTime(SixAnalysisParams params);
}

16
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticalPaneServiceImpl.java

@ -1564,8 +1564,16 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
return statisticalPanelMapper.analysis_non_enterprises(params);
}
@Override
public List<Map<String, Object>> analysisNonRegistration(SixAnalysisParams params) {
return statisticalPanelMapper.analysis_non_registration(params);
public Integer analysisEnterprisesCountAll(SixAnalysisParams params) {
return statisticalPanelMapper.analysis_enterprises_countAll(params);
}
@Override
public List<Map<String, Object>> analysisNonRegistrationType(SixAnalysisParams params) {
return statisticalPanelMapper.analysis_non_registration_type(params);
}
@Override
public List<Map<String, Object>> analysisRegistrationType(SixAnalysisParams params) {
return statisticalPanelMapper.analysis_registration_type(params);
}
@Override
@ -1573,6 +1581,10 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
return statisticalPanelMapper.analysis_enterprisesIns_time(params);
}
@Override
public List<Map<String, Object>> analysisNonEnterprisesInsTime(SixAnalysisParams params) {
return statisticalPanelMapper.analysis_non_enterprisesIns_time(params);
}
@Override
public List<Map<String, Object>> analysisEnterprisesTime(SixAnalysisParams params) {
return statisticalPanelMapper.analysis_enterprises_time(params);
}

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

@ -125,6 +125,7 @@
<!-- left join (select * from enterprise_information group by enterprise_number) e on r.enterprise_number = e.enterprise_number -->
<where>
and r.bureau_dept_name is not null
and r.is_submit = 1
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
@ -177,6 +178,7 @@
<!-- left join (select * from enterprise_information group by enterprise_number) e on r.enterprise_number = e.enterprise_number -->
<where>
and r.bureau_dept_name is not null
and r.is_submit = 1
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
@ -229,6 +231,7 @@
<!-- left join (select * from enterprise_information group by enterprise_number) e on r.enterprise_number = e.enterprise_number -->
<where>
and r.bureau_dept_name is not null
and r.is_submit = 1
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
@ -767,6 +770,7 @@
<!-- left join (select * from enterprise_information group by enterprise_number) e on r.enterprise_number = e.enterprise_number -->
<where>
and r.bureau_dept_name is not null
and r.is_submit = 1
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
@ -872,6 +876,7 @@
<!-- left join (select * from enterprise_information group by enterprise_number) e on r.enterprise_number = e.enterprise_number -->
<where>
and r.bureau_dept_name is not null
and r.is_submit = 1
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
@ -930,6 +935,7 @@
left join (select * from enterprise_information group by enterprise_number) e on r.enterprise_number = e.enterprise_number
<where>
and r.bureau_dept_name is not null
and r.is_submit = 1
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
@ -989,6 +995,7 @@
left join (select * from enterprise_information group by enterprise_number) e on r.enterprise_number = e.enterprise_number
<where>
and r.bureau_dept_name is not null
and r.is_submit = 1
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
@ -1103,6 +1110,7 @@
<where>
and c.enforcement_id is not null
and c.satisfaction_level is not null
and e.is_submit = 1
<if test="deptId != null and deptId != ''">
and e.bureau_dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
@ -1135,6 +1143,7 @@
</if>
from enforcement_registration r
where r.bureau_dept_name is not null
and r.is_submit = 1
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
@ -1163,6 +1172,7 @@
</if>
from enforcement_registration r
where r.bureau_dept_name is not null
and r.is_submit = 1
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
@ -1195,6 +1205,7 @@
</if>
from enforcement_registration r
where r.bureau_dept_name is not null
and r.is_submit = 1
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
@ -1243,6 +1254,7 @@
count(1) as num
from enforcement_registration r
where r.bureau_dept_name is not null
and r.is_submit = 1
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
@ -1273,7 +1285,7 @@
and n.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="userId != null and userId != '' ">and( n.law_enforcer_id=#{userId} or n.law_enforcer_id_two=#{userId}) </if>
<if test="isReg != null">and is_reg=#{isReg}) </if>
<if test="isReg != null">and is_reg=#{isReg} </if>
<if test="beginTime != null and beginTime != ''"> and DATE_FORMAT(n.enforcement_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d') </if>
<if test="endTime != null and endTime != ''"> and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(n.enforcement_time,'%Y-%m-%d') </if>
</where>
@ -1382,6 +1394,7 @@
count(distinct enterprise_number) as num
from enforcement_registration r
where r.bureau_dept_name is not null
and r.is_submit = 1
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
@ -1405,6 +1418,7 @@
count(distinct enterprise_number) as num
from enforcement_registration r
where r.bureau_dept_name is not null
and r.is_submit = 1
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
@ -1432,6 +1446,7 @@
count(distinct enterprise_number) as num
from enforcement_registration r
where r.bureau_dept_name is not null
and r.is_submit = 1
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
@ -1475,14 +1490,26 @@
<if test="endTime != null and endTime != ''"> and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') </if>
</select>
<!-- 企业总数 -->
<select id="analysis_enterprises_countAll" parameterType="SixAnalysisParams" resultType="integer">
select
count(distinct enterprise_number) as num
from enterprise_information r
where r.is_unsubscribe = 0
and r.is_delete = 0
and r.enterprise_number is not null
and r.enterprise_number is not null
</select>
<!-- 时间维度统计 -->
<!-- 检查 -->
<!-- 行政检查 -->
<select id="analysis_enterprisesIns_time" parameterType="SixAnalysisParams" resultType="map">
select
DATE_FORMAT(enforcement_time, '%Y-%m') as time, count(1) as num
from enforcement_registration r
<where>
and r.bureau_dept_name is not null
and r.is_submit = 1
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
@ -1503,6 +1530,28 @@
</where>
group by DATE_FORMAT(enforcement_time, '%Y-%m') order by enforcement_time
</select>
<!-- 非行政检查 -->
<select id="analysis_non_enterprisesIns_time" parameterType="SixAnalysisParams" resultType="map">
select
DATE_FORMAT(enforcement_time, '%Y-%m') as time, count(1) as num
from non_enforcement_registration r
where r.bureau_dept_name is not null
and r.dept_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
and r.law_enforcer_id is not null
and r.law_enforcer_id_other is not null
and r.law_enforcement_type is not null
and r.bureau_dept_id is not null
<if test="params.zone != null and params.zone != ''"> and r.bureau_dept_id in (select dept_id from sys_dept where zone = #{params.zone}) </if>
<if test="deptId != null and deptId != ''">
and r.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two like concat('%',#{userId}, '%'))</if>
<if test="beginTime != null and beginTime != ''"> and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d') </if>
<if test="endTime != null and endTime != ''"> and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') </if>
group by DATE_FORMAT(enforcement_time, '%Y-%m') order by enforcement_time
</select>
<!-- 企业 -->
<select id="analysis_enterprises_time" parameterType="SixAnalysisParams" resultType="map">
select
@ -1510,6 +1559,7 @@
from enforcement_registration r
<where>
and r.bureau_dept_name is not null
and r.is_submit = 1
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
@ -1532,16 +1582,11 @@
</select>
<!-- 非行政检查类型统计 -->
<select id="analysis_non_registration" parameterType="SixAnalysisParams" resultType="map">
<select id="analysis_non_registration_type" parameterType="SixAnalysisParams" resultType="map">
select sdd.dict_label, count(nr.law_enforcement_type) as num from sys_dict_data sdd
left join non_enforcement_registration nr on nr.law_enforcement_type = sdd.dict_value
<where>
<if test="params.check_category == 'non'">
and sdd.dict_type = 'no_check_category'
</if>
<if test="params.check_category != 'non'">
and sdd.dict_type = 'check_category'
</if>
and sdd.dict_type = 'no_check_category'
<if test="params.zone != null and params.zone != ''"> and nr.bureau_dept_id in (select dept_id from sys_dept where zone = #{params.zone}) </if>
<if test="deptId != null and deptId != ''">
and nr.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
@ -1554,4 +1599,24 @@
</where>
group by sdd.dict_value
</select>
<!-- 行政检查类型统计 -->
<select id="analysis_registration_type" parameterType="SixAnalysisParams" resultType="map">
select sdd.dict_label, count(r.check_category) as num from sys_dict_data sdd
left join enforcement_registration r on r.check_category = sdd.dict_value
<where>
and sdd.dict_type = 'check_category'
and r.is_submit = 1
<if test="params.zone != null and params.zone != ''"> and r.bureau_dept_id in (select dept_id from sys_dept where zone = #{params.zone}) </if>
<if test="deptId != null and deptId != ''">
and r.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="uniteCheck == '0'.toString()"> and (r.union_no is not null and r.union_no != '')</if>
<if test="uniteCheck == '1'.toString()"> and (r.union_no is null or r.union_no = '')</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{userId}) </if>
<if test="beginTime != null and beginTime != ''"> and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d') </if>
<if test="endTime != null and endTime != ''"> and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') </if>
</where>
group by sdd.dict_value
</select>
</mapper>
Loading…
Cancel
Save