Browse Source

监督端-企业信息与企业统计合并

v4
zouyx 2 years ago
parent
commit
8b961aa40b
  1. 352
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statisticsEnterprise/statisticsEnterprise.html
  2. 32
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsEnterpriseController.java
  3. 36
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/SearchType.java
  4. 2
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnterpriseInformationService.java
  5. 123
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java
  6. 40
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml

352
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statisticsEnterprise/statisticsEnterprise.html

@ -58,11 +58,32 @@
<option th:fragment="jd" th:each="j:${jdList}" th:text="${j.dictLabel}" th:value="${j.dictValue}"></option>
</select>
</li>
<li>
<p>企业名称:</p>
<input type="text" name="enterpriseName"/>
</li>
<li>
<p>企业纳税识别号:</p>
<input type="text" name="enterpriseNumber"/>
</li>
<li>
<p>企业类型:</p>
<select name="companyOrgType" th:with="type=${@dict.getType('enterpriseType')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<p>企业地址:</p>
<input type="text" name="enterpriseAddress"/>
</li>
<li>
<a class="btn btn-success btn-sm" onclick="searchE()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-reset btn-sm" onclick="restE()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
<a class="btn btn-warning btn-sm" onclick="downloadI1()"><i class="fa fa-share-square-o"></i> 导出</a>
<a class="btn btn-info btn-sm" id="closeButton" onclick="closeE()"><i class="fa fa-reply"></i> 返回</a>
<a class="btn btn-info btn-sm" id="closeButtonDQY" onclick="closeDetails()"><i class="fa fa-reply"></i> 返回</a>
<a class="btn btn-info btn-sm" id="closeButtonDJD" onclick="closeDetails()"><i class="fa fa-reply"></i> 返回</a>
</li>
</ul>
<div class="static-content">
@ -79,6 +100,7 @@
</div>
</form>
<div class="col-sm-12 select-table table-bordered">
<table id="bootstrap-table-details" ></table>
<table id="bootstrap-table1" ></table>
<table id="bootstrap-table" ></table>
</div>
@ -166,6 +188,11 @@
var prefix = ctx + "code/statisticsEnterprise";
/*var myChart = echarts.init(document.getElementById('container'));*/
var myChart = echarts.init(document.getElementById('echartEnterprise'));
var detailsStatus=false
var detailsId=""
var pickQY=""
var pickJD=""
var pickQY1=""
window.onload = function () {
$("#quarter2").hide();
$("#month2").hide();
@ -174,6 +201,10 @@
$("#jd").hide();
$('#bootstrap-table').hide();
$('#closeButton').hide();
$('#closeButtonDQY').hide();
$('#closeButtonDJD').hide();
// $('#qy').prop('disabled',true);
// $('#qy').prop('disabled',false);
};
$(function() {
var options1 = {
@ -212,45 +243,24 @@
{
field : 'value',
title : '注销企业数量',
}
]
};
$("#bootstrap-table1").bootstrapTable(options1);
});
/*$(function() {
var options = {
modalName: "街道统计",
showHeader: true,
showFooter: false,
showColumns: false,
showRefresh: false,
showToggle: false,
pagination: true,
columns: [
{
field : 'address',
title : '区域',
},
{
field : 'name',
title : '街道',
},
{
field : 'totalNumber',
title : '企业数量',
},
{
field : 'numInt',
title : '续存企业数量',
},
{
field : 'value',
title : '注销企业数量',
title : '详情',
formatter:function (value,row,index) {
console.log(row)
if(row.totalNumber == 0){
return "<span>详情</span>";
}else{
/*return "<span></span>";*/
pickQY=row.name;
return '<span style="cursor: pointer;color: blue;" ONCLICK="openDetailsQY(\'' + row.name + '\')">'+'详情'+'</span>';
}
}
}
]
};
$("#bootstrap-table").bootstrapTable(options);
});*/
$("#bootstrap-table1").bootstrapTable(options1);
});
$(function() {
var options2 = {
modalName: "企业类型统计",
@ -288,12 +298,24 @@
document.getElementById(`${prefix}-tab${num}`).classList.add('active');
}
function searchE(){
eTable1();
closeE();
frag1();
console.log(detailsStatus)
console.log(detailsId)
if(!detailsStatus){
eTable1();
closeE();
frag1();
}else{
console.log(detailsId=='bootstrap-table1')
if(detailsId=='bootstrap-table1'){
openDetailsQY(pickQY)
}else{
openDetailsJD(pickQY,pickJD)
}
}
}
function restE(){
$('form').eq(0).trigger("reset");
closeDetails()
searchE();
addressMake();
frag1();
@ -425,6 +447,10 @@
})
}
/**
* 街道统计
* @param n
*/
function jd(n){
let nameData={};
nameData.name=n;
@ -478,6 +504,20 @@
{
field : 'value',
title : '注销企业数量',
},
{
title:'详情',
formatter:function (value,row,index) {
console.log(row)
if(row.totalNumber == 0){
return "<span>详情</span>";
}else{
/*return "<span></span>";*/
pickQY=row.address;
pickJD=row.name;
return '<span style="cursor: pointer;color: blue;" ONCLICK="openDetailsJD(\'' + row.address +'\',\''+ row.name+'\')">'+'详情'+'</span>';
}
}
}
]
};
@ -540,6 +580,244 @@
eSearch2();
timeType2();
}
/**
* 区域企业信息
* @param qy
*/
function openDetailsQY(qy){
console.log(qy);
var currentId=$('form').eq(0).attr('id');
var params = $.common.formToJSON(currentId);
console.log(params)
params.qy=qy;
$.ajax({
url:prefix+'/QYDetails',
type:'GET',
data: params,
success:function (response){
var options = {
modalName: "区域企业信息详细",
showHeader: true,
showFooter: false,
showColumns: false,
showRefresh: false,
showToggle: false,
pagination: true,
pageSize: 10,
pageList: [10, 25, 50],
//quarterBoolean:quarterBoolean,
columns: [
/*{
checkbox: false
},*/
{
field : 'qy',
title : '区域'
},
{
field : 'jd',
title : '街道'
},
{
field : 'id',
title : '主键ID',
visible: false
},
{
field : 'enterpriseName',
title : '企业名称'
},
{
field : 'enterpriseNumber',
title : '企业纳税识别号'
},
// {
// field : 'enterpriseType',
// title : '企业类型'
// },
{
field : 'companyOrgType',
title : '企业类型'
},
{
field : 'isUnsubscribe',
title : '是否注销',
formatter:function (value, row, index) {
if(value == 0){
return "未注销";
}else{
return "<span style='color: red'>已注销</span>";
}
}
},
{
field : 'enterpriseAddress',
title : '企业地址'
},
{
field : 'legalPerson',
title : '法人代表'
},
{
field : 'registeredCapital',
title : '注册资本'
},
{
field : 'establishmentTime',
title : '成立日期'
},
{
field : 'operatingTerm',
title : '营业期限'
},
{
field : 'businessScope',
title : '经营范围'
}
]
};
$("#bootstrap-table-details").bootstrapTable(options);
console.log(response);
$('#qy').prop('disabled',true);
$('#closeButtonDQY').show();
$('#bootstrap-table-details').show();
$('#bootstrap-table1').hide();
$('#bootstrap-table-details').bootstrapTable('load', response);
detailsStatus=true;
detailsId="bootstrap-table1";
},error:function (xhr,status,error){
console.error("请求失败:",status,error);
}
})
}
function openDetailsJD(qy,jd){
// let qyjdList=qyjdStr.splice(",")
// let qy=qyjdList[1]
// let jd=qyjdList[2]
console.log(qy);
console.log(jd);
var currentId=$('form').eq(0).attr('id');
var params = $.common.formToJSON(currentId);
console.log(params)
params.qy=qy;
params.jd=jd;
$.ajax({
url:prefix+'/JDDetails',
type:'GET',
data: params,
success:function (response){
var options = {
modalName: "区域企业信息详细",
showHeader: true,
showFooter: false,
showColumns: false,
showRefresh: false,
showToggle: false,
pagination: true,
pageSize: 10,
pageList: [10, 25, 50],
//quarterBoolean:quarterBoolean,
columns: [
{
field : 'qy',
title : '区域'
},
{
field : 'jd',
title : '街道'
},
{
field : 'id',
title : '主键ID',
visible: false
},
{
field : 'enterpriseName',
title : '企业名称'
},
{
field : 'enterpriseNumber',
title : '企业纳税识别号'
},
{
field : 'companyOrgType',
title : '企业类型'
},
{
field : 'isUnsubscribe',
title : '是否注销',
formatter:function (value, row, index) {
if(value == 0){
return "未注销";
}else{
return "<span style='color: red'>已注销</span>";
}
}
},
{
field : 'enterpriseAddress',
title : '企业地址'
},
{
field : 'legalPerson',
title : '法人代表'
},
{
field : 'registeredCapital',
title : '注册资本'
},
{
field : 'establishmentTime',
title : '成立日期'
},
{
field : 'operatingTerm',
title : '营业期限'
},
{
field : 'businessScope',
title : '经营范围'
}
]
};
$("#bootstrap-table-details").bootstrapTable(options);
console.log(response);
$('#qy').prop('disabled',true);
$('#jd').prop('disabled',true);
$('#closeButton').hide();
$('#closeButtonDJD').show();
// $('#bootstrap-table').hide();
$('#bootstrap-table, .fixed-table-pagination').hide();
$('#bootstrap-table-details').show();
$('#bootstrap-table-details').bootstrapTable('load', response);
detailsStatus=true;
detailsId="bootstrap-table";
},error:function (xhr,status,error){
console.error("请求失败:",status,error);
}
})
}
function closeDetails(){
$('#qy').prop('disabled',false);
$('#jd').prop('disabled',false);
$('#bootstrap-table-details').bootstrapTable('destroy');
detailsStatus=false
if(detailsId=='bootstrap-table1'){
//关闭前区域列表
$('#closeButtonDQY').hide();
$('#bootstrap-table1').show();
pickQY="";
}else{
$('#bootstrap-table, .fixed-table-pagination').show();
$('#closeButton').show()
$('#closeButtonDJD').hide();
pickQY="";
pickJD="";
}
detailsId=''
}
function downloadI1(){
var currentId=$('form').eq(0).attr('id');
var params = $.common.formToJSON(currentId);

32
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsEnterpriseController.java

@ -91,8 +91,21 @@ public class StatisticsEnterpriseController extends BaseController {
}*/
}else {
model.addAttribute("qyJd", "全市");
}
}
if(searchType.getEnterpriseName()!=null&&!searchType.getEnterpriseName().equals("")){
enterpriseInformation.setEnterpriseName(searchType.getEnterpriseName());
}
if(searchType.getEnterpriseNumber()!=null&&!searchType.getEnterpriseNumber().equals("")){
enterpriseInformation.setEnterpriseNumber(searchType.getEnterpriseNumber());
}
if(searchType.getEnterpriseAddress()!=null&&!searchType.getEnterpriseAddress().equals("")){
enterpriseInformation.setEnterpriseAddress(searchType.getEnterpriseAddress());
}
List<EnterpriseInformation> enterpriseInformationList = iEnterpriseInformationService.selectEnterpriseInformationList1(enterpriseInformation);
if(searchType.getCompanyOrgType()!=null&&!searchType.getCompanyOrgType().equals("")){
String companyOrgType=iDictDataService.selectDictLabel("enterpriseType",searchType.getCompanyOrgType());
enterpriseInformationList=enterpriseInformationList.stream().filter(item->item.getCompanyOrgType().contains(companyOrgType)).collect(Collectors.toList());
}
List<EnterpriseInformation> existList = enterpriseInformationList.stream().filter(item -> item.getIsUnsubscribe() == 0).collect(Collectors.toList());
List<EnterpriseInformation> logoutList = enterpriseInformationList.stream().filter(item -> item.getIsUnsubscribe() == 1).collect(Collectors.toList());
model.addAttribute("number", enterpriseInformationList.size());//企业总数
@ -105,7 +118,7 @@ public class StatisticsEnterpriseController extends BaseController {
public String statisticsEnterprise(SearchType searchType,Model model) {
model.addAttribute("jdList", iDictDataService.selectDictDataByType(searchType.getName()));
return prefix + "/jd";
}
}
@RequiresPermissions("code:statisticsEnterprise:list")
@GetMapping("/listQY")
@ResponseBody
@ -119,6 +132,21 @@ public class StatisticsEnterpriseController extends BaseController {
public List<StatisticsIndicator> statisticsEnterpriseJD(SearchType searchType) {
return iEnterpriseInformationService.enterpriseInformationAllListToJD(searchType);
}
@RequiresPermissions("code:statisticsEnterprise:list")
@GetMapping("/QYDetails")
@ResponseBody
public List<EnterpriseInformation> statisticsEnterpriseQYDetails(EnterpriseInformation enterpriseInformation) {
return iEnterpriseInformationService.enterpriseInformationQYDetails(enterpriseInformation);
}
@RequiresPermissions("code:statisticsEnterprise:list")
@GetMapping("/JDDetails")
@ResponseBody
public List<EnterpriseInformation> enterpriseInformationJDDetails(EnterpriseInformation enterpriseInformation) {
return iEnterpriseInformationService.enterpriseInformationJDDetails(enterpriseInformation);
}
@RequiresPermissions("code:statisticsEnterprise:list")
@GetMapping("/type")
@ResponseBody

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

@ -30,6 +30,10 @@ public class SearchType implements Cloneable{
private String enterpriseTypeStr;
private String checkTypeStr;
private String complaintTypeStr;
private String companyOrgType;
private String enterpriseName;
private String enterpriseNumber;
private String enterpriseAddress;
public List<String> getAreaStreet() {
return areaStreet;
@ -207,6 +211,38 @@ public class SearchType implements Cloneable{
this.timeType = timeType;
}
public String getCompanyOrgType() {
return companyOrgType;
}
public void setCompanyOrgType(String companyOrgType) {
this.companyOrgType = companyOrgType;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getEnterpriseNumber() {
return enterpriseNumber;
}
public void setEnterpriseNumber(String enterpriseNumber) {
this.enterpriseNumber = enterpriseNumber;
}
public String getEnterpriseAddress() {
return enterpriseAddress;
}
public void setEnterpriseAddress(String enterpriseAddress) {
this.enterpriseAddress = enterpriseAddress;
}
public SearchType(){}
public SearchType(SearchType searchType){
this.areaStreet=searchType.getAreaStreet();

2
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnterpriseInformationService.java

@ -125,4 +125,6 @@ public interface IEnterpriseInformationService
List<StatisticsIndicator> enterpriseInformationAllListToQY(SearchType searchType);
List<StatisticsIndicator> enterpriseInformationAllListToJD(SearchType searchType);
List<EnterpriseInformation> enterpriseInformationQYDetails(EnterpriseInformation enterpriseInformation);
List<EnterpriseInformation> enterpriseInformationJDDetails(EnterpriseInformation enterpriseInformation);
}

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

@ -575,14 +575,29 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
qyNameList.add(dictData.getDictLabel());
}
}
if(searchType.getEnterpriseName()!=null&&!searchType.getEnterpriseName().equals("")){
enterpriseInformation.setEnterpriseName(searchType.getEnterpriseName());
}
if(searchType.getEnterpriseNumber()!=null&&!searchType.getEnterpriseNumber().equals("")){
enterpriseInformation.setEnterpriseNumber(searchType.getEnterpriseNumber());
}
if(searchType.getEnterpriseAddress()!=null&&!searchType.getEnterpriseAddress().equals("")){
enterpriseInformation.setEnterpriseAddress(searchType.getEnterpriseAddress());
}
List<EnterpriseInformation> enterpriseInformationList = enterpriseInformationMapper.selectEnterpriseInformationList1(enterpriseInformation);
for (String qy : qyNameList) {
if(searchType.getCompanyOrgType()!=null&&!searchType.getCompanyOrgType().equals("")){
String companyOrgType=dictDataMapper.selectDictLabel("enterpriseType",searchType.getCompanyOrgType());
enterpriseInformationList=enterpriseInformationList.stream().filter(item->item.getCompanyOrgType().contains(companyOrgType)).collect(Collectors.toList());
}
for (int i=0;i< qyNameList.size();i++) {
String qy= qyNameList.get(i);
StatisticsIndicator s = new StatisticsIndicator();
System.out.println(qy.substring(0, qy.indexOf("区")));
List<EnterpriseInformation> qyList = enterpriseInformationList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "区") || item.getEnterpriseAddress().startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "新区")).collect(Collectors.toList());
List<EnterpriseInformation> existList = qyList.stream().filter(item -> item.getIsUnsubscribe() == 0).collect(Collectors.toList());
List<EnterpriseInformation> logoutList = qyList.stream().filter(item -> item.getIsUnsubscribe() == 1).collect(Collectors.toList());
s.setName(qy);
s.setSort(i);
s.setTotalNumber(qyList.size());
s.setNumInt(existList.size());
s.setValue(logoutList.size());
@ -594,6 +609,7 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
List<EnterpriseInformation> logoutList = enterpriseInformationList.stream().filter(item -> item.getIsUnsubscribe() == 1).collect(Collectors.toList());
StatisticsIndicator s = new StatisticsIndicator();
s.setName("其他");
s.setSort(qyNameList.size());
s.setTotalNumber(enterpriseInformationList.size());
s.setNumInt(existList.size());
s.setValue(logoutList.size());
@ -607,7 +623,20 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
List<StatisticsIndicator> statisticsIndicatorList = new ArrayList<>();
EnterpriseInformation enterpriseInformation = new EnterpriseInformation();
enterpriseInformation.setQy(searchType.getName());
if(searchType.getEnterpriseName()!=null&&!searchType.getEnterpriseName().equals("")){
enterpriseInformation.setEnterpriseName(searchType.getEnterpriseName());
}
if(searchType.getEnterpriseNumber()!=null&&!searchType.getEnterpriseNumber().equals("")){
enterpriseInformation.setEnterpriseNumber(searchType.getEnterpriseNumber());
}
if(searchType.getEnterpriseAddress()!=null&&!searchType.getEnterpriseAddress().equals("")){
enterpriseInformation.setEnterpriseAddress(searchType.getEnterpriseAddress());
}
List<EnterpriseInformation> enterpriseInformationList = enterpriseInformationMapper.selectEnterpriseInformationList1(enterpriseInformation);
if(searchType.getCompanyOrgType()!=null&&!searchType.getCompanyOrgType().equals("")){
String companyOrgType=dictDataMapper.selectDictLabel("enterpriseType",searchType.getCompanyOrgType());
enterpriseInformationList=enterpriseInformationList.stream().filter(item->item.getCompanyOrgType().contains(companyOrgType)).collect(Collectors.toList());
}
String qyName = searchType.getName();
DictData dictData = new DictData();
dictData.setDictType("address_type");
@ -622,6 +651,7 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
List<EnterpriseInformation> logoutList = jdList.stream().filter(item -> item.getIsUnsubscribe() == 1).collect(Collectors.toList());
s.setName(jdName);
s.setAddress(qyName);
s.setSort(Integer.parseInt(d.getDictSort()+""));
s.setTotalNumber(jdList.size());
s.setNumInt(existList.size());
s.setValue(logoutList.size());
@ -633,6 +663,8 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
List<EnterpriseInformation> existList = enterpriseInformationList.stream().filter(item -> item.getIsUnsubscribe() == 0).collect(Collectors.toList());
List<EnterpriseInformation> logoutList = enterpriseInformationList.stream().filter(item -> item.getIsUnsubscribe() == 1).collect(Collectors.toList());
s.setAddress(qyName);
s.setName("其他");
s.setSort(dictDataListJD.size()+1);
s.setTotalNumber(enterpriseInformationList.size());
s.setNumInt(existList.size());
s.setValue(logoutList.size());
@ -641,6 +673,94 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
return statisticsIndicatorList;
}
@Override
public List<EnterpriseInformation> enterpriseInformationQYDetails(EnterpriseInformation enterpriseInformation) {
if(!enterpriseInformation.getQy().equals("其他")) {
List<EnterpriseInformation> enterpriseInformationList = enterpriseInformationMapper.selectEnterpriseInformationList1(enterpriseInformation);
List<EnterpriseInformation> list = new ArrayList<>();
if (enterpriseInformation.getCompanyOrgType() != null && !enterpriseInformation.getCompanyOrgType().equals("")) {
String companyOrgType = dictDataMapper.selectDictLabel("enterpriseType", enterpriseInformation.getCompanyOrgType());
enterpriseInformationList = enterpriseInformationList.stream().filter(item -> item.getCompanyOrgType().contains(companyOrgType)).collect(Collectors.toList());
}
DictData dictData = new DictData();
dictData.setDictLabel(enterpriseInformation.getQy());
dictData.setDictType("address_type");
String qyValue = dictDataMapper.selectDictData(dictData).getDictValue();
List<DictData> dictDataList = new ArrayList<>();
if (enterpriseInformation.getJd() != null && !enterpriseInformation.getJd().equals("")) {
DictData dictData1 = new DictData();
dictData1.setDictType(qyValue);
dictData1.setDictValue(enterpriseInformation.getJd());
dictDataList.add(dictDataMapper.selectDictData(dictData1));
} else {
dictDataList = dictDataMapper.selectDictDataByType(qyValue);
}
for (DictData d : dictDataList) {
List<EnterpriseInformation> e = enterpriseInformationList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + enterpriseInformation.getQy() + d.getDictLabel()) || item.getEnterpriseAddress().startsWith("深圳市" + enterpriseInformation.getQy().substring(0, enterpriseInformation.getQy().indexOf("区")) + "新区" + d.getDictLabel())).collect(Collectors.toList());
for (int i = 0; i < e.size(); i++) {
e.get(i).setQy(enterpriseInformation.getQy());
e.get(i).setJd(d.getDictLabel());
}
list.addAll(e);
enterpriseInformationList = enterpriseInformationList.stream().filter(item -> !item.getEnterpriseAddress().startsWith("深圳市" + enterpriseInformation.getQy() + d.getDictLabel()) && !item.getEnterpriseAddress().startsWith("深圳市" + enterpriseInformation.getQy().substring(0, enterpriseInformation.getQy().indexOf("区")) + "新区" + d.getDictLabel())).collect(Collectors.toList());
}
if (enterpriseInformationList.size() > 0) {
for (int i = 0; i < enterpriseInformationList.size(); i++) {
enterpriseInformationList.get(i).setQy(enterpriseInformation.getQy());
list.add(enterpriseInformationList.get(i));
}
}
return list;
}else{
enterpriseInformation.setQy("");
List<EnterpriseInformation> enterpriseInformationList = enterpriseInformationMapper.selectEnterpriseInformationList1(enterpriseInformation);
if (enterpriseInformation.getCompanyOrgType() != null && !enterpriseInformation.getCompanyOrgType().equals("")) {
String companyOrgType = dictDataMapper.selectDictLabel("enterpriseType", enterpriseInformation.getCompanyOrgType());
enterpriseInformationList = enterpriseInformationList.stream().filter(item -> item.getCompanyOrgType().contains(companyOrgType)).collect(Collectors.toList());
}
List<DictData> dictDataList=dictDataMapper.selectDictDataByType("address_type");
for (DictData d : dictDataList) {
enterpriseInformationList = enterpriseInformationList.stream().filter(item -> !item.getEnterpriseAddress().startsWith("深圳市" + d.getDictLabel()) && !item.getEnterpriseAddress().startsWith("深圳市" + d.getDictLabel().substring(0, d.getDictLabel().indexOf("区")) + "新区" )).collect(Collectors.toList());
}
return enterpriseInformationList;
}
}
@Override
public List<EnterpriseInformation> enterpriseInformationJDDetails(EnterpriseInformation enterpriseInformation) {
if(enterpriseInformation.getJd().equals("其他")){
enterpriseInformation.setJd("");
List<EnterpriseInformation> enterpriseInformationList = enterpriseInformationMapper.selectEnterpriseInformationList1(enterpriseInformation);
if (enterpriseInformation.getCompanyOrgType() != null && !enterpriseInformation.getCompanyOrgType().equals("")) {
String companyOrgType = dictDataMapper.selectDictLabel("enterpriseType", enterpriseInformation.getCompanyOrgType());
enterpriseInformationList = enterpriseInformationList.stream().filter(item -> item.getCompanyOrgType().contains(companyOrgType)).collect(Collectors.toList());
}
DictData dictData=new DictData();
dictData.setDictLabel(enterpriseInformation.getQy());
dictData.setDictType("address_type");
String qyValue=dictDataMapper.selectDictData(dictData).getDictValue();
List<DictData> dictDataList=dictDataMapper.selectDictDataByType(qyValue);
for(DictData d:dictDataList){
enterpriseInformationList = enterpriseInformationList.stream().filter(item -> !item.getEnterpriseAddress().startsWith("深圳市" + enterpriseInformation.getQy().substring(0, enterpriseInformation.getQy().indexOf("区")) + "区" + d.getDictLabel()) && !item.getEnterpriseAddress().startsWith("深圳市" + enterpriseInformation.getQy().substring(0, enterpriseInformation.getQy().indexOf("区")) + "新区" + d.getDictLabel())).collect(Collectors.toList());
}
for (int i = 0; i < enterpriseInformationList.size(); i++) {
enterpriseInformationList.get(i).setQy(enterpriseInformation.getQy());
}
return enterpriseInformationList;
}else {
List<EnterpriseInformation> enterpriseInformationList = enterpriseInformationMapper.selectEnterpriseInformationList1(enterpriseInformation);
if (enterpriseInformation.getCompanyOrgType() != null && !enterpriseInformation.getCompanyOrgType().equals("")) {
String companyOrgType = dictDataMapper.selectDictLabel("enterpriseType", enterpriseInformation.getCompanyOrgType());
enterpriseInformationList = enterpriseInformationList.stream().filter(item -> item.getCompanyOrgType().contains(companyOrgType)).collect(Collectors.toList());
}
for (int i = 0; i < enterpriseInformationList.size(); i++) {
enterpriseInformationList.get(i).setQy(enterpriseInformation.getQy());
enterpriseInformationList.get(i).setJd(enterpriseInformation.getJd());
}
return enterpriseInformationList;
}
}
public String getUrlParams(String urlStr,String paramKey) throws IOException {
URL url = new URL(urlStr);
URLConnection connection = url.openConnection();
@ -668,6 +788,5 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
}

