diff --git a/app/adminapi/controller/archives/ArchivesController.php b/app/adminapi/controller/archives/ArchivesController.php new file mode 100644 index 00000000..86078ddf --- /dev/null +++ b/app/adminapi/controller/archives/ArchivesController.php @@ -0,0 +1,44 @@ +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','name']); + $result = curl_post(env('project.worker_domain').'/middleapi/archives/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/archives/detail',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + } \ No newline at end of file diff --git a/app/adminapi/controller/archives/BusinessController.php b/app/adminapi/controller/archives/BusinessController.php new file mode 100644 index 00000000..00649d60 --- /dev/null +++ b/app/adminapi/controller/archives/BusinessController.php @@ -0,0 +1,78 @@ +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','name','status']); + $result = curl_post(env('project.worker_domain').'/middleapi/business/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/business/detail',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //新增商机分类 + public function create(): Json + { + $params = $this->request->post(['name','pid','sort','status']); + $result = curl_post(env('project.worker_domain').'/middleapi/business/create',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //编辑商机分类 + public function edit(): Json + { + $params = $this->request->post(['id','name','pid','sort','status']); + $result = curl_post(env('project.worker_domain').'/middleapi/business/edit',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //删除商机分类 + public function delete(): Json + { + $params = $this->request->post(['id']); + $result = curl_post(env('project.worker_domain').'/middleapi/business/delete',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + } \ No newline at end of file diff --git a/app/adminapi/controller/company/CompanyController.php b/app/adminapi/controller/company/CompanyController.php new file mode 100644 index 00000000..9151a68a --- /dev/null +++ b/app/adminapi/controller/company/CompanyController.php @@ -0,0 +1,153 @@ +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','area_name','street_name','area_manager','company_type','is_contract']); + $result = curl_post(env('project.worker_domain').'/middleapi/company/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('id不能为空'); + } + $result = curl_post(env('project.worker_domain').'/middleapi/company/detail',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //删除公司 + public function delete(): Json + { + $params=$this->request->post(['id']); + if(empty($params['id'])){ + return $this->fail('缺少必要参数'); + } + $result = curl_post(env('project.worker_domain').'/middleapi/company/delete',$params,[ + "appid:".env('app.app_id'), + "timestamp:".time(), + "sign:".makeSign(['appid'=>env('app.app_id'),'timestamp'=>time()],env('app.app_secret')) + ]); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //添加公司 + public function create(): Json + { + $params=$this->request->post(); + if(empty($params['company_name']) || empty($params['organization_code']) || empty($params['company_type']) || empty($params['master_name']) || empty($params['master_phone'])){ + return $this->fail('缺少必要参数'); + } + $result = curl_post(env('project.worker_domain').'/middleapi/company/create',http_build_query($params),$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //修改公司 + public function edit(): Json + { + $params=$this->request->post(); + if(empty($params['id']) || empty($params['company_name']) || empty($params['organization_code']) || empty($params['company_type']) || empty($params['master_name']) || empty($params['master_phone'])){ + return $this->fail('缺少必要参数'); + } + $result = curl_post(env('project.worker_domain').'/middleapi/company/edit',http_build_query($params),$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //公司认证 + public function enterpriseCertification(): Json + { + $params=$this->request->post(['id']); + if(empty($params['id'])){ + return $this->fail('id不能为空'); + } + $result = curl_post(env('project.worker_domain').'/middleapi/company/enterpriseCertification',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //生成合同 + public function generateContract(): Json + { + $params=$this->request->post(['id','party_a','contract_type']); + if(empty($params['id']) || empty($params['party_a']) || empty($params['contract_type'])){ + return $this->fail('缺少必要参数'); + } + $result = curl_post(env('project.worker_domain').'/middleapi/company/generateContract',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //下属公司 + public function subsidiaryCompany(): Json + { + $params=$this->request->get(['id','page_no','page_size']); + if(empty($params['id'])){ + return $this->fail('缺少必要参数'); + } + $result = curl_post(env('project.worker_domain').'/middleapi/company/subsidiaryCompany',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //公司类型 + public function companyType(): Json + { + $result = curl_post(env('project.worker_domain').'/middleapi/company/companyType',[],$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //合同类型 + public function contractType(): Json + { + $result = curl_post(env('project.worker_domain').'/middleapi/company/contractType',[],$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + } \ No newline at end of file diff --git a/app/adminapi/controller/company/MerchantController.php b/app/adminapi/controller/company/MerchantController.php new file mode 100644 index 00000000..3f3163ea --- /dev/null +++ b/app/adminapi/controller/company/MerchantController.php @@ -0,0 +1,53 @@ +reqHeader = [ + "appid:".env('app.app_id'), + "timestamp:".time(), + "sign:".makeSign(['appid'=>env('app.app_id'),'timestamp'=>time()],env('app.app_secret')) + ]; + } + + //商户档案列表 + public function merchantRecordLists(): Json + { + $params = $this->request->get(['page_no','page_size','merchant_name','master_name','master_phone']); + $result = curl_post(env('project.worker_domain').'/middleapi/merchant/merchantRecordLists',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //商户认证列表 + public function merchantAuthLists(): Json + { + $params = $this->request->get(['page_no','page_size','merchant_name','organization_code','master_name']); + $result = curl_post(env('project.worker_domain').'/middleapi/merchant/merchantAuthLists',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //商户申请列表 + public function merchantApplyLists(): Json + { + $params = $this->request->get(['page_no','page_size','check_status','type']); + $result = curl_post(env('project.worker_domain').'/middleapi/merchant/merchantApplyLists',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + } \ No newline at end of file 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 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