From 04814619de974043423d5807b1ec2393a5c45915 Mon Sep 17 00:00:00 2001 From: weiz Date: Mon, 13 Nov 2023 16:10:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=AC=E5=8F=B8=E5=90=88?= =?UTF-8?q?=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/CompanyContractController.php | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 app/adminapi/controller/contract/CompanyContractController.php diff --git a/app/adminapi/controller/contract/CompanyContractController.php b/app/adminapi/controller/contract/CompanyContractController.php new file mode 100644 index 00000000..19f9692a --- /dev/null +++ b/app/adminapi/controller/contract/CompanyContractController.php @@ -0,0 +1,101 @@ +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','contract_no','contract_type','contract_status','company_name','area_manager']); + $result = curl_post(env('project.worker_domain').'/middleapi/contract/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/contract/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']); + if(empty($params['id']) || empty($params['file'])){ + return $this->fail('参数错误'); + } + $result = curl_post(env('project.worker_domain').'/middleapi/contract/uploadContract',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //发起合同 + public function DraftingContract(): Json + { + $params = $this->request->post(['id','part_b','type']); + if(empty($params['id']) || empty($params['part_b']) || empty($params['type'])){ + return $this->fail('参数错误'); + } + $result = curl_post(env('project.worker_domain').'/middleapi/contract/DraftingContract',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //发送短信 + public function sendSms(): Json + { + $params = $this->request->post(['id']); + if(empty($params['id'])){ + return $this->fail('参数错误'); + } + $result = curl_post(env('project.worker_domain').'/middleapi/contract/sendSms',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //下载证据包 + public function evidence(): Json + { + $params = $this->request->get(['id']); + if(empty($params['id'])){ + $this->fail('参数错误'); + } + $result = curl_post(env('project.worker_domain').'/middleapi/contract/evidence',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + } \ No newline at end of file