Browse Source

Merge remote-tracking branch 'origin/v4' into v4

v4
chenrui 2 years ago
parent
commit
d9622a9d63
  1. 4
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/registration.html
  2. 22
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html
  3. 50
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html
  4. 26
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statisticalPanel.html
  5. 42
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementCheckStatisticsController.java
  6. 78
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java
  7. 123
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementRegistrationServiceImpl.java
  8. 11
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml
  9. 21
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml

4
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/registration.html

@ -401,7 +401,7 @@
formatter:function (value,row,index) {
for (i = 0; i < reson.length; i++) {
if (reson[i].dictValue == row.checkCss) {
return "<div style='text-align: left'>"+ reson[i].dictLabel +"</div>";
return "<span>"+ reson[i].dictLabel +"</span>";
}
}
}
@ -525,7 +525,7 @@
formatter:function (value,row,index) {
for (i = 0; i < reson.length; i++) {
if (reson[i].dictValue == row.checkCss) {
return "<div style='text-align: left'>"+ reson[i].dictLabel +"</div>";
return "<span>"+ reson[i].dictLabel +"</span>";
}
}
}

22
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html

@ -483,28 +483,6 @@
}
})
}
function download2(){
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+"/export",
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)
}
})
}
</script>
</body>
</html>

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

