@ -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
}