|
@@ -1103,14 +1103,14 @@ class JRFIDServerService extends Service
|
|
$rules = [];
|
|
$rules = [];
|
|
if(! empty($data['drawing_no'])) {
|
|
if(! empty($data['drawing_no'])) {
|
|
$rules[] = [
|
|
$rules[] = [
|
|
- 'field' => 'exe_sep_order_a.contact_no',
|
|
|
|
|
|
+ 'field' => 'exe_sep_order_a.drawing_no',
|
|
'option' => 'IN',
|
|
'option' => 'IN',
|
|
'values' => $data['drawing_no']
|
|
'values' => $data['drawing_no']
|
|
];
|
|
];
|
|
}
|
|
}
|
|
if(! empty($data['contract_no'])) {
|
|
if(! empty($data['contract_no'])) {
|
|
$rules[] = [
|
|
$rules[] = [
|
|
- 'field' => 'exe_sep_order_a.drawing_no',
|
|
|
|
|
|
+ 'field' => 'exe_sep_order_a.contract_no',
|
|
'option' => 'IN',
|
|
'option' => 'IN',
|
|
'values' => $data['contract_no']
|
|
'values' => $data['contract_no']
|
|
];
|
|
];
|
|
@@ -1164,6 +1164,142 @@ class JRFIDServerService extends Service
|
|
return [true, $result];
|
|
return [true, $result];
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public function furnSeparateOrderDtCompList($data,$param){
|
|
|
|
+ if(empty($data['site'])) return [false, '站点不能为空'];
|
|
|
|
+ $header = array_merge($param['header'], ['site:'. $data['site']]);
|
|
|
|
+ $url = config("j_rfid.furnSeparateOrderDtCompList");
|
|
|
|
+
|
|
|
|
+ if(! empty($data['drawing_no']) || ! empty($data['contract_no']) || ! empty($data['region']) || ! empty($data['room']) || ! empty($data['assembly_name']) || ! empty($data['component'])) {
|
|
|
|
+ $rules = [];
|
|
|
|
+ if(! empty($data['drawing_no'])) {
|
|
|
|
+ $rules[] = [
|
|
|
|
+ 'field' => 'furn_sep_order_dt_prod.drawing_no',
|
|
|
|
+ 'option' => 'IN',
|
|
|
|
+ 'values' => $data['drawing_no']
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ if(! empty($data['contract_no'])) {
|
|
|
|
+ $rules[] = [
|
|
|
|
+ 'field' => 'furn_sep_order_dt_prod.contact_no',
|
|
|
|
+ 'option' => 'IN',
|
|
|
|
+ 'values' => $data['contract_no']
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ if(! empty($data['region'])) {
|
|
|
|
+ $rules[] = [
|
|
|
|
+ 'field' => 'furn_sep_order_dt_prod.region',
|
|
|
|
+ 'option' => 'IN',
|
|
|
|
+ 'values' => $data['region']
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ if(! empty($data['room'])) {
|
|
|
|
+ $rules[] = [
|
|
|
|
+ 'field' => 'furn_sep_order_dt_assem.room',
|
|
|
|
+ 'option' => 'IN',
|
|
|
|
+ 'values' => $data['room']
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ if(! empty($data['assembly_name'])) {
|
|
|
|
+ $rules[] = [
|
|
|
|
+ 'field' => 'furn_sep_order_dt_assem.assembly_name',
|
|
|
|
+ 'option' => 'IN',
|
|
|
|
+ 'values' => $data['assembly_name']
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ if(! empty($data['component'])) {
|
|
|
|
+ $rules[] = [
|
|
|
|
+ 'field' => 'component',
|
|
|
|
+ 'option' => 'IN',
|
|
|
|
+ 'values' => $data['component']
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $post['rules'] = $rules;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $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 getWorkshopData($data,$param){
|
|
|
|
+ if(empty($data['site'])) return [false, '站点不能为空'];
|
|
|
|
+ if(empty($data['type'])) return [false, 'TYPE不能为空'];
|
|
|
|
+ $header = array_merge($param['header'], ['site:'. $data['site']]);
|
|
|
|
+
|
|
|
|
+ $url = config("j_rfid.getWorkshopData");
|
|
|
|
+
|
|
|
|
+ if(! empty($data['drawing_no'])) $post['drawing_no'] = $data['drawing_no'];
|
|
|
|
+ if(! empty($data['contract_no'])) $post['contract_no'] = $data['contract_no'];
|
|
|
|
+ if(! empty($data['region'])) $post['region'] = $data['region'];
|
|
|
|
+ if(! empty($data['room'])) $post['room'] = $data['room'];
|
|
|
|
+ if(! empty($data['assembly_name'])) $post['assembly_name'] = $data['assembly_name'];
|
|
|
|
+ if(! empty($data['component'])) $post['component'] = $data['component'];
|
|
|
|
+
|
|
|
|
+ $post['type'] = $data['type'];
|
|
|
|
+ $post['site'] = $data['site'];
|
|
|
|
+ $post['size'] = $data['size'] ?? 10;
|
|
|
|
+ $post['number'] = $data['number'] ?? 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['message']];
|
|
|
|
+ if(! empty($result['type']) && $result['type'] == 'errorVm') return [false, $result['message']];
|
|
|
|
+
|
|
|
|
+ if(! isset($result['success'])) {
|
|
|
|
+ $error = $result[0]['message'] ?? "操作失败,请刷新页面";
|
|
|
|
+ return [false, $error];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return [true, $result['data']];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public function screenGetSendData($data,$param){
|
|
|
|
+ if(empty($data['site'])) return [false, '站点不能为空'];
|
|
|
|
+ if(empty($data['type'])) return [false, 'TYPE不能为空'];
|
|
|
|
+ $header = array_merge($param['header'], ['site:'. $data['site']]);
|
|
|
|
+
|
|
|
|
+ $url = config("j_rfid.screenGetSendData");
|
|
|
|
+
|
|
|
|
+ if(! empty($data['drawing_no'])) $post['drawing_no'] = $data['drawing_no'];
|
|
|
|
+ if(! empty($data['contract_no'])) $post['contract_no'] = $data['contract_no'];
|
|
|
|
+ if(! empty($data['region'])) $post['region'] = $data['region'];
|
|
|
|
+ if(! empty($data['room'])) $post['room'] = $data['room'];
|
|
|
|
+ if(! empty($data['assembly_name'])) $post['assembly_name'] = $data['assembly_name'];
|
|
|
|
+ if(! empty($data['component'])) $post['component'] = $data['component'];
|
|
|
|
+
|
|
|
|
+ $post['type'] = $data['type'];
|
|
|
|
+ $post['site'] = $data['site'];
|
|
|
|
+ $post['size'] = $data['size'] ?? 10;
|
|
|
|
+ $post['number'] = $data['number'] ?? 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['message']];
|
|
|
|
+ if(! empty($result['type']) && $result['type'] == 'errorVm') return [false, $result['message']];
|
|
|
|
+
|
|
|
|
+ if(! isset($result['success'])) {
|
|
|
|
+ $error = $result[0]['message'] ?? "操作失败,请刷新页面";
|
|
|
|
+ return [false, $error];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return [true, $result['data']];
|
|
|
|
+ }
|
|
|
|
+
|
|
public function post_helper($url, $data, $header = [], $timeout = 20){
|
|
public function post_helper($url, $data, $header = [], $timeout = 20){
|
|
Log::channel('apiLog')->info('工装云POST', ["api" => $url , "param" => $data ,"header" => $header]);
|
|
Log::channel('apiLog')->info('工装云POST', ["api" => $url , "param" => $data ,"header" => $header]);
|
|
|
|
|