From f371cf65618db1424e6cb148ee4f20c6b0c13975 Mon Sep 17 00:00:00 2001 From: weiz Date: Mon, 13 Nov 2023 11:53:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=89=E8=BD=AE=E8=BD=A6?= =?UTF-8?q?=E5=90=88=E5=90=8C=E7=AE=A1=E7=90=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contract/VehicleContractController.php | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 app/adminapi/controller/contract/VehicleContractController.php diff --git a/app/adminapi/controller/contract/VehicleContractController.php b/app/adminapi/controller/contract/VehicleContractController.php new file mode 100644 index 00000000..d47ea76b --- /dev/null +++ b/app/adminapi/controller/contract/VehicleContractController.php @@ -0,0 +1,89 @@ +reqHeader = [ + "appid:".env('app.app_id'), + "timestamp:".time(), + "sign:".makeSign(['appid'=>env('app.app_id'),'timestamp'=>time()],env('app.app_secret')) + ]; + } + + //三轮车合同列表 + public function lists(): Json + { + $params = $this->request->get(['page_no','page_size','company_name','contract_no','status']); + $result = curl_post(env('project.worker_domain').'/middleapi/vehicle/lists',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //三轮车合同详情 + public function detail(): Json + { + $params = $this->request->get(['id']); + if(empty($params['id'])){ + return $this->fail('参数错误'); + } + $result = curl_post(env('project.worker_domain').'/middleapi/vehicle/detail',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //上传三轮车合同 + public function uploadContract(): Json + { + $params = $this->request->post(['id','file','cars']); + if(empty($params['id']) || empty($params['file'])){ + return $this->fail('缺少必要参数'); + } + $result = curl_post(env('project.worker_domain').'/middleapi/vehicle/uploadContract',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //发起三轮车合同 + public function initiatingContract(): Json + { + //获取参数 + $params = $this->request->post(['id']); + if(empty($params['id'])){ + return $this->fail('缺少必要参数'); + } + $result = curl_post(env('project.worker_domain').'/middleapi/vehicle/initiatingContract',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //重新发送三轮车合同短信 + public function sendSmsAgain(): Json + { + //获取参数 + $params = $this->request->post(['id']); + if(empty($params['id'])){ + return $this->fail('参数错误'); + } + $result = curl_post(env('project.worker_domain').'/middleapi/vehicle/sendSmsAgain',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + } \ No newline at end of file -- 2.40.1