|
@@ -1047,6 +1047,53 @@ class JRFIDServerService extends Service
|
|
|
return [true, $result];
|
|
|
}
|
|
|
|
|
|
+ public function screenAutoCreateDispatch($data,$param){
|
|
|
+ if(empty($data['type'])) return [false, '类型不能为空'];
|
|
|
+ if(empty($data['id'])) return [false, 'ID不能为空'];
|
|
|
+ $post = [
|
|
|
+ 'type' => $data['type'],
|
|
|
+ 'id' => $data['id'],
|
|
|
+ ];
|
|
|
+ $url = config("j_rfid.screenAutoCreateDispatch");
|
|
|
+ if(! empty($data['procedure'])) $post['procedure'] = $data['procedure'];
|
|
|
+
|
|
|
+ list($status,$result) = $this->post_helper($url,$post,$param['header']);
|
|
|
+ if(! $status) return [$status, $result];
|
|
|
+
|
|
|
+ if(! empty($result['status']) && $result['status'] == 'error') return [false, $result['msg']];
|
|
|
+
|
|
|
+ if(! isset($result['success'])) {
|
|
|
+ $error = $result[0]['message'] ?? "操作失败,请刷新页面";
|
|
|
+ return [false, $error];
|
|
|
+ }
|
|
|
+
|
|
|
+ return [true, ''];
|
|
|
+ }
|
|
|
+
|
|
|
+ public function screenGetSepData($data,$param){
|
|
|
+ if(empty($data['id'])) return [false, '数据ID不能为空'];
|
|
|
+ if(empty($data['type'])) return [false, 'TYPE不能为空'];
|
|
|
+
|
|
|
+ $url = config("j_rfid.screenGetSepData");
|
|
|
+ $post = [
|
|
|
+ 'id' => $data['id'],
|
|
|
+ 'type' => $data['type'],
|
|
|
+ ];
|
|
|
+
|
|
|
+ list($status,$result) = $this->post_helper($url,$post,$param['header']);
|
|
|
+ if(! $status) return [$status, $result];
|
|
|
+
|
|
|
+ if(! empty($result['status']) && $result['status'] == 'error') return [false, $result['message']];
|
|
|
+ if(! empty($result['type']) && $result['type'] == 'errorVm') return [false, $result['message']];
|
|
|
+
|
|
|
+ if(! isset($result['furn_sep_order_dt_assem_list'])) {
|
|
|
+ $error = $result[0]['message'] ?? "操作失败,请刷新页面";
|
|
|
+ return [false, $error];
|
|
|
+ }
|
|
|
+
|
|
|
+ return [true, $result['furn_sep_order_dt_assem_list']];
|
|
|
+ }
|
|
|
+
|
|
|
public function post_helper($url, $data, $header = [], $timeout = 20){
|
|
|
Log::channel('apiLog')->info('工装云POST', ["api" => $url , "param" => $data ,"header" => $header]);
|
|
|
|