@ -135,14 +135,16 @@ public class ReportServiceImpl implements ReportService {
//获取线索名
String clueName = null ;
List < String > label = new ArrayList < > ( ) ;
String remark = null ;
if ( clueMap . containsKey ( key ) ) {
ResSourceLabel resSourceLabel = clueMap . get ( key ) ;
clueName = resSourceLabel . getName ( ) ;
remark = resSourceLabel . getRemark ( ) ;
label = JSONUtil . toList ( JSONUtil . parseArray ( resSourceLabel . getSourceLabel ( ) ) , String . class ) ;
}
LinkedList < Object > linkedList = getDownLoadTaskInfo ( clueName , list ) ;
linkedList . add ( remark ) ;
for ( String l : baseLabel ) {
if ( label . size ( ) > 0 & & label . contains ( l ) ) {
linkedList . add ( "√" ) ;
@ -416,10 +418,11 @@ public class ReportServiceImpl implements ReportService {
* /
private StatisticalReportDTO getStatisticalReportDTO ( StatisticalReportDTO s ) {
List < Long > ids = s . getIds ( ) ;
Long userId = companyService . findById ( s . getCompanyId ( ) ) . getUserId ( ) ;
s . setUserId ( userId ) ;
if ( CollUtil . isEmpty ( ids ) ) {
ids = new ArrayList < > ( ) ;
Long userId = companyService . findById ( s . getCompanyId ( ) ) . getUserId ( ) ;
s . setUserId ( userId ) ;
log . debug ( "==================== the userId as {} ====================" , userId ) ;
getTaskId ( ids , userId ) ;
s . setIds ( ids ) ;
}
@ -503,7 +506,7 @@ public class ReportServiceImpl implements ReportService {
switch ( type ) {
case 2 :
int betweenDay = ( int ) DateUtil . between ( begin , end , DateUnit . DAY ) ;
for ( int i = 1 ; i < = betweenDay ; i + + ) {
for ( int i = 0 ; i < = betweenDay ; i + + ) {
Date dateTime = DateUtil . offsetDay ( begin , i ) ;
List < CallClueInfo > collect = callClueInfos . stream ( ) . filter ( c - > DateTimeUtil . betweenByDay ( dateTime , c . getCreateTime ( ) ) ) . collect ( Collectors . toList ( ) ) ;
map . put ( DateTimeUtil . getTimeType ( dateTime , type ) , collect ) ;
@ -517,7 +520,7 @@ public class ReportServiceImpl implements ReportService {
break ;
case 1 :
int betweenHour = ( int ) DateUtil . between ( begin , end , DateUnit . HOUR ) ;
for ( int i = 1 ; i < = betweenHour ; i + + ) {
for ( int i = 0 ; i < = betweenHour ; i + + ) {
Date dateTime = DateUtil . offsetHour ( begin , i ) ;
List < CallClueInfo > collectByHour = callClueInfos . stream ( ) . filter ( c - >
DateTimeUtil . betweenByHour ( dateTime , c . getCreateTime ( ) )
@ -559,10 +562,12 @@ public class ReportServiceImpl implements ReportService {
for ( Task info : tasks ) {
taskInfos . put ( info . getId ( ) , info ) ;
}
log . debug ( "================== the map size as {} ==================" , mapByTask . size ( ) ) ;
for ( Long key : mapByTask . keySet ( ) ) {
HashMap < String , Object > mapVo = new HashMap < String , Object > ( 16 ) ;
//按时间分
HashMap < String , List < CallClueInfo > > mapByTime = getGroupByTime ( s . getBeginTime ( ) , s . getEndTime ( ) , mapByTask . get ( key ) , s . getType ( ) ) ;
log . debug ( "================== the task json as {} ==================" , JSONUtil . toJsonStr ( taskInfos . get ( key ) ) ) ;
int total = taskInfos . get ( key ) . getTotalNumber ( ) ;
String taskName = taskInfos . get ( key ) . getTaskName ( ) ;