@ -199,23 +199,18 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
if ( ! Objects . isNull ( model ) & & model . getModelSql ( ) ! = null ) {
modelClues . addAll ( getModelClueBySql ( model . getModelSql ( ) , modelId ) ) ;
}
System . out . println ( "测试10" ) ;
if ( ! modelClues . isEmpty ( ) ) {
List < ModelClue > result = new ArrayList < > ( ) ;
for ( ModelClue modelClue : modelClues ) {
modelClue . setModelId ( modelId ) ;
modelClue . setCreateTime ( LocalDateTime . now ( ) ) ;
System . out . println ( "测试12" ) ;
if ( modelClue . getInvolveDepartName ( ) ! = null & & ! modelClue . getInvolveDepartName ( ) . isEmpty ( ) ) {
System . out . println ( "测试13" ) ;
result . add ( modelClue ) ;
}
}
System . out . println ( "测试14" ) ;
modelClueMapper . insert ( result ) ;
modelClueRecordMapper . insert ( new ModelClueRecord ( ) . setModelId ( modelId ) . setSize ( result . size ( ) ) . setCreateTime ( LocalDateTime . now ( ) ) . setState ( "success" ) ) ;
} else {
System . out . println ( "测试15" ) ;
modelClueRecordMapper . insert ( new ModelClueRecord ( ) . setModelId ( modelId ) . setSize ( 0 ) . setCreateTime ( LocalDateTime . now ( ) ) . setState ( "fail" ) . setErrMsg ( "数据为空" ) ) ;
}
}
@ -291,7 +286,6 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
}
setPerson ( modelId , modelClue , data ) ;
generateThingDesc ( modelId , modelClue , data ) ;
System . out . println ( "测试8" ) ;
break ;
}
}
@ -329,7 +323,7 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
}
if ( earliestJRSJ ! = null & & latestLKSJ ! = null ) {
Duration duration = Duration . between ( earliestDateTime , latestDateTime ) ;
if ( duration . toHours ( ) < 3 ) {
if ( duration . toHours ( ) > = 3 ) {
continue ;
}
Map < String , Object > newRecord = new HashMap < > ( ) ;
@ -562,7 +556,7 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
"发现" + data . get ( "gmrxm" ) + "(身份证号:" + data . get ( "zjhm" ) + ")于"
+ getDateMinuteString ( data . get ( "gmsj" ) ) + "在"
+ data . get ( "fjmc" ) + modelClue . getInvolveDepartName ( ) + "管辖的" + data . get ( "dwmc" )
+ "购买了" + data . get ( "gmsl" ) + "升" + data . get ( "jplx" ) + data . get ( " gmyt" )
+ "购买了" + data . get ( "gmsl" ) + "升" + data . get ( "gmyt" )
+ ",产生了" + data . get ( "yjlx" ) + ",请予以重点关注。" ) ;
}
}
@ -1000,9 +994,7 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
List < String > uniqueKeys = modelClues1 . stream ( ) . map ( ModelClue : : getUniqueKey ) . filter ( k - > k ! = null & & ! k . isEmpty ( ) ) . toList ( ) ;
if ( ! uniqueKeys . isEmpty ( ) ) {
String newSql = "SELECT a.* FROM dwd_asj_zhtx_jjd a LEFT JOIN dwd_asj_sjjhygx_jjcjxxb b ON b.BARLXDH = a.bjdh WHERE a.jjdbh IN " + "(" + uniqueKeys . stream ( ) . map ( k - > "'" + k + "'" ) . collect ( Collectors . joining ( "," ) ) + ");" ;
System . out . println ( "测试2开始查询数据库 newSql" ) ;
List < Map < String , Object > > allData = modelClueDataMapper . selectByUniqueKeys ( newSql ) ;
System . out . println ( "测试2查询数据库newSql记录条数:" + allData . size ( ) ) ;
for ( ModelClue modelClue : modelClues1 ) {
for ( Map < String , Object > data : allData ) {
String keyColumn = ( String ) data . get ( "jjdbh" ) ;