@ -249,6 +249,8 @@ public class SysPropertynumController extends BaseController {
List < String > recentlySixMonth = ObtainLastSixMonthsUtil . getRecentlySixMonth ( ) ;
List < Long > yAxisData = new ArrayList < > ( ) ;
List < Long > yAxisDataWx = new ArrayList < > ( ) ;
List < Long > yAxisDataSb = new ArrayList < > ( ) ;
List < Long > yAxisDataWxSb = new ArrayList < > ( ) ;
recentlySixMonth . forEach ( month - > {
// 获取指定月份的最大日期
String lastDayOfMonth = ObtainLastSixMonthsUtil . getLastDayOfMonth ( month ) ;
@ -282,6 +284,33 @@ public class SysPropertynumController extends BaseController {
}
yAxisWx . set ( Long . valueOf ( countWx ) ) ;
yAxisDataWx . add ( yAxisWx . get ( ) ) ;
AtomicReference < Long > yAxisSb = new AtomicReference < > ( 0 L ) ;
PropertyManagerDTO tdProperty = new PropertyManagerDTO ( ) ;
tdProperty . setMinDayTime ( minDayTime ) ;
tdProperty . setMaxDayTime ( maxDayTime ) ;
tdProperty . setSecretsType ( "2" ) ;
tdProperty . setDestoryState ( "1" ) ;
Integer countSb = tdPropertyManagerService . countSecretsDestoryMonth ( tdProperty ) ;
if ( Objects . isNull ( countSb ) ) {
countSb = 0 ;
}
yAxisSb . set ( Long . valueOf ( countSb ) ) ;
yAxisDataSb . add ( yAxisSb . get ( ) ) ;
AtomicReference < Long > yAxisSbWx = new AtomicReference < > ( 0 L ) ;
PropertyManagerDTO tdPropertwx = new PropertyManagerDTO ( ) ;
tdPropertwx . setMinDayTime ( minDayTime ) ;
tdPropertwx . setMaxDayTime ( maxDayTime ) ;
tdPropertwx . setSecretsType ( "1" ) ;
Integer countSbWx = tdPropertyManagerService . countSecretsWxMonth ( tdPropertwx ) ;
if ( Objects . isNull ( countSbWx ) ) {
countSbWx = 0 ;
}
yAxisSbWx . set ( Long . valueOf ( countSbWx ) ) ;
yAxisDataWxSb . add ( yAxisSbWx . get ( ) ) ;
} ) ;
JSONObject obj = new JSONObject ( ) ;
obj . put ( "xAxisData" , recentlySixMonth . toArray ( ) ) ;
@ -289,6 +318,10 @@ public class SysPropertynumController extends BaseController {
obj . put ( "yAxisData" , yAxisData ) ;
//未销毁
obj . put ( "yAxisDataWx" , yAxisDataWx ) ;
//设备销毁
obj . put ( "yAxisDataSb" , yAxisDataSb ) ;
//设备未销毁
obj . put ( "yAxisDataWxSb" , yAxisDataWxSb ) ;
return AjaxResult . success ( obj ) ;
}