更新
This commit is contained in:
parent
f4fe0139d1
commit
f3b14a944f
@ -32,7 +32,7 @@ class CompanyValidate extends BaseValidate
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require',
|
||||
'company_name' => 'require',
|
||||
'company_name' => 'require|unique:Company',
|
||||
'organization_code' => 'require',
|
||||
'master_name' => 'require',
|
||||
'master_position' => 'require',
|
||||
|
@ -31,8 +31,8 @@ class CeshiController extends BaseApiController
|
||||
$time=strtotime(date('Y-m-d'));
|
||||
// $time=strtotime(date('Y-m-d'));
|
||||
// $tiem_end=$time+86399;
|
||||
// $all=TaskTemplate::where('cron_time','<',$time)->where('status',1)->with('company')->select()->toArray();
|
||||
$all=TaskTemplate::where('id',73)->with('company')->select()->toArray();
|
||||
$all=TaskTemplate::where('cron_time','<',$time)->where('status',1)->with('company')->select()->toArray();
|
||||
// $all=TaskTemplate::where('id',73)->with('company')->select()->toArray();
|
||||
// $all=TaskSchedulingPlan::where('start_time','between',[$time,$tiem_end])->where('is_execute',0)->with(['template_info','scheduling'])->select()->toArray();
|
||||
$company_id=0;
|
||||
foreach($all as $k=>$v){
|
||||
@ -47,13 +47,17 @@ class CeshiController extends BaseApiController
|
||||
'start_time'=>'2023-08-18',
|
||||
'end_time'=>'2023-08-18 23:59:59'
|
||||
];
|
||||
$task=Task::where('id',485)->select()->toArray();
|
||||
$task=Task::where('id',487)->select()->toArray();
|
||||
foreach($task as $k=>$v){
|
||||
if(isset($v['extend']['terminus']['lnglat'])&& isset($v['extend']['transfer']['lnglat'])){
|
||||
$arr=$v['extend']['terminus']['lnglat'];
|
||||
app(RemoteController::class)->coordinate($params,$arr[0],$arr[1]);
|
||||
$a=app(RemoteController::class)->coordinate($params,$arr[0],$arr[1]);
|
||||
|
||||
$arr_two=$v['extend']['transfer']['lnglat'];
|
||||
app(RemoteController::class)->coordinate($params,$arr_two[0],$arr_two[1]);
|
||||
$b=app(RemoteController::class)->coordinate($params,$arr_two[0],$arr_two[1]);
|
||||
if($a<500 && $b<500){
|
||||
Task::where('id',$v['id'])->update(['status'=>3]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user