@ -7,6 +7,12 @@
<th:block th:include="zdxtInclude :: header('检查计划统计')" />
<th:block th:include="zdxtInclude :: datetimepicker-css" />
<link type="text/css" href="/css/stat1.css" rel="stylesheet" />
<style>
form#form2 {
display: flex;
width: 100%;
}
</style>
</head>
@ -133,7 +139,7 @@
</ul>
</div>
</form>
<div class="chart-box" style="float: none">
<div class="chart-box">
<h3><span id="echarts1-title" class="chart-title"></span>年年度检查计划排行(TOP10)</h3>
<div class="echarts" id="echars2"></div>
</div>
@ -527,7 +533,7 @@
},
calculable :false,
grid:{
left: '1%',
left: '2%',
right: '2%',
bottom: '1%',
top: '20%',
@ -574,7 +580,7 @@
splitLine:{
lineStyle:{
color:['#f2f2f2'],
width:0,
width:1.5,
type:'solid',
}
},
@ -657,7 +663,7 @@
});
}
option={
color:["#2d4beb","#03a978",'#1f74f1', '#79e24a'],
color:["#2d4beb","#03a978",'#fcc650', '#ee6666'],
legend: {
y : '10%',
x : 'center',
@ -719,7 +725,7 @@
splitLine:{
lineStyle:{
color:['#f2f2f2'],
width:0,
width:1.5,
type:'solid',
}
},
@ -794,8 +800,8 @@
0, 0, 1, 0,
[
{offset: 0, color: '#4f99ff'},
{offset: 1, color: '#55d9fa'}
{offset: 0, color: '#f9b523'},
{offset: 1, color: '#fcc650'}
]
)
@ -817,8 +823,8 @@
color: new echarts.graphic.LinearGradient(
0, 0, 1, 0,
[
{offset: 0, color: '#05cbc8'},
{offset: 1, color: '#1af0ed'}
{offset: 0, color: '#de5f62'},
{offset: 1, color: '#e55c61'}
]
)
@ -961,7 +967,7 @@
splitLine:{
lineStyle:{
color:['#f2f2f2'],
width:0,
width:1.5,
type:'solid',
}
},
@ -1132,8 +1138,8 @@
color: new echarts.graphic.LinearGradient(
0, 0, 1, 0,
[
{offset: 0, color: '#036291'},
{offset: 1, color: '#50a1ff'}
{offset: 0, color: '#bd8105'},
{offset: 1, color: '#d7960e'}
]
)
@ -1156,8 +1162,8 @@
color: new echarts.graphic.LinearGradient(
0, 0, 1, 0,
[
{offset: 0, color: '#046a9d'},
{offset: 1, color: '#3cc9fe'}
{offset: 0, color: '#f9b523'},
{offset: 1, color: '#fcc650'}
]
)
@ -1180,8 +1186,8 @@
color: new echarts.graphic.LinearGradient(
0, 0, 1, 0,
[
{offset: 0, color: '#1391c6'},
{offset: 1, color: '#6dd3fe'}
{offset: 0, color: '#fabb23'},
{offset: 1, color: '#f9c956'}
]
)
@ -1204,8 +1210,8 @@
color: new echarts.graphic.LinearGradient(
0, 0, 1, 0,
[
{offset: 0, color: '#083f8a'},
{offset: 1, color: '#0df2f1'}
{offset: 0, color: '#ce3d3f'},
{offset: 1, color: '#e4595b'}
]
)
@ -1228,8 +1234,8 @@
color: new echarts.graphic.LinearGradient(
0, 0, 1, 0,
[
{offset: 0, color: '#096aa3'},
{offset: 1, color: '#0cd7d4'}
{offset: 0, color: '#de5f62'},
{offset: 1, color: '#e55c61'}
]
)
@ -1252,8 +1258,8 @@
color: new echarts.graphic.LinearGradient(
0, 0, 1, 0,
[
{offset: 0, color: '#2790a6'},
{offset: 1, color: '#1df1e5'}
{offset: 0, color: '#ea7370'},
{offset: 1, color: '#fb9795'}
]
)

26
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statisticalPanel.html

@ -31,7 +31,31 @@
height: 32%;
background-color: #fff;
border-radius: 4px;
box-shadow: 0 0 5px #e2e3e4;
box-shadow: 0 0 5px #f0f0f1;
}
.statwrap .panel-card:nth-child(1) {
background-color: rgba(243, 249, 253, .8);
}
.statwrap .panel-card:nth-child(2) {
background-color: rgba(245, 253, 249, .8);
}
.statwrap .panel-card:nth-child(3) {
background-color: rgba(243, 244, 245, .8);
}
.statwrap .panel-card:nth-child(4) {
background-color: rgba(251, 245, 237, .8);
}
.statwrap .panel-card:nth-child(5) {
background-color: rgba(237, 241, 251, .8);
}
.statwrap .panel-card:nth-child(6) {
background-color: rgba(253, 241, 241, .8);
}
.panel-card-top {

42
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementCheckStatisticsController.java

@ -2,6 +2,7 @@ package com.zdxt.code.controller;
import com.zdxt.auth.project.system.dept.mapper.DeptMapper;
import com.zdxt.auth.project.system.dict.mapper.DictDataMapper;
import com.zdxt.auth.project.system.user.mapper.UserMapper;
import com.zdxt.code.domain.*;
import com.zdxt.code.mapper.Zfryjdm2405301Mapper;
@ -41,6 +42,8 @@ public class EnforcementCheckStatisticsController extends BaseController {
private Zfryjdm2405301Mapper zfryjdm2405301Mapper;
@Autowired
private DeptMapper deptMapper;
@Autowired
private DictDataMapper dictDataMapper;
@GetMapping ("/queryList/{year}/{month}")
@ResponseBody
@ -86,7 +89,7 @@ public class EnforcementCheckStatisticsController extends BaseController {
System.out.println(enterpriseStreetList);
enforcementCheckStatisticsService.excelExport2(response,enterpriseStreetList,enterpriseAddress);
}
//http://localhost:85/enforcementCheckStatistics/queryAllList/2024-8-26/2024-8-28
//http://10.132.108.3:85/enforcementCheckStatistics/queryAllList/2024-8-24/2024-11-20
@GetMapping ("/queryAllList/{startTime}/{endTime}")
@ResponseBody
public void queryAllList(HttpServletResponse response, @PathVariable String startTime, @PathVariable String endTime) throws ParseException {//以企业维度统计
@ -229,42 +232,37 @@ public class EnforcementCheckStatisticsController extends BaseController {
@ResponseBody
public void exportZFJDM(HttpServletResponse httpServletResponse,@RequestBody SearchType searchType) throws IOException, ParseException {
EnforcementCheckStatistics enforcementCheckStatistics=new EnforcementCheckStatistics();
/* String month1=StringUtils.join(month,",");
enforcementCheckStatistics.setYear(year);
enforcementCheckStatistics.setMonth(month1);*/
enforcementCheckStatistics.setStartTime(searchType.getBeginTime());
enforcementCheckStatistics.setEndTime(searchType.getEndTime());
enforcementCheckStatistics.setNowTime(new Date());
List<EnforcementCheckStatistics> enforcementCheckStatisticsList=enforcementCheckStatisticsService.selectAllStatisticsList(enforcementCheckStatistics);
List<String> inOrderList=new ArrayList<>();
Collections.addAll(inOrderList,"福田区","罗湖区","盐田区","南山区","宝安区","龙岗区","龙华区",
"坪山区","光明区","大鹏新区","深汕特别合作区");
List<DictData> dictDataListQY=dictDataMapper.selectDictDataByType("address_type");
/*Collections.addAll(inOrderList,"福田区","罗湖区","盐田区","南山区","宝安区","龙岗区","龙华区",
"坪山区","光明区","大鹏新区","深汕特别合作区");*/
for(DictData d:dictDataListQY){
inOrderList.add(d.getDictLabel());
}
Map<String,List<EnforcementCheckStatistics>> enforcementCheckStatisticsMap=new HashMap<>();
for(int i=0;i<inOrderList.size();i++){
String area=inOrderList.get(i);
//List<EnforcementCheckStatistics> e1=enforcementCheckStatisticsList.stream().filter(item->item.getEnterpriseAddress().contains(area)).collect(Collectors.toList());
List<EnforcementCheckStatistics> e1=new ArrayList<>();
if(area.equals("光明区")){//光明区特殊处理
//e1 = enforcementCheckStatisticsList.stream().collect(Collectors.groupingBy(item -> ((item.getEnterpriseAddress().contains(area)||(item.getEnterpriseAddress().contains("光明新区")))? area : "其他")));
e1=enforcementCheckStatisticsList.stream().filter(item->(item.getEnterpriseAddress().contains(area)||item.getEnterpriseAddress().contains("光明新区"))).collect(Collectors.toList());
}else {
// e1 = enforcementCheckStatisticsList.stream().collect(Collectors.groupingBy(item -> (item.getEnterpriseAddress().contains(area)? area : "其他")));
e1=enforcementCheckStatisticsList.stream().filter(item->item.getEnterpriseAddress().contains(area)).collect(Collectors.toList());
}
List<EnforcementCheckStatistics> e1=enforcementCheckStatisticsList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + area.substring(0, area.indexOf("区")) + "区") || item.getEnterpriseAddress().startsWith("深圳市" + area.substring(0, area.indexOf("区")) + "新区")).collect(Collectors.toList());
enforcementCheckStatisticsMap.put(area,e1);
}
//将地址不属于各个区的筛出来放入执法记录map
List<EnforcementCheckStatistics> qt=enforcementCheckStatisticsList.stream().filter(item->!(
item.getEnterpriseAddress().contains("福田区")||item.getEnterpriseAddress().contains("罗湖区")||
item.getEnterpriseAddress().contains("盐田区")||item.getEnterpriseAddress().contains("南山区")||
item.getEnterpriseAddress().contains("宝安区")||item.getEnterpriseAddress().contains("龙岗区")||
item.getEnterpriseAddress().contains("龙华区")||item.getEnterpriseAddress().contains("坪山区")||
item.getEnterpriseAddress().contains("大鹏新区")||item.getEnterpriseAddress().contains("深汕特别合作区")||
item.getEnterpriseAddress().contains("光明区")||item.getEnterpriseAddress().contains("光明新区")))
.collect(Collectors.toList());
List<EnforcementCheckStatistics> qt=enforcementCheckStatisticsList.stream().filter(item->!qyqtMake(inOrderList,item.getEnterpriseAddress())).collect(Collectors.toList());
enforcementCheckStatisticsMap.put("其他",qt);
List<EnterpriseStreet> enterpriseStreet=enforcementCheckStatisticsService.selectEnterpriseStreetList();
inOrderList.add("其他");
enforcementCheckStatisticsService.ZFJDM(httpServletResponse,enforcementCheckStatistics,inOrderList,enforcementCheckStatisticsMap,enterpriseStreet);
}
public Boolean qyqtMake(List<String> strings,String s){
for (String string : strings) {
if (s.startsWith("深圳市" + string.substring(0, string.indexOf("区")) + "区")||s.startsWith("深圳市" + string.substring(0, string.indexOf("区")) + "新区")) {
return true;
}
}
return false;
}
}

78
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java

@ -12,6 +12,7 @@ import java.util.function.Function;
import java.util.stream.Collectors;
import com.zdxt.auth.project.system.dept.service.IDeptService;
import com.zdxt.auth.project.system.dict.mapper.DictDataMapper;
import com.zdxt.auth.project.system.dict.service.IDictDataService;
import com.zdxt.code.domain.EnforceRegCount;
import com.zdxt.code.domain.EnterpriseLawEnforcement;
@ -62,6 +63,8 @@ public class EnforcementRegistrationController extends BaseController
private IDeptService iDeptService;
@Autowired
private EnforcementCheckStatisticsService enforcementCheckStatisticsService;
@Autowired
private DictDataMapper dictDataMapper;
@RequiresPermissions("code:registration:view")
@GetMapping()
@ -147,12 +150,7 @@ public class EnforcementRegistrationController extends BaseController
jdStrings.add(dictData.getDictLabel());
}*/
for(DictData jd:jdList){
List<EnforcementRegistration> jdEList=new ArrayList<>();
if(qy.equals("光明区")){
jdEList=list.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市光明新区"+jd.getDictLabel())||item.getEnterpriseAddress().startsWith("深圳市"+qy+jd.getDictLabel())).collect(Collectors.toList());
}else {
jdEList=list.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市"+qy+jd.getDictLabel())).collect(Collectors.toList());
}
List<EnforcementRegistration> jdEList=list.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "区"+jd.getDictLabel()) || item.getEnterpriseAddress().startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "新区"+jd.getDictLabel())).collect(Collectors.toList());
if(jdEList.size()>0){
for(int i=0;i<jdEList.size();i++){
jdEList.get(i).setQy(qy);
@ -184,19 +182,9 @@ public class EnforcementRegistrationController extends BaseController
for(DictData dictData:jdList){
jdStrings.add(dictData.getDictLabel());
}*/
List<EnforcementRegistration> qyEList=new ArrayList<>();
if(qy.getDictLabel().equals("光明区")){
qyEList=list.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市光明新区")||item.getEnterpriseAddress().startsWith("深圳市"+qy.getDictLabel())).collect(Collectors.toList());
}else {
qyEList=list.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市"+qy.getDictLabel())).collect(Collectors.toList());
}
List<EnforcementRegistration> qyEList=list.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + qy.getDictLabel().substring(0, qy.getDictLabel().indexOf("区")) + "区") || item.getEnterpriseAddress().startsWith("深圳市" + qy.getDictLabel().substring(0, qy.getDictLabel().indexOf("区")) + "新区")).collect(Collectors.toList());
for(DictData jd:jdList){
List<EnforcementRegistration> jdEList=new ArrayList<>();
if(qy.getDictLabel().equals("光明区")){
jdEList=qyEList.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市光明新区"+jd.getDictLabel())||item.getEnterpriseAddress().startsWith("深圳市"+qy.getDictLabel()+jd.getDictLabel())).collect(Collectors.toList());
}else {
jdEList=qyEList.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市"+qy.getDictLabel()+jd.getDictLabel())).collect(Collectors.toList());
}
List<EnforcementRegistration> jdEList=list.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + qy.getDictLabel().substring(0, qy.getDictLabel().indexOf("区")) + "区"+jd.getDictLabel()) || item.getEnterpriseAddress().startsWith("深圳市" + qy.getDictLabel().substring(0, qy.getDictLabel().indexOf("区")) + "新区"+jd.getDictLabel())).collect(Collectors.toList());
if(jdEList.size()>0){
for(int i=0;i<jdEList.size();i++){
jdEList.get(i).setQy(qy.getDictLabel());
@ -222,33 +210,18 @@ public class EnforcementRegistrationController extends BaseController
}
public Boolean qyMake(List<String> strings,String s){
for (String string : strings) {
if(string.equals("光明区")){
if (s.startsWith("深圳市" + string)||s.startsWith("深圳市光明新区")) {
if (s.startsWith("深圳市" + string.substring(0, string.indexOf("区")) + "区")||s.startsWith("深圳市" + string.substring(0, string.indexOf("区")) + "新区")) {
return true;
}
}else {
if (s.startsWith("深圳市" + string)) {
return true;
}
}
}
return false;
}
public Boolean jdMake(String qy,List<DictData> stringList,String s){
if(qy.equals("光明区")){
for(DictData d:stringList){
if(s.startsWith("深圳市"+qy+d.getDictLabel())||s.startsWith("深圳市光明新区"+d.getDictLabel())){
return true;
}
}
}else {
for(DictData d:stringList){
if (s.startsWith("深圳市"+qy+d.getDictLabel())) {
if(s.startsWith("深圳市"+qy.substring(0, qy.indexOf("区")) + "区"+d.getDictLabel())||s.startsWith("深圳市"+qy.substring(0, qy.indexOf("区")) + "新区"+d.getDictLabel())){
return true;
}
}
}
return false;
}
@RequiresPermissions("code:registration:list")
@ -741,34 +714,33 @@ public class EnforcementRegistrationController extends BaseController
enforcementCheckStatistics.setNowTime(new Date());
List<EnforcementCheckStatistics> enforcementCheckStatisticsList=enforcementCheckStatisticsService.selectAllStatisticsList(enforcementCheckStatistics);
List<String> inOrderList=new ArrayList<>();
Collections.addAll(inOrderList,"福田区","罗湖区","盐田区","南山区","宝安区","龙岗区","龙华区",
"坪山区","光明区","大鹏新区","深汕特别合作区");
List<DictData> dictDataListQY=dictDataMapper.selectDictDataByType("address_type");
/*Collections.addAll(inOrderList,"福田区","罗湖区","盐田区","南山区","宝安区","龙岗区","龙华区",
"坪山区","光明区","大鹏新区","深汕特别合作区");*/
for(DictData d:dictDataListQY){
inOrderList.add(d.getDictLabel());
}
Map<String,List<EnforcementCheckStatistics>> enforcementCheckStatisticsMap=new HashMap<>();
for(int i=0;i<inOrderList.size();i++){
String area=inOrderList.get(i);
//List<EnforcementCheckStatistics> e1=enforcementCheckStatisticsList.stream().filter(item->item.getEnterpriseAddress().contains(area)).collect(Collectors.toList());
List<EnforcementCheckStatistics> e1=new ArrayList<>();
if(area.equals("光明区")){//光明区特殊处理
//e1 = enforcementCheckStatisticsList.stream().collect(Collectors.groupingBy(item -> ((item.getEnterpriseAddress().contains(area)||(item.getEnterpriseAddress().contains("光明新区")))? area : "其他")));
e1=enforcementCheckStatisticsList.stream().filter(item->(item.getEnterpriseAddress().contains(area)||item.getEnterpriseAddress().contains("光明新区"))).collect(Collectors.toList());
}else {
// e1 = enforcementCheckStatisticsList.stream().collect(Collectors.groupingBy(item -> (item.getEnterpriseAddress().contains(area)? area : "其他")));
e1=enforcementCheckStatisticsList.stream().filter(item->item.getEnterpriseAddress().contains(area)).collect(Collectors.toList());
}
List<EnforcementCheckStatistics> e1=enforcementCheckStatisticsList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + area.substring(0, area.indexOf("区")) + "区") || item.getEnterpriseAddress().startsWith("深圳市" + area.substring(0, area.indexOf("区")) + "新区")).collect(Collectors.toList());
enforcementCheckStatisticsMap.put(area,e1);
}
//将地址不属于各个区的筛出来放入执法记录map
List<EnforcementCheckStatistics> qt=enforcementCheckStatisticsList.stream().filter(item->!(
item.getEnterpriseAddress().contains("福田区")||item.getEnterpriseAddress().contains("罗湖区")||
item.getEnterpriseAddress().contains("盐田区")||item.getEnterpriseAddress().contains("南山区")||
item.getEnterpriseAddress().contains("宝安区")||item.getEnterpriseAddress().contains("龙岗区")||
item.getEnterpriseAddress().contains("龙华区")||item.getEnterpriseAddress().contains("坪山区")||
item.getEnterpriseAddress().contains("大鹏新区")||item.getEnterpriseAddress().contains("深汕特别合作区")||
item.getEnterpriseAddress().contains("光明区")||item.getEnterpriseAddress().contains("光明新区")))
.collect(Collectors.toList());
List<EnforcementCheckStatistics> qt=enforcementCheckStatisticsList.stream().filter(item->!qyqtMake(inOrderList,item.getEnterpriseAddress())).collect(Collectors.toList());
enforcementCheckStatisticsMap.put("其他",qt);
List<EnterpriseStreet> enterpriseStreet=enforcementCheckStatisticsService.selectEnterpriseStreetList();
inOrderList.add("其他");
enforcementCheckStatisticsService.ZFJDM(httpServletResponse,enforcementCheckStatistics,inOrderList,enforcementCheckStatisticsMap,enterpriseStreet);
}
public Boolean qyqtMake(List<String> strings,String s){
for (String string : strings) {
if (s.startsWith("深圳市" + string.substring(0, string.indexOf("区")) + "区")||s.startsWith("深圳市" + string.substring(0, string.indexOf("区")) + "新区")) {
return true;
}
}
return false;
}
}

