Browse Source

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

v4
chenrui 2 years ago
parent
commit
bf53790243
  1. 86
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnforcementCheckStatisticsController.java
  2. 2
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/dept/controller/DeptController.java
  3. 5
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/RegistrationComplaintInformation.java
  4. 14
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/SearchType.java
  5. 113
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/StatisticsIndicatorPart.java
  6. 3
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/ComplaintStatisticsMapper.java
  7. 28
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/EnforcementRegistrationMapper.java
  8. 15
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/AnalyseService.java
  9. 124
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/AnalyseServiceImpl.java
  10. 9
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementCheckStatisticsImpl.java
  11. 21
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComplaintStatisticsMapper.xml
  12. 106
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml
  13. 12
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/RegistrationComplaintInformationMapper.xml

86
lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnforcementCheckStatisticsController.java

@ -6,11 +6,14 @@ import com.google.common.collect.Lists;
import com.zdxt.auth.project.system.dept.mapper.DeptMapper; import com.zdxt.auth.project.system.dept.mapper.DeptMapper;
import com.zdxt.auth.project.system.user.mapper.UserMapper; import com.zdxt.auth.project.system.user.mapper.UserMapper;
import com.zdxt.code.domain.*; import com.zdxt.code.domain.*;
import com.zdxt.code.mapper.EnforcementRegistrationMapper;
import com.zdxt.code.mapper.Zfryjdm2405301Mapper; import com.zdxt.code.mapper.Zfryjdm2405301Mapper;
import com.zdxt.code.service.AnalyseService;
import com.zdxt.code.service.EnforcementCheckStatisticsService; import com.zdxt.code.service.EnforcementCheckStatisticsService;
import com.zdxt.common.ZDResponse; import com.zdxt.common.ZDResponse;
import com.zdxt.common.controller.BaseController; import com.zdxt.common.controller.BaseController;
import com.zdxt.common.util.StringUtils; import com.zdxt.common.util.StringUtils;
import com.zdxt.domain.auth.DictData;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -41,6 +44,10 @@ public class AppEnforcementCheckStatisticsController extends BaseController {
private Zfryjdm2405301Mapper zfryjdm2405301Mapper; private Zfryjdm2405301Mapper zfryjdm2405301Mapper;
@Autowired @Autowired
private DeptMapper deptMapper; private DeptMapper deptMapper;
@Autowired
private AnalyseService analyseService;
@Autowired
private EnforcementRegistrationMapper enforcementRegistrationMapper;
@GetMapping ("/queryList/{year}/{month}") @GetMapping ("/queryList/{year}/{month}")
@ResponseBody @ResponseBody
@ -180,7 +187,7 @@ public class AppEnforcementCheckStatisticsController extends BaseController {
return ZDResponse.success("成功",enforcementRegistration); return ZDResponse.success("成功",enforcementRegistration);
} }
@GetMapping("/statisticsIndicatorPart1") /* @GetMapping("/statisticsIndicatorPart1")
@ResponseBody @ResponseBody
public ZDResponse statisticsIndicatorPart1(EnforcementRegistration enforcementRegistration){ public ZDResponse statisticsIndicatorPart1(EnforcementRegistration enforcementRegistration){
if(enforcementRegistration.getBeginTime()==null||"".equals(enforcementRegistration.getBeginTime())){ if(enforcementRegistration.getBeginTime()==null||"".equals(enforcementRegistration.getBeginTime())){
@ -192,7 +199,7 @@ public class AppEnforcementCheckStatisticsController extends BaseController {
//当不需要时间筛选时startTime=0,endTime=0,dateType=0 月度 dateType=6,年度 dateType=5,季度 dateType=1 自定义时,startTime,endTime;dateType=0 //当不需要时间筛选时startTime=0,endTime=0,dateType=0 月度 dateType=6,年度 dateType=5,季度 dateType=1 自定义时,startTime,endTime;dateType=0
List<StatisticsIndicatorPart> statisticsIndicatorPartList =enforcementCheckStatisticsService.statisticsIndicatorPart1(enforcementRegistration); List<StatisticsIndicatorPart> statisticsIndicatorPartList =enforcementCheckStatisticsService.statisticsIndicatorPart1(enforcementRegistration);
return ZDResponse.success("成功", statisticsIndicatorPartList); return ZDResponse.success("成功", statisticsIndicatorPartList);
} }*/
@GetMapping("/statisticsIndicatorPart2") @GetMapping("/statisticsIndicatorPart2")
@ResponseBody @ResponseBody
public ZDResponse statisticsIndicatorPart2(SearchType searchType) throws ParseException { public ZDResponse statisticsIndicatorPart2(SearchType searchType) throws ParseException {
@ -278,4 +285,79 @@ public class AppEnforcementCheckStatisticsController extends BaseController {
} }
return ZDResponse.success("该执法人员执法部门为空"); return ZDResponse.success("该执法人员执法部门为空");
} }
@GetMapping("/statisticsIndicatorPart1")
@ResponseBody
public ZDResponse totalPart(EnforcementRegistration enforcementRegistration) throws CloneNotSupportedException {//需传入--userId&&(dateType||(beginTime&&endTime))
SearchType searchType=new SearchType();
if(enforcementRegistration.getUserId() != null){
searchType.setUserId(enforcementRegistration.getUserId());
Long userId = searchType.getUserId();
String lawCertificateNum = userMapper.selectUserById(userId).getLawCertificateNum();
String zzjgdm = zfryjdm2405301Mapper.selectZfryByZfCode(lawCertificateNum).getZzjgdm();
String deptId = deptMapper.selectDeptByCreditcode(zzjgdm).getDeptId();
if (!deptId.isEmpty()) {
searchType.setBureauDeptId(deptId);
}
}
if(enforcementRegistration.getDateType()!=null){
searchType.setDateType(enforcementRegistration.getDateType());
}
/*if(enforcementRegistration.getBeginTime()!=null&&!"".equals(enforcementRegistration.getBeginTime())){
searchType.setBeginTime(enforcementRegistration.getBeginTime());
}
if(enforcementRegistration.getEndTime()!=null&&!"".equals(enforcementRegistration.getEndTime())){
searchType.setBeginTime(enforcementRegistration.getEndTime());
}*/
return ZDResponse.success("成功",analyseService.totalPart(searchType));
}
/* @GetMapping("/partPerson")
@ResponseBody
public ZDResponse partPerson(SearchType searchType){
}*/
@GetMapping("/getDeptListToPerson")
@ResponseBody
public ZDResponse getDeptListToPerson(EnforcementRegistration enforcementRegistration){
SearchType searchType=new SearchType();
if(enforcementRegistration.getUserId() != null){
searchType.setUserId(enforcementRegistration.getUserId());
}
if(enforcementRegistration.getDateType()!=null){
searchType.setDateType(enforcementRegistration.getDateType());
}
/*if(enforcementRegistration.getBeginTime()!=null&&!"".equals(enforcementRegistration.getBeginTime())){
searchType.setBeginTime(enforcementRegistration.getBeginTime());
}
if(enforcementRegistration.getEndTime()!=null&&!"".equals(enforcementRegistration.getEndTime())){
searchType.setBeginTime(enforcementRegistration.getEndTime());
}*/
List<EnforcementRegistration> enforcementRegistrationList=enforcementRegistrationMapper.selectGroupByDeptList(searchType);
return ZDResponse.success("个人部门筛选条件",analyseService.deptList(enforcementRegistrationList));
}
@GetMapping("/getDeptListToDept")
@ResponseBody
public ZDResponse getDeptListToDept(EnforcementRegistration enforcementRegistration){
SearchType searchType=new SearchType();
if(enforcementRegistration.getUserId() != null){
Long userId = enforcementRegistration.getUserId();
String lawCertificateNum = userMapper.selectUserById(userId).getLawCertificateNum();
String zzjgdm = zfryjdm2405301Mapper.selectZfryByZfCode(lawCertificateNum).getZzjgdm();
String deptId = deptMapper.selectDeptByCreditcode(zzjgdm).getDeptId();
if (!deptId.isEmpty()) {
searchType.setBureauDeptId(deptId);
}
}
if(enforcementRegistration.getDateType()!=null){
searchType.setDateType(enforcementRegistration.getDateType());
}
/*if(enforcementRegistration.getBeginTime()!=null&&!"".equals(enforcementRegistration.getBeginTime())){
searchType.setBeginTime(enforcementRegistration.getBeginTime());
}
if(enforcementRegistration.getEndTime()!=null&&!"".equals(enforcementRegistration.getEndTime())){
searchType.setBeginTime(enforcementRegistration.getEndTime());
}*/
List<EnforcementRegistration> enforcementRegistrationList=enforcementRegistrationMapper.selectGroupByDeptList(searchType);
return ZDResponse.success("部门的部门筛选条件",analyseService.deptList(enforcementRegistrationList));
}
} }

