|
|
@@ -19,6 +19,7 @@ use app\common\logic\BaseLogic;
|
|
|
use app\common\service\ConfigService;
|
|
|
use app\common\service\FileService;
|
|
|
use app\common\model\asset\AssetInfo;
|
|
|
+use function Qiniu\arraySort;
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -171,19 +172,20 @@ class WorkbenchLogic extends BaseLogic
|
|
|
{
|
|
|
$num = [];
|
|
|
$date = [];
|
|
|
+ $j=16;
|
|
|
for ($i = 0; $i < 15; $i++) {
|
|
|
$where_start = strtotime("- " . $i . "day");
|
|
|
$date[] = date('m/d', $where_start);
|
|
|
- $search_date = date('Y-m-d', $where_start);
|
|
|
-// $where['lease_status'] = 3;
|
|
|
- $where['lease_expiration_time'] =$search_date;
|
|
|
-// var_dump($where);
|
|
|
-// var_dump('-----');
|
|
|
-// $asset_number = AssetInfo::where($where)->count();
|
|
|
- $num[$i] = rand(0,100);
|
|
|
-
|
|
|
+ $search_date[$j] = date('Y-m-d', $where_start);
|
|
|
+ $j--;
|
|
|
+ }
|
|
|
+ array_multisort( $search_date); // 先按年龄排序,再按名字排
|
|
|
+ foreach($search_date as $k=>$v){
|
|
|
+ $where['lease_status'] = 3;
|
|
|
+ $where['lease_expiration_time'] =$v;
|
|
|
+ $asset_number = AssetInfo::where($where)->count();
|
|
|
+ $num[$k] = $asset_number;
|
|
|
}
|
|
|
-// var_dump($num);die;
|
|
|
return [
|
|
|
'date' => $date,
|
|
|
'list' => [
|