Compare commits

..

No commits in common. "849c2335ceaf9f4eebd52fc3430738e4f20681a8" and "fc975060f8e8e1788bcd86d52b6ec0be2990a775" have entirely different histories.

10 changed files with 0 additions and 725 deletions

View File

@ -28,7 +28,6 @@ class BaseAdminController extends BaseLikeAdminController
{
protected int $adminId = 0;
protected array $adminInfo = [];
protected array $reqHeader = [];
public function initialize()
{
@ -36,11 +35,6 @@ class BaseAdminController extends BaseLikeAdminController
$this->adminInfo = $this->request->adminInfo;
$this->adminId = $this->request->adminInfo['admin_id'];
}
$this->reqHeader = [
"appid:".env('app.app_id'),
"timestamp:".time(),
"sign:".makeSign(['appid'=>env('app.app_id'),'timestamp'=>time()],env('app.app_secret'))
];
}
}

View File

@ -1,33 +0,0 @@
<?php
namespace app\adminapi\controller\archives;
use app\adminapi\controller\BaseAdminController;
use think\response\Json;
class ArchivesController extends BaseAdminController
{
//档案列表
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);
}
}

View File

@ -1,67 +0,0 @@
<?php
namespace app\adminapi\controller\archives;
use app\adminapi\controller\BaseAdminController;
use think\response\Json;
class BusinessController extends BaseAdminController
{
//商机分类列表
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);
}
}

View File

@ -1,142 +0,0 @@
<?php
namespace app\adminapi\controller\company;
use app\adminapi\controller\BaseAdminController;
use think\response\Json;
class CompanyController extends BaseAdminController
{
//公司列表
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);
}
}

View File

@ -1,42 +0,0 @@
<?php
namespace app\adminapi\controller\company;
use app\adminapi\controller\BaseAdminController;
use think\response\Json;
class MerchantController extends BaseAdminController
{
//商户档案列表
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);
}
}

View File

@ -1,90 +0,0 @@
<?php
namespace app\adminapi\controller\contract;
use app\adminapi\controller\BaseAdminController;
use think\response\Json;
class CompanyContractController extends BaseAdminController
{
//合同列表
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);
}
}

View File

@ -1,104 +0,0 @@
<?php
namespace app\adminapi\controller\contract;
use app\adminapi\controller\BaseAdminController;
use think\response\Json;
class ShopContractController extends BaseAdminController
{
//商户合同列表
public function lists(): Json
{
$params = $this->request->get(['page_no','page_size','contract_no','party_a','party_b','status']);
$result = curl_post(env('project.worker_domain').'/middleapi/ShopContract/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/ShopContract/detail',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
//商户合同审核
public function check(): 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/ShopContract/check',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
//商户合同备注
public function note(): Json
{
$params = $this->request->post(['id','notes']);
if(empty($params['id']) || empty($params['notes'])){
return $this->fail('缺少必要参数');
}
$result = curl_post(env('project.worker_domain').'/middleapi/ShopContract/note',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
//发送商户合同
public function draftContract(): Json
{
$params = $this->request->post(['id']);
if(empty($params['id'])){
return $this->fail('缺少必要参数');
}
$result = curl_post(env('project.worker_domain').'/middleapi/ShopContract/draftContract',$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/ShopContract/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'])){
return $this->fail('缺少必要参数');
}
$result = curl_post(env('project.worker_domain').'/middleapi/ShopContract/evidence',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
}

View File

@ -1,78 +0,0 @@
<?php
namespace app\adminapi\controller\contract;
use app\adminapi\controller\BaseAdminController;
use think\response\Json;
class VehicleContractController extends BaseAdminController
{
//三轮车合同列表
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);
}
}

View File

@ -1,32 +0,0 @@
<?php
namespace app\adminapi\controller\dict;
use app\adminapi\controller\BaseAdminController;
use think\response\Json;
class DictController extends BaseAdminController
{
//字典列表
public function lists(): Json
{
$params=$this->request->get(['page_no','page_size','type_id']);
$result = curl_post(env('project.worker_domain').'/middleapi/dict_data/lists',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
//获取任务审批类型
public function getTaskApproveTypeList(): Json
{
$params=$this->request->get();
$result = curl_post(env('project.worker_domain').'/middleapi/dict_data/getTaskApproveTypeList',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
}

View File

@ -1,131 +0,0 @@
<?php
namespace app\adminapi\controller\task;
use app\adminapi\controller\BaseAdminController;
use think\response\Json;
class SchedulingController extends BaseAdminController
{
public function lists(): Json
{
$params=$this->request->get(['page_no','page_size','company_id']);
$result = curl_post(env('project.worker_domain').'/middleapi/task_scheduling/lists',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
public function editMoney(): Json
{
$params=$this->request->post(['id', 'money']);
$result = curl_post(env('project.worker_domain').'/middleapi/task_scheduling/editMoney',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
public function edit(): Json
{
$params=$this->request->post(['id', 'status']);
$result = curl_post(env('project.worker_domain').'/middleapi/task_scheduling/edit',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
public function detail(): Json
{
$params=$this->request->get(['id']);
$result = curl_post(env('project.worker_domain').'/middleapi/task_scheduling/detail',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
public function plan(): Json
{
$params=$this->request->get(['scheduling_id','start_time','end_time']);
$result = curl_post(env('project.worker_domain').'/middleapi/task_scheduling_plan/lists',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
public function template(): Json
{
$params=$this->request->get(['company_id','title']);
$result = curl_post(env('project.worker_domain').'/middleapi/task_template/lists',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
public function addTemplate(): Json
{
$params=$this->request->post();
$result = curl_post(env('project.worker_domain').'/middleapi/task_template/add',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
public function editTemplate(): Json
{
$params=$this->request->post();
$result = curl_post(env('project.worker_domain').'/middleapi/task_template/edit',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
public function deleteTemplate(): Json
{
$params=$this->request->post();
$result = curl_post(env('project.worker_domain').'/middleapi/task_template/delete',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
public function detailTemplate(): Json
{
$params=$this->request->get(['id']);
$result = curl_post(env('project.worker_domain').'/middleapi/task_template/detail',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
public function approve(): Json
{
$params=$this->request->get(['page_no','page_size','type', 'check_status']);
$result = curl_post(env('project.worker_domain').'/middleapi/approve/lists',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
public function auditApprove(): Json
{
$params=$this->request->post(['id','check_status','remark']);
$result = curl_post(env('project.worker_domain').'/middleapi/approve/audit',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
}