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