|
@@ -1,19 +1,22 @@
|
|
|
<?php
|
|
|
|
|
|
-use think\facade\Log;
|
|
|
class queue_logic
|
|
|
{
|
|
|
public function OpenBox($params) {
|
|
|
+ global $config;
|
|
|
Log::record($params);
|
|
|
$box_list[] = $params['box_number'];
|
|
|
+
|
|
|
$postData['cabinet_code'] = $params['cabinet_number'];
|
|
|
$postData['box_position_list'] = $box_list;
|
|
|
$postData['delay_time'] = 0;
|
|
|
+
|
|
|
$return = http_post($params['req_url'] , $postData);
|
|
|
$return['code'] = 'ok';
|
|
|
if($return['code'] != 0){
|
|
|
$return['value'] = 'error';
|
|
|
}
|
|
|
+
|
|
|
$this->push_queue_return($params['ret_queue'] , $config['net_queue']['host'] , $config['net_queue']['port'] , $return);
|
|
|
}
|
|
|
|
|
@@ -22,11 +25,13 @@ class queue_logic
|
|
|
$postData['cabinet_code'] = $params['cabinet_number'];
|
|
|
$postData['box_position_list'] = $box_list;
|
|
|
$postData['delay_time'] = 0;
|
|
|
+
|
|
|
$return = http_post($params['req_url'] , $postData);
|
|
|
$return['code'] = 'ok';
|
|
|
if($return['code'] != 0){
|
|
|
$return['value'] = 'error';
|
|
|
}
|
|
|
+
|
|
|
$this->push_queue_return($params['ret_queue'] , $config['net_queue']['host'] , $config['net_queue']['port'] , $return);
|
|
|
}
|
|
|
|
|
@@ -35,6 +40,7 @@ class queue_logic
|
|
|
$postData['cabinet_code'] = $params['cabinet_number'];
|
|
|
$postData['box_position_list'] = $box_list;
|
|
|
$postData['delay_time'] = 0;
|
|
|
+
|
|
|
$return = http_post($params['req_url'] , $postData);
|
|
|
$return['code'] = 'ok';
|
|
|
if($return['code'] != 0){
|