|
@@ -62,40 +62,42 @@ class Report extends CatchController
|
|
|
public function hydraulicCount(Request $request)
|
|
|
{
|
|
|
$list =array(
|
|
|
- ['type'=>'液压泵','name'=>'在线','value'=>103],
|
|
|
- ['type'=>'液压泵','name'=>'离线','value'=>17],
|
|
|
- ['type'=>'液压泵','name'=>'其他','value'=>28],
|
|
|
- ['type'=>'液压泵','name'=>'总数','value'=>148],
|
|
|
-
|
|
|
- ['type'=>'液压扳手','name'=>'合格','value'=>140],
|
|
|
- ['type'=>'液压扳手','name'=>'不合格','value'=>24],
|
|
|
- ['type'=>'液压扳手','name'=>'总数','value'=>164],
|
|
|
- );
|
|
|
- $pump_bar=array(
|
|
|
- 'xData'=>['总数','B1','B2','B3','B4','B5',],
|
|
|
- 'yData'=>[250,100,20,30,60,40],
|
|
|
+ ['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=array(
|
|
|
- ['name'=>'在线','value'=>113],
|
|
|
- ['name'=>'离线','value'=>17],
|
|
|
- ['name'=>'其他','value'=>18],
|
|
|
+
|
|
|
+ $list20 =array(
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备2','number'=>20210618,'online_time'=>'2022-06-03 11:10:11','address'=>'杭州滨江','unused_days'=>20,'remarks'=>''],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备2','number'=>20210618,'online_time'=>'2022-06-03 11:10:11','address'=>'杭州滨江','unused_days'=>22,'remarks'=>''],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备2','number'=>20210618,'online_time'=>'2022-06-03 11:10:11','address'=>'杭州滨江','unused_days'=>22,'remarks'=>''],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备2','number'=>20210618,'online_time'=>'2022-06-03 11:10:11','address'=>'杭州滨江','unused_days'=>22,'remarks'=>''],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备2','number'=>20210618,'online_time'=>'2022-06-03 11:10:11','address'=>'杭州滨江','unused_days'=>22,'remarks'=>''],
|
|
|
);
|
|
|
- $wrench_bar=array(
|
|
|
- 'xData'=>['总数','A1','A2','A3','A4','A5',],
|
|
|
- 'yData'=>[230,103,17,50,35,25],
|
|
|
+
|
|
|
+ $list40 =array(
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备3','number'=>20210618,'online_time'=>'2022-06-13 11:10:11','address'=>'杭州滨江','unused_days'=>41,'remarks'=>''],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备3','number'=>20210618,'online_time'=>'2022-06-13 11:10:11','address'=>'杭州滨江','unused_days'=>41,'remarks'=>''],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备3','number'=>20210618,'online_time'=>'2022-06-13 11:10:11','address'=>'杭州滨江','unused_days'=>41,'remarks'=>''],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备3','number'=>20210618,'online_time'=>'2022-06-13 11:10:11','address'=>'杭州滨江','unused_days'=>41,'remarks'=>''],
|
|
|
+ ['type'=>'液压泵','name'=>'测试设备3','number'=>20210618,'online_time'=>'2022-06-13 11:10:11','address'=>'杭州滨江','unused_days'=>41,'remarks'=>''],
|
|
|
);
|
|
|
- $wrench_pie=array(
|
|
|
- ['name'=>'合格','value'=>103],
|
|
|
- ['name'=>'不合格','value'=>17],
|
|
|
|
|
|
+ $pie_data=array(
|
|
|
+ ['name'=>'正常使用','value'=>113],
|
|
|
+ ['name'=>'20+天未使用','value'=>17],
|
|
|
+ ['name'=>'40+天未使用','value'=>18],
|
|
|
);
|
|
|
+
|
|
|
|
|
|
$data=array(
|
|
|
'list'=>$list,
|
|
|
- 'pump_bar'=>$pump_bar,
|
|
|
- 'pump_pie'=>$pump_pie,
|
|
|
- 'wrench_bar'=>$wrench_bar,
|
|
|
- 'wrench_pie'=>$wrench_pie,
|
|
|
+ 'list20'=>$list20,
|
|
|
+ 'list40'=>$list40,
|
|
|
+ 'pie_data'=>$pie_data,
|
|
|
);
|
|
|
return CatchResponse::success($data);
|
|
|
}
|