|
@@ -17,6 +17,7 @@ class DesktopDeviceJob implements ShouldQueue
|
|
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
|
|
|
|
|
protected $data;
|
|
|
+ protected $url;
|
|
|
|
|
|
/**
|
|
|
* Create a new job instance.
|
|
@@ -26,6 +27,7 @@ class DesktopDeviceJob implements ShouldQueue
|
|
|
public function __construct($data)
|
|
|
{
|
|
|
$this->data = $data;
|
|
|
+ $this->url = config('ip.zs');
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -47,7 +49,7 @@ class DesktopDeviceJob implements ShouldQueue
|
|
|
|
|
|
$dispatchList = $this->getDispatchList($order_num);
|
|
|
if(empty($dispatchList) || empty($dispatchList['content'])) return;
|
|
|
- $this->completionOrders($dispatchList);
|
|
|
+ $this->completionOrders($dispatchList,$first);
|
|
|
|
|
|
file_put_contents('send_record.txt',date('Y-m-d H:i:s').$order_num . PHP_EOL,8);
|
|
|
}
|
|
@@ -64,7 +66,7 @@ class DesktopDeviceJob implements ShouldQueue
|
|
|
list($status,$token) = ClearDataService::getToken();
|
|
|
if(! $status) return;
|
|
|
|
|
|
- $url = 'http://121.36.142.167:7774/jbl/api/module-data/dispatch_orders/page';
|
|
|
+ $url = $this->url . 'jbl/api/module-data/dispatch_orders/page';
|
|
|
$post = [
|
|
|
'direction' => 'DESC',
|
|
|
'property' => 'id',
|
|
@@ -105,7 +107,7 @@ class DesktopDeviceJob implements ShouldQueue
|
|
|
return json_decode($response,true);
|
|
|
}
|
|
|
|
|
|
- public function completionOrders($data){
|
|
|
+ public function completionOrders($data,$tag){
|
|
|
list($status,$token) = ClearDataService::getToken();
|
|
|
if(! $status) return;
|
|
|
|
|
@@ -176,20 +178,21 @@ class DesktopDeviceJob implements ShouldQueue
|
|
|
"process_id_show" => $first['process_id_show'],
|
|
|
"team_id_show" => $first['team_id_show'],
|
|
|
"equipment_id_show" => $first['equipment_id_show'],
|
|
|
- "employee_id_show" => $first['employee_id_show']
|
|
|
+ "employee_id_show" => $first['employee_id_show'],
|
|
|
+ "tag" => $tag
|
|
|
];
|
|
|
$post = [
|
|
|
"bizTypeEk" => "LOWCODE",
|
|
|
"bizId" => -1,
|
|
|
"data" => [
|
|
|
"completion_orders_dtl" => $completion_orders_dtl,
|
|
|
- "completion_orders" => $completion_orders
|
|
|
+ "completion_orders" => $completion_orders,
|
|
|
],
|
|
|
"dynamicFormId" => "474201923419320320",
|
|
|
"showModelId" => "474382714828959744"
|
|
|
];
|
|
|
//组织数据------
|
|
|
- $url = 'http://121.36.142.167:7774/jbl/api/module-data/completion_orders/completion_orders';
|
|
|
+ $url = $this->url . 'jbl/api/module-data/completion_orders/completion_orders';
|
|
|
$header = ["Authorization: Bearer {$token}","Content-Type:application/json",'Site:91451322MA5P9JNKXA'];
|
|
|
|
|
|
$curl = curl_init();
|