|
@@ -782,6 +782,37 @@ class JRFIDServerService extends Service
|
|
|
return [true, $result];
|
|
|
}
|
|
|
|
|
|
+ public function furnSeparateOrderDtAssemList($data,$param){
|
|
|
+ if(empty($data['site'])) return [false, '站点不能为空'];
|
|
|
+ if(empty($data['id'])) return [false, '芯片|组件数据不能为空'];
|
|
|
+ $header = array_merge($param['header'], ['site:'. $data['site']]);
|
|
|
+ $url = config("j_rfid.furn_separate_order_dt_assem_list");
|
|
|
+
|
|
|
+ $post['rules'] = [
|
|
|
+ [
|
|
|
+ 'field' => 'id',
|
|
|
+ 'option' => 'IN',
|
|
|
+ 'values' => $data['id']
|
|
|
+ ],
|
|
|
+ ];
|
|
|
+
|
|
|
+ $post['size'] = $data['size'] ?? 10;
|
|
|
+ $post['number'] = ($data['number'] ?? 1) - 1;
|
|
|
+
|
|
|
+ list($status,$result) = $this->post_helper($url,$post,$header);
|
|
|
+ if(! $status) return [$status, $result];
|
|
|
+
|
|
|
+ if(! empty($result['status']) && $result['status'] == 'error') return [false, $result['msg']];
|
|
|
+ if(! empty($result['type']) && $result['type'] == 'errorVm') return [false, $result['message']];
|
|
|
+
|
|
|
+ if(! isset($result['content'])) {
|
|
|
+ $error = $result[0]['message'] ?? "操作失败,请刷新页面";
|
|
|
+ return [false, $error];
|
|
|
+ }
|
|
|
+
|
|
|
+ return [true, $result];
|
|
|
+ }
|
|
|
+
|
|
|
public function post_helper($url, $data, $header = [], $timeout = 20){
|
|
|
Log::channel('apiLog')->info('工装云POST', ["api" => $url , "param" => $data ,"header" => $header]);
|
|
|
|