40
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml

@ -67,25 +67,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by create_time desc
</select>
<select id="selectEnterpriseInformationList1" parameterType="EnterpriseInformation" resultMap="EnterpriseInformationResult">
<include refid="selectEnterpriseInformationVo"/>
<where>
<if test="enterpriseAddress != null and enterpriseAddress != ''"> and enterprise_address like concat('%', #{enterpriseAddress}, '%')</if>
<if test="qy != null and qy != ''">
and (enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
<if test="jd != null and jd != ''">
and (enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))
</if>
</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>
and is_unsubscribe is not null
and company_org_type is not null
and enterprise_address is not null
</where>
<include refid="selectEnterpriseInformationVo"/>
<where>
<if test="enterpriseAddress != null and enterpriseAddress != ''"> and enterprise_address like concat('%', #{enterpriseAddress}, '%')</if>
<if test="enterpriseNumber != null and enterpriseNumber != ''"> and enterprise_number like concat('%', #{enterpriseNumber}, '%')</if>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="qy != null and qy != ''">
and (enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
<if test="jd != null and jd != ''">
and (enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))
</if>
</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>
and is_unsubscribe is not null
and company_org_type is not null
and enterprise_address is not null
</where>
</select>
<select id="selectEnterpriseInformationByAddress" parameterType="SearchType" resultMap="EnterpriseInformationResult">
<include refid="selectEnterpriseInformationVo"/>

Loading…
Cancel
Save