Compare commits

...

20 Commits

Author SHA1 Message Date
yaooo 849c2335ce 更新管理 2023-11-14 18:12:23 +08:00
yaooo 537d679f9c Merge branch 'zhangwei' into yaooo 2023-11-14 16:39:03 +08:00
weiz 4339656834 新增商户合同管理模块接口 2023-11-14 11:32:09 +08:00
weiz 00fc93908b Merge pull request 'fixed' (#32) from zhangwei into dev
Reviewed-on: #32
2023-11-14 10:13:09 +08:00
weiz b2f868983e fixed 2023-11-14 10:12:16 +08:00
yaooo 64399a8fe3 Merge branch 'zhangwei' into yaooo 2023-11-14 09:27:05 +08:00
weiz c830899860 Merge pull request '新增公司合同管理接口' (#31) from zhangwei into dev
Reviewed-on: #31
2023-11-13 16:10:49 +08:00
weiz 04814619de 新增公司合同管理接口 2023-11-13 16:10:10 +08:00
weiz 248fd6d57a Merge pull request '新增三轮车合同管理接口' (#30) from zhangwei into dev
Reviewed-on: #30
2023-11-13 11:54:31 +08:00
weiz f371cf6561 新增三轮车合同管理接口 2023-11-13 11:53:37 +08:00
weiz e73aeb98e6 Merge pull request '新增档案列表接口和档案详情接口' (#29) from zhangwei into dev
Reviewed-on: #29
2023-11-11 15:38:57 +08:00
weiz af78fdd2b1 新增档案列表接口和档案详情接口 2023-11-11 15:37:30 +08:00
weiz 3fac24b5e7 Merge pull request '新增档案管理模块商机分类子模块接口' (#28) from zhangwei into dev
Reviewed-on: #28
2023-11-11 14:20:18 +08:00
weiz 541ed7fced 新增档案管理模块商机分类子模块接口 2023-11-11 14:19:26 +08:00
weiz 583d65c339 Merge pull request '新增商户模块相关接口' (#27) from zhangwei into dev
Reviewed-on: #27
2023-11-11 11:00:56 +08:00
weiz a9eeab3456 新增商户模块相关接口 2023-11-11 11:00:06 +08:00
weiz 88f841567d Merge pull request 'fixed' (#26) from zhangwei into dev
Reviewed-on: #26
2023-11-11 09:35:24 +08:00
weiz 5bb069e1a2 fixed 2023-11-11 09:34:43 +08:00
weiz 97eae43b64 Merge pull request '增加后台合同管理模块api' (#25) from zhangwei into dev
Reviewed-on: #25
2023-11-10 17:05:33 +08:00
weiz dbc3a7d26d 增加后台合同管理模块api 2023-11-10 17:04:24 +08:00
10 changed files with 725 additions and 0 deletions

View File

@ -28,6 +28,7 @@ class BaseAdminController extends BaseLikeAdminController
{
protected int $adminId = 0;
protected array $adminInfo = [];
protected array $reqHeader = [];
public function initialize()
{
@ -35,6 +36,11 @@ 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

@ -0,0 +1,33 @@
<?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

@ -0,0 +1,67 @@
<?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

@ -0,0 +1,142 @@
<?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

@ -0,0 +1,42 @@
<?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

@ -0,0 +1,90 @@
<?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

@ -0,0 +1,104 @@
<?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

@ -0,0 +1,78 @@
<?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

@ -0,0 +1,32 @@
<?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

@ -0,0 +1,131 @@
<?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);
}
}