@ -284,11 +284,10 @@ public class BusinessAlertServiceImpl implements IBusinessAlertService {
return new TableDataInfo < > ( ) ;
}
wrapper . notIn ( "t.flowStatus" , BusinessStatusEnum . CANCEL . getStatus ( ) ) ;
wrapper . eq ( "t.handle_type" , BusinessStatusEnum . FINISH . getStatus ( ) ) ;
wrapper . apply ( " EXISTS(select * from dk_workflow.flow_his_task ht where ht.approver ='" + LoginHelper . getUserId ( ) + "' and ht.instance_id = t.instanceId)" ) ;
Page < BusinessAlert > page = this . baseMapper . pageAlertFinish ( pageQuery . build ( ) , wrapper ) ;
Page < BusinessAlert > page = this . baseMapper . pageBusiness AlertFinish ( pageQuery . build ( ) , wrapper ) ;
try {
page . getRecords ( ) . forEach ( businessAlertVo - > {
@ -360,6 +359,38 @@ public class BusinessAlertServiceImpl implements IBusinessAlertService {
return TableDataInfo . build ( page ) ;
}
@Override
public TableDataInfo < BusinessAlert > pageBusinessAlertHandle ( BusinessAlertBo bo , PageQuery pageQuery ) {
QueryWrapper < BusinessAlert > wrapper = buildQueryWrapper ( bo ) ;
if ( ObjectUtil . isEmpty ( wrapper ) ) {
return new TableDataInfo < > ( ) ;
}
wrapper . notIn ( "t.flowStatus" , BusinessStatusEnum . CANCEL . getStatus ( ) ) ;
wrapper . apply ( " EXISTS(select * from dk_workflow.flow_his_task ht where ht.approver ='" + LoginHelper . getUserId ( ) + "' and ht.instance_id = t.instanceId)" ) ;
Page < BusinessAlert > page = this . baseMapper . pageBusinessAlertHandle ( pageQuery . build ( ) , wrapper ) ;
try {
page . getRecords ( ) . forEach ( businessAlertVo - > {
if ( businessAlertVo . getBusinessType ( ) = = 2 ) {
businessAlertVo . setImages ( MinioUntil . getObjectUrlOne ( MinIOConstants . BUCKET_DKCY , businessAlertVo . getImages ( ) , 3600 ) . toString ( ) ) ;
} else {
businessAlertVo . setImages ( MinioUntil . getObjectUrlOne ( MinIOConstants . BUCKET_ALERT , businessAlertVo . getImages ( ) , 3600 ) . toString ( ) ) ;
businessAlertVo . setMaxImages ( MinioUntil . getObjectUrlOne ( MinIOConstants . BUCKET_ALERT , businessAlertVo . getMaxImages ( ) , 3600 ) . toString ( ) ) ;
businessAlertVo . setMaxMateSourceImgUrl ( MinioUntil . getObjectUrlOne ( MinIOConstants . BUCKET_ALERT , businessAlertVo . getMaxMateSourceImgUrl ( ) , 3600 ) . toString ( ) ) ;
businessAlertVo . setMateSourceImgUrl ( MinioUntil . getObjectUrlOne ( MinIOConstants . BUCKET_ALERT , businessAlertVo . getMateSourceImgUrl ( ) , 3600 ) . toString ( ) ) ;
}
} ) ;
} catch ( Exception e ) {
log . error ( e . getMessage ( ) , e ) ;
}
return TableDataInfo . build ( page ) ;
}
/ * *
* 构建wrapper