cqpCow hace 9 meses
padre
commit
93339bdd3f

+ 11 - 0
app/Http/Controllers/Api/JRFIDController.php

@@ -171,6 +171,17 @@ class JRFIDController extends BaseController
         }
     }
 
+    public function getDispatchContractDrawRoom(Request $request){
+        list($bool, $data) = (new JRFIDServerService())->getDispatchContractDrawRoom($request->all(),$request->common_param);
+
+        if($bool){
+            return $this->json_return(200,'',$data);
+        }else{
+            if($bool === 0) return $this->json_return(401,$data);
+            return $this->json_return(201,$data);
+        }
+    }
+
     public function screenGetProFlow(Request $request){
         list($bool, $data) = (new JRFIDServerService())->screenGetProFlow($request->all(),$request->common_param);
 

+ 27 - 0
app/Service/JRFIDServerService.php

@@ -562,6 +562,33 @@ class JRFIDServerService extends Service
         return [true, $result['data']];
     }
 
+    public function getDispatchContractDrawRoom($data,$param){
+        if(empty($data['site'])) return [false, '站点不能为空'];
+        if(empty($data['type'])) return [false, 'TYPE不能为空'];
+        $post['site'] = $data['site'];
+        $post['type'] = $data['type'];
+
+        $url = config("j_rfid.get_dispatch_contract_draw_room");
+        if(isset($data['contract_no'])) $post['contract_no'] = $data['contract_no'];
+        if(isset($data['room_no'])) $post['room_no'] = $data['room_no'];
+        if(isset($data['drawing_no'])) $post['drawing_no'] = $data['drawing_no'];
+        if(isset($data['procedure_calss'])) $post['procedure_calss'] = $data['procedure_calss'];
+        $post['size'] = $data['size'] ?? 10;
+        $post['number'] = $data['number'] ?? 1;
+
+        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, $result['data']];
+    }
+
     public function screenSend($data,$param){
         if(empty($data['screenDataList'])) return [false, '收发货数据不能为空'];
         if(empty($data['site']) || empty($data['site_show'])) return [false, '站点信息不能为空'];

+ 2 - 0
config/j_rfid.php

@@ -19,6 +19,8 @@ return [
     'get_print_data' => 'https://gzy.qingyaokeji.com/api/module-data/process_flow/process_flow/diy/get_process_data',
     //查询拆单以及拆单详情分页数据
     'get_sep_order_dt_data' => 'https://gzy.qingyaokeji.com/api/module-data/separate_order/separate_order/diy/get_sep_order_dt_data',
+    //(批量派工单—查询合同编号,图号,房间号、工序)
+    'get_dispatch_contract_draw_room' => 'https://gzy.qingyaokeji.com/api/module-data/sales_order/sales_order/diy/get_dispatch_contract_draw_room',
     //班组查询
     'get_team' => 'https://gzy.qingyaokeji.com/api/module-data/teams_group_list/page',
     //部门查询

+ 2 - 0
routes/api.php

@@ -52,6 +52,8 @@ Route::group(['middleware'=> ['CheckJRFIDLogin']],function ($route){
     $route->any('qualityOrders', 'Api\JRFIDController@qualityOrders');
     //(查询合同号、图号、房间号)
     $route->any('getContractDrawRoom', 'Api\JRFIDController@getContractDrawRoom');
+    // 批量派工单—查询合同编号,图号,房间号、工序
+    $route->any('getDispatchContractDrawRoom', 'Api\JRFIDController@getDispatchContractDrawRoom');
     //(根据合同号、图号、房间号查询工艺流程单数据)
     $route->any('screenGetProFlow', 'Api\JRFIDController@screenGetProFlow');
     //收发货