@ -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,31 +670,16 @@ 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 ) ) {
return true ;
}
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 ( ) ) ) {
return true ;
}
for ( DictData d : stringList ) {
if ( s . startsWith ( "深圳市" + qy . substring ( 0 , qy . indexOf ( "区" ) ) + "区" + d . getDictLabel ( ) ) | | s . startsWith ( "深圳市" + qy . substring ( 0 , qy . indexOf ( "区" ) ) + "新区" + d . getDictLabel ( ) ) ) {
return true ;
}
}
return false ;
@ -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 ;
}
} * /
}