123
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementRegistrationServiceImpl.java

@ -541,22 +541,6 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
}
@Override
public List<EnforcementRegistrationDto> staticEnforcementRegistrationLI(EnforcementRegistrationDto enforcementRegistrationDto) {
/*if(enforcementRegistrationDto.getQy()!=null&&!"".equals(enforcementRegistrationDto.getQy())) {
if (enforcementRegistrationDto.getJd() != null && !"".equals(enforcementRegistrationDto.getJd())) {
String qy = iDictDataService.selectDictLabel("address_Type", enforcementRegistrationDto.getQy());
String jd = iDictDataService.selectDictLabel(enforcementRegistrationDto.getQy(), enforcementRegistrationDto.getJd());
enforcementRegistrationDto.setJd(jd);
enforcementRegistrationDto.setQy(qy);
*//*List<EnforcementRegistrationDto> enforcementRegistrationDtos =
enforcementRegistrationMapper.staticEnforcementRegistrationLI(enforcementRegistrationDto);*//*
}else {
String qy = iDictDataService.selectDictLabel("address_Type", enforcementRegistrationDto.getQy());
enforcementRegistrationDto.setQy(qy);
}
}
List<EnforcementRegistrationDto> enforcementRegistrationDtos =
enforcementRegistrationMapper.staticEnforcementRegistrationLI(enforcementRegistrationDto);
return enforcementRegistrationDtos;*/
if(enforcementRegistrationDto.getQy()!=null&&!"".equals(enforcementRegistrationDto.getQy())){
if(enforcementRegistrationDto.getJd()!=null&&!"".equals(enforcementRegistrationDto.getJd())){
String qy=iDictDataService.selectDictLabel("address_Type",enforcementRegistrationDto.getQy());
@ -582,12 +566,7 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
jdStrings.add(dictData.getDictLabel());
}*/
for(DictData jd:jdList){
List<EnforcementRegistrationDto> jdEList=new ArrayList<>();
if(qy.equals("光明区")){
jdEList=enforcementRegistrationDtoList.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市光明新区"+jd.getDictLabel())||item.getEnterpriseAddress().startsWith("深圳市"+qy+jd.getDictLabel())).collect(Collectors.toList());
}else {
jdEList=enforcementRegistrationDtoList.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市"+qy+jd.getDictLabel())).collect(Collectors.toList());
}
List<EnforcementRegistrationDto> jdEList=enforcementRegistrationDtoList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "区"+jd.getDictLabel()) || item.getEnterpriseAddress().startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "新区"+jd.getDictLabel())).collect(Collectors.toList());
if(jdEList.size()>0){
for(int i=0;i<jdEList.size();i++){
jdEList.get(i).setQy(qy);
@ -620,19 +599,9 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
for(DictData dictData:jdList){
jdStrings.add(dictData.getDictLabel());
}*/
List<EnforcementRegistrationDto> qyEList=new ArrayList<>();
if(qy.getDictLabel().equals("光明区")){
qyEList=enforcementRegistrationDtoList.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市光明新区")||item.getEnterpriseAddress().startsWith("深圳市"+qy.getDictLabel())).collect(Collectors.toList());
}else {
qyEList=enforcementRegistrationDtoList.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市"+qy.getDictLabel())).collect(Collectors.toList());
}
List<EnforcementRegistrationDto> qyEList=enforcementRegistrationDtoList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + qy.getDictLabel().substring(0, qy.getDictLabel().indexOf("区")) + "区") || item.getEnterpriseAddress().startsWith("深圳市" + qy.getDictLabel().substring(0, qy.getDictLabel().indexOf("区")) + "新区")).collect(Collectors.toList());
for(DictData jd:jdList){
List<EnforcementRegistrationDto> jdEList=new ArrayList<>();
if(qy.getDictLabel().equals("光明区")){
jdEList=qyEList.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市光明新区"+jd.getDictLabel())||item.getEnterpriseAddress().startsWith("深圳市"+qy.getDictLabel()+jd.getDictLabel())).collect(Collectors.toList());
}else {
jdEList=qyEList.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市"+qy.getDictLabel()+jd.getDictLabel())).collect(Collectors.toList());
}
List<EnforcementRegistrationDto> jdEList=qyEList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + qy.getDictLabel().substring(0, qy.getDictLabel().indexOf("区")) + "区"+jd.getDictLabel()) || item.getEnterpriseAddress().startsWith("深圳市" + qy.getDictLabel().substring(0, qy.getDictLabel().indexOf("区")) + "新区"+jd.getDictLabel())).collect(Collectors.toList());
if(jdEList.size()>0){
for(int i=0;i<jdEList.size();i++){
jdEList.get(i).setQy(qy.getDictLabel());
@ -701,33 +670,18 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
}*/
public Boolean qyMake(List<String> strings,String s){
for (String string : strings) {
if(string.equals("光明区")){
if (s.startsWith("深圳市" + string)||s.startsWith("深圳市光明新区")) {
return true;
}
}else {
if (s.startsWith("深圳市" + string)) {
if (s.startsWith("深圳市" + string.substring(0, string.indexOf("区")) + "区")||s.startsWith("深圳市" + string.substring(0, string.indexOf("区")) + "新区")) {
return true;
}
}
}
return false;
}
public Boolean jdMake(String qy, List<DictData> stringList, String s){
if(qy.equals("光明区")){
for(DictData d:stringList){
if(s.startsWith("深圳市"+qy+d.getDictLabel())||s.startsWith("深圳市光明新区"+d.getDictLabel())){
return true;
}
}
}else {
for(DictData d:stringList){
if (s.startsWith("深圳市"+qy+d.getDictLabel())) {
if(s.startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "区"+d.getDictLabel())||s.startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "新区"+d.getDictLabel())){
return true;
}
}
}
return false;
}
@Override
@ -858,12 +812,7 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
jdStrings.add(dictData.getDictLabel());
}*/
for(DictData jd:jdList){
List<EnforcementRegistration> jdEList=new ArrayList<>();
if(qy.equals("光明区")){
jdEList=list.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市光明新区"+jd.getDictLabel())||item.getEnterpriseAddress().startsWith("深圳市"+qy+jd.getDictLabel())).collect(Collectors.toList());
}else {
jdEList=list.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市"+qy+jd.getDictLabel())).collect(Collectors.toList());
}
List<EnforcementRegistration> jdEList=list.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "区"+jd.getDictLabel()) || item.getEnterpriseAddress().startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "新区"+jd.getDictLabel())).collect(Collectors.toList());
if(jdEList.size()>0){
for(int i=0;i<jdEList.size();i++){
jdEList.get(i).setQy(qy);
@ -895,19 +844,9 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
for(DictData dictData:jdList){
jdStrings.add(dictData.getDictLabel());
}*/
List<EnforcementRegistration> qyEList=new ArrayList<>();
if(qy.getDictLabel().equals("光明区")){
qyEList=list.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市光明新区")||item.getEnterpriseAddress().startsWith("深圳市"+qy.getDictLabel())).collect(Collectors.toList());
}else {
qyEList=list.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市"+qy.getDictLabel())).collect(Collectors.toList());
}
List<EnforcementRegistration> qyEList=list.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + qy.getDictLabel().substring(0, qy.getDictLabel().indexOf("区")) + "区") || item.getEnterpriseAddress().startsWith("深圳市" + qy.getDictLabel().substring(0, qy.getDictLabel().indexOf("区")) + "新区")).collect(Collectors.toList());
for(DictData jd:jdList){
List<EnforcementRegistration> jdEList=new ArrayList<>();
if(qy.getDictLabel().equals("光明区")){
jdEList=qyEList.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市光明新区"+jd.getDictLabel())||item.getEnterpriseAddress().startsWith("深圳市"+qy.getDictLabel()+jd.getDictLabel())).collect(Collectors.toList());
}else {
jdEList=qyEList.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市"+qy.getDictLabel()+jd.getDictLabel())).collect(Collectors.toList());
}
List<EnforcementRegistration> jdEList=list.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + qy.getDictLabel().substring(0, qy.getDictLabel().indexOf("区")) + "区"+jd.getDictLabel()) || item.getEnterpriseAddress().startsWith("深圳市" + qy.getDictLabel().substring(0, qy.getDictLabel().indexOf("区")) + "新区"+jd.getDictLabel())).collect(Collectors.toList());
if(jdEList.size()>0){
for(int i=0;i<jdEList.size();i++){
jdEList.get(i).setQy(qy.getDictLabel());
@ -931,4 +870,50 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
return enforcementRegistrationsList;
}
}
/*public List<EnforcementRegistration> list(EnforcementRegistration enforcementRegistration){
if(enforcementRegistration.getQy()!=null&&!"".equals(enforcementRegistration.getQy())){
if(enforcementRegistration.getJd()!=null&&!"".equals(enforcementRegistration.getJd())){
enforcementRegistration.setJd(iDictDataService.selectDictLabel(enforcementRegistration.getQy(),enforcementRegistration.getJd()));
List<EnforcementRegistration> list=enforcementRegistrationMapper.selectEnforcementRegistrationAndAddressList(enforcementRegistration);
for(int i=0;i<list.size();i++){
list.get(i).setQy(qyDictData.getDictLabel());
jdList.get(i).setJd(jdDictData.getDictLabel());
}
}
enforcementRegistration.setQy(iDictDataService.selectDictLabel("address_type",enforcementRegistration.getQy()));
}else {
List<EnforcementRegistration> list=new ArrayList<>();
List<EnforcementRegistration> enforcementRegistrationList=enforcementRegistrationMapper.selectEnforcementRegistrationAndAddressList(enforcementRegistration);
List<DictData> dictDataListQY=iDictDataService.selectDictDataByType("address_type");
for(DictData qyDictData:dictDataListQY){
List<EnforcementRegistration> qyList = enforcementRegistrationList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + qyDictData.getDictLabel().substring(0, qyDictData.getDictLabel().indexOf("区")) + "区") || item.getEnterpriseAddress().startsWith("深圳市" + qyDictData.getDictLabel().substring(0, qyDictData.getDictLabel().indexOf("区")) + "新区")).collect(Collectors.toList());
if(qyList.size()>0){
List<DictData> dictDataListJD=iDictDataService.selectDictDataByType(qyDictData.getDictValue());
for(DictData jdDictData:dictDataListJD){
List<EnforcementRegistration> jdList = qyList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + qyDictData.getDictLabel().substring(0, qyDictData.getDictLabel().indexOf("区")) + "区" + jdDictData.getDictLabel()) || item.getEnterpriseAddress().startsWith("深圳市" + qyDictData.getDictLabel().substring(0, qyDictData.getDictLabel().indexOf("区")) + "新区" + jdDictData.getDictLabel())).collect(Collectors.toList());
if(jdList.size()>0){
for(int i=0;i<jdList.size();i++){
jdList.get(i).setQy(qyDictData.getDictLabel());
jdList.get(i).setJd(jdDictData.getDictLabel());
}
list.addAll(jdList);
}
qyList =qyList.stream().filter(item -> !item.getEnterpriseAddress().startsWith("深圳市" + qyDictData.getDictLabel().substring(0, qyDictData.getDictLabel().indexOf("区")) + "区" + jdDictData.getDictLabel()) && !item.getEnterpriseAddress().startsWith("深圳市" + qyDictData.getDictLabel().substring(0, qyDictData.getDictLabel().indexOf("区")) + "新区" + jdDictData.getDictLabel())).collect(Collectors.toList());
}
if(qyList.size()>0){
for(int i=0;i<qyList.size();i++){
qyList.get(i).setQy(qyDictData.getDictLabel());
qyList.get(i).setJd("其他");
}
list.addAll(qyList);
}
}
enforcementRegistrationList=enforcementRegistrationList.stream().filter(item -> !item.getEnterpriseAddress().startsWith("深圳市" + qyDictData.getDictLabel().substring(0, qyDictData.getDictLabel().indexOf("区")) + "区") && !item.getEnterpriseAddress().startsWith("深圳市" + qyDictData.getDictLabel().substring(0, qyDictData.getDictLabel().indexOf("区")) + "新区")).collect(Collectors.toList());
}
return list;
}
}*/
}

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

