|
@@ -106,34 +106,7 @@ class Report extends CatchController
|
|
|
return CatchResponse::success($data);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 风场设备统计
|
|
|
- * @param Request $request
|
|
|
- */
|
|
|
- public function windCount(Request $request)
|
|
|
- {
|
|
|
- $list =array(
|
|
|
- ['name'=>'风场1','total'=>103,'online'=>20,'offline'=>40],
|
|
|
- ['name'=>'风场2','total'=>103,'online'=>20,'offline'=>40],
|
|
|
- ['name'=>'风场3','total'=>42,'online'=>20,'offline'=>40],
|
|
|
- ['name'=>'风场4','total'=>10,'online'=>20,'offline'=>40],
|
|
|
- ['name'=>'风场5','total'=>103,'online'=>20,'offline'=>40],
|
|
|
- ['name'=>'风场6','total'=>103,'online'=>20,'offline'=>40],
|
|
|
- ['name'=>'风场7','total'=>123,'online'=>20,'offline'=>40],
|
|
|
- ['name'=>'风场8','total'=>103,'online'=>20,'offline'=>40],
|
|
|
- ['name'=>'风场9','total'=>103,'online'=>20,'offline'=>40],
|
|
|
-
|
|
|
- );
|
|
|
- $xdata=['风场1','风场2','风场3','风场4','风场5','风场6','风场7','风场8','风场9',];
|
|
|
- $ydata=[20,30,49,20,56,54,87,23,69];
|
|
|
-
|
|
|
- $data=array(
|
|
|
- 'list'=>$list,
|
|
|
- 'xdata'=>$xdata,
|
|
|
- 'ydata'=>$ydata,
|
|
|
- );
|
|
|
- return CatchResponse::success($data);
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 告警统计
|
|
@@ -142,27 +115,35 @@ class Report extends CatchController
|
|
|
public function alarmDeviceCount(Request $request)
|
|
|
{
|
|
|
$list =array(
|
|
|
- ['type'=>'液压泵','name'=>'测试设备1','number'=>20210618,'online_time'=>'2022-06-23 11:10:11','address'=>'杭州滨江','unused_days'=>5,'remarks'=>''],
|
|
|
- ['type'=>'液压泵','name'=>'测试设备1','number'=>20210618,'online_time'=>'2022-06-23 11:10:11','address'=>'杭州滨江','unused_days'=>3,'remarks'=>''],
|
|
|
- ['type'=>'液压泵','name'=>'测试设备1','number'=>20210618,'online_time'=>'2022-06-23 11:10:11','address'=>'杭州滨江','unused_days'=>2,'remarks'=>''],
|
|
|
- ['type'=>'液压泵','name'=>'测试设备1','number'=>20210618,'online_time'=>'2022-06-23 11:10:11','address'=>'杭州滨江','unused_days'=>4,'remarks'=>''],
|
|
|
- ['type'=>'液压泵','name'=>'测试设备1','number'=>20210618,'online_time'=>'2022-06-23 11:10:11','address'=>'杭州滨江','unused_days'=>1,'remarks'=>''],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备1','number'=>20210618,'online_time'=>'2022-06-23 11:10:11','address'=>'杭州滨江','code'=>'ERROR_CODE','comment'=>'液压油偏低','remarks'=>''],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备1','number'=>20210618,'online_time'=>'2022-06-23 11:10:11','address'=>'杭州滨江','code'=>'ERROR_CODE','comment'=>'液压油偏低','remarks'=>''],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备1','number'=>20210618,'online_time'=>'2022-06-23 11:10:11','address'=>'杭州滨江','code'=>'ERROR_CODE','comment'=>'液压油偏低','remarks'=>''],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备1','number'=>20210618,'online_time'=>'2022-06-23 11:10:11','address'=>'杭州滨江','code'=>'ERROR_CODE','comment'=>'液压油偏低','remarks'=>''],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备1','number'=>20210618,'online_time'=>'2022-06-23 11:10:11','address'=>'杭州滨江','code'=>'ERROR_CODE','comment'=>'液压油偏低','remarks'=>''],
|
|
|
|
|
|
);
|
|
|
|
|
|
$pie_dataA=array(
|
|
|
- ['name'=>'有效期内','value'=>15],
|
|
|
- ['name'=>'已失效(小于15天)','value'=>4],
|
|
|
+ ['name'=>'故障设备','value'=>15],
|
|
|
+ ['name'=>'未出现故障设备','value'=>4],
|
|
|
);
|
|
|
|
|
|
$pie_dataB=array(
|
|
|
- ['name'=>'有效使用(大于45天)','value'=>13],
|
|
|
- ['name'=>'警告失效(15~45天)','value'=>2],
|
|
|
- ['name'=>'失效(0~15天)','value'=>4],
|
|
|
+ ['name'=>'液压油偏低','value'=>10],
|
|
|
+ ['name'=>'扳手校验不合格','value'=>8],
|
|
|
+ ['name'=>'液压泵校验过期','value'=>6],
|
|
|
+ ['name'=>'扳手外观不合格','value'=>5],
|
|
|
+ ['name'=>'设备异常','value'=>4],
|
|
|
+ ['name'=>'其他','value'=>3],
|
|
|
+
|
|
|
);
|
|
|
$pie_dataC=array(
|
|
|
- ['name'=>'已维护','value'=>15],
|
|
|
- ['name'=>'未维护','value'=>4],
|
|
|
+ ['name'=>' 测试设备1','value'=>9],
|
|
|
+ ['name'=>' 测试设备2','value'=>8],
|
|
|
+ ['name'=>' 测试设备3','value'=>7],
|
|
|
+ ['name'=>' 测试设备4','value'=>5],
|
|
|
+ ['name'=>' 测试设备5','value'=>4],
|
|
|
+ ['name'=>' 其他设备','value'=>3],
|
|
|
);
|
|
|
|
|
|
$data=array(
|
|
@@ -174,45 +155,39 @@ class Report extends CatchController
|
|
|
return CatchResponse::success($data);
|
|
|
}
|
|
|
/**
|
|
|
- * 告警统计
|
|
|
+ * 作业记录统计
|
|
|
* @param Request $request
|
|
|
*/
|
|
|
- public function companyCount(Request $request)
|
|
|
+ public function workCount(Request $request)
|
|
|
{
|
|
|
$list =array(
|
|
|
- ['type'=>'测试部门1','name'=>'液压泵','value'=>100],
|
|
|
- ['type'=>'测试部门1','name'=>'液压扳手','value'=>120],
|
|
|
- ['type'=>'测试部门1','name'=>'风机','value'=>30],
|
|
|
- ['type'=>'测试部门1','name'=>'总数','value'=>250],
|
|
|
-
|
|
|
- ['type'=>'测试部门2','name'=>'液压泵','value'=>100],
|
|
|
- ['type'=>'测试部门2','name'=>'液压扳手','value'=>120],
|
|
|
- ['type'=>'测试部门2','name'=>'风机','value'=>30],
|
|
|
- ['type'=>'测试部门2','name'=>'总数','value'=>250],
|
|
|
-
|
|
|
- ['type'=>'测试部门3','name'=>'液压泵','value'=>100],
|
|
|
- ['type'=>'测试部门3','name'=>'液压扳手','value'=>120],
|
|
|
- ['type'=>'测试部门3','name'=>'风机','value'=>30],
|
|
|
- ['type'=>'测试部门3','name'=>'总数','value'=>250],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备1','number'=>20210618,'wind_name'=>'风场A','fan_num'=>20,'bolt_num'=>40,'remarks'=>''],
|
|
|
+
|
|
|
);
|
|
|
- $bar_data=array(
|
|
|
- 'xData'=>['测试部门1','测试部门2','测试部门3'],
|
|
|
- 'pump_yData'=>[120,120,130],
|
|
|
- 'wrench_yData'=>[40,150,90],
|
|
|
- 'flange_yData'=>[100,80,30],
|
|
|
+
|
|
|
+ $pie_dataB=array(
|
|
|
+ ['name'=>' 测试设备1','value'=>9],
|
|
|
+ ['name'=>' 测试设备2','value'=>8],
|
|
|
+ ['name'=>' 测试设备3','value'=>7],
|
|
|
+ ['name'=>' 测试设备4','value'=>5],
|
|
|
+ ['name'=>' 测试设备5','value'=>4],
|
|
|
+ ['name'=>' 其他设备','value'=>3],
|
|
|
+
|
|
|
);
|
|
|
- $pump_pie=array(
|
|
|
- ['name'=>'电量告警','value'=>100],
|
|
|
- ['name'=>'液压油偏低','value'=>120],
|
|
|
- ['name'=>'液压油偏高','value'=>30],
|
|
|
+ $pie_dataC=array(
|
|
|
+ ['name'=>' 风场A','value'=>9],
|
|
|
+ ['name'=>' 风场B','value'=>8],
|
|
|
+ ['name'=>' 风场C','value'=>7],
|
|
|
+ ['name'=>' 风场D','value'=>5],
|
|
|
+ ['name'=>' 风场E','value'=>4],
|
|
|
+ ['name'=>' 其他风场','value'=>3],
|
|
|
);
|
|
|
-
|
|
|
-
|
|
|
|
|
|
$data=array(
|
|
|
'list'=>$list,
|
|
|
- 'bar_data'=>$bar_data,
|
|
|
- 'pump_pie'=>$pump_pie,
|
|
|
+
|
|
|
+ 'pie_dataB'=>$pie_dataB,
|
|
|
+ 'pie_dataC'=>$pie_dataC,
|
|
|
);
|
|
|
return CatchResponse::success($data);
|
|
|
}
|
|
@@ -223,30 +198,34 @@ class Report extends CatchController
|
|
|
public function maintainCount(Request $request)
|
|
|
{
|
|
|
$list =array(
|
|
|
- ['type'=>'法兰','name'=>'总数','value'=>250],
|
|
|
- ['type'=>'法兰','name'=>'及格','value'=>200],
|
|
|
- ['type'=>'法兰','name'=>'不及格','value'=>50],
|
|
|
- );
|
|
|
- $pump_bar=array(
|
|
|
- 'xData'=>['总数','紧固及格','紧固不及格'],
|
|
|
- 'yData'=>[250,200,50],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备1','number'=>20210618,'online_time'=>'2022-06-23 11:10:11','address'=>'杭州滨江','unused_days'=>5,'remarks'=>''],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备1','number'=>20210618,'online_time'=>'2022-06-23 11:10:11','address'=>'杭州滨江','unused_days'=>3,'remarks'=>''],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备1','number'=>20210618,'online_time'=>'2022-06-23 11:10:11','address'=>'杭州滨江','unused_days'=>2,'remarks'=>''],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备1','number'=>20210618,'online_time'=>'2022-06-23 11:10:11','address'=>'杭州滨江','unused_days'=>4,'remarks'=>''],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备1','number'=>20210618,'online_time'=>'2022-06-23 11:10:11','address'=>'杭州滨江','unused_days'=>1,'remarks'=>''],
|
|
|
+
|
|
|
);
|
|
|
- $pump_pie=[
|
|
|
- ['name'=>'紧固及格','value'=>200],
|
|
|
- ['name'=>'紧固不及格','value'=>50]
|
|
|
- ];
|
|
|
-
|
|
|
- $list_type = array(
|
|
|
- 'xData'=>['c1','c2','c3','c4'],
|
|
|
- 'yData'=>[250,200,50,40],
|
|
|
|
|
|
+ $pie_dataA=array(
|
|
|
+ ['name'=>'有效期内','value'=>15],
|
|
|
+ ['name'=>'已失效(小于15天)','value'=>4],
|
|
|
+ );
|
|
|
+
|
|
|
+ $pie_dataB=array(
|
|
|
+ ['name'=>'有效使用(大于45天)','value'=>13],
|
|
|
+ ['name'=>'警告失效(15~45天)','value'=>2],
|
|
|
+ ['name'=>'失效(0~15天)','value'=>4],
|
|
|
+ );
|
|
|
+ $pie_dataC=array(
|
|
|
+ ['name'=>'已维护','value'=>15],
|
|
|
+ ['name'=>'未维护','value'=>4],
|
|
|
);
|
|
|
-
|
|
|
|
|
|
$data=array(
|
|
|
'list'=>$list,
|
|
|
- 'pump_bar'=>$pump_bar,
|
|
|
- 'pump_pie'=>$pump_pie,
|
|
|
+ 'pie_dataA'=>$pie_dataA,
|
|
|
+ 'pie_dataB'=>$pie_dataB,
|
|
|
+ 'pie_dataC'=>$pie_dataC,
|
|
|
);
|
|
|
return CatchResponse::success($data);
|
|
|
}
|