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