@ -203,8 +203,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
AND bureau_dept_id is not null
and time_type is not null
and plan_year is not null
and(quarter is not null or mouth is not null)
and (plan_year is not null or quarter is not null or mouth is not null)
</where>
GROUP BY bureau_dept_id
order by total desc
@ -237,8 +236,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
AND bureau_dept_id is not null
and time_type is not null
and plan_year is not null
and (quarter is not null or mouth is not null)
and (plan_year is not null or quarter is not null or mouth is not null)
</where>
</select>
@ -268,8 +266,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
AND bureau_dept_id is not null
AND time_type is not null
and plan_year is not null
and (quarter is not null or mouth is not null)
and (plan_year is not null or quarter is not null or mouth is not null)
</where>
GROUP BY bureau_dept_id
order by total desc
@ -354,6 +351,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
AND bureau_dept_id is not null
and time_type ='quarter'
and plan_year is not null
and quarter is not null
</where>
GROUP BY bureau_dept_id
@ -415,6 +413,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
AND bureau_dept_id is not null
and time_type ='month'
and plan_year is not null
and mouth is not null
</where>
GROUP BY bureau_dept_id

21
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml

@ -222,11 +222,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and r.check_category is not null
and r.bureau_dept_id is not null
<if test="qy != null and qy != ''">
<if test="qy!='光明区'.toString()">and i.enterprise_address like concat('深圳市',#{qy}, '%')</if>
<if test="qy=='光明区'.toString()">and ( i.enterprise_address like concat('深圳市',#{qy}, '%')or i.enterprise_address like '深圳市光明新区%')</if>
and (enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
<if test="jd != null and jd != ''">
<if test="qy!='光明区'.toString()">and i.enterprise_address like concat('深圳市',#{qy},#{jd}, '%')</if>
<if test="qy=='光明区'.toString()">and ( i.enterprise_address like concat('深圳市光明区',#{jd}, '%')or i.enterprise_address like concat('深圳市光明新区',#{jd}, '%'))</if>
and (enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))
</if>
</if>
<if test="deptQx != null and deptQx != ''">and r.bureau_dept_id =#{deptQx}</if>
@ -647,12 +645,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
( SELECT r.id,r.enterprise_name,r.enterprise_number,r.bureau_dept_name,r.law_enforcer,r.law_enforcer_two,r.law_enforcement_item_text,r.create_time,i.enterprise_address from enforcement_registration r
left join (select * from enterprise_information group by enterprise_number order by is_delete asc) i on r.enterprise_number=i.enterprise_number
<where>
and r.bureau_dept_name is not null
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
and r.law_enforcer is not null
and r.law_enforcer_two is not null
and r.is_complaint is not null
and r.check_category is not null
and r.bureau_dept_id is not null
<if test="qy != null and qy != ''">
<if test="qy!='光明区'.toString()">and i.enterprise_address like concat('深圳市',#{qy}, '%')</if>
<if test="qy=='光明区'.toString()">and ( i.enterprise_address like concat('深圳市',#{qy}, '%')or i.enterprise_address like '深圳市光明新区%')</if>
and (enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
<if test="jd != null and jd != ''">
<if test="qy!='光明区'.toString()">and i.enterprise_address like concat('深圳市',#{qy},#{jd}, '%')</if>
<if test="qy=='光明区'.toString()">and ( i.enterprise_address like concat('深圳市光明区',#{jd}, '%')or i.enterprise_address like concat('深圳市光明新区',#{jd}, '%'))</if>
and (enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))
</if>
</if>
<if test="enterpriseName != null and enterpriseName != ''">

Loading…
Cancel
Save