2
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/dept/controller/DeptController.java

@ -77,7 +77,7 @@ public class DeptController extends BaseController {
/** /**
* 新增部门 * 新增部门
*/ */
// @GetMapping("/add/{parentId}") @GetMapping("/add/{parentId}")
public String add(@PathVariable("parentId") String parentId, ModelMap mmap) public String add(@PathVariable("parentId") String parentId, ModelMap mmap)
{ {
mmap.put("dept", deptService.selectDeptById(parentId)); mmap.put("dept", deptService.selectDeptById(parentId));

5
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/RegistrationComplaintInformation.java

@ -15,7 +15,7 @@ public class RegistrationComplaintInformation {
private String enterpriseName; private String enterpriseName;
private String enterpriseAddress; private String enterpriseAddress;
/** /**
* 投诉类型 * 企业类型
*/ */
private String companyOrgType; private String companyOrgType;
private Date rCreateTime; private Date rCreateTime;
@ -43,8 +43,11 @@ public class RegistrationComplaintInformation {
* 投诉部门 * 投诉部门
*/ */
private String complaintDepartmentIds; private String complaintDepartmentIds;
private String complaintItemCodes;
/** /**
* 投诉类型 * 投诉类型
*/ */
private Integer complaintType; private Integer complaintType;
private Integer enforceType;
} }

14
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/SearchType.java

@ -6,7 +6,7 @@ import lombok.Data;
import java.util.List; import java.util.List;
public class SearchType { public class SearchType implements Cloneable{
private List<String> areaStreet; private List<String> areaStreet;
private List<String> deptId; private List<String> deptId;
private List<String> enterpriseType; private List<String> enterpriseType;
@ -18,6 +18,7 @@ public class SearchType {
private String beginTime; private String beginTime;
private String endTime; private String endTime;
private Integer dateType; private Integer dateType;
private String timeType;
private String name; private String name;
private Integer nameId; private Integer nameId;
private String year; private String year;
@ -198,6 +199,14 @@ public class SearchType {
this.complaintTypeStr = complaintTypeStr; this.complaintTypeStr = complaintTypeStr;
} }
public String getTimeType() {
return timeType;
}
public void setTimeType(String timeType) {
this.timeType = timeType;
}
public SearchType(){} public SearchType(){}
public SearchType(SearchType searchType){ public SearchType(SearchType searchType){
this.areaStreet=searchType.getAreaStreet(); this.areaStreet=searchType.getAreaStreet();
@ -212,5 +221,8 @@ public class SearchType {
this.dateType=searchType.getDateType(); this.dateType=searchType.getDateType();
} }
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
} }

113
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/StatisticsIndicatorPart.java

@ -5,7 +5,6 @@ import lombok.Data;
import java.util.List; import java.util.List;
@Data
public class StatisticsIndicatorPart extends BaseDomain { public class StatisticsIndicatorPart extends BaseDomain {
private String name; private String name;
private Integer number; private Integer number;
@ -46,4 +45,116 @@ public class StatisticsIndicatorPart extends BaseDomain {
private String beginTime; private String beginTime;
private String endTime; private String endTime;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getNumber() {
return number;
}
public void setNumber(Integer number) {
this.number = number;
}
public Integer getHuan() {
return huan;
}
public void setHuan(Integer huan) {
this.huan = huan;
}
public Integer getTong() {
return tong;
}
public void setTong(Integer tong) {
this.tong = tong;
}
public Integer getComplaint() {
return complaint;
}
public void setComplaint(Integer complaint) {
this.complaint = complaint;
}
public List<StatisticsIndicatorPart> getStatisticsIndicatorPartList() {
return statisticsIndicatorPartList;
}
public void setStatisticsIndicatorPartList(List<StatisticsIndicatorPart> statisticsIndicatorPartList) {
this.statisticsIndicatorPartList = statisticsIndicatorPartList;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Integer getTotal() {
return total;
}
public void setTotal(Integer total) {
this.total = total;
}
public String getYear() {
return year;
}
public void setYear(String year) {
this.year = year;
}
public Integer getQuarter() {
return quarter;
}
public void setQuarter(Integer quarter) {
this.quarter = quarter;
}
public String getMonth() {
return month;
}
public void setMonth(String month) {
this.month = month;
}
public String getCreditCode() {
return creditCode;
}
public void setCreditCode(String creditCode) {
this.creditCode = creditCode;
}
public String getBeginTime() {
return beginTime;
}
public void setBeginTime(String beginTime) {
this.beginTime = beginTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
} }

3
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/ComplaintStatisticsMapper.java

@ -1,6 +1,7 @@
package com.zdxt.code.mapper; package com.zdxt.code.mapper;
import com.zdxt.code.domain.ComplaintStatistics; import com.zdxt.code.domain.ComplaintStatistics;
import com.zdxt.code.domain.SearchType;
import java.util.List; import java.util.List;
@ -19,4 +20,6 @@ public interface ComplaintStatisticsMapper {
List<ComplaintStatistics> selectComplaintStatisticsGroup(ComplaintStatistics complaintStatistics); List<ComplaintStatistics> selectComplaintStatisticsGroup(ComplaintStatistics complaintStatistics);
List<ComplaintStatistics> selectComplaintStatisticsGroupByType(ComplaintStatistics complaintStatistics); List<ComplaintStatistics> selectComplaintStatisticsGroupByType(ComplaintStatistics complaintStatistics);
Integer insertComplaintStatistics(ComplaintStatistics complaintStatistics); Integer insertComplaintStatistics(ComplaintStatistics complaintStatistics);
List<ComplaintStatistics> selectAppComplaintStatisticsP1(SearchType searchType);
} }

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

@ -2,6 +2,7 @@ package com.zdxt.code.mapper;
import com.zdxt.code.domain.EnforceRegCount; import com.zdxt.code.domain.EnforceRegCount;
import com.zdxt.code.domain.EnforcementRegistration; import com.zdxt.code.domain.EnforcementRegistration;
import com.zdxt.code.domain.SearchType;
import com.zdxt.code.domain.dto.EnforcementRegistrationDto; import com.zdxt.code.domain.dto.EnforcementRegistrationDto;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -110,4 +111,31 @@ public interface EnforcementRegistrationMapper
* @return * @return
*/ */
List<EnforcementRegistrationDto> staticEnforcementRegistrationDetail(EnforcementRegistrationDto enforcementRegistrationDto); List<EnforcementRegistrationDto> staticEnforcementRegistrationDetail(EnforcementRegistrationDto enforcementRegistrationDto);
/**
* 用于移动端统计第一部分
* @param searchType
* @return
*/
List<EnforcementRegistration> selectAppStatisticsPart1(SearchType searchType);
/**
* 传入userId或bureauDeptId得符合记录的部门
* @param searchType
* @return
*/
List<EnforcementRegistration>selectGroupByDeptList(SearchType searchType);
/**
* 传入联合执法批次id和本次执法id--得此次联合执法除本身外的部门
* @param enforcementRegistration
* @return
*/
List<EnforcementRegistration>selectUniteGroupByDeptList(EnforcementRegistration enforcementRegistration);
/**
* 传入联合执法批次id和本次执法id--得此次联合执法除本身外的记录
* @param enforcementRegistration
* @return
*/
List<EnforcementRegistration>selectUniteNotItself(EnforcementRegistration enforcementRegistration);
} }

15
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/AnalyseService.java

@ -0,0 +1,15 @@
package com.zdxt.code.service;
import com.zdxt.code.domain.EnforcementRegistration;
import com.zdxt.code.domain.SearchType;
import com.zdxt.code.domain.StatisticsIndicatorPart;
import com.zdxt.domain.auth.DictData;
import java.util.List;
public interface AnalyseService {
List<StatisticsIndicatorPart> totalPart(SearchType searchType) throws CloneNotSupportedException;
List<DictData> deptList(List<EnforcementRegistration> enforcementRegistrationList1);
}

124
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/AnalyseServiceImpl.java

@ -0,0 +1,124 @@
package com.zdxt.code.service.impl;
import com.zdxt.auth.project.system.dept.mapper.DeptMapper;
import com.zdxt.auth.project.system.user.mapper.UserMapper;
import com.zdxt.code.domain.ComplaintStatistics;
import com.zdxt.code.domain.EnforcementRegistration;
import com.zdxt.code.domain.SearchType;
import com.zdxt.code.domain.StatisticsIndicatorPart;
import com.zdxt.code.mapper.ComplaintStatisticsMapper;
import com.zdxt.code.mapper.EnforcementRegistrationMapper;
import com.zdxt.code.mapper.Zfryjdm2405301Mapper;
import com.zdxt.code.service.AnalyseService;
import com.zdxt.domain.auth.DictData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Service
public class AnalyseServiceImpl implements AnalyseService {
@Autowired
private UserMapper userMapper;
@Autowired
private Zfryjdm2405301Mapper zfryjdm2405301Mapper;
@Autowired
private DeptMapper deptMapper;
@Autowired
private EnforcementRegistrationMapper enforcementRegistrationMapper;
@Autowired
private ComplaintStatisticsMapper complaintStatisticsMapper;
/**
* 移动端统计--第一部分
* @param searchType
* @return
* 时间筛选 如本年则dateType=6本年dateType=5本季dateType=1自定义beginTimeendTime
* 在controller传值时第一部分user_id!=null,dept_id==null
* 无其他类型筛选
* 返回为指标名称name总数Number环比huan同比tong投诉数量complaint
*/
@Override
public List<StatisticsIndicatorPart> totalPart(SearchType searchType) throws CloneNotSupportedException {
//筛选对象
// searchType个人 searchTypeH个人环比 searchTypeT个人同比
SearchType searchTypeH=(SearchType) searchType.clone();
SearchType searchTypeT=(SearchType) searchType.clone();
searchType.setTimeType("new");
searchTypeH.setTimeType("lastH");
searchTypeT.setTimeType("lastT");
// searchTypeDept 部门 searchTypeDeptH 部门环比 searchTypeT个人同比
SearchType searchTypeDept=(SearchType) searchType.clone();
SearchType searchTypeDeptH=(SearchType) searchTypeH.clone();
SearchType searchTypeDeptT=(SearchType) searchTypeT.clone();
searchType.setBureauDeptId(null);
searchTypeH.setBureauDeptId(null);
searchTypeT.setBureauDeptId(null);
searchTypeDept.setUserId(null);
searchTypeDeptH.setUserId(null);
searchTypeDeptT.setUserId(null);
List<EnforcementRegistration> personList=enforcementRegistrationMapper.selectAppStatisticsPart1(searchType);
List<EnforcementRegistration> personListH=enforcementRegistrationMapper.selectAppStatisticsPart1(searchTypeH);
List<EnforcementRegistration> personListT=enforcementRegistrationMapper.selectAppStatisticsPart1(searchTypeT);
List<EnforcementRegistration> deptList=enforcementRegistrationMapper.selectAppStatisticsPart1(searchTypeDept);
List<EnforcementRegistration> deptListH=enforcementRegistrationMapper.selectAppStatisticsPart1(searchTypeDeptH);
List<EnforcementRegistration> deptListT=enforcementRegistrationMapper.selectAppStatisticsPart1(searchTypeDeptT);
List<EnforcementRegistration> personComplaintList=personList.stream().filter(item->item.getIsComplaint()==1).collect(Collectors.toList());
/*List<EnforcementRegistration> deptComplaintList=deptList.stream().filter(item->item.getIsComplaint()==1).collect(Collectors.toList());*/
List<ComplaintStatistics> deptComplaintList=complaintStatisticsMapper.selectAppComplaintStatisticsP1(searchTypeDept);
List<StatisticsIndicatorPart> statisticsIndicatorPartList=new ArrayList<>();
StatisticsIndicatorPart personSIP=new StatisticsIndicatorPart();
personSIP.setNumber(personList.size());
personSIP.setHuan(personList.size()-personListH.size());
personSIP.setTong(personList.size()-personListT.size());
personSIP.setComplaint(personComplaintList.size());
StatisticsIndicatorPart deptSIP=new StatisticsIndicatorPart();
deptSIP.setNumber(deptList.size());
deptSIP.setHuan(deptList.size()-deptListH.size());
deptSIP.setTong(deptList.size()-deptListT.size());
deptSIP.setComplaint(deptComplaintList.size());
statisticsIndicatorPartList.add(personSIP);
statisticsIndicatorPartList.add(deptSIP);
return statisticsIndicatorPartList;
}
/**
* 移动端统计第二部分个人
* @param searchType
* @return
* 前置处理--区域为文字且已拼接为xx区xx街道部门为部门id企业为企业类型特殊处理检查类型为value值投诉类型为value值
*/
public List<StatisticsIndicatorPart> partPerson(SearchType searchType){
List<StatisticsIndicatorPart> statisticsIndicatorPartList=new ArrayList<>();
return statisticsIndicatorPartList;
}
@Override
public List<DictData> deptList(List<EnforcementRegistration> enforcementRegistrationList1){
List<EnforcementRegistration> enforcementRegistrationList=new ArrayList<>();
enforcementRegistrationList.addAll(enforcementRegistrationList1);
for(EnforcementRegistration e:enforcementRegistrationList1){
if(e.getUniteCheck()!=null&&!"".equals(e.getUniteCheck())){
List<EnforcementRegistration> uniteList=enforcementRegistrationMapper.selectUniteGroupByDeptList(e);
if(uniteList.size()>0){
enforcementRegistrationList.addAll(uniteList);
}
}
}
Map<String,List<EnforcementRegistration>> map=enforcementRegistrationList.stream().filter(item->item.getBureauDeptId()!=null&&!"".equals(item.getBureauDeptId())).collect(Collectors.groupingBy(EnforcementRegistration::getBureauDeptId));
List<DictData> dictDataList=new ArrayList<>();
for(String s: map.keySet()){
DictData dictData=new DictData();
dictData.setDictLabel(map.get(s).get(0).getBureauDeptName());
dictData.setDictValue(s);
dictDataList.add(dictData);
}
return dictDataList;
}
}

9
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementCheckStatisticsImpl.java

@ -1844,7 +1844,8 @@ public class EnforcementCheckStatisticsImpl implements EnforcementCheckStatistic
s2.setName("部门检查数量"); s2.setName("部门检查数量");
Long userId=enforcementRegistration.getUserId(); Long userId=enforcementRegistration.getUserId();
String lawCertificateNum=userMapper.selectUserById(userId).getLawCertificateNum(); String lawCertificateNum=userMapper.selectUserById(userId).getLawCertificateNum();
String deptId=zfryjdm2405301Mapper.selectZfryByZfCode(lawCertificateNum).getZzjgdm(); String zzjgdm=zfryjdm2405301Mapper.selectZfryByZfCode(lawCertificateNum).getZzjgdm();
String deptId=deptMapper.selectDeptByCreditcode(zzjgdm).getDeptId();
//按时间筛选,月季年或自定义 //按时间筛选,月季年或自定义
List<EnforcementRegistration> erTime=TimeFiltering1(enforcementRegistration.getBeginTime(),enforcementRegistration.getEndTime(),enforcementRegistration.getDateType()); List<EnforcementRegistration> erTime=TimeFiltering1(enforcementRegistration.getBeginTime(),enforcementRegistration.getEndTime(),enforcementRegistration.getDateType());
//条件:用户id,时间 //条件:用户id,时间
@ -2019,7 +2020,7 @@ public class EnforcementCheckStatisticsImpl implements EnforcementCheckStatistic
} }
} }
//进行企业地区筛选 //进行企业地区筛选
if(searchType.getAreaStreet()!=null){ if(searchType.getAreaStreet()!=null&&searchType.getAreaStreet().size()>0){
List<String> addressList=searchType.getAreaStreet(); List<String> addressList=searchType.getAreaStreet();
rNowList = rNowList.stream().filter(item -> item.getEnterpriseAddress() != null && !"".equals(item.getEnterpriseAddress()) && AddressStreetFiltering(item.getEnterpriseAddress(),addressList)).collect(Collectors.toList()); rNowList = rNowList.stream().filter(item -> item.getEnterpriseAddress() != null && !"".equals(item.getEnterpriseAddress()) && AddressStreetFiltering(item.getEnterpriseAddress(),addressList)).collect(Collectors.toList());
rLastList = rLastList.stream().filter(item -> item.getEnterpriseAddress() != null && !"".equals(item.getEnterpriseAddress()) && AddressStreetFiltering(item.getEnterpriseAddress(),addressList)).collect(Collectors.toList()); rLastList = rLastList.stream().filter(item -> item.getEnterpriseAddress() != null && !"".equals(item.getEnterpriseAddress()) && AddressStreetFiltering(item.getEnterpriseAddress(),addressList)).collect(Collectors.toList());
@ -2027,7 +2028,7 @@ public class EnforcementCheckStatisticsImpl implements EnforcementCheckStatistic
cLastList = cLastList.stream().filter(item -> item.getEnterpriseAddress() != null && !"".equals(item.getEnterpriseAddress()) && AddressStreetFiltering(item.getEnterpriseAddress(),addressList)).collect(Collectors.toList()); cLastList = cLastList.stream().filter(item -> item.getEnterpriseAddress() != null && !"".equals(item.getEnterpriseAddress()) && AddressStreetFiltering(item.getEnterpriseAddress(),addressList)).collect(Collectors.toList());
} }
//进行企业类型筛选 //进行企业类型筛选
if(searchType.getEnterpriseType()!=null){ if(searchType.getEnterpriseType()!=null&&searchType.getEnterpriseType().size()>0){
List<String> enterpriseTypeList=searchType.getEnterpriseType(); List<String> enterpriseTypeList=searchType.getEnterpriseType();
rNowList = rNowList.stream().filter(item->item.getCompanyOrgType()!=null&&!"".equals(item.getCompanyOrgType())&&enterpriseTypeFiltering(item.getCompanyOrgType(),enterpriseTypeList,dictDataMap.keySet())).collect(Collectors.toList()); rNowList = rNowList.stream().filter(item->item.getCompanyOrgType()!=null&&!"".equals(item.getCompanyOrgType())&&enterpriseTypeFiltering(item.getCompanyOrgType(),enterpriseTypeList,dictDataMap.keySet())).collect(Collectors.toList());
rLastList = rLastList.stream().filter(item->item.getCompanyOrgType()!=null&&!"".equals(item.getCompanyOrgType())&&enterpriseTypeFiltering(item.getCompanyOrgType(),enterpriseTypeList,dictDataMap.keySet())).collect(Collectors.toList()); rLastList = rLastList.stream().filter(item->item.getCompanyOrgType()!=null&&!"".equals(item.getCompanyOrgType())&&enterpriseTypeFiltering(item.getCompanyOrgType(),enterpriseTypeList,dictDataMap.keySet())).collect(Collectors.toList());
@ -2057,7 +2058,7 @@ public class EnforcementCheckStatisticsImpl implements EnforcementCheckStatistic
} }
private Boolean AddressStreetFiltering(String s,List<String> strings){ private Boolean AddressStreetFiltering(String s,List<String> strings){
for(String i:strings){ for(String i:strings){
if(s.startsWith("深圳市"+i)){ if(s.startsWith("深圳市" + i.substring(0, i.indexOf("区"))+i.substring(i.indexOf("区")))||s.startsWith("深圳市" + i.substring(0, i.indexOf("区"))+"新"+i.substring(i.indexOf("区")))){
return true; return true;
} }
} }

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

@ -123,4 +123,25 @@
<if test="enterpriseAddress != null and enterpriseAddress != ''">#{enterpriseAddress},</if> <if test="enterpriseAddress != null and enterpriseAddress != ''">#{enterpriseAddress},</if>
</trim> </trim>
</insert> </insert>
<select id="selectAppComplaintStatisticsP1" parameterType="SearchType" resultMap="ComplaintStatisticsResult">
select * from complaint_statistics
<where>
<if test="bureauDeptId!=null and bureauDeptId !=''"> and complaint_department_id =#{bureauDeptId}</if>
<if test="dateType != null and dateType ==6 ">
and DATE_FORMAT(complaint_time,'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
</if>
<if test="dateType != null and dateType ==5 ">
and DATE_FORMAT(complaint_time,'%Y') = DATE_FORMAT(CURDATE(),'%Y')
</if>
<if test="dateType != null and dateType ==1 ">
and QUARTER(complaint_time) = QUARTER(CURDATE())
</if>
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
and DATE_FORMAT(complaint_time,'%Y-%m-%d') &gt;= STR_TO_DATE(#{beginTime},'%Y-%m-%d')
</if>
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
and DATE_FORMAT(complaint_time,'%Y-%m-%d') &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d')
</if>
</where>
</select>
</mapper> </mapper>

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

@ -770,4 +770,110 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
order by i.enterprise_address order by i.enterprise_address
</select> </select>
<select id="selectAppStatisticsPart1" parameterType="SearchType" resultMap="EnforcementRegistrationResult">
select * from enforcement_registration
<where>
<if test="userId !=null and userId !=''"> and (law_enforcer_id=#{userId} or law_enforcer_id_two=#{userId})</if>
<if test="bureauDeptId != null and bureauDeptId !=''"> and bureau_dept_id=#{bureauDeptId}</if>
<if test="timeType=='new'.toString()">
<if test="dateType != null and dateType ==6 ">
and DATE_FORMAT(create_time,'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
</if>
<if test="dateType != null and dateType ==5 ">
and DATE_FORMAT(create_time,'%Y') = DATE_FORMAT(CURDATE(),'%Y')
</if>
<if test="dateType != null and dateType ==1 ">
and QUARTER(create_time) = QUARTER(CURDATE())
</if>
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
and DATE_FORMAT(create_time,'%Y-%m-%d') &gt;= STR_TO_DATE(#{beginTime},'%Y-%m-%d')
</if>
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
and DATE_FORMAT(create_time,'%Y-%m-%d') &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d')
</if>
</if>
<if test="timeType=='lastH'.toString()"><!--环比-->
<if test="dateType != null and dateType ==6 ">
and DATE_FORMAT(date_add(create_time, interval 1 month),'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
</if>
<if test="dateType != null and dateType ==5 ">
and DATE_FORMAT(date_add(create_time, interval 1 year),'%Y') = DATE_FORMAT(CURDATE(),'%Y')
</if>
<if test="dateType != null and dateType ==1 ">
and QUARTER(date_add(create_time, interval 1 quarter)) = QUARTER(CURDATE())
</if>
<if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"><!-- 开始时间检索 -->
and date_add(create_time,interval datediff(#{endTime},#{beginTime}) day) >= #{beginTime}
and date_add(create_time,interval datediff(#{endTime},#{beginTime}) day) &lt;= #{endTime}
</if>
</if>
<if test="timeType=='lastT'.toString()"><!--同比-->
<if test="dateType != null and dateType ==6 ">
and DATE_FORMAT(date_add(create_time, interval 1 year),'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
</if>
<if test="dateType != null and dateType ==5 ">
and DATE_FORMAT(date_add(create_time, interval 1 year),'%Y') = DATE_FORMAT(CURDATE(),'%Y')
</if>
<if test="dateType != null and dateType ==1 ">
and QUARTER(date_add(create_time, interval 1 year)) = QUARTER(CURDATE())
</if>
<if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"><!-- 开始时间检索 -->
and date_add(create_time, interval 1 year) >= #{beginTime}
and date_add(create_time, interval 1 year) &lt;= #{endTime}
</if>
</if>
</where>
</select>
<select id="selectGroupByDeptList" parameterType="SearchType" resultMap="EnforcementRegistrationResult">
select bureau_dept_id,bureau_dept_name from enforcement_registration
<where>
<if test="userId !=null and userId !=''"> and (law_enforcer_id=#{userId} or law_enforcer_id_two=#{userId})</if>
<if test="bureauDeptId != null and bureauDeptId !=''"> and bureau_dept_id=#{bureauDeptId}</if>
<if test="timeType=='new'.toString()">
<if test="dateType != null and dateType ==6 ">
and DATE_FORMAT(create_time,'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
</if>
<if test="dateType != null and dateType ==5 ">
and DATE_FORMAT(create_time,'%Y') = DATE_FORMAT(CURDATE(),'%Y')
</if>
<if test="dateType != null and dateType ==1 ">
and QUARTER(create_time) = QUARTER(CURDATE())
</if>
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
and DATE_FORMAT(create_time,'%Y-%m-%d') &gt;= STR_TO_DATE(#{beginTime},'%Y-%m-%d')
</if>
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
and DATE_FORMAT(create_time,'%Y-%m-%d') &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d')
</if>
</if>
</where>
group by bureau_dept_id
</select>
<select id="selectUniteGroupByDeptList" parameterType="EnforcementRegistration" resultMap="EnforcementRegistrationResult">
select bureau_dept_id,bureau_dept_name from enforcement_registration
<where>
<if test="uniteCheck != null and uniteCheck != ''">
and r.unite_check=#{uniteCheck}
</if>
<if test="id != null and id != ''">
and r.id !=#{id}
</if>
</where>
group by bureau_dept_id
</select>
<select id="selectUniteNotItself" parameterType="EnforcementRegistration" resultMap="EnforcementRegistrationResult">
select r.id,r.bureau_dept_name,r.bureau_dept_id,r.law_enforcer,r.law_enforcer_two,r.enterprise_name,r.enterprise_number,i.enterprise_address,r.law_enforcement_item_text,r.unite_check,
r.check_category,r.check_css,r.is_complaint,r.create_timefrom enforcement_registration r
left join enterprise_information i on r.enterprise_number=i.enterprise_number
<where>
<if test="uniteCheck != null and uniteCheck != ''">
and r.unite_check=#{uniteCheck}
</if>
<if test="id != null and id != ''">
and r.id !=#{id}
</if>
</where>
order by i.enterprise_address
</select>
</mapper> </mapper>

12
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/RegistrationComplaintInformationMapper.xml

@ -20,9 +20,11 @@
<result property="cCreateTime" column="cCreateTime"/> <result property="cCreateTime" column="cCreateTime"/>
<result property="complaintDepartmentIds" column="complaint_department_ids"/> <result property="complaintDepartmentIds" column="complaint_department_ids"/>
<result property="complaintType" column="complaint_type"/> <result property="complaintType" column="complaint_type"/>
<result property="enforceType" column="enforce_type"/>
<result property="complaintItemCodes" column="complaint_item_codes"/>
</resultMap> </resultMap>
<select id="selectThree" parameterType="SearchType" resultMap="RegistrationComplaintInformationResult"> <select id="selectThree" parameterType="SearchType" resultMap="RegistrationComplaintInformationResult">
select r.id as 'rId',i.enterprise_name,i.enterprise_number,i.enterprise_address,i.company_org_type,r.create_time as 'rCreateTime',r.law_enforcer_id,r.law_enforcer_id_two,r.check_css,r.is_complaint,r.bureau_dept_id,c.id as 'cId',c.rel_id,c.create_time as 'cCreateTime',c.complaint_department_ids,c.complaint_type select r.id as 'rId',i.enterprise_name,i.enterprise_number,i.enterprise_address,i.company_org_type,r.create_time as 'rCreateTime',r.law_enforcer_id,r.law_enforcer_id_two,r.check_css,r.is_complaint,r.bureau_dept_id,c.id as 'cId',c.rel_id,c.create_time as 'cCreateTime',c.complaint_department_ids,c.enforce_type,c.complaint_item_codes
from enforcement_registration r inner join enterprise_information i on r.enterprise_number=i.enterprise_number left join enterprise_complaint c on r.id=c.rel_id from enforcement_registration r inner join enterprise_information i on r.enterprise_number=i.enterprise_number left join enterprise_complaint c on r.id=c.rel_id
<where> <where>
<if test="bureauDeptId != null and bureauDeptId != ''">and r.bureau_dept_id=#{bureauDeptId} </if> <if test="bureauDeptId != null and bureauDeptId != ''">and r.bureau_dept_id=#{bureauDeptId} </if>
@ -41,7 +43,7 @@
</if> </if>
</if> </if>
<if test="complaintType != null and complaintType.size() > 0 "> <if test="complaintType != null and complaintType.size() > 0 ">
and c.complaint_type in and c.enforce_type in
<foreach collection="complaintType" item="complaintType" open="(" separator="," close=")"> <foreach collection="complaintType" item="complaintType" open="(" separator="," close=")">
#{complaintType} #{complaintType}
</foreach> </foreach>
@ -55,12 +57,12 @@
</where> </where>
</select> </select>
<select id="selectComplaint" parameterType="SearchType" resultMap="RegistrationComplaintInformationResult"> <select id="selectComplaint" parameterType="SearchType" resultMap="RegistrationComplaintInformationResult">
select i.enterprise_name,i.enterprise_number,i.enterprise_address,i.company_org_type,c.id as 'cId',c.rel_id,c.create_time as 'cCreateTime',c.complaint_department_ids,c.complaint_type select i.enterprise_name,i.enterprise_number,i.enterprise_address,i.company_org_type,c.id as 'cId',c.rel_id,c.create_time as 'cCreateTime',c.complaint_department_ids,c.enforce_type,c.complaint_item_codes
from enterprise_complaint c inner join enterprise_information i on c.enterprise_number=i.enterprise_number from enterprise_complaint c inner join enterprise_information i on c.enterprise_number=i.enterprise_number
<where> <where>
<if test="bureauDeptId != null and bureauDeptId != ''">and c.complaint_department_ids like concat('%',#{bureauDeptId},'%') </if> <if test="bureauDeptId != null and bureauDeptId != ''">and (c.complaint_department_ids like concat('%',#{bureauDeptId},'%') or c.complaint_item_codes like concat('%',#{bureauDeptId},'%')) </if>
<if test="complaintType != null and complaintType.size() > 0 "> <if test="complaintType != null and complaintType.size() > 0 ">
and c.complaint_type in and c.enforce_type in
<foreach collection="complaintType" item="complaintType" open="(" separator="," close=")"> <foreach collection="complaintType" item="complaintType" open="(" separator="," close=")">
#{complaintType} #{complaintType}
</foreach> </foreach>

Loading…
Cancel
Save