@ -477,28 +477,38 @@ public class PointServiceImpl implements PointService {
Map < String , RiskModelTaskClue > oldMap = domain . getOldMap ( task . getModelId ( ) , true ) ;
Map < String , Integer > idCode = new HashMap < > ( ) ;
List < GBaseCSCZRK > list = new ArrayList < > ( ) ;
List < String > list = new ArrayList < > ( ) ;
log . info ( "模型119开始查询" ) ;
List < WdpcHZCRYXX > wdpcHZCRYXXS = hZCRYXXRepository . list ( new LambdaQueryWrapper < WdpcHZCRYXX > ( ) . select ( WdpcHZCRYXX : : getIdCode ) ) ;
List < GBaseCSCZRK > father = cSCZRKRepository . getBaseMapper ( ) . selectFather ( ) ;
log . info ( "模型119查询father结果数:{}" , father . size ( ) ) ;
Map < String , List < String > > fatherMap = father . stream ( ) . collect ( Collectors . groupingBy ( GBaseCSCZRK : : getGmsfhm ,
Collectors . mapping ( GBaseCSCZRK : : getFatherId , Collectors . toList ( ) ) ) ) ;
List < String > fatherList = father . stream ( ) . map ( GBaseCSCZRK : : getFatherId ) . toList ( ) ;
// 切割 每次查10000条
List < List < WdpcHZCRYXX > > wdpcHZCRYXXSParts = IntStream . range ( 0 , ( wdpcHZCRYXXS . size ( ) + 9999 ) / 10000 )
. mapToObj ( i - > wdpcHZCRYXXS . subList ( i * 10000 , Math . min ( ( i + 1 ) * 10000 , wdpcHZCRYXXS . size ( ) ) ) )
List < List < String > > fatherList Parts = IntStream . range ( 0 , ( fatherList . size ( ) + 9999 ) / 10000 )
. mapToObj ( i - > fatherList . subList ( i * 10000 , Math . min ( ( i + 1 ) * 10000 , fatherList . size ( ) ) ) )
. toList ( ) ;
for ( List < WdpcHZCRYXX > wdpcHZCRYXXSPart : wdpcHZCRYXXSParts ) {
List < String > ids = wdpcHZCRYXXSPart . stream ( ) . map ( WdpcHZCRYXX : : getIdCode ) . toList ( ) ;
list . addAll ( cSCZRKRepository . getBaseMapper ( ) . selectFatherDiePeople ( ids ) ) ;
for ( List < String > fatherListPart : fatherListParts ) {
list . addAll ( hZCRYXXRepository . getBaseMapper ( ) . selectHZCPeople ( fatherListPart ) ) ;
}
log . info ( "模型119查询结果数:{}" , list . size ( ) ) ;
Map < String , RiskPersonal > personalMap = domain . getPersons ( ) . stream ( ) . collect ( Collectors . toMap ( RiskPersonal : : getIdCode , Function . identity ( ) , ( old , newVal ) - > newVal ) ) ;
List < RiskModelTaskClue > toInsert = new ArrayList < > ( ) ;
for ( GBaseCSCZRK domicileType : list ) {
RiskPersonal personal = personalMap . get ( domicileType . getGmsfhm ( ) ) ;
for ( Map . Entry < String , List < String > > entry : fatherMap . entrySet ( ) ) {
boolean contains = false ;
for ( String fatherId : entry . getValue ( ) ) {
if ( list . contains ( fatherId ) ) {
contains = true ;
break ;
}
}
if ( ! contains ) continue ;
RiskPersonal personal = personalMap . get ( entry . getKey ( ) ) ;
if ( personal = = null ) continue ;
if ( idCode . get ( domicileType . getGmsfhm ( ) ) ! = null ) continue ;
if ( oldMap . get ( domicileType . getGmsfhm ( ) ) ! = null ) continue ;
if ( idCode . get ( entry . getKey ( ) ) ! = null ) continue ;
if ( oldMap . get ( entry . getKey ( ) ) ! = null ) continue ;
idCode . put ( domicileType . getGmsfhm ( ) , 1 ) ;
idCode . put ( entry . getKey ( ) , 1 ) ;
ClueData data = ClueData . builder ( )
. name ( personal . getName ( ) )
. id ( personal . getId ( ) . toString ( ) )
@ -529,28 +539,38 @@ public class PointServiceImpl implements PointService {
Map < String , RiskModelTaskClue > oldMap = domain . getOldMap ( task . getModelId ( ) , true ) ;
Map < String , Integer > idCode = new HashMap < > ( ) ;
List < GBaseCSCZRK > list = new ArrayList < > ( ) ;
List < String > list = new ArrayList < > ( ) ;
log . info ( "模型120开始查询" ) ;
List < WdpcHZCRYXX > wdpcHZCRYXXS = hZCRYXXRepository . list ( new LambdaQueryWrapper < WdpcHZCRYXX > ( ) . select ( WdpcHZCRYXX : : getIdCode ) ) ;
List < GBaseCSCZRK > mother = cSCZRKRepository . getBaseMapper ( ) . selectMother ( ) ;
log . info ( "模型120查询mother结果数:{}" , mother . size ( ) ) ;
Map < String , List < String > > motherMap = mother . stream ( ) . collect ( Collectors . groupingBy ( GBaseCSCZRK : : getGmsfhm ,
Collectors . mapping ( GBaseCSCZRK : : getMotherId , Collectors . toList ( ) ) ) ) ;
List < String > motherList = mother . stream ( ) . map ( GBaseCSCZRK : : getMotherId ) . toList ( ) ;
// 切割 每次查10000条
List < List < WdpcHZCRYXX > > wdpcHZCRYXXSParts = IntStream . range ( 0 , ( wdpcHZCRYXXS . size ( ) + 9999 ) / 10000 )
. mapToObj ( i - > wdpcHZCRYXXS . subList ( i * 10000 , Math . min ( ( i + 1 ) * 10000 , wdpcHZCRYXXS . size ( ) ) ) )
List < List < String > > motherList Parts = IntStream . range ( 0 , ( motherList . size ( ) + 9999 ) / 10000 )
. mapToObj ( i - > motherList . subList ( i * 10000 , Math . min ( ( i + 1 ) * 10000 , motherList . size ( ) ) ) )
. toList ( ) ;
for ( List < WdpcHZCRYXX > wdpcHZCRYXXSPart : wdpcHZCRYXXSParts ) {
List < String > ids = wdpcHZCRYXXSPart . stream ( ) . map ( WdpcHZCRYXX : : getIdCode ) . toList ( ) ;
list . addAll ( cSCZRKRepository . getBaseMapper ( ) . selectMotherDiePeople ( ids ) ) ;
for ( List < String > motherListPart : motherListParts ) {
list . addAll ( hZCRYXXRepository . getBaseMapper ( ) . selectHZCPeople ( motherListPart ) ) ;
}
log . info ( "模型120查询结果数:{}" , list . size ( ) ) ;
Map < String , RiskPersonal > personalMap = domain . getPersons ( ) . stream ( ) . collect ( Collectors . toMap ( RiskPersonal : : getIdCode , Function . identity ( ) , ( old , newVal ) - > newVal ) ) ;
List < RiskModelTaskClue > toInsert = new ArrayList < > ( ) ;
for ( GBaseCSCZRK domicileType : list ) {
RiskPersonal personal = personalMap . get ( domicileType . getGmsfhm ( ) ) ;
for ( Map . Entry < String , List < String > > entry : motherMap . entrySet ( ) ) {
boolean contains = false ;
for ( String motherId : entry . getValue ( ) ) {
if ( list . contains ( motherId ) ) {
contains = true ;
break ;
}
}
if ( ! contains ) continue ;
RiskPersonal personal = personalMap . get ( entry . getKey ( ) ) ;
if ( personal = = null ) continue ;
if ( idCode . get ( domicileType . getGmsfhm ( ) ) ! = null ) continue ;
if ( oldMap . get ( domicileType . getGmsfhm ( ) ) ! = null ) continue ;
if ( idCode . get ( entry . getKey ( ) ) ! = null ) continue ;
if ( oldMap . get ( entry . getKey ( ) ) ! = null ) continue ;
idCode . put ( domicileType . getGmsfhm ( ) , 1 ) ;
idCode . put ( entry . getKey ( ) , 1 ) ;
ClueData data = ClueData . builder ( )
. name ( personal . getName ( ) )
. id ( personal . getId ( ) . toString ( ) )
@ -1351,28 +1371,38 @@ public class PointServiceImpl implements PointService {
Map < String , RiskModelTaskClue > oldMap = domain . getOldMap ( task . getModelId ( ) , true ) ;
Map < String , Integer > idCode = new HashMap < > ( ) ;
List < GBaseCSCZRK > list = new ArrayList < > ( ) ;
List < String > list = new ArrayList < > ( ) ;
log . info ( "模型118开始查询" ) ;
List < WdpcHZCRYXX > wdpcHZCRYXXS = hZCRYXXRepository . list ( new LambdaQueryWrapper < WdpcHZCRYXX > ( ) . select ( WdpcHZCRYXX : : getIdCode ) ) ;
List < GBaseCSCZRK > familyPeople = cSCZRKRepository . getBaseMapper ( ) . selectFamilyPeople ( ) ;
log . info ( "模型118查询familyPeople结果数:{}" , familyPeople . size ( ) ) ;
Map < String , List < String > > familyMap = familyPeople . stream ( ) . collect ( Collectors . groupingBy ( GBaseCSCZRK : : getGmsfhm ,
Collectors . mapping ( GBaseCSCZRK : : getFamilyId , Collectors . toList ( ) ) ) ) ;
List < String > familyList = familyPeople . stream ( ) . map ( GBaseCSCZRK : : getFamilyId ) . toList ( ) ;
// 切割 每次查10000条
List < List < WdpcHZCRYXX > > wdpcHZCRYXXSParts = IntStream . range ( 0 , ( wdpcHZCRYXXS . size ( ) + 9999 ) / 10000 )
. mapToObj ( i - > wdpcHZCRYXXS . subList ( i * 10000 , Math . min ( ( i + 1 ) * 10000 , wdpcHZCRYXXS . size ( ) ) ) )
List < List < String > > familyList Parts = IntStream . range ( 0 , ( familyList . size ( ) + 9999 ) / 10000 )
. mapToObj ( i - > familyList . subList ( i * 10000 , Math . min ( ( i + 1 ) * 10000 , familyList . size ( ) ) ) )
. toList ( ) ;
for ( List < WdpcHZCRYXX > wdpcHZCRYXXSPart : wdpcHZCRYXXSParts ) {
List < String > ids = wdpcHZCRYXXSPart . stream ( ) . map ( WdpcHZCRYXX : : getIdCode ) . toList ( ) ;
list . addAll ( cSCZRKRepository . getBaseMapper ( ) . selectFamilyDiePeople ( ids ) ) ;
for ( List < String > familyListPart : familyListParts ) {
list . addAll ( hZCRYXXRepository . getBaseMapper ( ) . selectHZCPeople ( familyListPart ) ) ;
}
log . info ( "模型118查询结果数:{}" , list . size ( ) ) ;
Map < String , RiskPersonal > personalMap = domain . getPersons ( ) . stream ( ) . collect ( Collectors . toMap ( RiskPersonal : : getIdCode , Function . identity ( ) , ( old , newVal ) - > newVal ) ) ;
List < RiskModelTaskClue > toInsert = new ArrayList < > ( ) ;
for ( GBaseCSCZRK domicileType : list ) {
RiskPersonal personal = personalMap . get ( domicileType . getGmsfhm ( ) ) ;
for ( Map . Entry < String , List < String > > entry : familyMap . entrySet ( ) ) {
boolean contains = false ;
for ( String familyId : entry . getValue ( ) ) {
if ( list . contains ( familyId ) ) {
contains = true ;
break ;
}
}
if ( ! contains ) continue ;
RiskPersonal personal = personalMap . get ( entry . getKey ( ) ) ;
if ( personal = = null ) continue ;
if ( idCode . get ( domicileType . getGmsfhm ( ) ) ! = null ) continue ;
if ( oldMap . get ( domicileType . getGmsfhm ( ) ) ! = null ) continue ;
if ( idCode . get ( entry . getKey ( ) ) ! = null ) continue ;
if ( oldMap . get ( entry . getKey ( ) ) ! = null ) continue ;
idCode . put ( domicileType . getGmsfhm ( ) , 1 ) ;
idCode . put ( entry . getKey ( ) , 1 ) ;
ClueData data = ClueData . builder ( )
. name ( personal . getName ( ) )
. id ( personal . getId ( ) . toString ( ) )