|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace App\Service;
|
|
namespace App\Service;
|
|
|
|
|
|
|
|
+use App\Model\Record;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
|
|
class U8ServerService extends Service
|
|
class U8ServerService extends Service
|
|
@@ -60,6 +61,7 @@ class U8ServerService extends Service
|
|
->orderBy('a.ID','desc');
|
|
->orderBy('a.ID','desc');
|
|
|
|
|
|
$list = $this->limit($model,'',$data);
|
|
$list = $this->limit($model,'',$data);
|
|
|
|
+ $list = $this->fillAll($list, 3);
|
|
|
|
|
|
return [true , $list];
|
|
return [true , $list];
|
|
}
|
|
}
|
|
@@ -111,6 +113,7 @@ class U8ServerService extends Service
|
|
->orderBy('a.POID','desc');
|
|
->orderBy('a.POID','desc');
|
|
|
|
|
|
$list = $this->limit($model,'',$data);
|
|
$list = $this->limit($model,'',$data);
|
|
|
|
+ $list = $this->fillAll($list, 1);
|
|
|
|
|
|
return [true , $list];
|
|
return [true , $list];
|
|
}
|
|
}
|
|
@@ -162,6 +165,7 @@ class U8ServerService extends Service
|
|
->orderBy('a.PID','desc');
|
|
->orderBy('a.PID','desc');
|
|
|
|
|
|
$list = $this->limit($model,'',$data);
|
|
$list = $this->limit($model,'',$data);
|
|
|
|
+ $list = $this->fillAll($list, 3);
|
|
|
|
|
|
return [true , $list];
|
|
return [true , $list];
|
|
}
|
|
}
|
|
@@ -202,4 +206,22 @@ class U8ServerService extends Service
|
|
|
|
|
|
return [$success, $order];
|
|
return [$success, $order];
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ private function fillAll($list, $type){
|
|
|
|
+ if(empty($list['data'])) return $list;
|
|
|
|
+
|
|
|
|
+ $map = Record::where('del_time',0)
|
|
|
|
+ ->where('type', $type)
|
|
|
|
+ ->whereIn('order_number',array_column($list['data'],'order_number'))
|
|
|
|
+ ->pluck('id','order_number')
|
|
|
|
+ ->toArray();
|
|
|
|
+
|
|
|
|
+ foreach ($list['data'] as $key => $value){
|
|
|
|
+ $is_create = 0;
|
|
|
|
+ if(isset($map[$value->order_number])) $is_create = 1;
|
|
|
|
+ $list['data'][$key]->is_create = $is_create;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return $list;
|
|
|
|
+ }
|
|
}
|
|
}
|