This commit is contained in:
mkm 2023-11-17 11:54:10 +08:00
commit d6f6b70a0e
4930 changed files with 7526 additions and 3521 deletions

View File

@ -388,12 +388,17 @@ class CompanyController extends BaseAdminController
// $master_email=substr(md5(uniqid()),rand(0, 22),10)."@lihai.com";
// }
// 根据street码查询所属镇农科公司
$company_select=Db::query("select * from la_company where company_type=:company_type and FIND_IN_SET(:street,responsible_area)", ['company_type' => 41,'street'=>$params['street']], true);
if(empty($company_select)) {
throw new Exception('当前区域无镇农科公司');
// 市级供应链直接和海之农签约
if (isset($params['type_id']) && $params['type_id'] == 12) {
$company = Company::where(['company_name' => '泸州市海之农科技有限公司'])->find();
} else {
// 根据street码查询所属镇农科公司
$company_select=Db::query("select * from la_company where company_type=:company_type and FIND_IN_SET(:street,responsible_area)", ['company_type' => 41,'street'=>$params['street']], true);
if(empty($company)) {
throw new Exception('当前区域无镇农科公司');
}
$company=$company_select[0];
}
$company=$company_select[0];
$data = [
'mer_intention_id' => $params['mer_intention_id']??'', // 商城商户入驻申请id签约完成后回调使用
'company_name' => $params['company_name']??'',
@ -504,12 +509,13 @@ class CompanyController extends BaseAdminController
'sn' => generate_sn(CompanyAccountLog::class, 'sn', 20),
'user_id' => 0,
'company_id' => $param['company_id'],
'change_type' => 300,
'change_object' => 2,
'change_type' => CompanyAccountLog::COMPANY_DEPOSIT,
'change_object' => CompanyAccountLog::DEPOSIT,
'action' => 1,
'change_amount' => $param['deposit'],
'left_amount' =>$left_amount,
'remark' => '后台押金转账凭证充值',
'status' => 1,
];
CompanyAccountLog::create($datas);

View File

@ -4,10 +4,17 @@ namespace app\adminapi\controller\approve;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\approve\ApproveLists;
use app\common\enum\user\AccountLogEnum;
use app\common\logic\AccountLogLogic;
use app\common\logic\task\TaskLogic;
use app\common\model\Approve;
use app\common\model\Company;
use app\common\model\company\CompanyAccountLog;
use app\common\model\task\Task;
use app\common\model\task_scheduling_plan\TaskSchedulingPlan;
use app\common\model\task_template\TaskTemplate;
use app\common\model\user\User;
use app\common\model\user\UserAccountLog;
use think\facade\Db;
class ApproveController extends BaseAdminController
@ -17,6 +24,15 @@ class ApproveController extends BaseAdminController
return $this->dataLists(new ApproveLists());
}
public function lists2()
{
return $this->success('成功',(new ApproveLists())->lists2());
}
public function lists3()
{
return $this->success('成功',(new ApproveLists())->lists3());
}
public function audit()
{
try {
@ -25,6 +41,7 @@ class ApproveController extends BaseAdminController
if (!$approve) {
$this->fail('数据不存在');
}
Db::startTrans();
// 拒绝通过 要让用户今天可以继续做任务
if ($params['check_status'] == 3) {
@ -32,7 +49,27 @@ class ApproveController extends BaseAdminController
}
// 修改任务完成状态
if ($params['check_status'] == 2) {
$this->pass($approve);
if ($approve->type == Approve::APPROVE_TYPE_7) {
$taskTemplate = TaskTemplate::where(['id'=>$approve->business_id])->find();
// 提前完成
if ($taskTemplate['day_count'] < $taskTemplate['stage_day_one']) {
if (bccomp($params['amount'], 300000, 2) == -1) {
$this->fail('该任务提前完成条件销售总额必须达到30万元及以上');
} else {
// 提前完成标识
$extend = json_decode($taskTemplate['extend'], true);
$extend['early_finish'] = 1;
$taskTemplate->extend = json_encode($extend);
$taskTemplate->save();
$this->pass($approve, $params);
}
} else {
$this->pass($approve, $params);
}
} else {
$this->pass($approve);
}
}
Db::commit();
return $this->success('审核成功');
@ -42,7 +79,7 @@ class ApproveController extends BaseAdminController
}
}
// 通过
private function pass($approve)
private function pass($approve, $params=[])
{
Db::startTrans();
$approve->check_status = 2;
@ -56,7 +93,7 @@ class ApproveController extends BaseAdminController
}
Db::commit();
// 结算
// 镇农科公司任务-数字农贸宣传业务、加工业务的建设和招商工作任务 结算
if ($approve->type == Approve::APPROVE_TYPE_4) {
$taskSchedulePlan = TaskSchedulingPlan::where('la_task_scheduling_plan.id', $task['scheduling_plan_id'])
->where('is_pay',0)
@ -67,6 +104,48 @@ class ApproveController extends BaseAdminController
->toArray();
TaskLogic::dealTaskMarketingDirector10($taskSchedulePlan, $approve);
}
if ($approve->type == Approve::APPROVE_TYPE_5) {
$taskSchedulePlan = TaskSchedulingPlan::where('la_task_scheduling_plan.id', $task['scheduling_plan_id'])
->where('is_pay',0)
->with(['template_info'])
->withJoin(['scheduling'], 'left')
->where('scheduling.company_type', 17)
->find()
->toArray();
TaskLogic::dealVillageTask6($taskSchedulePlan);
}
if ($approve->type == Approve::APPROVE_TYPE_6) {
$taskSchedulePlan = TaskSchedulingPlan::where('la_task_scheduling_plan.id', $task['scheduling_plan_id'])
->where('is_pay',0)
->with(['template_info'])
->withJoin(['scheduling'], 'left')
->where('scheduling.company_type', 17)
->find()
->toArray();
TaskLogic::dealVillageTask8($taskSchedulePlan);
}
if ($approve->type == Approve::APPROVE_TYPE_7) {
// 需要手动输入销售总额
$approve->amount = $params['amount'];
$approve->save();
}
if ($approve->type == Approve::APPROVE_TYPE_8) {
// 需要手动输入申请的政策补贴金额
$approve->amount = $params['amount'];
$approve->save();
}
if ($approve->type == Approve::APPROVE_TYPE_9) {
$taskSchedulePlan = TaskSchedulingPlan::where('la_task_scheduling_plan.id', $task['scheduling_plan_id'])
->where('is_pay',0)
->with(['template_info'])
->withJoin(['scheduling'], 'left')
->where('scheduling.company_type', 17)
->find()
->toArray();
TaskLogic::masterTask8Settlement($taskSchedulePlan);
}
}
// 拒绝
@ -93,4 +172,246 @@ class ApproveController extends BaseAdminController
]);
}
/**
* 股金任务审批
*/
public function shareholderMoneyTaskAudit()
{
// try {
$params = $this->request->param(); // id check_status remark
$approve = Approve::find($params['id']);
if (!empty($approve)) {
$this->fail('数据不存在');
}
// 拒绝通过 要让用户今天可以继续做任务
if ($params['check_status'] == 3) {
$this->refuse1($params, $approve);
}
if ($params['check_status'] == 2) {
$this->pass1($approve, $params);
}
// } catch (\Exception $e) {
// return $this->fail($e->getMessage());
// }
}
private function refuse1($params, $approve)
{
$approve->check_status = $params['check_status'];
$approve->remark = $params['remark'];
$approve->update_time = time();
$approve->save();
}
private function pass1($approve, $params)
{
Db::startTrans();
// 任务
$task = Task::find($approve['task_id']);
if ($task['status'] == 2) {
$task->status = 3;
$task->save();
}
// 小组服务公司股金上交 小组服务团队-入股任务 村联络员-督促小组服务团队入股任务 镇农科服务部长-督促小组服务团队入股村管理公司任务
if ($approve->type == Approve::APPROVE_TYPE_10 || $approve->type == Approve::APPROVE_TYPE_11 || $approve->type == Approve::APPROVE_TYPE_13) {
// 小组服务公司
$subordinateCompany = Company::where(['id'=>$approve->department_id])->find();
// 村公司
$parentCompany = Company::where(['village'=>$subordinateCompany['village'], 'company_type'=>17])->find();
}
// 村管理公司股金上交 村联络员任务-入股甲方公司
if ($approve->type == Approve::APPROVE_TYPE_12) {
// 村公司
$subordinateCompany = Company::where(['id'=>$approve->department_id])->find();
// 镇农科公司 负责区域包含有村公司的street码
$parentCompany = Db::query("select id from la_company where company_type=:company_type and FIND_IN_SET(:street,responsible_area)", ['company_type' => 41,'street'=>$subordinateCompany['street']], true)[0];
}
$amount = $approve->amount; // 上交股金金额
$subordinateCompany->shareholder_money = $amount;
$subordinateCompany->save();
// 添加股金入股记录
$sharecapitalChangeLogInsertId = $this->addConpanyAccountLog($subordinateCompany, $parentCompany, $amount);
$approve->check_status = 2;
$approve->update_time = time();
$approve->business_id = $sharecapitalChangeLogInsertId; // 灵活运用业务主键id
$approve->remark = $params['remark'];
$approve->save();
// 小组服务团队-入股任务结算
if ($approve->type == Approve::APPROVE_TYPE_10) {
$taskSchedulingPaln = TaskSchedulingPlan::where(['task_id' => $task->id])
->withJoin(['scheduling'], 'left')
->where('scheduling.company_type', 18)
->where('is_pay',0)
->with(['template_info'])
->select()
->toArray()[0];
$taskInfo = $task->toArray();
$this->taskSettlement($taskInfo, $subordinateCompany, $taskSchedulingPaln);
}
Db::commit();
// 村联络员-督促小组服务团队入股
if ($approve->type == Approve::APPROVE_TYPE_11) {
$taskSchedulingPaln = TaskSchedulingPlan::where(['task_id' => $task->id])
->withJoin(['scheduling'], 'left')
->where('scheduling.company_type', 17)
->where('is_pay',0)
->with(['template_info'])
->select()
->toArray()[0];
TaskLogic::dealVillageTask4($taskSchedulingPaln, $approve);
}
// 村联络员-入股甲方公司
if ($approve->type == Approve::APPROVE_TYPE_12) {
$taskSchedulingPaln = TaskSchedulingPlan::where(['task_id' => $task->id])
->withJoin(['scheduling'], 'left')
->where('scheduling.company_type', 17)
->where('is_pay',0)
->with(['template_info'])
->select()
->toArray()[0];
TaskLogic::dealVillageTask5($taskSchedulingPaln, $approve);
}
// 镇农科服务部长-督促小组服务团队入股村管理公司任务
if ($approve->type == Approve::APPROVE_TYPE_13) {
$taskSchedulingPaln = TaskSchedulingPlan::where(['task_id' => $task->id])
->withJoin(['scheduling'], 'left')
->where('scheduling.company_type', 41)
->where('is_pay',0)
->with(['template_info'])
->select()
->toArray()[0];
TaskLogic::dealTownTask6($taskSchedulingPaln, $approve);
}
return $this->success('成功');
}
private function addConpanyAccountLog($subordinateCompany, $parentCompany, $amount)
{
$sharecapitalChangeLogData = [
'subordinate_company_id' => $subordinateCompany['id'],
'parent_company_id' => $parentCompany['id'],
'amount' => $amount,
'create_time' => time(),
'update_time' => time(),
];
$sharecapitalChangeLogInsertId = Db::name('company_sharecapital_change_log')->insertGetId($sharecapitalChangeLogData);
// 上交股金公司股金变更 + 公司股金减少记录
$leftAmount = bcsub($subordinateCompany['shareholder_money'], $amount, 2);
Company::where('id', $subordinateCompany['company_id'])->save(['shareholder_money'=> $leftAmount]);
$company_log1 = [
'sn' => generate_sn(UserAccountLog::class, 'sn', 20),
'company_id' => $subordinateCompany['id'],
'change_object' => CompanyAccountLog::SHAREHOLDER, // 变动对象 1余额 2股金
'change_type' => CompanyAccountLog::SHAREHOLDER_DEC_DEPOSIT, //变动类型
'action' => CompanyAccountLog::DEC, //1-增加 2-减少
'left_amount' => $leftAmount, //变动后数量
'change_amount' => $amount, //变动数量
'extend' => json_encode(['company_sharecapital_change_log_id' => $sharecapitalChangeLogInsertId]),
'status' => 1,
];
CompanyAccountLog::create($company_log1);
// 接收股金公司股金变更 + 公司股金增加记录
$addAmount = bcadd($parentCompany['shareholder_money'], $amount, 2);
Company::where('id', $parentCompany['id'])->save(['shareholder_money'=>$addAmount]);
// 公司账户变动记录
$company_log2 = [
'sn' => generate_sn(UserAccountLog::class, 'sn', 20),
'company_id' => $parentCompany['id'],
'change_object' => CompanyAccountLog::SHAREHOLDER, // 变动对象 1余额 2股金
'change_type' => CompanyAccountLog::TASK_INC_SHAREHOLDER_MONEY, //变动类型
'action' => CompanyAccountLog::INC, //1-增加 2-减少
'left_amount' => $addAmount, //变动后数量
'change_amount' => $amount, //变动数量
'extend' => json_encode(['company_sharecapital_change_log_id' => $sharecapitalChangeLogInsertId]),
'status' => 1,
];
CompanyAccountLog::create($company_log2);
return $sharecapitalChangeLogInsertId;
}
public function taskSettlement($data, $company, $datas = [])
{
$proportion = 0;
$remark = '来自任务【' . $datas['template_info']['title'] . '】,';
//总金额除以2等于不可提现账号金额和收益
$master_money = bcdiv($data['money'], 2, 2);
//收益的百分之25为负责人的收益其余为成员的平分收益
$master_money_user = bcdiv($master_money, 2, 2);
//成员数量
$userAll = User::where('company_id', $data['company_id'])->where('admin_id', 0)->field('id,user_money')->select();
$yser_all_count = count($userAll);
$member_money_user = bcdiv($master_money_user, $yser_all_count, 2);
//负责人
$arr = [$company['user_id'], AccountLogEnum::UM_INC_TASK, AccountLogEnum::INC, $master_money_user, $datas['sn'], $remark . '获得收益' . $master_money_user . '元', ['company_id' => $data['company_id'], 'proportion' => $proportion], $data['status']];
$this->master($arr);
$arr_two = [$company['user_id'], AccountLogEnum::UM_INC_TASKUSER, AccountLogEnum::INC, $master_money_user, $datas['sn'], $remark. '获得账户余额' . $master_money_user . '元', ['company_id' => $data['company_id'], 'proportion' => $proportion], $data['status']];
$this->Account($arr_two);
//成员
foreach ($userAll as $value) {
$arr = [$value['id'], AccountLogEnum::UM_INC_TASK, AccountLogEnum::INC, $member_money_user, $datas['sn'], $remark . '获得收益' . $member_money_user . '元', ['company_id' => $data['company_id'], 'proportion' => $proportion], $data['status']];
$this->member($arr);
$arr_two = [$value['id'], AccountLogEnum::UM_INC_TASKUSER, AccountLogEnum::INC, $member_money_user, $datas['sn'], $remark. '获得账户余额' . $member_money_user . '元', ['company_id' => $data['company_id'], 'proportion' => $proportion], $data['status']];
$this->Account($arr_two);
}
//公司
$deposit_count = bcadd($company['deposit'], $master_money, 2);
$this->AccountLog($data['company_id'], $deposit_count, $master_money);
$company_money_count = bcadd($company['company_money'], $master_money, 2);
$this->AccountLog($data['company_id'], $company_money_count, $master_money);
Company::where('id', $data['company_id'])->update(['deposit' => Db::raw('deposit+' . $master_money), 'company_money' => Db::raw('company_money+' . $master_money)]);
}
public function AccountLog($companyId, $left_amount, $changeAmount, $change_object = 1, $change_type = 1, $action = 1)
{
$company_log = [
'sn' => generate_sn(UserAccountLog::class, 'sn', 20),
'company_id' => $companyId,
'change_object' => $change_object, //变动对象
'change_type' => $change_type, //变动类型
'action' => $action, //1-增加 2-减少
'left_amount' => $left_amount, //变动后数量
'change_amount' => $changeAmount, //变动数量
'status' => 1,
];
CompanyAccountLog::create($company_log);
}
/**负责人的分润
* @param $data
*/
private function master($data)
{
User::where('id', $data[0])->update(['deposit'=>Db::raw('deposit+' . $data[3]),'user_money'=>Db::raw('user_money+' . $data[3])]);
return AccountLogLogic::add($data[0], $data[1], $data[2], $data[3], $data[4], $data[5], $data[6], $data[7]);
}
/**成员分润
* @param $data
*/
private function member($data)
{
User::where('id', $data[0])->update(['deposit'=>Db::raw('deposit+' . $data[3]),'user_money'=>Db::raw('user_money+' . $data[3])]);
return AccountLogLogic::add($data[0], $data[1], $data[2], $data[3], $data[4], $data[5], $data[6], $data[7]);
}
private function Account($data)
{
return AccountLogLogic::add($data[0], $data[1], $data[2], $data[3], $data[4], $data[5], $data[6], $data[7]);
}
}

View File

@ -40,6 +40,7 @@ class VehicleContractController extends BaseAdminController
'id' => $vehicle_contract['contract_logistic_id'],
'file' => $params['file'],
'status' => 1,
'update_time' => time()
];
//判断合同类型
if($vehicle_contract['type'] == 0 && $vehicle_contract['contract_logistic_id'] != 0){
@ -186,7 +187,8 @@ class VehicleContractController extends BaseAdminController
'id' => $contract['contract_logistic_id'],
'contract_no' => $signRes->data,
'status' => 2,
'signing_timer' => 0
'signing_timer' => 0,
'update_time' => time()
]);
}
$this->sendSms($params['id'],$smsTitle);

View File

@ -101,5 +101,10 @@ class DictDataController extends BaseAdminController
return $this->data($result);
}
public function getTaskApproveTypeList()
{
$result = DictDataLogic::getTaskApproveTypeList();
return $this->data($result);
}
}

View File

@ -18,6 +18,7 @@ namespace app\adminapi\controller\task_template;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\task_template\TaskTemplateLists;
use app\common\logic\ShopRequestLogic;
use app\common\logic\task_template\TaskTemplateLogic;
use app\adminapi\validate\task_template\TaskTemplateValidate;
use app\common\model\Company;
@ -119,5 +120,19 @@ class TaskTemplateController extends BaseAdminController
return $this->data($result);
}
public function getProductList()
{
$param = $this->request->param(); // page keyword
$p['page'] = $param['page_no'] ?? 1;
$p['keyword'] = $param['keyword'] ??'';
$result = ShopRequestLogic::getProductList($p);;
// $result['data']['count'] = 1000;
$data = [
'lists' => $result['data']['data'],
'count' => $result['data']['count'],
'page_no' => $result['data']['page'],
'page_size' => 10,
];
return $this->data($data);
}
}

View File

@ -114,7 +114,7 @@ class UserController extends BaseAdminController
public function Draftingcontracts()
{
$params = Request::param();
$result = ContractLogic::Draftingcontracts($params);
$result = ContractLogic::Draftingcontracts($params, 2);
if ($result === true) {
return $this->success('发送合同成功', [], 1, 1);
} else {

View File

@ -7,6 +7,7 @@ use app\common\lists\ListsSearchInterface;
use app\common\model\Approve;
use app\common\model\auth\Admin;
use app\common\model\Company;
use app\common\model\task\Task;
use think\facade\Db;
class ApproveLists extends BaseAdminDataLists implements ListsSearchInterface
@ -20,7 +21,8 @@ class ApproveLists extends BaseAdminDataLists implements ListsSearchInterface
public function setSearch(): array
{
return [
'in' => ['type']
'in' => ['type'],
'='=>['check_status']
];
}
@ -46,11 +48,75 @@ class ApproveLists extends BaseAdminDataLists implements ListsSearchInterface
return Admin::where(['id' => $data['check_admin_ids']])->value('name');
})
->withAttr('company_name',function($value,$data){
return Company::where(['admin_id' => $data['check_admin_ids']])->value('company_name');
$task = Task::where('id', $data['task_id'])->find();
return Company::where(['id' => $task['company_id']])->value('company_name');
})
->toArray();
}
public function lists2(): array
{
$list = Approve::where($this->searchWhere)
->where($this->queryWhere())
->with('task')
->field('*')
->append(['area_manager', 'company_name'], true)
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()
->withAttr('area_manager',function($value,$data){
return Admin::where(['id' => $data['check_admin_ids']])->value('name');
})
->withAttr('company_name',function($value,$data){
$extend = json_decode($data['extend'], true);
$company = Db::query("select * from la_company where FIND_IN_SET(:street,responsible_area)", ['street'=>$extend['street']], true);
return $company[0]['company_name'];
})
->toArray();
$count = Approve::where($this->searchWhere)
->where($this->queryWhere())->count();
return [
'lists' => $list,
'count' => $count,
'page_no' => $this->pageNo,
'page_size' => $this->pageSize,
];
}
public function lists3(): array
{
$list = Approve::where($this->searchWhere)
->where($this->queryWhere())
->with('task')
->field('*')
->append(['area_manager', 'company_a_name', 'company_b_name'], true)
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()
->withAttr('area_manager',function($value,$data){
return Admin::where(['id' => $data['check_admin_ids']])->value('name');
})
->withAttr('company_b_name',function($value,$data){
$task = Task::where('id', $data['task_id'])->find();
return Company::where(['id' => $task['company_id']])->value('company_name');
})
->withAttr('company_a_name',function($value,$data){
$task = Task::where('id', $data['task_id'])->find();
$companyB = Company::where(['id' => $task['company_id']])->find();
return Company::where(['village' => $companyB['village'], 'company_type'=>17])->value('company_name');
})
->toArray();
$count = Approve::where($this->searchWhere)
->where($this->queryWhere())->count();
return [
'lists' => $list,
'count' => $count,
'page_no' => $this->pageNo,
'page_size' => $this->pageSize,
];
}
public function count(): int
{

View File

@ -17,6 +17,7 @@ namespace app\adminapi\lists\informationg;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\informationg\UserInformationg;
use app\common\model\informationg\UserInformationgDemand;
use app\common\lists\ListsSearchInterface;
@ -61,6 +62,23 @@ class UserInformationgLists extends BaseAdminDataLists implements ListsSearchInt
->limit($this->limitOffset, $this->limitLength)
->select()
->toArray();
$informationIdArray = [];
foreach($lists as $k=>$v) {
$informationIdArray[] = $v['id'];
}
$data = UserInformationgDemand::whereIn('information_id', $informationIdArray)->order('id', 'desc')->select();
$aianalyseArray = [];
foreach($data as $kk=>$vv) {
if (!empty($vv['ai_aianalyse'])) {
$aianalyseArray[$vv['information_id']][] = $vv['id'];
}
}
foreach($lists as $k=>$v) {
$lists[$k]['aianalyse_status'] = 0;
if (!empty($aianalyseArray[$v['id']])) {
$lists[$k]['aianalyse_status'] = 1;
}
}
return $lists;
}

View File

@ -84,4 +84,9 @@ class DictDataLogic extends BaseLogic
{
return DictData::whereIn('id', [30,16,41])->order('sort')->select()->toArray();
}
public static function getTaskApproveTypeList()
{
return DictData::where(['type_value' => 'task_approve_type', 'status' => 1])->column('value');
}
}

View File

@ -36,8 +36,8 @@ class RechargeRefundValidate extends BaseValidate
];
protected $message = [
'recharge_id.require' => '参数缺失',
'record_id.require' => '参数缺失',
'recharge_id.require' => '参数缺失recharge_id',
'record_id.require' => '参数缺失record_id',
];

View File

@ -290,7 +290,9 @@ class CompanyController extends BaseApiController
Db::startTrans();
// 上交股金金额
$amount = $serviceGroupCompany['shareholder_money'];
if ($amount == 0) {
return $this->fail('股金金额不能为0');
}
$sharecapitalChangeLogData = [
'subordinate_company_id' => $serviceGroupCompany['id'],
'parent_company_id' => $villageCompany['id'],
@ -334,7 +336,7 @@ class CompanyController extends BaseApiController
];
CompanyAccountLog::create($company_log2);
Db::commit();
return $this->success('上交成功');
return $this->success('上交成功', [], 1, 1);
} catch (Exception $e) {
Db::rollback();
return $this->fail($e->getMessage());

View File

@ -6,6 +6,7 @@ use app\job\TaskInformationJob;
use app\job\TownTaskAdd;
use app\job\TownTaskSettlementJob;
use app\job\VillageTaskAdd;
use app\job\VillageTaskSettlementJob;
use think\facade\Log;
use app\common\model\Company;
use app\common\model\task_template\TaskTemplate;
@ -20,33 +21,13 @@ use app\job\TaskAdd;
*/
class CronController extends BaseApiController
{
public array $notNeedLogin = ['settlement','task_add', 'town_task_add', 'town_task_settlement'];
/**
* 小组服务公司任务结算
*/
public function settlement(){
// $all=TaskSchedulingPlan::where('is_pay',0)->with(['template_info','scheduling'])->select()->toArray();
$all = TaskSchedulingPlan::whereDay('end_time','today')
->withJoin(['scheduling'], 'left')
->where('scheduling.company_type', 18)
->where('is_pay',0)
->with(['template_info'])
->select()
->toArray();
foreach($all as $k=>$v){
queue(TaskInformationJob::class,$v);
}
Log::info('小组服务公司定时任务结算执行成功'.date('Y-m-d H:i:s'));
return $this->success('小组服务公司定时任务结算执行成功');
}
public array $notNeedLogin = ['settlement','task_add', 'town_task_add', 'town_task_settlement','village_task_add', 'village_task_settlement'];
/**
* 小组服务公司任务下发
*/
public function task_add(){
//任务下发
//任务下发
// $time=strtotime(date('Y-m-d',strtotime('-1 day')));
$time = strtotime(date('Y-m-d'));
// $tiem_end=$time+86399;
@ -77,24 +58,80 @@ class CronController extends BaseApiController
}
/**
* 镇农科公司任务结算
* 小组服务公司任务结算
*/
public function town_task_settlement()
public function settlement(){
// $all=TaskSchedulingPlan::where('is_pay',0)->with(['template_info','scheduling'])->select()->toArray();
$all = TaskSchedulingPlan::whereDay('end_time','today')
->withJoin(['scheduling'], 'left')
->where('scheduling.company_type', 18)
->where('is_pay',0)
->with(['template_info'])
->select()
->toArray();
foreach($all as $k=>$v){
queue(TaskInformationJob::class,$v);
}
Log::info('小组服务公司定时任务结算执行成功'.date('Y-m-d H:i:s'));
return $this->success('小组服务公司定时任务结算执行成功');
}
/**
* 村管理公司任务下发
*/
public function village_task_add()
{
Log::info('镇农科公司定时任务结算执行-开始'.date('Y-m-d H:i:s'));
//任务下发
$time = strtotime(date('Y-m-d'));
// 查询系统 所有镇农科公司 未下发 的 任务安排
$taskSchedulingList = TaskScheduling::where('cron_time', '<', $time)
->where('status', 1)
->where('company_type', 17)
->with('company_info')
->select()
->toArray();
$taskSchedulingIds = [];
$companyIds = [];
foreach ($taskSchedulingList as $k => $taskScheduling) {
$templateList = TaskTemplate::where('status', 1)->where('task_scheduling', $taskScheduling['id'])->limit(30)->select()->toArray();
$taskSchedulingIds[] = $taskScheduling['id'];
$companyIds[] = $taskScheduling['company_id'];
foreach ($templateList as $template) {
queue(VillageTaskAdd::class, $template);
// TaskLogic::TownCronAdd($template); // 手动下发用
}
if (empty($templateList)) {
unset($taskSchedulingList[$k]);
}
}
Company::where('id', 'in', $companyIds)->inc('day_count')->update();
TaskScheduling::where('id', 'in', $taskSchedulingIds)->update(['cron_time' => time()]);
Log::info('村管理公司定时任务下发执行成功' . date('Y-m-d H:i:s'));
return $this->success('村管理公司定时任务下发执行成功');
}
/**
* 村管理公司任务结算
*/
public function village_task_settlement()
{
Log::info('村管理公司定时任务结算执行-开始'.date('Y-m-d H:i:s'));
//today 今日未结算的任务计划
$taskSchedulingPlanList = TaskSchedulingPlan::whereDay('end_time','today')
->withJoin(['scheduling'], 'left')
->where('scheduling.company_type', 41)
->where('scheduling.company_type', 17)
->where('is_pay',0)
->with(['template_info'])
->select()
->toArray();
foreach($taskSchedulingPlanList as $taskSchedulingPlan){
queue(TownTaskSettlementJob::class, $taskSchedulingPlan);
queue(VillageTaskSettlementJob::class, $taskSchedulingPlan);
}
Log::info('镇农科公司定时任务结算执行-结束'.date('Y-m-d H:i:s'));
return $this->success('镇农科公司定时任务结算执行成功');
Log::info('村管理公司定时任务结算执行-结束'.date('Y-m-d H:i:s'));
return $this->success('村管理公司定时任务结算执行成功');
}
/**
@ -105,7 +142,12 @@ class CronController extends BaseApiController
//任务下发
$time = strtotime(date('Y-m-d'));
// 查询系统 所有镇农科公司 未下发 的 任务安排
$taskSchedulingList = TaskScheduling::where('cron_time', '<', $time)->where('status', 1)->where('company_type', 41)->with('company_info')->select()->toArray();
$taskSchedulingList = TaskScheduling::where('cron_time', '<', $time)
->where('status', 1)
->where('company_type', 41)
->with('company_info')
->select()
->toArray();
$taskSchedulingIds = [];
$companyIds = [];
@ -129,33 +171,36 @@ class CronController extends BaseApiController
}
/**
* 村管理公司任务下发
* 镇农科公司任务结算
*/
public function village_task_add()
public function town_task_settlement()
{
//任务下发
$time = strtotime(date('Y-m-d'));
// 查询系统 所有镇农科公司 未下发 的 任务安排
$taskSchedulingList = TaskScheduling::where('cron_time', '<', $time)->where('status', 1)->where('company_type', 17)->with('company_info')->select()->toArray();
$taskSchedulingIds = [];
$companyIds = [];
foreach ($taskSchedulingList as $k => $taskScheduling) {
$templateList = TaskTemplate::where('status', 1)->where('task_scheduling', $taskScheduling['id'])->limit(30)->select()->toArray();
$taskSchedulingIds[] = $taskScheduling['id'];
$companyIds[] = $taskScheduling['company_id'];
foreach ($templateList as $template) {
queue(VillageTaskAdd::class, $template);
// TaskLogic::TownCronAdd($template); // 手动下发用
Log::info('镇农科公司定时任务结算执行-开始'.date('Y-m-d H:i:s'));
//today 今日未结算的任务计划
$taskSchedulingPlanList = TaskSchedulingPlan::whereDay('end_time','today')
->withJoin(['scheduling'], 'left')
->where('scheduling.company_type', 41)
->where('is_pay',0)
->with(['template_info'])
->select()
->toArray();
foreach($taskSchedulingPlanList as $taskSchedulingPlan){
// 解耦 三个角色分开结算,避免某个角色的结算逻辑出现异常,导致整个镇农科公司的任务结算都终止
$taskTemplateInfo = $taskSchedulingPlan['template_info'];
// 负责人任务结算
if ($taskTemplateInfo['extend']['task_role'] == 1) {
queue(TownTaskSettlementJob::class, $taskSchedulingPlan);
}
if (empty($templateList)) {
unset($taskSchedulingList[$k]);
// 市场部长任务结算
if ($taskTemplateInfo['extend']['task_role'] == 2) {
queue(TownTaskSettlementJob::class, $taskSchedulingPlan);
}
// 服务部长任务结算
if ($taskTemplateInfo['extend']['task_role'] == 3) {
queue(TownTaskSettlementJob::class, $taskSchedulingPlan);
}
}
Company::where('id', 'in', $companyIds)->inc('day_count')->update();
TaskScheduling::where('id', 'in', $taskSchedulingIds)->update(['cron_time' => time()]);
Log::info('村管理公司定时任务下发执行成功' . date('Y-m-d H:i:s'));
return $this->success('村管理公司定时任务下发执行成功');
Log::info('镇农科公司定时任务结算执行-结束'.date('Y-m-d H:i:s'));
return $this->success('镇农科公司定时任务结算执行成功');
}
}

View File

@ -178,6 +178,7 @@ class IndexController extends BaseApiController
$updateSverRes =curl_post(env('project.logistic_domain').'/api/contractUpdate',[],[
'id' => $contract['contract_logistic_id'],
'signing_timer' => 1,
'update_time' => time()
]);
if(!$updateLocalRes || $updateSverRes['code']==0){
return json(['success' => false, 'msg' => '更新失败']);
@ -224,7 +225,8 @@ class IndexController extends BaseApiController
'signing_timer' => 2,
'status' => 3,
'contract_url'=>$signContractFile,
'contract_evidence'=>$contractEvidence
'contract_evidence'=>$contractEvidence,
'update_time' => time()
]);
if(!$updateLocalRes || $updateSverRes['code']==0){
return json(['success' => false, 'msg' => '更新失败']);
@ -429,6 +431,7 @@ class IndexController extends BaseApiController
'status' => 3,
'contract_url'=>$signContractFile,
'contract_evidence'=>$contractEvidence,
'update_time' => time()
]);
}
//判断合同是否存在购买记录表中
@ -644,6 +647,7 @@ class IndexController extends BaseApiController
'use_user_id' =>$compay['user_id'],
'use_user_name' =>$compay['master_name'],
'use_user_phone' =>$compay['master_phone'],
'update_time' => time()
]);
if(!$updateLocalRes || $updateSverRes['code']==0){
return json(['success' => false, 'msg' => '更新失败']);

View File

@ -2,14 +2,19 @@
namespace app\api\controller;
use app\common\model\Company;
use app\common\model\informationg\UserInformationg;
use app\common\logic\BaseLogic;
use app\common\model\informationg\UserInformationgDemand;
use app\common\model\task\Task;
use app\common\model\task_template\TaskTemplate;
use app\common\model\user\User;
use think\response\Json;
class InformationController extends BaseApiController
{
public array $notNeedLogin = ['groupServiceInfo','captainInfo','farmerInfo','farmerInfoByPhone','farmerLandInfo','farmerPondInfo','farmerList'];
public function list()
{
$param = Request()->param();
@ -128,4 +133,404 @@ class InformationController extends BaseApiController
}
return $this->success('成功');
}
//获取吓阻服务公司用户信息
public function groupServiceInfo(): Json
{
//获取参数
$params = $this->request->post(['user_id']);
if(empty($params['user_id'])){
return $this->fail('参数错误_worker');
}
$userData = User::field('id,company_id,nickname as name,avatar')->where('id',$params['user_id'])->findOrEmpty();
if($userData->isEmpty()){
return $this->fail('用户数据不存在');
}
$companyData = Company::field('id,company_name,company_type')->where('id',$userData['company_id'])->findOrEmpty();
if($companyData->isEmpty() || $companyData['company_type'] != 18){
return $this->fail('当前用户不是小组服务公司用户');
}
$userData['company_name'] = $companyData['company_name'];
//获取小组服务公司下面的队长
$captainList = User::field('id,nickname as name,avatar,province,province province_name,city,city city_name,area,area area_name,street,street street_name,village,village village_name,brigade,brigade brigade_name')->where('company_id',$userData['company_id'])->where('is_captain',1)->select()->each(function($item){
$item['address'] = $item['province_name'].$item['city_name'].$item['area_name'].$item['street_name'].$item['village_name'].$item['brigade_name'];
unset($item['province'],$item['province_name'],$item['city'],$item['city_name'],$item['area'],$item['area_name'],$item['street'],$item['street_name'],$item['village'],$item['village_name'],$item['brigade'],$item['brigade_name']);
$farmerList = UserInformationg::where('create_user_id', $item['id'])->field('id')->select()->each(function($val){
//获取农户档案详情
$information = UserInformationgDemand::field('id,category_child,data')->where('information_id', $val['id'])->where('category_id',6)->where('category_child','in','7,32')->order('id', 'desc')->select()->toArray();
//总面积
$val['land_total_area'] = 0;
$val['pond_total_area'] = 0;
$val['animal_total_area'] = 0;
$val['poultry_total_area'] = 0;
//种养类型
$val['is_zz_user'] = false;
$val['is_sc_user'] = false;
$val['is_jc_user'] = false;
$val['is_jq_user'] = false;
foreach($information as $v){
if($v['category_child'] == 7){
$val['is_zz_user'] = true;
$val['land_total_area'] += floatval($v['data']['area']);
}
if($v['category_child'] == 32){
if($v['data']['breeding_type'] == 1){//水产
$val['is_sc_user'] = true;
$val['pond_total_area'] += floatval($v['data']['area']);
}elseif ($v['data']['breeding_type'] == 2) {//脯乳动物
$val['is_jc_user'] = true;
$val['animal_total_area'] += floatval($v['data']['area']);
}elseif ($v['data']['breeding_type'] == 3){//家禽
$val['is_jq_user'] = true;
$val['poultry_total_area'] += floatval($v['data']['area']);
}
}
}
$val['total_area'] = $val['land_total_area'] + $val['pond_total_area'] + $val['animal_total_area'] + $val['poultry_total_area'];
return $val;
})->toArray();
$item['farmer_total'] = count($farmerList);
$item['farmer_area'] = array_sum(array_column($farmerList,'total_area'));
$item['farmer_zz_total'] = 0;
$item['farmer_sc_total'] = 0;
$item['farmer_jc_total'] = 0;
$item['farmer_jq_total'] = 0;
$item['farmer_zz_area'] = 0;
$item['farmer_sc_area'] = 0;
$item['farmer_jc_area'] = 0;
$item['farmer_jq_area'] = 0;
foreach($farmerList as $v){
if($v['is_zz_user']){
$item['farmer_zz_total'] += 1;
}
if($v['is_sc_user']){
$item['farmer_sc_total'] += 1;
}
if($v['is_jc_user']){
$item['farmer_jc_total'] += 1;
}
if($v['is_jq_user']){
$item['farmer_jq_total'] += 1;
}
$item['farmer_zz_area'] += $v['land_total_area'];
$item['farmer_sc_area'] += $v['pond_total_area'];
$item['farmer_jc_area'] += $v['animal_total_area'];
$item['farmer_jq_area'] += $v['poultry_total_area'];
}
return $item;
})->toArray();
$userData['captain_list'] = $captainList;
return $this->success('请求成功',$userData->toArray());
}
//获取生产队长信息
public function captainInfo(): Json
{
//获取参数
$params = $this->request->post(['user_id']);
if(empty($params['user_id'])){
return $this->fail('参数错误_worker');
}
$userData = User::field('id,nickname as name,avatar,province,province province_name,city,city city_name,area,area area_name,street,street street_name,village,village village_name,brigade,brigade brigade_name')->where('id',$params['user_id'])->where('is_captain',1)->findOrEmpty();
if($userData->isEmpty()){
return $this->fail('用户数据不存在');
}
$userData['address'] = $userData['province_name'].$userData['city_name'].$userData['area_name'].$userData['street_name'].$userData['village_name'].$userData['brigade_name'];
unset($userData['province'],$userData['province_name'],$userData['city'],$userData['city_name'],$userData['area'],$userData['area_name'],$userData['street'],$userData['street_name'],$userData['village'],$userData['village_name'],$userData['brigade'],$userData['brigade_name']);
//获取生产队长下面的农户
$farmerList = UserInformationg::where('create_user_id', $params['user_id'])->field('id,name,phone,area_id,street_id,village_id,brigade_id,area_id area_name,street_id street_name,village_id village_name,brigade_id brigade_name')->select()->each(function($item){
$item['address'] = $item['area_name'].$item['street_name'].$item['village_name'].$item['brigade_name'];
unset($item['area_id'],$item['area_name'],$item['street_id'],$item['street_name'],$item['village_id'],$item['village_name'],$item['brigade_id'],$item['brigade_name']);
//获取农户档案详情
$information = UserInformationgDemand::field('id,category_child,data')->where('information_id', $item['id'])->where('category_id',6)->where('category_child','in','7,32')->order('id', 'desc')->select()->toArray();
//总面积
$item['land_total_area'] = 0;
$item['pond_total_area'] = 0;
$item['animal_total_area'] = 0;
$item['poultry_total_area'] = 0;
//种养类型
$item['is_zz_user'] = false;
$item['is_sc_user'] = false;
$item['is_jc_user'] = false;
$item['is_jq_user'] = false;
foreach($information as $v){
if($v['category_child'] == 7){
$item['is_zz_user'] = true;
$item['land_total_area'] += floatval($v['data']['area']);
}
if($v['category_child'] == 32){
if($v['data']['breeding_type'] == 1){//水产
$item['is_sc_user'] = true;
$item['pond_total_area'] += floatval($v['data']['area']);
}elseif ($v['data']['breeding_type'] == 2) {//脯乳动物
$item['is_jc_user'] = true;
$item['animal_total_area'] += floatval($v['data']['area']);
}elseif ($v['data']['breeding_type'] == 3){//家禽
$item['is_jq_user'] = true;
$item['poultry_total_area'] += floatval($v['data']['area']);
}
}
}
$item['total_area'] = $item['land_total_area'] + $item['pond_total_area'] + $item['animal_total_area'] + $item['poultry_total_area'];
return $item;
})->toArray();
$userData['farmer_total'] = count($farmerList);
$userData['farmer_area'] = array_sum(array_column($farmerList,'total_area'));
$userData['farmer_zz_total'] = 0;
$userData['farmer_sc_total'] = 0;
$userData['farmer_jc_total'] = 0;
$userData['farmer_jq_total'] = 0;
$userData['farmer_zz_area'] = 0;
$userData['farmer_sc_area'] = 0;
$userData['farmer_jc_area'] = 0;
$userData['farmer_jq_area'] = 0;
foreach($farmerList as $v){
if($v['is_zz_user']){
$userData['farmer_zz_total'] += 1;
}
if($v['is_sc_user']){
$userData['farmer_sc_total'] += 1;
}
if($v['is_jc_user']){
$userData['farmer_jc_total'] += 1;
}
if($v['is_jq_user']){
$userData['farmer_jq_total'] += 1;
}
$userData['farmer_zz_area'] += $v['land_total_area'];
$userData['farmer_sc_area'] += $v['pond_total_area'];
$userData['farmer_jc_area'] += $v['animal_total_area'];
$userData['farmer_jq_area'] += $v['poultry_total_area'];
}
$userData['farmer_list'] = $farmerList;
return $this->success('请求成功',$userData->toArray());
}
//获取农户信息,该接口溯源系统调用
public function farmerInfo(): Json
{
//获取参数
$params = $this->request->post(['user_id']);
if(empty($params['user_id'])){
return $this->fail('参数错误_worker');
}
//获取农户信息
$farmerInfo = UserInformationg::alias('f')
->leftJoin('company c','f.company_id = c.id')
->leftJoin('user u','u.id = f.create_user_id')
->leftJoin('user g','g.id = c.user_id')
->where('f.id', $params['user_id'])
->field('f.id,f.create_user_id,f.company_id,f.name,f.phone,f.area_id,f.street_id,f.village_id,f.brigade_id,f.area_id area_name,f.street_id street_name,f.village_id village_name,f.brigade_id brigade_name,c.company_name,f.address,u.nickname as captain_name,g.nickname as group_name')
->findOrEmpty()->toArray();
if(empty($farmerInfo)){
return $this->fail('用户不存在_worker');
}
unset($farmerInfo['area_id'],$farmerInfo['street_id'],$farmerInfo['village_id'],$farmerInfo['brigade_id']);
$data = UserInformationgDemand::field('id,category_child,data')->where('information_id', $params['user_id'])->where('category_id',6)->where('category_child','in','7,32')->order('id', 'desc')->select()->toArray();
//是否是种植户
$farmerInfo['is_zz_user'] = false;
//是否是水产养殖户
$farmerInfo['is_sc_user'] = false;
//是否是家禽养殖户
$farmerInfo['is_jq_user'] = false;
//是否是大型动物养殖户
$farmerInfo['is_dw_user'] = false;
//土地总面积
$farmerInfo['total_land_area'] = 0;
//池塘总面积
$farmerInfo['total_pond_area'] = 0;
//家禽养殖场总面积
$farmerInfo['total_henhouse_area'] = 0;
//动物养殖场总面积
$farmerInfo['total_pasture_area'] = 0;
foreach($data as $v){
if($v['category_child'] == 7){
$farmerInfo['is_zz_user'] = true;
$farmerInfo['total_land_area'] += floatval($v['data']['area']);
$farmerInfo['land_detail'][] = [
'land_id' => $v['id'],
'land_area' => $v['data']['area'],
'land_notes' => $v['data']['notes'],
];
}
if($v['category_child'] == 32){
if($v['data']['breeding_type'] == 1){//水产
$farmerInfo['is_sc_user'] = true;
$farmerInfo['total_pond_area'] += floatval($v['data']['area']);
$farmerInfo['pond_detail'][] = [
'pond_id' => $v['id'],
'pond_area' => $v['data']['area'],
'pond_notes' => $v['data']['notes'],
];
}elseif ($v['data']['breeding_type'] == 2) {//脯乳动物
$farmerInfo['is_jq_user'] = true;
$farmerInfo['total_henhouse_area'] += floatval($v['data']['area']);
}elseif ($v['data']['breeding_type'] == 3){//家禽
$farmerInfo['is_dw_user'] = true;
$farmerInfo['total_pasture_area'] += floatval($v['data']['area']);
}
}
}
return $this->success('请求成功',$farmerInfo);
}
//通过手机号码查找农户
public function farmerInfoByPhone(): Json
{
$params = $this->request->post(['phone']);
if(empty($params['phone'])){
return $this->fail('参数错误');
}
$data = UserInformationg::where('phone',$params['phone'])
->field('id,name,phone,area_id,street_id,village_id,brigade_id,area_id area_name,street_id street_name,village_id village_name,brigade_id brigade_name,address')
->findOrEmpty();
return !$data->isEmpty() ? $this->success('请求成功',$data->toArray()) : $this->fail('请求失败');
}
//获取农户土地信息
public function farmerLandInfo(): Json
{
//获取参数
$params = $this->request->post(['user_id','land_id']);
if(empty($params['user_id']) || empty($params['land_id'])){
return $this->fail('参数错误_worker');
}
//获取农户信息
$data = UserInformationgDemand::field('id,data')->where('id',$params['land_id'])->where('information_id', $params['user_id'])->where('category_id',6)->where('category_child',7)->findOrEmpty()->toArray();
if(empty($data)){
return $this->fail('数据不存在_worker');
}
$resData = [
'land_id' => $data['id'],
'land_area' => $data['data']['area']
];
return $this->success('请求成功',$resData);
}
//获取农户鱼塘信息
public function farmerPondInfo(): Json
{
//获取参数
$params = $this->request->post(['user_id','pond_id']);
if(empty($params['user_id']) || empty($params['pond_id'])){
return $this->fail('参数错误_worker');
}
//获取农户信息
$data = UserInformationgDemand::field('id,data')->where('id',$params['pond_id'])->where('information_id', $params['user_id'])->where('category_id',6)->where('category_child',32)->findOrEmpty()->toArray();
if(empty($data) || empty($data['data'])){
return $this->fail('数据不存在_worker');
}
if($data['data']['breeding_type'] != 1){
return $this->fail('数据错误_work');
}
$resData = [
'pond_id' => $data['id'],
'pond_area' => $data['data']['area']
];
return $this->success('请求成功',$resData);
}
//获取农户列表
public function farmerList(): Json
{
$params = $this->request->post(['farmer_name','farmer_phone','group_name','captain_name','page_no','page_size']);
if(empty($params['page_no']) || empty($params['page_size'])){
return $this->fail('参数错误');
}
$search = [];
if(!empty($params['farmer_name'])){
$search[] = ['f.name','like','%'.$params['farmer_name'].'%'];
}
if(!empty($params['farmer_phone'])){
$search[] = ['f.phone','like','%'.$params['farmer_phone'].'%'];
}
if(!empty($params['group_name'])){
$search[] = ['g.nickname','like','%'.$params['group_name'].'%'];
}
if(!empty($params['captain_name'])){
$search[] = ['u.nickname','like','%'.$params['captain_name'].'%'];
}
$data = UserInformationg::alias('f')
->field('f.id,f.create_user_id,f.company_id,f.name,f.phone,f.area_id,f.street_id,f.village_id,f.brigade_id,c.company_name,u.nickname as captain_name,g.nickname as group_name,f.area_id area_name,f.street_id street_name,f.village_id village_name,f.brigade_id brigade_name,f.address')
->leftJoin('company c','f.company_id = c.id')
->leftJoin('user u','u.id = f.create_user_id')
->leftJoin('user g','g.id = c.user_id')
->where($search)
->page($params['page_no'],$params['page_size'])->order('id desc')->select()
->each(function($item){
$item['address'] = $item['area_name'].$item['street_name'].$item['village_name'].$item['brigade_name'].$item['address'];
unset($item['area_name'],$item['street_name'],$item['village_name'],$item['brigade_name'],$item['area_id'],$item['street_id'],$item['village_id'],$item['brigade_id']);
$userInformationgDemand = UserInformationgDemand::field('id,category_child,data')->where('information_id', $item['id'])->where('category_id',6)->where('category_child','in','7,32')->order('id', 'desc')->select()->toArray();
//是否是种植户
$is_zz_user = false;
//是否是水产养殖户
$is_sc_user = false;
//是否是家禽养殖户
$is_jq_user = false;
//是否是大型动物养殖户
$is_dw_user = false;
//土地总面积
$total_land_area = 0;
//池塘总面积
$total_pond_area = 0;
//家禽养殖场总面积
$total_henhouse_area = 0;
//动物养殖场总面积
$total_pasture_area = 0;
foreach($userInformationgDemand as $v){
if($v['category_child'] == 7){
$is_zz_user = true;
$total_land_area += floatval($v['data']['area']);
}
if($v['category_child'] == 32){
if($v['data']['breeding_type'] == 1){//水产
$is_sc_user = true;
$total_pond_area += floatval($v['data']['area']);
}elseif ($v['data']['breeding_type'] == 2) {//脯乳动物
$is_jq_user = true;
$total_henhouse_area += floatval($v['data']['area']);
}elseif ($v['data']['breeding_type'] == 3){//家禽
$is_dw_user = true;
$total_pasture_area += floatval($v['data']['area']);
}
}
}
$str = [];
$area = [];
if($is_zz_user){
$str[] = '种植户';
$area[] = $total_land_area;
}
if($is_sc_user){
$str[] = '水产养殖户';
$area[] = $total_pond_area;
}
if($is_jq_user){
$str[] = '家禽养殖户';
$area[] = $total_henhouse_area;
}
if($is_dw_user){
$str[] = '家畜养殖户';
$area[] = $total_pasture_area;
}
$item['farmer_type'] = implode('/',$str);
$item['farmer_area'] = implode('/',$area);
return $item;
})->toArray();
$count = UserInformationg::alias('f')
->field('f.id,f.create_user_id,f.company_id,f.name,f.phone,f.area_id,f.street_id,f.village_id,f.brigade_id,c.company_name,u.nickname as captain_name,g.nickname as group_name,f.area_id area_name,f.street_id street_name,f.village_id village_name,f.brigade_id brigade_name,f.address')
->leftJoin('company c','f.company_id = c.id')
->leftJoin('user u','u.id = f.create_user_id')
->leftJoin('user g','g.id = c.user_id')
->where($search)
->count();
$result = [
'count' => $count,
'page_no' => $params['page_no'],
'page_size' => $params['page_size'],
'lists' => $data
];
return $this->success('请求成功',$result);
}
}

View File

@ -14,6 +14,8 @@
namespace app\api\controller;
use app\common\cache\UserTokenCache;
use app\common\model\Company;
use app\api\validate\{LoginAccountValidate, RegisterValidate, WebScanLoginValidate, WechatLoginValidate};
use app\api\logic\LoginLogic;
use app\api\logic\UserLogic;
@ -32,7 +34,7 @@ use app\common\service\FileService;
class LoginController extends BaseApiController
{
public array $notNeedLogin = ['register', 'account', 'logout', 'codeUrl', 'oaLogin', 'mnpLogin', 'getScanCode', 'scanLogin', 'shop_account'];
public array $notNeedLogin = ['register', 'account', 'logout', 'codeUrl', 'oaLogin', 'mnpLogin', 'getScanCode', 'scanLogin', 'shop_account','checkToken'];
/**
@ -255,4 +257,23 @@ class LoginController extends BaseApiController
LoginLogic::updateUser($params, $this->userId);
return $this->success('操作成功', [], 1, 1);
}
public function checkToken(): \think\response\Json
{
$token = $this->request->post('token');
if(empty($token)){
return $this->fail('token参数错误');
}
$userInfo = (new UserTokenCache())->getUserInfo($token);
if(!$userInfo){
return $this->fail('token无效');
}
//获取公司信息
$company = Company::field('company_name,company_type')->where('id',$userInfo['company_id'])->findOrEmpty();
if(!$company->isEmpty()){
$userInfo['company_name'] = $company['company_name'];
$userInfo['company_type'] = $company['company_type'];
}
return $this->success('请求成功',$userInfo);
}
}

View File

@ -44,7 +44,7 @@ class RechargeController extends BaseApiController
foreach($list as $k=>$v){
$datas[$k]['create_time']=$v['create_time'];
$datas[$k]['order_amount']=$v['change_amount'];
$datas[$k]['tips']='充值保证金'.$v['change_amount'];
$datas[$k]['tips']='押金充值'.$v['change_amount'];
}
return $this->success('ok',['count'=>0,'extend'=>[],'lists'=>$datas,'page_no'=>$params['page_no'],'page_size'=>$params['page_size']]);
}

View File

@ -13,6 +13,7 @@ use app\common\model\informationg\UserInformationg;
use app\common\model\task\Task;
use app\common\model\task_template\TaskTemplate;
use app\common\model\user\User;
use app\common\model\vehicle\VehicleRent;
use think\Exception;
use think\facade\Db;
@ -34,15 +35,20 @@ class TaskController extends BaseApiController
$is_captain = User::where('id', $this->userId)->value('is_captain');
if ($is_captain == 1) {
$where[] = ['type', 'in', [31,33]];
} else {
$where[] = ['type', '=', 33];
$where[] = ['director_uid', '=', $this->userId];
}
// $where[] = ['company_id', '=', $this->userInfo['company_id']];
// else {
// $where[] = ['type', '=', 33];
// $where[] = ['director_uid', '=', $this->userId];
// }
$where[] = ['company_id', '=', $this->userInfo['company_id']];
}
if ($userCompanyInfo['company_type'] == 41) {
$where[] = ['director_uid', '=', $this->userId];
// $where[] = ['company_id', '=', $this->userInfo['company_id']];
}
if ($userCompanyInfo['company_type'] == 17) {
$where[] = ['director_uid', '=', $this->userId];
// $where[] = ['company_id', '=', $this->userInfo['company_id']];
}
if (isset($param['date_time']) && $param['date_time'] != '') {
@ -71,7 +77,6 @@ class TaskController extends BaseApiController
->page($page, 25)
->order(['id' => 'desc', 'status' => 'asc'])
->select()->toArray();
foreach ($res as $k => $item) {
if ($item['type'] == 33) {
$company = Company::where('id', $item['company_id'])->field('id,deposit,company_money,user_id,day_count,company_type,province,city,area,street,village,brigade,responsible_area')->find(); // 可能要判断预存金是否满足
@ -200,6 +205,12 @@ class TaskController extends BaseApiController
public function shareholder(){
$parmas = $this->request->param();
$task = TaskLogic::detail($parmas);
$extend = $task['extend'];
if (isset($extend['is_commit']) && $extend['is_commit'] == 1) {
$approve = Approve::where(['task_id' =>$task['id']])->order('id', 'desc')->find();
$task['approve_status'] = $approve['check_status']; //审核状态
$task['deny_notes'] = $approve['remark']; // 拒绝原因
}
return $this->success('ok', $task);
}
/**
@ -219,15 +230,20 @@ class TaskController extends BaseApiController
{
$parmas = $this->request->param();
$task = Task::where('id', $parmas['id'])->find()->toArray();
$object_id=CompanyProperty::where('company_id',$this->userInfo['company_id'])->value('object_id');
if(!$object_id){
return $this->fail('该公司没有三轮车,请先租赁三轮车');
$VehicleRent = VehicleRent::where('rent_company_id', $this->userInfo['company_id'])->find();
if(empty($VehicleRent)){
self::setError('该公司没有三轮车,请先租赁三轮车');
return false;
}
// $object_id=CompanyProperty::where('company_id',$this->userInfo['company_id'])->value('object_id');
// if(!$object_id){
// return $this->fail('该公司没有三轮车,请先租赁三轮车');
// }
$start_time = date('Y-m-d');
$time=strtotime($start_time)+86399;
$end_time=date('Y-m-d H:i:s',$time);
$datas=[
'car_id'=>$object_id,
'car_id'=>$VehicleRent['car_id'],
'start_time'=>$start_time.' 00:00:00',
'end_time'=>$end_time
];
@ -299,7 +315,7 @@ class TaskController extends BaseApiController
$parmas = $this->request->param();
$task = TaskLogic::detail($parmas);
$extend = $task['extend'];
if ($extend['other']['is_commit'] == 1) {
if (isset($extend['other']) && $extend['other']['is_commit'] == 1) {
$approve = Approve::where(['task_id' =>$task['id']])->find();
$task['approve_status'] = $approve['check_status']; //审核状态
$task['deny_notes'] = $approve['remark']; // 拒绝原因
@ -318,6 +334,10 @@ class TaskController extends BaseApiController
if (empty($task)) {
$this->fail('任务不存在');
}
if (empty($parmas['annex']) && empty($parmas['video_annex'])) {
$this->fail('没有上传凭证,无法提交审核');
}
$extend = ['other' => ['is_commit' => 1, 'note' => $parmas['note'], 'annex'=>$parmas['annex'], 'video_annex' => $parmas['video_annex']]];
Db::startTrans();
Task::where(['id' => $parmas['id']])->update(['extend' => json_encode($extend), 'update_time'=>time(), 'director_uid'=>$this->userId]); // director_uid 指派人
@ -340,7 +360,7 @@ class TaskController extends BaseApiController
$approveModel->other_type = 6;
$approveModel->create_time = time();
$approveModel->update_time = time();
$approveModel->strict(false)->save();
$re = $approveModel->save();
} else {
// 有则更新状态
$approveModel->check_status = 1; // 状态 0待审核,1审核中,2审核通过,3审核不通过,4撤销审核
@ -363,6 +383,7 @@ class TaskController extends BaseApiController
{
$param = $this->request->param();
$task = TaskLogic::detail($param);
$task['template_info'] = TaskTemplate::where(['id' => $task['template_id']])->find();
return $this->success('成功', $task);
}
@ -405,23 +426,83 @@ class TaskController extends BaseApiController
$extend = [];
$stage = $parmas['stage']; // 当前做的是任务第几阶段
if ($stage == 1) {
$parmas['stage1']['is_commit'] = 1;
$extend['stage1'] = $parmas['stage1'];
$parmas['stage1']['is_commit'] = 1;
}
if ($stage == 2) {
$extend['stage2']['is_commit'] = 1;
$extend['stage2'] = $parmas['stage2'];
$extend['stage2']['is_commit'] = 1;
}
if ($stage == 3) {
$extend['stage3']['is_commit'] = 1;
$extend['stage3'] = $parmas['stage3'];
$extend['stage3']['is_commit'] = 1;
}
if ($stage == 4) {
$extend['stage4']['is_commit'] = 1;
$extend['stage4'] = $parmas['stage4'];
$extend['stage4']['is_commit'] = 1;
}
$extend['stage'] = $stage;
Task::where(['id' => $parmas['id']])->update(['extend' => json_encode($extend), 'update_time'=>time(), 'director_uid'=>$this->userId]); // director_uid 指派人
// 片区经理
$areaManagerId = User::where(['id' => $this->userId])->with('company')->value('area_manager');
// 创建审批任务
$approveModel = new Approve();
$approveModel->type = Approve::APPROVE_TYPE_4;
$approveModel->flow_id = 1;
$approveModel->name = $task['title'];
$approveModel->admin_id = 0; // 后台发起人id 暂时为0
$approveModel->user_id = $this->userId; // 前台发起人用户id
$approveModel->task_id = $task['id']; // 任务id
$approveModel->department_id = '0';
$approveModel->check_admin_ids = $areaManagerId; // 当前审批人ID 片区经理的admin_id
$approveModel->check_status = 1; // 状态 0待审核,1审核中,2审核通过,3审核不通过,4撤销审核
$approveModel->other_type = 6;
$approveModel->extend = json_encode($extend);
$approveModel->create_time = time();
$approveModel->update_time = time();
$re = $approveModel->save();
return $this->success('ok', []);
} catch (Exception $e) {
return $this->fail($e->getMessage());
}
}
public function town_task_type_marketing_director_10_detail()
{
$parmas = $this->request->param();
$task = TaskLogic::detail($parmas);
$approve = Approve::where(['task_id' =>$task['id']])->order('id', 'desc')->find();
if ($approve) {
$task['approve_status'] = $approve['check_status']; //审核状态
$task['deny_notes'] = $approve['remark']; // 拒绝原因
$task['approve_extend'] = $approve['extend']; // 审批扩展信息
}
return $this->success('ok', $task);
}
public function commit_village_task_type_6()
{
try {
$parmas = $this->request->param(); //id annex video_annex
$task = TaskLogic::detail($parmas);
if (empty($task)) {
$this->fail('任务不存在');
}
if (empty($parmas['annex']) && empty($parmas['video_annex'])) {
$this->fail('没有上传凭证,无法提交审核');
}
$extend = [
'other'=> [
'is_commit' => 1,
'note' => $parmas['note'],
'annex' => $parmas['annex'],
'video_annex' => $parmas['video_annex'],
]
];
Task::where(['id' => $parmas['id']])->update(['extend' => json_encode($extend), 'update_time'=>time(), 'director_uid'=>$this->userId]); // director_uid 指派人
// 片区经理
@ -431,7 +512,7 @@ class TaskController extends BaseApiController
// 没有则创建审批任务
$approveModel = Approve::where(['task_id' => $task['id']])->findOrEmpty();
if ($approveModel->isEmpty()) {
$approveModel->type = Approve::APPROVE_TYPE_4;
$approveModel->type = Approve::APPROVE_TYPE_5;
$approveModel->flow_id = 1;
$approveModel->name = $task['title'];
$approveModel->admin_id = 0; // 后台发起人id 暂时为0
@ -456,16 +537,343 @@ class TaskController extends BaseApiController
}
}
public function town_task_type_marketing_director_10_detail()
public function commit_village_task_type_8()
{
$parmas = $this->request->param();
$task = TaskLogic::detail($parmas);
$approve = Approve::where(['task_id' =>$task['id']])->find();
if ($approve) {
$task['approve_status'] = $approve['check_status']; //审核状态
$task['deny_notes'] = $approve['remark']; // 拒绝原因
$task['approve_extend'] = $approve['extend']; // 审批扩展信息
try {
$parmas = $this->request->param(); // id annex video_annex
$task = TaskLogic::detail($parmas);
if (empty($task)) {
$this->fail('任务不存在');
}
if (empty($parmas['annex']) && empty($parmas['video_annex'])) {
$this->fail('没有上传凭证,无法提交审核');
}
$extend = [
'other'=> [
'is_commit' => 1,
'note' => $parmas['note'],
'annex' => $parmas['annex'],
'video_annex' => $parmas['video_annex'],
]
];
Task::where(['id' => $parmas['id']])->update(['extend' => json_encode($extend), 'update_time'=>time(), 'director_uid'=>$this->userId]); // director_uid 指派人
// 片区经理
$areaManagerId = User::where(['id' => $this->userId])->with('company')->value('area_manager');
// 没有则创建审批任务
$approveModel = Approve::where(['task_id' => $task['id']])->findOrEmpty();
if ($approveModel->isEmpty()) {
$approveModel->type = Approve::APPROVE_TYPE_6;
$approveModel->flow_id = 1;
$approveModel->name = $task['title'];
$approveModel->admin_id = 0; // 后台发起人id 暂时为0
$approveModel->user_id = $this->userId; // 前台发起人用户id
$approveModel->task_id = $task['id']; // 任务id
$approveModel->department_id = '0';
$approveModel->check_admin_ids = $areaManagerId; // 当前审批人ID 片区经理的admin_id
$approveModel->check_status = 1; // 状态 0待审核,1审核中,2审核通过,3审核不通过,4撤销审核
$approveModel->other_type = 6;
$approveModel->extend = json_encode($extend);
$approveModel->create_time = time();
$approveModel->update_time = time();
$re = $approveModel->save();
} else {
// 有则更新状态
$approveModel->check_status = 1; // 状态 0待审核,1审核中,2审核通过,3审核不通过,4撤销审核
$approveModel->save();
}
return $this->success('ok', []);
} catch (Exception $e) {
return $this->fail($e->getMessage());
}
}
/**
* 提前完成,截止提交时间,前面的钱一次性结算,往后至任务结束每天发放
*/
public function commit_town_master_task_type_2()
{
try {
$parmas = $this->request->param(); // id annex video_annex
$task = TaskLogic::detail($parmas);
if (empty($task)) {
$this->fail('任务不存在');
}
if (empty($parmas['annex']) && empty($parmas['video_annex'])) {
$this->fail('没有上传凭证,无法提交审核');
}
$extend = [
'other'=> [
'is_commit' => 1,
'note' => $parmas['note'],
'annex' => $parmas['annex'],
'video_annex' => $parmas['video_annex'],
]
];
Task::where(['id' => $parmas['id']])->update(['extend' => json_encode($extend), 'update_time'=>time(), 'director_uid'=>$this->userId]); // director_uid 指派人
// 片区经理
$areaManagerId = User::where(['id' => $this->userId])->with('company')->value('area_manager');
// 查询是否 已有审批通过的
$approveModel = Approve::where(['business_id' => $task['template_id'], 'check_status' => 2])->findOrEmpty();
if ($approveModel->isEmpty()) {
$approveModel->type = Approve::APPROVE_TYPE_7;
$approveModel->flow_id = 1;
$approveModel->name = $task['title'];
$approveModel->admin_id = 0; // 后台发起人id 暂时为0
$approveModel->user_id = $this->userId; // 前台发起人用户id
$approveModel->task_id = $task['id']; // 任务id
$approveModel->business_id = $task['template_id']; // 关联模板id结算时用于判断这个任务是否提前完成
$approveModel->department_id = '0';
$approveModel->check_admin_ids = $areaManagerId; // 当前审批人ID 片区经理的admin_id
$approveModel->check_status = 1; // 状态 0待审核,1审核中,2审核通过,3审核不通过,4撤销审核
$approveModel->other_type = 6;
$approveModel->create_time = time();
$approveModel->update_time = time();
$re = $approveModel->save();
} else {
// 有则更新状态
return $this->fail('该任务已完成,请勿重复提交');
}
return $this->success('ok', []);
} catch (Exception $e) {
return $this->fail($e->getMessage());
}
}
/**
* 提交 镇农科负责人-信息收集
* 将信息收集存入task_template表中
*/
publiC function commit_town_master_task_type_3()
{
$param = $this->request->param();
$task = Task::where(['id'=>$param['id']])->find();
$taskTemplate = TaskTemplate::where(['id'=>$task['template_id']])->find();
$extend = $taskTemplate['extend'];
$extend['purchase_sales_info'][] = $param['purchase_sales_info'];
$taskTemplate->save(['extend'=>json_encode($extend)]);
return $this->success('成功', []);
}
/**
* 提交 镇农科负责人-政策补贴申请
* 上传凭证,后台审批,填写实际完成金额
*/
publiC function commit_town_master_task_type_7()
{
try {
$parmas = $this->request->param(); // id annex video_annex
$task = TaskLogic::detail($parmas);
if (empty($task)) {
$this->fail('任务不存在');
}
if (empty($parmas['annex']) && empty($parmas['video_annex'])) {
$this->fail('没有上传凭证,无法提交审核');
}
$extend = [
'other'=> [
'is_commit' => 1,
'note' => $parmas['note'],
'annex' => $parmas['annex'],
'video_annex' => $parmas['video_annex'],
]
];
Task::where(['id' => $parmas['id']])->update(['extend' => json_encode($extend), 'update_time'=>time(), 'director_uid'=>$this->userId]); // director_uid 指派人
// 片区经理
$areaManagerId = User::where(['id' => $this->userId])->with('company')->value('area_manager');
// 没有则创建审批任务
$approveModel = Approve::where(['task_id' => $task['id']])->findOrEmpty();
if ($approveModel->isEmpty()) {
$approveModel->type = Approve::APPROVE_TYPE_6;
$approveModel->flow_id = 1;
$approveModel->name = $task['title'];
$approveModel->admin_id = 0; // 后台发起人id 暂时为0
$approveModel->user_id = $this->userId; // 前台发起人用户id
$approveModel->task_id = $task['id']; // 任务id
$approveModel->department_id = '0';
$approveModel->check_admin_ids = $areaManagerId; // 当前审批人ID 片区经理的admin_id
$approveModel->check_status = 1; // 状态 0待审核,1审核中,2审核通过,3审核不通过,4撤销审核
$approveModel->other_type = 6;
$approveModel->extend = json_encode($extend);
$approveModel->create_time = time();
$approveModel->update_time = time();
$re = $approveModel->save();
} else {
// 有则更新状态
$approveModel->check_status = 1; // 状态 0待审核,1审核中,2审核通过,3审核不通过,4撤销审核
$approveModel->save();
}
return $this->success('ok', []);
} catch (Exception $e) {
return $this->fail($e->getMessage());
}
}
// 小组服务团队-入股任务提交
public function commit_service_group_task()
{
try {
$parmas = $this->request->param(); // id annex amount
$task = TaskLogic::detail($parmas);
if (empty($task)) {
$this->fail('任务不存在');
}
$extend = $task['extend'];
$extend['is_commit'] = 1;
$extend['annex'] = $parmas['annex'];
$extend['file_type'] = $parmas['file_type'];
$extend['amount'] = $parmas['amount'];
Task::where(['id' => $parmas['id']])->update(['extend' => json_encode($extend), 'update_time' => time(), 'director_uid' => $this->userId]); // director_uid 指派人
// 创建审批任务
$approveModel = new Approve();
$approveModel->type = Approve::APPROVE_TYPE_10;
$approveModel->flow_id = 1;
$approveModel->name = $task['title'];
$approveModel->admin_id = 0; // 后台发起人id 暂时为0
$approveModel->user_id = $this->userId; // 前台发起人用户id
$approveModel->task_id = $task['id']; // 任务id
$approveModel->department_id = $this->userInfo['company_id']; // 公司id
$approveModel->check_status = 1; // 状态 0待审核,1审核中,2审核通过,3审核不通过,4撤销审核
$approveModel->other_type = 6;
$approveModel->amount = $parmas['amount']; // 入股金额
$approveModel->extend = json_encode($extend);
$approveModel->create_time = time();
$approveModel->update_time = time();
$re = $approveModel->save();
return $this->success('ok', []);
} catch (Exception $e) {
return $this->fail($e->getMessage());
}
}
// 村联络员-督促小组服务团队入股任务提交
public function commit_village_task_4()
{
try {
$parmas = $this->request->param(); // id annex amount
$task = TaskLogic::detail($parmas);
if (empty($task)) {
$this->fail('任务不存在');
}
$extend = $task['extend'];
$extend['is_commit'] = 1;
$extend['annex'] = $parmas['annex'];
$extend['file_type'] = $parmas['file_type'];
$extend['amount'] = $parmas['amount'];
Task::where(['id' => $parmas['id']])->update(['extend' => json_encode($extend), 'update_time' => time(), 'director_uid' => $this->userId]); // director_uid 指派人
// 创建审批任务
$approveModel = new Approve();
$approveModel->type = Approve::APPROVE_TYPE_11;
$approveModel->flow_id = 1;
$approveModel->name = $task['title'];
$approveModel->admin_id = 0; // 后台发起人id 暂时为0
$approveModel->user_id = $this->userId; // 前台发起人用户id
$approveModel->task_id = $task['id']; // 任务id
$approveModel->department_id = $this->userInfo['company_id']; // 公司id
$approveModel->check_status = 1; // 状态 0待审核,1审核中,2审核通过,3审核不通过,4撤销审核
$approveModel->other_type = 6;
$approveModel->amount = $parmas['amount']; // 入股金额
$approveModel->extend = json_encode($extend);
$approveModel->create_time = time();
$approveModel->update_time = time();
$re = $approveModel->save();
return $this->success('ok', []);
} catch (Exception $e) {
return $this->fail($e->getMessage());
}
}
// 村联络员-入股甲方公司任务提交
public function commit_village_task_5()
{
try {
$parmas = $this->request->param(); // id annex amount
$task = TaskLogic::detail($parmas);
if (empty($task)) {
$this->fail('任务不存在');
}
$extend = $task['extend'];
$extend['is_commit'] = 1;
$extend['annex'] = $parmas['annex'];
$extend['file_type'] = $parmas['file_type'];
$extend['amount'] = $parmas['amount'];
Task::where(['id' => $parmas['id']])->update(['extend' => json_encode($extend), 'update_time' => time(), 'director_uid' => $this->userId]); // director_uid 指派人
// 创建审批任务
$approveModel = new Approve();
$approveModel->type = Approve::APPROVE_TYPE_12;
$approveModel->flow_id = 1;
$approveModel->name = $task['title'];
$approveModel->admin_id = 0; // 后台发起人id 暂时为0
$approveModel->user_id = $this->userId; // 前台发起人用户id
$approveModel->task_id = $task['id']; // 任务id
$approveModel->department_id = $this->userInfo['company_id']; // 公司id
$approveModel->check_status = 1; // 状态 0待审核,1审核中,2审核通过,3审核不通过,4撤销审核
$approveModel->other_type = 6;
$approveModel->amount = $parmas['amount']; // 入股金额
$approveModel->extend = json_encode($extend);
$approveModel->create_time = time();
$approveModel->update_time = time();
$re = $approveModel->save();
return $this->success('ok', []);
} catch (Exception $e) {
return $this->fail($e->getMessage());
}
}
// 服务部长-督促小组服务团队入股村管理公司
public function commit_town_service_manager_task_6()
{
try {
$parmas = $this->request->param(); // id annex amount
$task = TaskLogic::detail($parmas);
if (empty($task)) {
$this->fail('任务不存在');
}
$extend = $task['extend'];
$extend['is_commit'] = 1;
$extend['annex'] = $parmas['annex'];
$extend['file_type'] = $parmas['file_type'];
$extend['amount'] = $parmas['amount'];
Task::where(['id' => $parmas['id']])->update(['extend' => json_encode($extend), 'update_time' => time(), 'director_uid' => $this->userId]); // director_uid 指派人
// 创建审批任务
$approveModel = new Approve();
$approveModel->type = Approve::APPROVE_TYPE_13;
$approveModel->flow_id = 1;
$approveModel->name = $task['title'];
$approveModel->admin_id = 0; // 后台发起人id 暂时为0
$approveModel->user_id = $this->userId; // 前台发起人用户id
$approveModel->task_id = $task['id']; // 任务id
$approveModel->department_id = $this->userInfo['company_id']; // 公司id
$approveModel->check_status = 1; // 状态 0待审核,1审核中,2审核通过,3审核不通过,4撤销审核
$approveModel->other_type = 6;
$approveModel->amount = $parmas['amount']; // 入股金额
$approveModel->extend = json_encode($extend);
$approveModel->create_time = time();
$approveModel->update_time = time();
$re = $approveModel->save();
return $this->success('ok', []);
} catch (Exception $e) {
return $this->fail($e->getMessage());
}
return $this->success('ok', $task);
}
}

View File

@ -15,7 +15,7 @@ class VehicleController extends BaseApiController
//镇街公司想物流平台申请租赁车辆
public function setContractByTownCompany()
{
//获取参数
//获取参数 测试1111
$params = $this->request->post(['num']);
//验证参数
if(empty($params['num'])){
@ -58,7 +58,7 @@ class VehicleController extends BaseApiController
return $this->fail('数据不存在');
}
//判断是否是镇街公司
if($party_b['company_type'] != 16){
if($party_b['company_type'] != 41){
return ['code'=>0,'msg'=>'非镇街公司不能签约'];
}
//发送生成合同给物流信息
@ -236,12 +236,12 @@ class VehicleController extends BaseApiController
return $this->fail('当前小组服务公司未签约');
}
//获取签约信息
$contract = Contract::where('party_b',$this->userInfo['company_id'])->where('signing_timer',2)->find();
$contract = Contract::where('party_b',$this->userInfo['company_id'])->where('signing_timer',2)->findOrEmpty();
if($contract->isEmpty()){
return $this->fail('未找到签约镇街公司');
}
$party_a = Company::field('id,company_name,master_name,master_phone,master_email,is_contract,organization_code,company_type')->where('id',$contract['party_a'])->find();
if(empty($contract) || empty($party_a)){
return $this->fail('未找到签约镇街公司');
}
if($party_a['company_type'] != 16){
if($party_a['company_type'] != 41){
return $this->fail('不能与非镇街公司签约');
}
if($party_a['is_contract'] != 1){
@ -386,7 +386,7 @@ class VehicleController extends BaseApiController
if(empty($company)){
return $this->fail('数据错误');
}
if($company['company_type'] != 16){
if($company['company_type'] != 41){
return $this->fail('非镇街公司不能访问');
}
//获取小组服务公司申请信息
@ -587,7 +587,7 @@ class VehicleController extends BaseApiController
if(empty($company)){
return $this->fail('请求错误');
}
if($company['company_type'] != 16){
if($company['company_type'] != 41){
return $this->fail('非镇街公司不能访问');
}
$data = VehicleContract::field('id,contract_no,contract_url,status,create_time,update_time')->where('contract_logistic_id','<>',0)->where('company_b_id',$company['id'])->select();
@ -666,6 +666,9 @@ class VehicleController extends BaseApiController
}
//2、获取小组服务公司签约的镇街公司
$zjCompany = Contract::field('party_a')->where('party_b',$this->userInfo['company_id'])->where('signing_timer',2)->findOrEmpty();
if($zjCompany->isEmpty()){
return $this->fail('未获取到小组服务公司签约的镇街公司');
}
//3、获取镇街公司向平台租赁的且未二次租赁给小组公司的车辆
$zjRentCars = VehicleRent::field('car_id')->where('company_id',$zjCompany['party_a'])->where('status',0)->select()->toArray();
$zjRentCars = array_column($zjRentCars,'car_id');

View File

@ -114,7 +114,7 @@ class XunFeiController extends BaseApiController
foreach($data_field as $k=>$v) {
$demand .= $k . '' . $v . '';
}
$question = "分析以下{$type_name}信息【{$demand}】请问有那些商机?";
$question = "根据以下{$type_name}信息【{$demand}】请问有那些商机?";
$chat=new ChatClient($this->app_id,$this->api_key,$this->api_secret);
$client = new Client($chat->assembleAuthUrl('wss://spark-api.xf-yun.com/v2.1/chat'));
// 连接到 WebSocket 服务器
@ -216,6 +216,7 @@ class XunFeiController extends BaseApiController
if (!in_array($ext, $extArray)) {
return $this->fail('录音格式错误');
}
// ********** 临时方案 ********** //
$encoding = 'raw';
if ($ext == 'mp3') {
$encoding = 'lame';
@ -356,7 +357,7 @@ class XunFeiController extends BaseApiController
$audioFile = $dir . '/' . $file_name;
$business = [
'aue' => 'lame', //mp3格式
'vcn' => 'x4_lingxiaoyao_en', //发音人
'vcn' => 'aisjinger', //发音人
'auf' => 'audio/L16;rate=16000', //音频采样率
'speed' => 50, //语速
'volume' => 100, //音量
@ -436,7 +437,10 @@ class XunFeiController extends BaseApiController
$textArray = json_decode(base64_decode($encodeText), true);
$lineArray = $textArray['pages'][0]['lines'] ?? [];
foreach($lineArray as $item) {
$text[] = $item['words'][0]['content'] ?? '';
$content = $item['words'][0]['content'] ?? '';
if ($content) {
$text[] = $content;
}
}
} catch (GuzzleException $e) {
return $this->fail($e->getMessage());

View File

@ -8,12 +8,19 @@ use app\common\model\Company;
use app\common\model\im\UserImMessage;
use app\common\model\user\User;
use GatewayClient\Gateway;
use think\App;
use think\facade\Db;
use think\response\Json;
class ImController extends BaseLikeAdminController
{
//获取场景值
public function __construct(App $app)
{
parent::__construct($app);
Gateway::$registerAddress = "172.19.97.179:1256";
}
//获取场景值
private function sceneText($scene): string
{
if($scene == 0){
@ -380,7 +387,7 @@ class ImController extends BaseLikeAdminController
return $this->fail('用户信息错误');
}
if($params['user_id'] == $companyInfo['area_manager']){
return $this->fail('用户身份错误错误');
return $this->fail('用户身份错误');
}
//获取用户信息
$adminInfo = Admin::field('id,name,avatar')->where('id',$companyInfo['area_manager'])->findOrEmpty();

View File

@ -81,8 +81,8 @@ class PayNotifyLogic extends BaseLogic
'sn' => $order->sn,
'user_id' => $order->user_id,
'company_id' => $company['id']??0,
'change_type' => 300,
'change_object' => 2,
'change_type' => CompanyAccountLog::COMPANY_DEPOSIT,
'change_object' => CompanyAccountLog::DEPOSIT,
'action' => 1,
'change_amount' => $order->order_amount,
'left_amount' =>$left_amount,

View File

@ -7,23 +7,17 @@ use think\Exception;
class ShopRequestLogic extends BaseLogic
{
public static $shopUrlPrefix;
public function __construct()
{
self::$shopUrlPrefix = env('url.shop_prefix');
parent::__construct();
}
/**
* 查询时间范围内,某一农科公司下的 供应链商户入驻统计
*/
public static function getSupplyChainMerchantCount($param)
{
try {
$requestResponse = HttpClient::create()->request('GET', self::$shopUrlPrefix . '', [
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '/api/statistics/supply_chain_mer_count', [
'query' => $param
]);
return $requestResponse->getContent();
return json_decode($requestResponse->getContent(), true);
} catch (Exception $e) {
self::setError($e->getMessage());
return false;
@ -36,10 +30,10 @@ class ShopRequestLogic extends BaseLogic
public static function getProductListing($param)
{
try {
$requestResponse = HttpClient::create()->request('GET', self::$shopUrlPrefix . '', [
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '/api/statistics/supply_chain_product_count', [
'query' => $param
]);
return $requestResponse->getContent();
return json_decode($requestResponse->getContent(), true);
} catch (Exception $e) {
self::setError($e->getMessage());
return false;
@ -52,10 +46,10 @@ class ShopRequestLogic extends BaseLogic
public static function getStockUpdate($param)
{
try {
$requestResponse = HttpClient::create()->request('GET', self::$shopUrlPrefix . '', [
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '/api/statistics/supply_chain_product_stock_count', [
'query' => $param
]);
return $requestResponse->getContent();
return json_decode($requestResponse->getContent(), true);
} catch (Exception $e) {
self::setError($e->getMessage());
return false;
@ -68,10 +62,10 @@ class ShopRequestLogic extends BaseLogic
public static function getProductList($param)
{
try {
$requestResponse = HttpClient::create()->request('GET', self::$shopUrlPrefix . '', [
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '/api/statistics/product_list', [
'query' => $param
]);
return $requestResponse->getContent();
return json_decode($requestResponse->getContent(), true);
} catch (Exception $e) {
self::setError($e->getMessage());
return false;
@ -84,10 +78,10 @@ class ShopRequestLogic extends BaseLogic
public static function getPurchaseAmount($param)
{
try {
$requestResponse = HttpClient::create()->request('GET', self::$shopUrlPrefix . '', [
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '/api/statistics/supply_chain_product_price_count', [
'query' => $param
]);
return $requestResponse->getContent();
return json_decode($requestResponse->getContent(), true);
} catch (Exception $e) {
self::setError($e->getMessage());
return false;
@ -100,10 +94,10 @@ class ShopRequestLogic extends BaseLogic
public static function getTradeAmount($param)
{
try {
$requestResponse = HttpClient::create()->request('GET', self::$shopUrlPrefix . '', [
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '/api/statistics/supply_chain_product_price_count', [
'query' => $param
]);
return $requestResponse->getContent();
return json_decode($requestResponse->getContent(), true);
} catch (Exception $e) {
self::setError($e->getMessage());
return false;
@ -116,10 +110,10 @@ class ShopRequestLogic extends BaseLogic
public static function getGeneralMerchantCount($param)
{
try {
$requestResponse = HttpClient::create()->request('GET', self::$shopUrlPrefix . '', [
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '/api/statistics/supply_chain_product_count', [
'query' => $param
]);
return $requestResponse->getContent();
return json_decode($requestResponse->getContent(), true);
} catch (Exception $e) {
self::setError($e->getMessage());
return false;
@ -132,10 +126,10 @@ class ShopRequestLogic extends BaseLogic
public static function getGeneralMerchantProductListing($param)
{
try {
$requestResponse = HttpClient::create()->request('GET', self::$shopUrlPrefix . '', [
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '/api/statistics/supply_chain_product_count', [
'query' => $param
]);
return $requestResponse->getContent();
return json_decode($requestResponse->getContent(), true);
} catch (Exception $e) {
self::setError($e->getMessage());
return false;
@ -148,10 +142,10 @@ class ShopRequestLogic extends BaseLogic
public static function getGeneralMerchantStockUpdate($param)
{
try {
$requestResponse = HttpClient::create()->request('GET', self::$shopUrlPrefix . '', [
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '/api/statistics/supply_chain_product_stock_count', [
'query' => $param
]);
return $requestResponse->getContent();
return json_decode($requestResponse->getContent(), true);
} catch (Exception $e) {
self::setError($e->getMessage());
return false;
@ -164,10 +158,10 @@ class ShopRequestLogic extends BaseLogic
public static function getGeneralMerchantPurchaseAmount($param)
{
try {
$requestResponse = HttpClient::create()->request('GET', self::$shopUrlPrefix . '', [
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '/api/statistics/supply_chain_street_product_price_count', [
'query' => $param
]);
return $requestResponse->getContent();
return json_decode($requestResponse->getContent(), true);
} catch (Exception $e) {
self::setError($e->getMessage());
return false;
@ -180,10 +174,58 @@ class ShopRequestLogic extends BaseLogic
public static function getGeneralMerchantTradeAmount($param)
{
try {
$requestResponse = HttpClient::create()->request('GET', self::$shopUrlPrefix . '', [
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '/api/statistics/supply_chain_street_product_price_count', [
'query' => $param
]);
return $requestResponse->getContent();
return json_decode($requestResponse->getContent(), true);
} catch (Exception $e) {
self::setError($e->getMessage());
return false;
}
}
/**
* 查询村管理公司负责片区内的种养殖商户交易额
*/
public static function getPlantingAndBreedingMerchantTradeAmount($param)
{
try {
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '/api/statistics/supply_chain_village_breeding_price_count', [
'query' => $param
]);
return json_decode($requestResponse->getContent(), true);
} catch (Exception $e) {
self::setError($e->getMessage());
return false;
}
}
/**
* 查询镇农科公司负责片区内的种养殖商户和供应链商户交易额 todo 商城还需确认种养殖商户是何种类型
*/
public static function getTownTradeAmount($param)
{
try {
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '/api/statistics/supply_chain_breeding_street_product_count', [
'query' => $param
]);
return json_decode($requestResponse->getContent(), true);
} catch (Exception $e) {
self::setError($e->getMessage());
return false;
}
}
/**
* 查询手机号用户的交易金额
*/
public static function getUserTradeAmount($param)
{
try {
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '/api/statistics/store_order_user_trade_amount', [
'query' => $param
]);
return json_decode($requestResponse->getContent(), true);
} catch (Exception $e) {
self::setError($e->getMessage());
return false;

View File

@ -81,7 +81,7 @@ class ShareProfit
$money = bcdiv($datas['template_info']['over_decimal'], count($responsible_area), 2);
$left_amount = 0;
foreach ($responsible_area as $kkk => $vvv) {
$left_amount += bcadd(1000, $money, 2);
$left_amount += bcadd($company['shareholder_money'], $money, 2);
$company_log = [
'sn' => generate_sn(UserAccountLog::class, 'sn', 20),
'company_id' => $datas['company_id'],

View File

@ -157,18 +157,19 @@ class TownShareProfit
$remark = '来自任务【' . $taskSchedulePlan['template_info']['title'] . '】,';
//负责人收益 todo
//负责人收益
if ($taskSchedulePlan['template_info']['extend']['task_role'] == 1) {
$serviceManagerUser = (new User())->searchMaster($company['id']);
Log::info([$taskSchedulePlan['template_info']['title'].'结算-市场部长用户信息', $serviceManagerUser]);
}
//市场部长收益
if ($taskSchedulePlan['template_info']['extend']['task_role'] == 2) {
$serviceManagerUser = User::where(['company_id' => $company['id'], 'group_id' => 16])->find();
$serviceManagerUser = (new User())->searchMarketingManager($company['id']);;
Log::info([$taskSchedulePlan['template_info']['title'].'结算-市场部长用户信息', $serviceManagerUser]);
}
//服务部长收益 任务金额的50%为服务部长的收益
if ($taskSchedulePlan['template_info']['extend']['task_role'] == 3) {
$serviceManagerUser = User::where(['company_id' => $company['id'], 'group_id' => 14])->find();
$serviceManagerUser = (new User())->searchServiceManager($company['id']);;
Log::info([$taskSchedulePlan['template_info']['title'].'结算-服务部长用户信息', $serviceManagerUser]);
}
@ -183,7 +184,7 @@ class TownShareProfit
// 公司收益
$deposit_count = bcadd($company['deposit'], $masterMoney, 2);
// 公司收益变动记录
$this->AccountLog($company['id'], $deposit_count, $masterMoney, 1, CompanyAccountLog::TASK_INC_DEPOSIT);
$this->AccountLog($company['id'], $deposit_count, $masterMoney, 1, CompanyAccountLog::TASK_INC_INCOME);
$company_money_count = bcadd($company['company_money'], $masterMoney, 2);
//公司余额变动记录
$this->AccountLog($company['id'], $company_money_count, $masterMoney, 1, CompanyAccountLog::TASK_INC_COMPANY_MONEY);
@ -410,4 +411,134 @@ class TownShareProfit
return false;
}
}
public function dealTaskSettlementMaster2(Task $taskInfo, Company $townCompany, $taskSchedulePlan)
{
try {
Db::startTrans();
$this->shareProfit($taskInfo, $townCompany, $taskSchedulePlan);
// 更改结算状态
(new TaskSchedulingPlan())->settlement($taskSchedulePlan['id']);
// 更改任务状态
Task::where(['id' => $taskSchedulePlan['task_id']])->update(['status' => 3,'money' => $taskInfo['money']]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
Log::error($taskSchedulePlan['template_info']['title'].'-任务结算失败:' . $e->getMessage());
return false;
}
}
public function dealTaskSettlementMaster3(Task $taskInfo, Company $townCompany, $taskSchedulePlan, $leftTransactionPool)
{
try {
Db::startTrans();
$this->shareProfit($taskInfo, $townCompany, $taskSchedulePlan);
// 更改结算状态
(new TaskSchedulingPlan())->settlement($taskSchedulePlan['id']);
// 更改任务状态
Task::where(['id' => $taskSchedulePlan['task_id']])->update(['status' => 3,'money' => $taskInfo['money']]);
// 更新交易池
(new TaskTemplate())->updateTransactionPool($taskSchedulePlan['template_info']['id'], $leftTransactionPool);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
Log::error($taskSchedulePlan['template_info']['title'].'-任务结算失败:' . $e->getMessage());
return false;
}
}
public function dealTaskSettlementMaster4(Task $taskInfo, Company $townCompany, $taskSchedulePlan, $leftTransactionPool)
{
try {
Db::startTrans();
$this->shareProfit($taskInfo, $townCompany, $taskSchedulePlan);
// 更改结算状态
(new TaskSchedulingPlan())->settlement($taskSchedulePlan['id']);
// 更改任务状态
Task::where(['id' => $taskSchedulePlan['task_id']])->update(['status' => 3,'money' => $taskInfo['money']]);
// 更新交易池
(new TaskTemplate())->updateTransactionPool($taskSchedulePlan['template_info']['id'], $leftTransactionPool);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
Log::error($taskSchedulePlan['template_info']['title'].'-任务结算失败:' . $e->getMessage());
return false;
}
}
public function dealTaskSettlementMaster5(Task $taskInfo, Company $townCompany, $taskSchedulePlan)
{
try {
Db::startTrans();
$this->shareProfit($taskInfo, $townCompany, $taskSchedulePlan);
// 更改结算状态
(new TaskSchedulingPlan())->settlement($taskSchedulePlan['id']);
// 更改任务状态
Task::where(['id' => $taskSchedulePlan['task_id']])->update(['status' => 3,'money' => $taskInfo['money']]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
Log::error($taskSchedulePlan['template_info']['title'].'-任务结算失败:' . $e->getMessage());
return false;
}
}
public function dealTaskSettlementMaster6(Task $taskInfo, Company $townCompany, $taskSchedulePlan)
{
try {
Db::startTrans();
$this->shareProfit($taskInfo, $townCompany, $taskSchedulePlan);
// 更改结算状态
(new TaskSchedulingPlan())->settlement($taskSchedulePlan['id']);
// 更改任务状态
Task::where(['id' => $taskSchedulePlan['task_id']])->update(['status' => 3,'money' => $taskInfo['money']]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
Log::error($taskSchedulePlan['template_info']['title'].'-任务结算失败:' . $e->getMessage());
return false;
}
}
public function dealTaskSettlementMaster7(Task $taskInfo, Company $townCompany, $taskSchedulePlan)
{
try {
Db::startTrans();
$this->shareProfit($taskInfo, $townCompany, $taskSchedulePlan);
// 更改结算状态
(new TaskSchedulingPlan())->settlement($taskSchedulePlan['id']);
// 更改任务状态
Task::where(['id' => $taskSchedulePlan['task_id']])->update(['status' => 3,'money' => $taskInfo['money']]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
Log::error($taskSchedulePlan['template_info']['title'].'-任务结算失败:' . $e->getMessage());
return false;
}
}
public function dealTaskSettlementMaster8(Task $taskInfo, Company $townCompany, $taskSchedulePlan)
{
try {
Db::startTrans();
$this->shareProfit($taskInfo, $townCompany, $taskSchedulePlan);
// 更改结算状态
(new TaskSchedulingPlan())->settlement($taskSchedulePlan['id']);
// 更改任务状态
Task::where(['id' => $taskSchedulePlan['task_id']])->update(['status' => 3,'money' => $taskInfo['money']]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
Log::error($taskSchedulePlan['template_info']['title'].'-任务结算失败:' . $e->getMessage());
return false;
}
}
}

View File

@ -0,0 +1,234 @@
<?php
namespace app\common\logic\finance;
use app\common\enum\user\AccountLogEnum;
use app\common\logic\AccountLogLogic;
use app\common\model\Company;
use app\common\model\company\CompanyAccountLog;
use app\common\model\task\Task;
use app\common\model\task_scheduling_plan\TaskSchedulingPlan;
use app\common\model\task_template\TaskTemplate;
use app\common\model\user\User;
use app\common\model\user\UserAccountLog;
use think\facade\Db;
use think\facade\Log;
class VillageShareProfit
{
/**
* 分润
*/
public function shareProfit($taskInfo, $company, $taskSchedulePlan)
{
$proportion = 0;
//总金额除以2等于不可提现账号金额和收益
$masterMoney = bcdiv($taskInfo['money'], 2, 2);
$remark = '来自任务【' . $taskSchedulePlan['template_info']['title'] . '】,';
$liaisonMan = (new User())->searchLiaisonMan($company['id']);
Log::info([$taskSchedulePlan['template_info']['title'].'结算-村联络员用户信息', $liaisonMan]);
// 用户收益变动
$arr = [$liaisonMan['id'], AccountLogEnum::UM_INC_TASK, AccountLogEnum::INC, $masterMoney, $taskSchedulePlan['sn'], $remark.'任务结算获得收益' . $masterMoney . '元', ['company_id' => $company['id'], 'proportion' => $proportion], 1];
$this->master($arr);
// 用户余额变动
$arr_two = [$liaisonMan['id'], AccountLogEnum::UM_INC_TASKUSER, AccountLogEnum::INC, $masterMoney, $taskSchedulePlan['sn'], $remark . '获得账户余额' . $masterMoney . '元', ['company_id' => $company['id'], 'proportion' => $proportion], 1];
$this->Account($arr_two);
// 公司收益
$deposit_count = bcadd($company['deposit'], $masterMoney, 2);
// 公司收益变动记录
$this->AccountLog($company['id'], $deposit_count, $masterMoney, 1, CompanyAccountLog::TASK_INC_INCOME);
$company_money_count = bcadd($company['company_money'], $masterMoney, 2);
//公司余额变动记录
$this->AccountLog($company['id'], $company_money_count, $masterMoney, 1, CompanyAccountLog::TASK_INC_COMPANY_MONEY);
// 变更公司收益和余额
Company::where('id', $company['id'])->update(['deposit' => Db::raw('deposit+' . $masterMoney), 'company_money' => Db::raw('company_money+' . $masterMoney)]);
}
public function AccountLog($companyId, $left_amount, $changeAmount, $change_object = 1, $change_type = 1, $action = 1)
{
$company_log = [
'sn' => generate_sn(UserAccountLog::class, 'sn', 20),
'company_id' => $companyId,
'change_object' => $change_object, //变动对象
'change_type' => $change_type, //变动类型
'action' => $action, //1-增加 2-减少
'left_amount' => $left_amount, //变动后数量
'change_amount' => $changeAmount, //变动数量
'status' => 1,
];
CompanyAccountLog::create($company_log);
}
/**负责人的分润
* @param $data
*/
private function master($data)
{
User::where('id', $data[0])->update(['deposit'=>Db::raw('deposit+' . $data[3]),'user_money'=>Db::raw('user_money+' . $data[3])]);
return AccountLogLogic::add($data[0], $data[1], $data[2], $data[3], $data[4], $data[5], $data[6], $data[7]);
}
/**成员分润
* @param $data
*/
private function member($data)
{
User::where('id', $data[0])->update(['deposit'=>Db::raw('deposit+' . $data[3]),'user_money'=>Db::raw('user_money+' . $data[3])]);
return AccountLogLogic::add($data[0], $data[1], $data[2], $data[3], $data[4], $data[5], $data[6], $data[7]);
}
private function Account($data)
{
return AccountLogLogic::add($data[0], $data[1], $data[2], $data[3], $data[4], $data[5], $data[6], $data[7]);
}
public function dealVillageTaskSettlement1(Task $taskInfo, Company $townCompany, $taskSchedulePlan)
{
try {
Db::startTrans();
$this->shareProfit($taskInfo, $townCompany, $taskSchedulePlan);
// 更改结算状态
(new TaskSchedulingPlan())->settlement($taskSchedulePlan['id']);
// 更改任务状态
Task::where(['id' => $taskSchedulePlan['task_id']])->update(['status' => 3,'money' => $taskInfo['money']]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
Log::error($taskSchedulePlan['template_info']['title'].'-任务结算失败:' . $e->getMessage());
return false;
}
}
public function dealVillageTaskSettlement2($taskInfo, $townCompany, $taskSchedulePlan, $leftTransactionPool)
{
try {
Db::startTrans();
$this->shareProfit($taskInfo, $townCompany, $taskSchedulePlan);
// 更改结算状态
(new TaskSchedulingPlan())->settlement($taskSchedulePlan['id']);
// 更改任务状态
Task::where(['id' => $taskSchedulePlan['task_id']])->update(['status' => 3,'money' => $taskInfo['money']]);
// 更新镇交易池
(new TaskTemplate())->updateTransactionPool($taskSchedulePlan['template_info']['id'], $leftTransactionPool);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
Log::error($taskSchedulePlan['template_info']['title'].'-任务结算失败:' . $e->getMessage());
return false;
}
}
public function dealVillageTaskSettlement3($taskInfo, $townCompany, $taskSchedulePlan)
{
try {
Db::startTrans();
$this->shareProfit($taskInfo, $townCompany, $taskSchedulePlan);
// 更改结算状态
(new TaskSchedulingPlan())->settlement($taskSchedulePlan['id']);
// 更改任务状态
Task::where(['id' => $taskSchedulePlan['task_id']])->update(['status' => 3,'money' => $taskInfo['money']]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
Log::error($taskSchedulePlan['template_info']['title'].'-任务结算失败:' . $e->getMessage());
return false;
}
}
public function dealVillageTaskSettlement4(Task $taskInfo, Company $townCompany, $taskSchedulePlan)
{
try {
Db::startTrans();
$this->shareProfit($taskInfo, $townCompany, $taskSchedulePlan);
// 更改结算状态
(new TaskSchedulingPlan())->settlement($taskSchedulePlan['id']);
// 更改任务状态
Task::where(['id' => $taskSchedulePlan['task_id']])->update(['status' => 3,'money' => $taskInfo['money']]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
Log::error($taskSchedulePlan['template_info']['title'].'-任务结算失败:' . $e->getMessage());
return false;
}
}
public function dealVillageTaskSettlement5(Task $taskInfo, Company $townCompany, $taskSchedulePlan)
{
try {
Db::startTrans();
$this->shareProfit($taskInfo, $townCompany, $taskSchedulePlan);
// 更改结算状态
(new TaskSchedulingPlan())->settlement($taskSchedulePlan['id']);
// 更改任务状态
Task::where(['id' => $taskSchedulePlan['task_id']])->update(['status' => 3,'money' => $taskInfo['money']]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
Log::error($taskSchedulePlan['template_info']['title'].'-任务结算失败:' . $e->getMessage());
return false;
}
}
public function dealVillageTaskSettlement6(Task $taskInfo, Company $townCompany, $taskSchedulePlan)
{
try {
Db::startTrans();
$this->shareProfit($taskInfo, $townCompany, $taskSchedulePlan);
// 更改结算状态
(new TaskSchedulingPlan())->settlement($taskSchedulePlan['id']);
// 更改任务状态
Task::where(['id' => $taskSchedulePlan['task_id']])->update(['status' => 3,'money' => $taskInfo['money']]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
Log::error($taskSchedulePlan['template_info']['title'].'-任务结算失败:' . $e->getMessage());
return false;
}
}
public function dealVillageTaskSettlement7(Task $taskInfo, Company $townCompany, $taskSchedulePlan, $leftTransactionPool)
{
try {
Db::startTrans();
$this->shareProfit($taskInfo, $townCompany, $taskSchedulePlan);
// 更改结算状态
(new TaskSchedulingPlan())->settlement($taskSchedulePlan['id']);
// 更改任务状态
Task::where(['id' => $taskSchedulePlan['task_id']])->update(['status' => 3,'money' => $taskInfo['money']]);
// 更新交易池
(new TaskTemplate())->updateTransactionPool($taskSchedulePlan['template_info']['id'], $leftTransactionPool);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
Log::error($taskSchedulePlan['template_info']['title'].'-任务结算失败:' . $e->getMessage());
return false;
}
}
public function dealVillageTaskSettlement8(Task $taskInfo, Company $townCompany, $taskSchedulePlan)
{
try {
Db::startTrans();
$this->shareProfit($taskInfo, $townCompany, $taskSchedulePlan);
// 更改结算状态
(new TaskSchedulingPlan())->settlement($taskSchedulePlan['id']);
// 更改任务状态
Task::where(['id' => $taskSchedulePlan['task_id']])->update(['status' => 3,'money' => $taskInfo['money']]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
Log::error($taskSchedulePlan['template_info']['title'].'-任务结算失败:' . $e->getMessage());
return false;
}
}
}

View File

@ -44,7 +44,7 @@ class WithdrawLogic extends BaseLogic
// 拒绝通过审核,记录备注原因
if ($params['status'] == 2) {
Withdraw::where(['id'=>$withDrawInfo['id']])->update(['status'=>2, 'deny_desc'=>$params['deny_desc']]);
Withdraw::where(['id'=>$withDrawInfo['id']])->update(['status'=>2, 'deny_desc'=>$params['deny_desc'] ?? '']);
return true;
}
@ -72,7 +72,7 @@ class WithdrawLogic extends BaseLogic
$companyAccountLog = [
'sn' => generate_sn(UserAccountLog::class, 'sn', 20),
'company_id' => $companyInfo['id'],
'change_object' => CompanyAccountLog::TASK, //变动对象
'change_object' => CompanyAccountLog::COMPANY_MONEY, //变动对象
'change_type' => CompanyAccountLog::WITHDRAW_DEC_DEPOSIT, //变动类型
'action' => CompanyAccountLog::DEC, //1-增加 2-减少
'left_amount' => $leftMoney, //变动后数量

File diff suppressed because it is too large Load Diff

View File

@ -23,6 +23,7 @@ use app\common\model\company\CompanyProperty;
use app\common\model\informationg\UserInformationg;
use app\common\model\task_scheduling\TaskScheduling;
use app\common\model\user\User;
use app\common\model\vehicle\VehicleRent;
use think\facade\Db;
@ -47,11 +48,15 @@ class TaskTemplateLogic extends BaseLogic
try {
Db::startTrans();
$find=TaskTemplate::where('task_scheduling', $params['task_scheduling'])->where('company_id',$params['company_id'])->where('type',$params['type'])->field('id,types,type')->find();
if($find&&$params['type']==$find['type']){
self::setError('已经有同一种任务类型了');
return false;
// 其他任务可重复创建
if ($params['type'] != 34) {
$find=TaskTemplate::where('task_scheduling', $params['task_scheduling'])->where('company_id',$params['company_id'])->where('type',$params['type'])->field('id,types,type')->find();
if($find&&$params['type']==$find['type']){
self::setError('已经有同一种任务类型了');
return false;
}
}
if($params['type']==33){
$count=UserInformationg::where('company_id',$params['company_id'])->where('status',1)->count();
if($count<300){
@ -76,8 +81,8 @@ class TaskTemplateLogic extends BaseLogic
return false;
}
if($params['type']==32){
$object_id=CompanyProperty::where('company_id',$params['company_id'])->value('object_id');
if(!$object_id){
$VehicleRent = VehicleRent::where('rent_company_id',$params['company_id'])->find();
if(empty($VehicleRent)){
self::setError('该公司没有三轮车,请先租赁三轮车');
return false;
}
@ -130,6 +135,13 @@ class TaskTemplateLogic extends BaseLogic
{
Db::startTrans();
try {
$company = Company::find($params['company_id']);
if ($company->company_type == 41) {
// 创建 镇农科公司 任务模板
$taskScheduleAmount = 700;
} else {
$taskScheduleAmount = 200;
}
$find=TaskTemplate::where('task_scheduling', $params['task_scheduling'])->where('company_id',$params['company_id'])->where('type',$params['type'])->field('id,types,type,money,money_two,money_three')->find();
if($find && $find['id']!=$params['id']&&$params['type']==$find['type']){
self::setError('已经有同一种任务类型了');
@ -143,23 +155,23 @@ class TaskTemplateLogic extends BaseLogic
}
}
$moeny=TaskTemplate::where('company_id', $params['company_id'])->sum('money');
if($moeny+$params['money']-$find['money']>200){
if($moeny+$params['money']-$find['money']>$taskScheduleAmount){
self::setError('任务模板一阶段合计金额不能大于任务调度金额');
return false;
}
$money_two=TaskTemplate::where('company_id', $params['company_id'])->sum('money_two');
if($money_two+$params['money_two']-$find['money_two']>200){
if($money_two+$params['money_two']-$find['money_two']>$taskScheduleAmount){
self::setError('任务模板二阶段合计金额不能大于任务调度金额');
return false;
}
$money_three=TaskTemplate::where('company_id', $params['company_id'])->sum('money_three');
if($money_three+$params['money_three']-$find['money_three']>200){
if($money_three+$params['money_three']-$find['money_three']>$taskScheduleAmount){
self::setError('任务模板长期合计金额不能大于任务调度金额');
return false;
}
if($params['type']==32){
$object_id=CompanyProperty::where('company_id',$params['company_id'])->value('object_id');
if(!$object_id){
$VehicleRent = VehicleRent::where('rent_company_id',$params['company_id'])->find();
if(empty($VehicleRent)){
self::setError('该公司没有三轮车,请先租赁三轮车');
return false;
}
@ -252,6 +264,14 @@ class TaskTemplateLogic extends BaseLogic
Db::startTrans();
// $params['extend']['task_role'] 扩展字段 任务角色 1总负责人 2市场部长 3服务部长
$taskScheduleAmount = 700;
if ($params['extend']['task_role'] == 1) {
$serviceManagerUser = (new User())->searchMaster($params['company_id']);
if (empty($serviceManagerUser)) {
self::setError('公司还没有负责人,无法指派任务');
return false;
}
}
if ($params['extend']['task_role'] == 2) {
$serviceManagerUser = (new User())->searchMarketingManager($params['company_id']);
if (empty($serviceManagerUser)) {
@ -276,22 +296,22 @@ class TaskTemplateLogic extends BaseLogic
}
$moeny = TaskTemplate::where('company_id', $params['company_id'])->sum('money');
if($moeny + $params['money'] > 200){
if($moeny + $params['money'] > $taskScheduleAmount){
self::setError('任务模板一阶段合计金额不能大于任务调度金额');
return false;
}
$moneyTwo = TaskTemplate::where('company_id', $params['company_id'])->sum('money_two');
if($moneyTwo + $params['money_two'] > 200){
if($moneyTwo + $params['money_two'] > $taskScheduleAmount){
self::setError('任务模板二阶段合计金额不能大于任务调度金额');
return false;
}
$newMoneyThree = TaskTemplate::where('company_id', $params['company_id'])->sum('new_money_three');
if($newMoneyThree + $params['new_money_three'] > 200){
if($newMoneyThree + $params['new_money_three'] > $taskScheduleAmount){
self::setError('任务模板三阶段合计金额不能大于任务调度金额');
return false;
}
$moneyThree = TaskTemplate::where('company_id', $params['company_id'])->sum('money_three');
if($moneyThree + $params['money_three']>200){
if($moneyThree + $params['money_three']>$taskScheduleAmount){
self::setError('任务模板长期合计金额不能大于任务调度金额');
return false;
}

View File

@ -16,6 +16,18 @@ class Approve extends BaseModel
const APPROVE_TYPE_3 = 3; // 开通交易
const APPROVE_TYPE_4 = 4; // 镇农科市场部长数字农贸宣传业务、加工业务的建设和招商任务
const APPROVE_TYPE_5 = 5; // 村联络员任务-信息平台铺设工作任务
const APPROVE_TYPE_6 = 6; // 村联络员任务-日常管理及其他临时任务
const APPROVE_TYPE_7 = 7; // 镇农科负责人任务-应用软件推广
const APPROVE_TYPE_8 = 8; // 镇农科负责人任务-政策补贴申请
const APPROVE_TYPE_9 = 9; // 镇农科负责人任务-日常管理及其他临时任务
const APPROVE_TYPE_10 = 10; // 小组团队任务-入股任务
const APPROVE_TYPE_11 = 11; // 村联络员任务-督促小组服务团队入股
const APPROVE_TYPE_12 = 12; // 村联络员任务-入股甲方公司
const APPROVE_TYPE_13 = 13; // 镇农科服务部长任务-督促入股村管理公司
public function task()
{
return $this->hasOne(Task::class, 'id', 'task_id');

View File

@ -41,9 +41,18 @@ class CompanyAccountLog extends BaseModel
*/
const TASK = 1;
/**
* 股金
* 公司股金
*/
const SHAREHOLDER = 2;
/**
* 公司余额
*/
const COMPANY_MONEY = 3;
/**
* 公司押金
*/
const DEPOSIT = 4;
/**
* 动作
@ -72,13 +81,13 @@ class CompanyAccountLog extends BaseModel
const WITHDRAW_DEC_DEPOSIT = 102;
/**
* 用户余额增加类型
* 公司金额变动类型
*/
/**
* 任务收益
*/
const TASK_INC_DEPOSIT = 200;
const TASK_INC_INCOME = 200;
/**
* 公司余额
*/
@ -88,4 +97,9 @@ class CompanyAccountLog extends BaseModel
*/
const TASK_INC_SHAREHOLDER_MONEY = 202;
/**
* 押金
*/
const COMPANY_DEPOSIT = 300;
}

View File

@ -221,15 +221,25 @@ class User extends BaseModel
}
}
// 查询镇农科服务部长
public function searchServiceManager($companyId)
{
return User::where(['company_id' => $companyId, 'group_id'=> 14])->find();
}
// 查询镇农科负责人
public function searchMaster($companyId)
{
return User::where(['company_id' => $companyId, 'group_id'=> 15])->find();
}
// 查询镇农科市场部长
public function searchMarketingManager($companyId)
{
return User::where(['company_id' => $companyId, 'group_id'=> 16])->find();
}
// 查询村联络员
public function searchLiaisonMan($companyId)
{
return User::where(['company_id' => $companyId, 'group_id'=> 17])->find();

View File

@ -1,7 +1,8 @@
<?php
namespace workerim;
namespace app\common\service\workerim;
use GatewayClient\Gateway;
/**
* 主逻辑
* 主要是处理 onConnect onMessage onClose 三个方法

View File

@ -0,0 +1,30 @@
<?php
use GatewayWorker\BusinessWorker;
use Workerman\Worker;
// 自动加载类
require_once __DIR__ . '/../../../../vendor/autoload.php';
// bussinessWorker 进程
$worker = new BusinessWorker();
// worker名称
$worker->name = 'PushBusinessWorker';
// bussinessWorker进程数量
$worker->count = 4;
// 服务注册地址
$worker->registerAddress = '172.19.97.179:1256';
// 注册服务类
$worker->eventHandler = 'app\common\service\workerim\Events';
// 如果不是在根目录启动则运行runAll方法
if(!defined('GLOBAL_START'))
{
Worker::runAll();
}

View File

@ -0,0 +1,39 @@
<?php
use \Workerman\Worker;
use \GatewayWorker\Gateway;
// 自动加载类
require_once __DIR__ . '/../../../../vendor/autoload.php';
// gateway 进程这里使用Text协议可以用telnet测试
$gateway = new Gateway("Websocket://0.0.0.0:8282");
// gateway名称status方便查看
$gateway->name = 'worker_task_im';
// gateway进程数一般设置2个就足够
$gateway->count = 4;
// 本机ip分布式部署时使用内网ip
$gateway->lanIp = '172.19.97.179';
// 内部通讯起始端口,假如$gateway->count=2起始端口为2900
// 则一般会使用3900 3901 3902 3903 4个端口作为内部通讯端口
$gateway->startPort = 3900;
// 服务注册地址
$gateway->registerAddress = '172.19.97.179:1256';
// 心跳间隔
$gateway->pingInterval = 20;
// 心跳数据
$gateway->pingData = '{"type":"ping"}';
// 如果不是在根目录启动则运行runAll方法
if(!defined('GLOBAL_START'))
{
Worker::runAll();
}

View File

@ -0,0 +1,16 @@
<?php
use \Workerman\Worker;
use \GatewayWorker\Register;
// 自动加载类
require_once __DIR__ . '/../../../../vendor/autoload.php';
// register 必须是text协议切记不能将register端口开放给外网
$register = new Register('text://172.19.97.179:1256');
// 如果不是在根目录启动则运行runAll方法
if(!defined('GLOBAL_START'))
{
Worker::runAll();
}

View File

@ -34,7 +34,7 @@ class AiAianalyse
foreach($data_field as $k=>$v) {
$demand .= $k . '' . $v . '';
}
$question = "分析以下{$type_name}信息【{$demand}】请问有那些商机?需要购买哪些商品?";
$question = "根据以下{$type_name}信息【{$demand}】请问有那些商机?需要购买哪些商品?";
try {
$chat=new ChatClient($this->app_id,$this->api_key,$this->api_secret);
$client = new Client($chat->assembleAuthUrl('wss://spark-api.xf-yun.com/v2.1/chat'));

View File

@ -87,12 +87,15 @@ class TaskInformationJob
$task_35 = Task::where('id', $data['task_id'])->field('director_uid,status,money,start_time,end_time')->with('director_info')->find();
if($task_35){
$day= $data['template_info']['stage_day_one'] + $data['template_info']['stage_day_two'];
if($task_35['status']==3 && $data['template_info']['day_count']<=$day){
$name = $task_35['director_info']['nickname'];
$arr['status'] = 1;
$arr['money'] = $task_35['money'];
$arr['company_account_type'] = 2;
}else{
// if($task_35['status']==3 && $data['template_info']['day_count']<=$day){
// $name = $task_35['director_info']['nickname'];
// $arr['status'] = 1;
// $arr['money'] = $task_35['money'];
// $arr['company_account_type'] = 2;
// }else{
if ($task_35['status'] == 3) {
return true;
}
/**
* 判断入股任务 单次类型 是否超时
* 未超时时刷新开始结束时间
@ -114,7 +117,7 @@ class TaskInformationJob
Log::info('入股任务 ' . $data['template_info']['title'] . '结算失败,任务为超时:' . json_encode($data));
return false;
}
}
// }
}else{
Log::info('入股任务 ' . $data['template_info']['title'] . '结算失败,任务为空:' . json_encode($data));
return false;
@ -133,7 +136,7 @@ class TaskInformationJob
if($data['template_info']['day_count'] >= $day){
Task::where('id', $data['task_id'])->update(['status' =>5]);
Log::info('入股任务 ' . $data['template_info']['title'] . '结算失败,任务为超时:' . json_encode($data));
Log::info( $data['template_info']['title'] . '结算失败,任务为超时:' . json_encode($data));
return false;
}

View File

@ -0,0 +1,26 @@
<?php
namespace app\job;
use app\api\controller\RemoteController;
use app\common\logic\finance\ShareProfit;
use app\common\logic\task\TaskLogic;
use app\common\model\Company;
use app\common\model\task\Task;
use app\common\model\task_scheduling_plan\TaskSchedulingPlan;
use app\common\model\task_template\TaskTemplate;
use think\facade\Log;
use think\queue\Job;
class VillageTaskSettlementJob
{
/**
* 镇农科公司任务结算
*/
public function fire(Job $job, $taskSchedulingPlan)
{
TaskLogic::villageTaskSettlement($taskSchedulingPlan);
//如果任务执行成功后 记得删除任务不然这个任务会重复执行直到达到最大重试次数后失败后执行failed方法
$job->delete();
}
}

View File

@ -0,0 +1,20 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
return [
'middleware' => [
// 权限认证
// app\middleapi\http\middleware\AuthMiddleware::class,
],
];

View File

@ -0,0 +1,97 @@
<?php
namespace app\middleapi\controller;
use app\common\enum\user\AccountLogEnum;
use app\common\model\user\User;
use app\common\model\user\UserAccountLog;
use app\common\model\user\UserRole;
use app\common\service\FileService;
use app\common\controller\BaseLikeAdminController;
/***
* 账户流水控制器
* Class AccountLogController
* @package app\adminapi\controller
*/
class AccountLogController extends BaseLikeAdminController
{
/**
* @notes 账户流水明细
* @return \think\response\Json
* @author 段誉
* @date 2023/2/24 15:25
*/
public function lists()
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['page_no','page_size', 'start_time', 'end_time', 'type','company_id']);
$where = [];
if (isset($params['type']) && $params['type'] == 'um') {
$where[] = ['change_type', 'in', AccountLogEnum::getUserMoneyChangeType()];
}
if (!empty($params['company_id'])) {
$where[] = ['company_id', '=', $params['company_id']];
}
if (!empty($params['start_time'])) {
$where[] = ['create_time', '>=', strtotime($params['start_time'])];
}
if (!empty($params['end_time'])) {
$where[] = ['create_time', '<=', strtotime($params['end_time'])];
}
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$lists = UserAccountLog::where($where)
->with(['company_info','user_info'])
->order('id', 'desc')
->page($pageNo, $pageSize)
->select()
->toArray();
foreach ($lists as &$item) {
$item['user_info']['avatar'] = FileService::getFileUrl($item['user_info']['avatar']);
$item['user_info']['group_name']=UserRole::where('id',$item['user_info']['group_id'])->value('name');
$item['change_type_desc'] = AccountLogEnum::getChangeTypeDesc($item['change_type']);
$symbol = $item['action'] == AccountLogEnum::INC ? '+' : '-';
$item['change_amount'] = $symbol . $item['change_amount'];
// 用于导出
$item['user_info_sn'] = $item['user_info']['sn'];
$item['company_info_company_name'] = $item['company_info']['company_name'];
$item['user_info_nickname'] = $item['user_info']['nickname'];
$item['user_info_group_name'] = $item['user_info']['group_name'];
$item['user_info_mobile'] = $item['user_info']['mobile'];
}
$count = UserAccountLog::where($where)->count();
$result = [
'lists' => $lists,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
/**
* @notes 用户余额变动类型
* @return \think\response\Json
* @author 段誉
* @date 2023/2/24 15:25
*/
public function getUmChangeType()
{
return $this->data(AccountLogEnum::getUserMoneyChangeTypeDesc());
}
public function getCompanyUserList()
{
$param = $this->request->param();
$companyId = $param['company_id'] ?? 0;
$userList = User::where(['company_id' => $companyId])->field('id,nickname,avatar,sn,mobile,group_id,deposit,income')->select()->toArray();
return $this->success('成功', $userList);
}
}

View File

@ -0,0 +1,200 @@
<?php
namespace app\middleapi\controller;
use app\adminapi\lists\approve\ApproveLists;
use app\common\logic\task\TaskLogic;
use app\common\model\Approve;
use app\common\model\task\Task;
use app\common\model\auth\Admin;
use app\common\model\Company;
use app\common\model\task_scheduling_plan\TaskSchedulingPlan;
use app\common\model\task_template\TaskTemplate;
use think\facade\Db;
use app\common\controller\BaseLikeAdminController;
class ApproveController extends BaseLikeAdminController
{
public function lists()
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params=$this->request->post(['page_no','page_size','type','check_status']);
$where = [];
if (isset($params['check_status']) && $params['check_status'] != '') {
$where[] = ['check_status', '=', $params['check_status']];
}
if (isset($params['type']) && $params['type'] != '') {
$where[] = ['type', 'in', $params['type']];
}
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$data = Approve::where($where)
->with('task')
->field('*')
->append(['area_manager', 'company_name'], true)
->page($pageNo, $pageSize)
->order(['id' => 'desc'])
->select()
->withAttr('area_manager',function($value,$data){
return Admin::where(['id' => $data['check_admin_ids']])->value('name');
})
->withAttr('company_name',function($value,$data){
$task = Task::where('id', $data['task_id'])->find();
return Company::where(['id' => $task['company_id'] ?? 0])->value('company_name');
})
->toArray();
$count = Approve::where($where)->count();
$result = [
'lists' => $data,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
public function audit()
{
try {
$params = $this->request->param();
if(empty($params['id'])){
return $this->fail('缺少必要参数id');
}
if(empty($params['check_status'])){
return $this->fail('缺少必要参数审核状态');
}
$approve = Approve::find($params['id']);
if (!$approve) {
$this->fail('数据不存在');
}
Db::startTrans();
// 拒绝通过 要让用户今天可以继续做任务
if ($params['check_status'] == 3) {
$this->refuse($params, $approve);
}
// 修改任务完成状态
if ($params['check_status'] == 2) {
if ($approve->type == Approve::APPROVE_TYPE_7) {
$taskTemplate = TaskTemplate::where(['id'=>$approve->business_id])->find();
// 提前完成
if ($taskTemplate['day_count'] < $taskTemplate['stage_day_one']) {
if (bccomp($params['amount'], 300000, 2) == -1) {
$this->fail('该任务提前完成条件销售总额必须达到30万元及以上');
} else {
// 提前完成标识
$extend = json_decode($taskTemplate['extend'], true);
$extend['early_finish'] = 1;
$taskTemplate->extend = json_encode($extend);
$taskTemplate->save();
$this->pass($approve, $params);
}
} else {
$this->pass($approve, $params);
}
} else {
$this->pass($approve);
}
}
Db::commit();
return $this->success('审核成功');
} catch (\Exception $e) {
Db::rollback();
return $this->fail($e->getFile().$e->getLine().$e->getMessage());
}
}
// 通过
private function pass($approve, $params=[])
{
$approve->check_status = 2;
$approve->update_time = time();
$approve->save();
// 任务
$task = Task::find($approve['task_id']);
if ($task['status'] == 2) {
$task->status = 3;
$task->save();
}
// 镇农科公司任务-数字农贸宣传业务、加工业务的建设和招商工作任务 结算
if ($approve->type == Approve::APPROVE_TYPE_4) {
$taskSchedulePlan = TaskSchedulingPlan::where('la_task_scheduling_plan.id', $task['scheduling_plan_id'])
->where('is_pay',0)
->with(['template_info'])
->withJoin(['scheduling'], 'left')
->where('scheduling.company_type', 41)
->find()
->toArray();
TaskLogic::dealTaskMarketingDirector10($taskSchedulePlan, $approve);
}
if ($approve->type == Approve::APPROVE_TYPE_5) {
$taskSchedulePlan = TaskSchedulingPlan::where('la_task_scheduling_plan.id', $task['scheduling_plan_id'])
->where('is_pay',0)
->with(['template_info'])
->withJoin(['scheduling'], 'left')
->where('scheduling.company_type', 17)
->find()
->toArray();
TaskLogic::dealVillageTask6($taskSchedulePlan);
}
if ($approve->type == Approve::APPROVE_TYPE_6) {
$taskSchedulePlan = TaskSchedulingPlan::where('la_task_scheduling_plan.id', $task['scheduling_plan_id'])
->where('is_pay',0)
->with(['template_info'])
->withJoin(['scheduling'], 'left')
->where('scheduling.company_type', 17)
->find()
->toArray();
TaskLogic::dealVillageTask8($taskSchedulePlan);
}
if ($approve->type == Approve::APPROVE_TYPE_7) {
// 需要手动输入销售总额
$approve->amount = $params['amount'];
$approve->save();
}
if ($approve->type == Approve::APPROVE_TYPE_8) {
// 需要手动输入申请的政策补贴金额
$approve->amount = $params['amount'];
$approve->save();
}
if ($approve->type == Approve::APPROVE_TYPE_9) {
$taskSchedulePlan = TaskSchedulingPlan::where('la_task_scheduling_plan.id', $task['scheduling_plan_id'])
->where('is_pay',0)
->with(['template_info'])
->withJoin(['scheduling'], 'left')
->where('scheduling.company_type', 17)
->find()
->toArray();
TaskLogic::masterTask8Settlement($taskSchedulePlan);
}
}
// 拒绝
private function refuse($params, $approve)
{
$approve->check_status = $params['check_status'];
$approve->remark = $params['remark'];
$approve->update_time = time();
$approve->save();
// 更新schedule_plan时间和task的时间为今天依旧可提交
$schedulePlan = TaskSchedulingPlan::find(['tast_id' => $approve['task_id']]);
if (empty($schedule_plan)) {
return $this->fail('数据异常,任务计划不存在');
}
$time = strtotime(date('Y-m-d'));
TaskSchedulingPlan::where(['id' => $schedulePlan['id']])->update([
'start_time'=>$time,
'end_time'=>$time + 86399
]);
Task::where('id', $approve['task_id'])->update([
'start_time'=>$time,
'end_time'=>$time + 86399
]);
}
}

View File

@ -0,0 +1,68 @@
<?php
namespace app\middleapi\controller;
use app\adminapi\logic\informationg\UserInformationgLogic;
use app\adminapi\validate\informationg\UserInformationgValidate;
use app\common\controller\BaseLikeAdminController;
use app\common\model\informationg\UserInformationg;
use app\common\model\informationg\UserInformationgDemand;
use think\response\Json;
class ArchivesController extends BaseLikeAdminController
{
//档案列表
public function lists(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['page_no','page_size','name']);
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$where = [];
if(!empty($params['name'])){
$where[] = ['name','like','%'.$params['name'].'%'];
}
$lists = UserInformationg::where($where)
->field(['id','create_user_id','company_id','area_id','area_id area_name','street_id','street_id street_name','village_id','village_id village_name', 'brigade_id','brigade_id brigade_name', 'address', 'name', 'phone', 'sex', 'age','update_time','create_time','status'])
->append(['extend'])
->order(['id' => 'desc'])
->page($pageNo, $pageSize)
->select()
->toArray();
$informationIdArray = [];
foreach($lists as $k=>$v) {
$informationIdArray[] = $v['id'];
}
$data = UserInformationgDemand::whereIn('information_id', $informationIdArray)->order('id', 'desc')->select();
$aianalyseArray = [];
foreach($data as $kk=>$vv) {
if (!empty($vv['ai_aianalyse'])) {
$aianalyseArray[$vv['information_id']][] = $vv['id'];
}
}
foreach($lists as $k=>$v) {
$lists[$k]['aianalyse_status'] = 0;
if (!empty($aianalyseArray[$v['id']])) {
$lists[$k]['aianalyse_status'] = 1;
}
}
$count = UserInformationg::where($where)->count();
$result = [
'lists' => $lists,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
//档案详情
public function detail(): Json
{
$params = (new UserInformationgValidate())->post()->goCheck('detail');
$result = UserInformationgLogic::detail($params);
return $this->data($result);
}
}

View File

@ -0,0 +1,83 @@
<?php
namespace app\middleapi\controller;
use app\adminapi\validate\category_business\CategoryBusinessValidate;
use app\common\controller\BaseLikeAdminController;
use app\common\logic\category_business\CategoryBusinessLogic;
use app\common\model\category_business\CategoryBusiness;
use think\response\Json;
class BusinessController extends BaseLikeAdminController
{
//商机分类列表
public function lists(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['page_no','page_size','name','status']);
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$where = [];
if(!empty($params['name'])){
$where[] = ['name','like','%'.$params['name'].'%'];
}
if(!empty($params['status'])){
$where[] = ['status','=',$params['status']];
}
$data = CategoryBusiness::where($where)->field(['id', 'name', 'pid', 'sort', 'status'])->order(['id' => 'desc'])->select()->toArray();
$count = CategoryBusiness::where($where)->count();
$result = [
'lists' => linear_to_tree($data, 'children'),
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
//商机分类详情
public function detail(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['id']);
if(empty($params['id'])){
return $this->fail('参数错误');
}
$data = CategoryBusiness::where('id',$params['id'])->findOrEmpty();
return $this->success('请求成功',$data->toArray());
}
//新增商机分类
public function create(): Json
{
$params = (new CategoryBusinessValidate())->post()->goCheck('add');
$result = CategoryBusinessLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(CategoryBusinessLogic::getError());
}
//编辑商机分类
public function edit(): Json
{
$params = (new CategoryBusinessValidate())->post()->goCheck('edit');
$result = CategoryBusinessLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(CategoryBusinessLogic::getError());
}
//删除商机分类
public function delete(): Json
{
$params = (new CategoryBusinessValidate())->post()->goCheck('delete');
CategoryBusinessLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
}

View File

@ -0,0 +1,359 @@
<?php
namespace app\middleapi\controller;
use app\adminapi\logic\auth\AdminLogic;
use app\adminapi\validate\CompanyValidate;
use app\api\controller\JunziqianController;
use app\common\controller\BaseLikeAdminController;
use app\common\logic\CompanyLogic;
use app\common\logic\contract\ContractLogic;
use app\common\logic\RedisLogic;
use app\common\model\auth\Admin;
use app\common\model\Company;
use app\common\model\contract\Contract;
use app\common\model\dict\DictData;
use app\common\model\task_scheduling\TaskScheduling;
use app\common\model\user\User;
use app\common\model\CompanyDepositVoucher;
use think\facade\Db;
use think\facade\Log;
use think\response\Json;
class CompanyController extends BaseLikeAdminController
{
//公司列表
public function lists(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params=$this->request->post(['page_no','page_size','company_name','area_name','street_name','area_manager','company_type','is_contract']);
$where = [];
if(!empty($params['company_name'])){
$where[] = ['company','like','%'.$params['company_name'].'%'];
}
if(!empty($params['area_name'])){
$arr= Db::name('geo_area')->where('area_name','like','%'.$params['area_name'].'%')->column('area_code');
if($arr){
$where[]=['area','in',$arr];
}
}
if(!empty($params['street_name'])){
$arr= Db::name('geo_street')->where('street_name','like','%'.$params['street_name'].'%')->column('street_code');
if($arr){
$where[]=['street','in',$arr];
}
}
if(!empty($params['area_manager'])){
$arr= Admin::where('name','like','%'.$params['area_manager'].'%')->column('id');
if($arr){
$where[]=['area_manager','in',$arr];
}
}
if(!empty($params['company_type'])){
$where[] = ['company_type','=',$params['company_type']];
}
if(!empty($params['is_contract'])){
$where[] = ['is_contract','=',$params['is_contract']];
}
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$data = Company::where($where)
->field(['is_authentication','id', 'id contract', 'company_name', 'organization_code', 'city', 'area', 'street', 'company_type', 'master_name', 'master_position', 'master_phone', 'master_email', 'area_manager', 'is_contract', 'deposit', 'company_money', 'shareholder_money', 'deposit_time', 'status', 'face_create_status'])
->page($pageNo, $pageSize)
->order(['id' => 'desc'])
->append(['notes'], true)
->withAttr('company_type',function($value,$data){
return Db::name('dict_data')->where('id',$value)->value('name');
})
->withAttr('area',function($value,$data){
return Db::name('geo_area')->where('area_code',$value)->value('area_name');
})
->withAttr('street',function($value,$data){
return Db::name('geo_street')->where('street_code',$value)->value('street_name');
})
->withAttr('area_manager',function($value,$data){
return Db::name('admin')->where('id',$value)->value('name');
})
->withAttr('notes',function($value,$data){
if ($data['is_authentication'] == 1) {
return Db::name('company_authentication_fail_log')->where('company_id',$data['id'])->where('log_type', 2)->order(['id'=>'desc'])->limit(1)->value('fail_reason');
} else {
return Db::name('company_authentication_fail_log')->where('company_id',$data['id'])->where('log_type', 1)->order(['id'=>'desc'])->limit(1)->value('fail_reason');
}
})->select()->toArray();
$count = Company::where($where)->count();
$result = [
'lists' => $data,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
//公司详情
public function detail(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params=$this->request->post(['id']);
if(empty($params['id'])){
return $this->fail('缺少必要参数');
}
$result = CompanyLogic::detail($params);
return $this->data($result);
}
//公司删除
public function delete(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params=$this->request->post(['id']);
if(empty($params['id'])){
return $this->fail('缺少必要参数');
}
$admin_id = Company::where('id', $params['id'])->value('admin_id');
User::where('company_id', $params['id'])->update(['delete_time' => time()]);
TaskScheduling::where('company_id', $params['id'])->update(['delete_time' => time()]);
AdminLogic::delete(['id' => $admin_id]);
CompanyLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
//添加公司
public function create(): Json
{
$params = (new CompanyValidate())->post()->goCheck('add');
$params['other_contacts'] = json_encode($params['other_contacts']);
$params['qualification'] = json_encode($params['qualification']);
if (isset($params['responsible_area'])) {
$params['responsible_area'] = implode(',', $params['responsible_area']);
}
$result = CompanyLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(CompanyLogic::getError());
}
//修改公司
public function edit(): Json
{
$params = (new CompanyValidate())->post()->goCheck('edit');
$params['other_contacts'] = json_encode($params['other_contacts']);
$params['qualification'] = json_encode($params['qualification']);
if (isset($params['responsible_area'])) {
$params['responsible_area'] = implode(',', $params['responsible_area']);
}
$result = CompanyLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(CompanyLogic::getError());
}
//公司认证
public function enterpriseCertification(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params=$this->request->post(['id']);
if(empty($params['id'])){
return $this->fail('缺少必要参数');
}
$company = Db::name('company')->where('id', $params['id'])->find();
$qualification = json_decode($company['qualification'], true);
if ($company && $qualification['business_license']) {
$data = [
'name' => $company['company_name'],
'organization_code' => $company['organization_code'],
'business_license' => 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/561f8202305171526091317.png', //$qualification['business_license'],
'master_name' => $company['master_name'],
'master_email' => $company['master_email'],
'master_phone' => $company['master_phone'],
'master_id_card' => $company['master_id_card'],
'id' => $company['id'],
];
$res = app(JunziqianController::class)->EnterpriseCertification($data);
Log::info(['企业认证同步结果',$res]);
if ($res->success) {
if ($company['company_type'] == 30) {
// 平台公司不用初始化生成合同 合同签约暂不用人脸识别,预留人脸采集状态为已采集
Db::name('company')->where('id', $params['id'])->update([ 'is_contract'=>1,'face_create_status'=>1]);
} else {
Db::name('company')->where('id', $params['id'])->update([ 'face_create_status'=>1]);
}
// 加入缓存中is_callback用于判断是否获取到异步通知
RedisLogic::getInstance()->set('authentication_company_id_'.$company['id'], json_encode(['company_id'=>$company['id'],'is_callback'=>0, 'timing'=>time()]));
return $this->success('系统认证中,请稍后刷新页面查看', ['email' => $res->data], 1, 1);
} else {
return $this->fail($res->msg);
}
} else {
return $this->fail("公司不存在");
}
}
//生成合同
public function generateContract(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params=$this->request->post(['id','party_a','contract_type']);
if(empty($params['id']) || empty($params['party_a']) || empty($params['contract_type'])){
return $this->fail('缺少必要参数');
}
$area_manager = Company::where('id', $params['party_a'])->value('area_manager');
$params['area_manager'] = $area_manager;
$params['type'] = 1;
$params['party_b'] = $params['id'];
unset($params['id']);
$result = ContractLogic::initiate_contract($params);
if (!empty($result) && $result['code'] == 1) {
return $this->success($result['msg'], $result['data'], 1, 1);
}
return $this->fail(ContractLogic::getError());
}
//下属公司
public function subsidiaryCompany(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params=$this->request->post(['id','page_no','page_size']);
if(empty($params['id'])){
return $this->fail('缺少必要参数');
}
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$ids = Contract::where('party_a', $params['id'])->where('status', 1)->where('type', 1)->column('party_b');
if ($ids) {
$result = Company::where('id', 'in', $ids)->field('company_name,id,company_type,company_type company_type_name,area,area area_name,street,street street_name,is_contract,area_manager,area_manager area_manager_name,master_name,master_phone,is_authentication')->page($pageNo,$pageSize)->select();
$count = Company::where('id', 'in', $ids)->count();
} else {
$result = [];
$count = 0;
}
$data = [
'lists' => $result,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('success', $data);
}
//公司类型
public function companyType(): Json
{
$data = DictData::where('type_id',6)
->append(['status_desc'])
->order(['sort' => 'desc', 'id' => 'desc'])
->select()
->toArray();
return $this->success('请求成功',$data);
}
//合同类型
public function contractType(): Json
{
$data = DictData::where('type_id',7)
->append(['status_desc'])
->order(['sort' => 'desc', 'id' => 'desc'])
->select()
->toArray();
return $this->success('请求成功',$data);
}
public function responsibleArea(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['key','value','company_type']);
if (empty($params['key']) || empty($params['value']) || empty($params['company_type'])) {
return $this->fail('参数错误');
}
if ($params['key'] == 'city') {
$where[] = ['area', '=', 0];
}
if ($params['value'] == '') {
return $this->fail('参数不能为空');
}
$where[] = [$params['key'], '=', $params['value']];
$where[] = ['company_type', '=', $params['company_type']];
switch ($params['key']) {
case 'city':
// $geo_area=Db::name('geo_area')->where('city_code', '=', $parmas['value'])->column('area_code');
// $where[] = ['area', 'in', $geo_area];
break;
case 'area':
$street_code = Db::name('geo_street')->where('area_code', '=', $params['value'])->column('street_code');
$where[] = ['street', 'in', $street_code];
$where[] = ['village', '=', 0];
break;
case 'street':
$street_code = Db::name('geo_village')->where('street_code', '=', $params['value'])->column('village_code');
$where[] = ['village', 'in', $street_code];
$where[] = ['brigade', '=', 0];
break;
case 'village':
// $street_code = Db::name('geo_brigade')->where('street_code', '=', $parmas['value'])->column('village_code');
$where[] = ['village', '=', $params['value']];
// $where[] = ['brigade', '=', 0];
break;
}
$res = Company::where($where)->column('responsible_area');
foreach ($res as $k => $v) {
$res[$k] = explode(',', $v);
}
$data = [];
foreach ($res as $k => $v) {
foreach ($v as $kk => $vv) {
if ($vv != '') {
$data[] = $vv;
}
}
}
return $this->success('success', array_unique($data));
}
public function getDepositRechargeTransferVoucherList()
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['page_no','page_size', 'account', 'mobile', 'company_id']);
$where = [];
if(isset($params['company_id']) && $params['company_id'] > 0){
$where[] = ['company_id', '=', $params['company_id']];
}
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$lists = CompanyDepositVoucher::where($where)
->page($pageNo, $pageSize)
->order(['id' => 'desc'])
->select()
->toArray();
$count=CompanyDepositVoucher::where($where)->count();
$result = [
'lists' => $lists,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
}

View File

@ -0,0 +1,181 @@
<?php
namespace app\middleapi\controller;
use app\adminapi\validate\contract\ContractValidate;
use app\api\controller\JunziqianController;
use app\api\logic\SmsLogic;
use app\common\controller\BaseLikeAdminController;
use app\common\logic\contract\ContractLogic;
use app\common\model\auth\Admin;
use app\common\model\Company;
use app\common\model\contract\Contract;
use app\common\model\user\User;
use think\facade\Db;
use think\response\Json;
class ContractController extends BaseLikeAdminController
{
//合同列表
public function lists(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['page_no','page_size','contract_no','contract_type','contract_status','company_name','area_manager']);
$where = [];
if(isset($params['contract_no'])){
$where[] = ['contract_no','like','%'.$params['contract_no'].'%'];
}
if(isset($params['contract_type'])){
$where[] = ['contract_type','=',$params['contract_type']];
}
if(isset($params['contract_status']) && in_array($params['contract_status'],[0,1])){
$where[] = ['status','=', $params['contract_status']];
}
if(isset($params['company_name']) && $params['company_name']!=''){
$arr= Company::where('company_name','like','%'.$params['company_name'].'%')->column('id');
if($arr){
$where[]=['party_a|party_b','in',$arr];
}
}
if(isset($params['area_manager']) && $params['area_manager']!=''){
$arr= Admin::where('name','like','%'.$params['area_manager'].'%')->column('id');
if($arr){
$where[]=['area_manager','in',$arr];
}
}
$pageNo = !empty($param['page_no']) ? $param['page_no'] : 1;
$pageSize = !empty($param['page_size']) ? $param['page_size'] : 20;
$data = Contract::where($where)->with(['companyName','party_a_info','contractType'])
->page($pageNo, $pageSize)
->order(['id' => 'desc'])
->select()->each(function ($item) {
if($item->type==1){
$item->party_b_name=Db::name('company')->where('id',$item->party_b)->value('company_name');
}else{
$item->party_b_name=Db::name('user')->where('id',$item->party_b)->value('nickname');
}
if(!empty($item->party_a_info)){
$area_manager_name=Db::name('admin')->where('id',$item->party_a_info->area_manager)->value('name');
if($area_manager_name){
$item->area_manager_name=$area_manager_name;
}else{
$item->area_manager_name='暂无片区经理';
}
}else{
$item->area_manager_name='暂无片区经理';
}
$item->contract_type_name=Db::name('dict_data')->where('id',$item->contract_type)->value('name');
$item->status_name=$item->status==1?'已签约':'未签约';
})->toArray();
$count = Contract::where($where)->count();
$result = [
'lists' => $data,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
//合同详情
public function detail(): Json
{
$params = (new ContractValidate())->post()->goCheck('detail');
$result = ContractLogic::detail($params);
return $this->data($result);
}
//上传合同
public function uploadContract(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['id','file']);
if(empty($params['id']) || empty($params['file'])){
return $this->fail('参数错误');
}
$res = Contract::where('id', $params['id'])->update(['file' => $params['file'], 'check_status' => 2]);
if ($res) {
$find = Contract::where('id', $params['id'])->with(['party_a_info'])->field('type,party_b,party_a')->find()->toArray();
if ($find['type'] == 1) {
$find['party_b_info'] = Company::where('id', $find['party_b'])->field('company_name name,master_phone phone')->find()->toArray();
} else {
$find['party_b_info'] = User::where('id', $find['party_b'])->field('nickname name,mobile phone')->find()->toArray();
}
$a = [
'mobile' => $find['party_a_info']['master_phone'],
'name' => $find['party_a_info']['company_name'],
'scene' => 'WQTZ'
];
SmsLogic::contractUrl($a);
$b = [
'mobile' => $find['party_b_info']['phone'],
'name' => $find['party_b_info']['name'],
'scene' => 'WQTZ'
];
SmsLogic::contractUrl($b);
return $this->success('上传成功', [], 1, 1);
} else {
if ($res == 0) {
return $this->success('没有更新', [], 1, 1);
}
return $this->fail('上传失败');
}
}
//发起合同
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('参数错误');
}
$data = [
'id' => $params['part_b'],
'contract_id' => $params['id']
];
$result = ContractLogic::Draftingcontracts($data,$params['type']);
if ($result) {
return $this->success('发送合同成功', [], 1, 1);
}
return $this->fail(ContractLogic::getError());
}
//发送短信
public function sendSms(): Json
{
$params = $this->request->post(['id']);
if(empty($params['id'])){
return $this->fail('参数错误');
}
$res = ContractLogic::postsms($params);
if ($res) {
return $this->success('发送成功', [], 1, 1);
} else {
return $this->fail(ContractLogic::getError());
}
}
//下载证据包
public function evidence() {
$params = $this->request->post(['id']);
if(empty($params['id'])){
$this->fail('参数错误');
}
$detail=Contract::where('id',$params['id'])->find();
if(!empty($detail['evidence_url'])){
return $this->success('获取成功', ['url' => env('url.url_prefix').$detail['evidence_url']]);
}
$company=Company::where('id',$detail['party_a'])->find();
$request = array(
"applyNo" => $detail['contract_no'],
"fullName" => $company['company_name'],
"identityCard" => $company['organization_code'],
"identityType" => 12,
);
return app(JunziqianController::class)->EvidenceDownload($request);
}
}

View File

@ -0,0 +1,77 @@
<?php
namespace app\middleapi\controller;
use app\common\model\dict\DictData;
use app\adminapi\logic\setting\dict\DictDataLogic;
use app\common\controller\BaseLikeAdminController;
/**
* 字典数据
* Class DictDataController
* @package app\adminapi\controller\dictionary
*/
class DictDataController extends BaseLikeAdminController
{
/**
* @notes 获取字典数据列表
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 16:35
*/
public function lists()
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params=$this->request->post(['page_no','page_size','name','type_id','type_value']);
$where = [];
if(!empty($params['name'])){
$where[] = ['name','like','%' . $params['name'] . '%'];
}
if(!empty($params['type_id'])){
$where[] = ['type_id', '=', $params['type_id']];
}
if(!empty($params['type_value'])){
$where[] = ['type_value', '=', $params['type_value']];
}
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$data = DictData::where($where)
->append(['status_desc'])
->page($pageNo, $pageSize)
->order(['sort' => 'desc', 'id' => 'desc'])
->select()
->toArray();
$count = DictData::where($where)->count();
$result = [
'lists' => $data,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
/**
* @notes 获取字典详情
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 17:14
*/
public function detail()
{
$params = (new DictDataValidate())->goCheck('id');
$result = DictDataLogic::detail($params);
return $this->data($result);
}
public function getTaskApproveTypeList()
{
$result = DictDataLogic::getTaskApproveTypeList();
return $this->data($result);
}
}

View File

@ -0,0 +1,44 @@
<?php
namespace app\middleapi\controller;
use app\common\controller\BaseLikeAdminController;
use think\facade\Db;
class GeoController extends BaseLikeAdminController
{
public function province()
{
$data = Db::name('geo_province')->where(['switch' => 1])->select();
return $this->data($data->toArray());
} //**市列表 */
public function city($city)
{
$data = Db::name('geo_city')->where(['province_code' => $city])->select();
return $this->data($data->toArray());
}
//**区域列表 */
public function area($area)
{
$data = Db::name('geo_area')->where(['city_code' => $area])->select();
return $this->data($data->toArray());
}
//**街道列表 */
public function street($street)
{
$data = Db::name('geo_street')->where(['area_code' => $street])->select();
return $this->data($data->toArray());
}
//**村列表 */
public function village($village)
{
$data = Db::name('geo_village')->where(['street_code' => $village])->select();
return $this->data($data->toArray());
}
//**小队列表 */
public function brigade()
{
$data = Db::name('geo_brigade')->select();
return $this->data($data->toArray());
}
}

View File

@ -0,0 +1,124 @@
<?php
namespace app\middleapi\controller;
use app\common\controller\BaseLikeAdminController;
use app\common\model\Approve;
use app\common\model\auth\Admin;
use app\common\model\Company;
use app\common\model\CompanyForm;
use app\common\model\ShopMerchant;
use app\common\model\task\Task;
use think\facade\Db;
use think\response\Json;
class MerchantController extends BaseLikeAdminController
{
//商户档案列表
public function merchantRecordLists(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['page_no','page_size','merchant_name','master_name','master_phone']);
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$where = [];
if(!empty($params['merchant_name'])){
$where[] = ['company_name','like','%'.$params['merchant_name'].'%'];
}
if(!empty($params['master_name'])){
$where[] = ['master_name','like','%'.$params['master_name'].'%'];
}
if(!empty($params['master_phone'])){
$where[] = ['master_phone','like','%'.$params['master_phone'].'%'];
}
$data = ShopMerchant::where($where)
->field(['id', 'company_name', 'organization_code', 'master_name', 'master_phone'])
->page($pageNo, $pageSize)
->order(['id' => 'desc'])
->append(['notes'], true)
->withAttr('notes',function($value,$data){
return Db::name('company_authentication_fail_log')->where('company_id',$data['id'])->where('log_type', 3)->order(['id'=>'desc'])->limit(1)->value('fail_reason');
})->select()->toArray();
$count = ShopMerchant::where($where)->count();
$result = [
'lists' => $data,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
//商户认证表格列表
public function merchantAuthLists(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['page_no','page_size','merchant_name','organization_code','master_name']);
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$where = [];
if(!empty($params['merchant_name'])){
$where[] = ['company_name','like','%'.$params['merchant_name'].'%'];
}
if(!empty($params['organization_code'])){
$where[] = ['organization_code','like','%'.$params['organization_code'].'%'];
}
if(!empty($params['master_name'])){
$where[] = ['master_name','like','%'.$params['master_name'].'%'];
}
$data = CompanyForm::where($where)
->field(['id', 'company_name', 'organization_code', 'address', 'master_name', 'type', 'master_email', 'notes'])
->page($pageNo, $pageSize)->order(['id' => 'desc'])->select()->toArray();
$count = CompanyForm::where($where)->count();
$result = [
'lists' => $data,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
//商户申请列表
public function merchantApplyLists(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['page_no','page_size','check_status','type']);
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$where = [];
if(!empty($params['check_status']) && in_array($params['check_status'],[1,2,3])){
$where[] = ['check_status','=', $params['check_status']];
}
if(!empty($params['type']) && in_array($params['type'],[2,3])){
$where[] = ['type','=',$params['type']];
}else{
$where[] = ['type','in','2,3'];
}
$data = Approve::where($where)->with('task')->append(['area_manager', 'company_name'], true)
->page($pageNo, $pageSize)->order(['id' => 'desc'])->select()
->withAttr('area_manager',function($value,$data){
return Admin::where(['id' => $data['check_admin_ids']])->value('name');
})
->withAttr('company_name',function($value,$data){
$task = Task::where('id', $data['task_id'])->find();
if(!empty($task)){
return Company::where(['id' => $task['company_id']])->value('company_name');
}
})->toArray();
$count = Approve::where($where)->count();
$result = [
'lists' => $data,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
}

View File

@ -0,0 +1,99 @@
<?php
namespace app\middleapi\controller;
use app\adminapi\logic\recharge\RechargeLogic;
use app\adminapi\validate\recharge\RechargeRefundValidate;
use app\common\model\recharge\RechargeOrder;
use app\common\service\FileService;
use app\common\controller\BaseLikeAdminController;
/**
* 充值控制器
* Class RechargeController
* @package app\adminapi\controller\recharge
*/
class RechargeController extends BaseLikeAdminController
{
/**
* @notes 充值记录
* @return \think\response\Json
* @author 段誉
* @date 2023/2/24 16:01
*/
public function lists()
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['page_no','page_size', 'user_info', 'start_time', 'end_time', 'sn', 'pay_way', 'pay_status' ]);
$where = [];
if (!empty($params['sn'])) {
$where[] = ['ro.sn', '=', $params['sn']];
}
if (!empty($params['pay_way'])) {
$where[] = ['ro.pay_way', '=', $params['pay_way']];
}
if (!empty($params['pay_status'])) {
$where[] = ['ro.pay_status', '=', $params['pay_status']];
}
if (!empty($params['user_info'])) {
$where[] = ['u.sn|u.nickname|u.mobile', 'like', '%' . $params['user_info'] . '%'];
}
if (!empty($params['start_time']) && !empty($params['end_time'])) {
$where[] = ['ro.create_time', 'between', [strtotime($params['start_time']), strtotime($params['end_time'])]];
}
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$field = 'ro.id,ro.sn,ro.order_amount,ro.pay_way,ro.pay_time,ro.pay_status,ro.create_time,ro.refund_status';
$field .= ',u.avatar,u.nickname,u.company_id';
$data = RechargeOrder::alias('ro')
->join('user u', 'u.id = ro.user_id')
->join('admin a', 'u.admin_id = a.id')
->join('company c', 'u.company_id = c.id')
->field($field)
->where($where)
->order('ro.id', 'desc')
->page($pageNo, $pageSize)
->append(['pay_status_text', 'pay_way_text'])
->select()
->toArray();
foreach ($data as &$item) {
$item['avatar'] = FileService::getFileUrl($item['avatar']);
$item['pay_time'] = empty($item['pay_time']) ? '' : date('Y-m-d H:i:s', $item['pay_time']);
}
$count = RechargeOrder::alias('ro')
->join('user u', 'u.id = ro.user_id')
->join('admin a', 'u.admin_id = a.id')
->join('company c', 'u.company_id = c.id')
->where($where)->count();
$result = [
'lists' => $data,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
/**
* @notes 退款
* @return \think\response\Json
* @author 段誉
* @date 2023/2/28 17:29
*/
public function refund()
{
$params = (new RechargeRefundValidate())->post()->goCheck('refund');
$adminId = 1;
$result = RechargeLogic::refund($params, $adminId);
list($flag, $msg) = $result;
if(false === $flag) {
return $this->fail($msg);
}
return $this->success($msg, [], 1, 1);
}
}

View File

@ -0,0 +1,108 @@
<?php
namespace app\middleapi\controller;
use app\adminapi\logic\finance\RefundLogic;
use app\common\model\refund\RefundRecord;
use app\common\controller\BaseLikeAdminController;
/**
* 退款控制器
* Class RefundController
* @package app\adminapi\controller\finance
*/
class RefundController extends BaseLikeAdminController
{
/**
* @notes 退还统计
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2023/3/3 12:10
*/
public function stat()
{
$result = RefundLogic::stat();
return $this->success('', $result);
}
/**
* @notes 退款记录
* @return \think\response\Json
* @author 段誉
* @date 2023/3/1 9:47
*/
public function record()
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['page_no','page_size', 'user_info', 'start_time', 'end_time', 'sn', 'order_sn', 'refund_type', 'refund_status']);
$where = [];
if (!empty($params['sn'])) {
$where[] = ['r.sn', '=', $params['sn']];
}
if (!empty($params['order_sn'])) {
$where[] = ['r.order_sn', '=', $params['order_sn']];
}
if (!empty($params['refund_type'])) {
$where[] = ['r.refund_type', '=', $params['refund_type']];
}
if (!empty($params['user_info'])) {
$where[] = ['u.sn|u.nickname|u.mobile', 'like', '%' . $params['user_info'] . '%'];
}
if (!empty($params['start_time']) && !empty($params['end_time'])) {
$where[] = ['r.create_time', 'between', [strtotime($params['start_time']), strtotime($params['end_time'])]];
}
if (isset($params['refund_status']) && $params['refund_status'] != '') {
$where[] = ['r.refund_status', '=', $params['refund_status']];
}
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$lists = (new RefundRecord())->alias('r')
->field('r.*,u.nickname,u.avatar')
->join('user u', 'u.id = r.user_id')
->order(['r.id' => 'desc'])
->where($where)
->page($pageNo, $pageSize)
->append(['refund_type_text', 'refund_status_text', 'refund_way_text'])
->select()
->toArray();
foreach ($lists as &$item) {
$item['avatar'] = FileService::getFileUrl($item['avatar']);
}
$count = (new RefundRecord())->alias('r')
->field('r.*,u.nickname,u.avatar')
->join('user u', 'u.id = r.user_id')
->order(['r.id' => 'desc'])
->where($where)->count();
$result = [
'lists' => $lists,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
/**
* @notes 退款日志
* @return \think\response\Json
* @author 段誉
* @date 2023/3/1 9:47
*/
public function log()
{
$params = $this->request->post(['record_id']);
$recordId = $params['record_id'] ?? 0;
$result = RefundLogic::refundLog($recordId);
return $this->success('', $result);
}
}

View File

@ -0,0 +1,180 @@
<?php
namespace app\middleapi\controller;
use app\adminapi\logic\ShopContractLogic;
use app\adminapi\validate\ShopContractValidate;
use app\api\controller\JunziqianController;
use app\api\logic\SmsLogic;
use app\common\controller\BaseLikeAdminController;
use app\common\logic\contract\ContractLogic;
use app\common\model\ShopContract;
use app\common\model\ShopMerchant;
use think\response\Json;
class ShopContractController extends BaseLikeAdminController
{
//商户合同列表
public function lists(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['page_no','page_size','contract_no','party_a','party_b','status']);
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$where = [];
if(!empty($params['contract_no'])){
$where[] = ['contract_no','like','%'.$params['contract_no'].'%'];
}
if(isset($params['party_a']) && $params['party_a']!=''){
$arr= ShopMerchant::where('company_name','like','%'.$params['party_a'].'%')->column('id');
if($arr){
$where[]=['party_a','in',$arr];
}
}
if(isset($params['party_b']) && $params['party_b']!=''){
$arr= ShopMerchant::where('company_name','like','%'.$params['party_b'].'%')->column('id');
if($arr){
$where[]=['party_b','in',$arr];
}
}
if(isset($params['status']) && in_array($params['status'],[0,1])){
$where[] = ['status','=',$params['status']];
}
$data = ShopContract::where($where)
->field(['id', 'contract_no', 'party_a', 'party_b', 'area_manager', 'type', 'evidence_url', 'check_status', 'status', 'notes'])
->page($pageNo, $pageSize)->order(['id' => 'desc'])
->with(['partyA', 'partyB'])->select()->toArray();
$count = ShopContract::where($where)->count();
$result = [
'lists' => $data,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
//商户合同详情
public function detail(): Json
{
$params = (new ShopContractValidate())->post()->goCheck('detail');
$result = ShopContractLogic::detail($params);
return $this->data($result);
}
//商户合同审核后
public function check(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['id','file']);
if(empty($params['id']) || empty($params['file'])){
return $this->fail('参数错误');
}
$res = ShopContract::where('id', $params['id'])->update(['file' => $params['file'], 'check_status' => 2]);
if ($res) {
$find = ShopContract::where('id', $params['id'])->field('type,party_b,party_a')->find()->toArray();
$find['party_a_info'] = ShopMerchant::where('id', $find['party_a'])->field('company_name name,master_phone phone')->find()->toArray();
$find['party_b_info'] = ShopMerchant::where('id', $find['party_b'])->field('company_name name,master_phone phone')->find()->toArray();
$a = [
'mobile' => $find['party_a_info']['phone'],
'name' => $find['party_a_info']['name'],
'scene' => 'WQTZ'
];
SmsLogic::contractUrl($a);
$b = [
'mobile' => $find['party_b_info']['phone'],
'name' => $find['party_b_info']['name'],
'scene' => 'WQTZ'
];
SmsLogic::contractUrl($b);
return $this->success('上传成功', [], 1, 1);
} else {
if ($res == 0) {
return $this->success('没有更新', [], 1, 1);
}
return $this->fail('上传失败');
}
}
//商户合同备注
public function note(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['id','notes']);
if(empty($params['id']) || empty($params['notes'])){
return $this->fail('参数错误');
}
$shopContract = ShopContract::where('id', $params['id'])->find();
if (empty($shopContract)) {
return $this->fail('合同不存在');
}
$shopContract->notes = $params['notes'];
$shopContract->save();
return $this->success('成功');
}
//发送合同
public function draftContract(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['id']);
if(empty($params['id'])){
return $this->fail('参数错误');
}
$result = ShopContractLogic::Draftingcontracts($params);
if ($result) {
return $this->success('生成合同成功', [], 1, 1);
}
return $this->fail(ContractLogic::getError());
}
//发送短信
public function sendSms(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['id']);
if(empty($params['id'])){
return $this->fail('参数错误');
}
$re = ShopContractLogic::postsms($params);
if (!$re) {
return $this->fail(ShopContractLogic::getError());
}
return $this->success('成功');
}
//下载证据包
public function evidence()
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['id']);
if(empty($params['id'])){
return $this->fail('参数错误');
}
$detail=ShopContract::where('id',$params['id'])->find();
if(!empty($detail['evidence_url'])){
return $this->success('获取成功', ['url' => env('url.url_prefix').$detail['evidence_url']]);
}
$company=ShopMerchant::where('id',$detail['party_a'])->find();
$request = array(
"applyNo" => $detail['contract_no'],
"fullName" => $company['company_name'],
"identityCard" => $company['organization_code'],
"identityType" => 12,
);
return app(JunziqianController::class)->EvidenceShopDownload($request);
}
}

View File

@ -0,0 +1,106 @@
<?php
namespace app\middleapi\controller;
use app\common\model\task_scheduling\TaskScheduling;
use app\common\model\Company;
use app\adminapi\validate\task_scheduling\TaskSchedulingValidate;
use app\common\logic\task_scheduling\TaskSchedulingLogic;
use app\common\controller\BaseLikeAdminController;
/**
* 任务公司排期控制器
* Class TaskSchedulingController
* @package app\adminapi\controller\task_scheduling
*/
class TaskSchedulingController extends BaseLikeAdminController
{
/**
* @notes 获取任务公司排期列表
* @return \think\response\Json
* @author likeadmin
* @date 2023/08/08 10:08
*/
public function lists()
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params=$this->request->post(['page_no','page_size','company_id']);
$where = [];
if (isset($params['company_id']) && $params['company_id'] != '') {
$arr = Company::where('company_name', 'like', '%' . $params['company_id'] . '%')->column('id');
if ($arr) {
$where[] = ['company_id', 'in', $arr];
} else {
$where[] = ['company_id', 'in', [0]];
}
}
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$data = TaskScheduling::where($where)
->with(['admin', 'company', 'company_type'])
->page($pageNo, $pageSize)
->order(['id' => 'desc'])
->select()
->toArray();
$count = TaskScheduling::where($where)->count();
$result = [
'lists' => $data,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
/**
* @notes 编辑任务公司排期
* @return \think\response\Json
* @author likeadmin
* @date 2023/08/08 10:08
*/
public function edit()
{
$params = (new TaskSchedulingValidate())->post()->goCheck('edit');
$result = TaskSchedulingLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(TaskSchedulingLogic::getError());
}
//编辑金额
public function editMoney()
{
$params = $this->request->param();
if(empty($params['id'])){
return $this->fail('缺少必要参数id');
}
if(empty($params['money'])){
return $this->fail('缺少必要参数金额');
}
$moeny = $params['money'];
$result = TaskScheduling::where(['id'=>$params['id']])->update(['money'=>$moeny]);
if ( $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail('编辑失败');
}
/**
* @notes 获取任务公司排期详情
* @return \think\response\Json
* @author likeadmin
* @date 2023/08/08 10:08
*/
public function detail()
{
$params = (new TaskSchedulingValidate())->post()->goCheck('detail');
$result = TaskSchedulingLogic::detail($params);
return $this->data($result);
}
}

View File

@ -0,0 +1,62 @@
<?php
namespace app\middleapi\controller;
use app\common\model\task_scheduling_plan\TaskSchedulingPlan;
use app\common\controller\BaseLikeAdminController;
/**
* 任务排期日历控制器
* Class TaskSchedulingPlanController
* @package app\adminapi\controller\task_scheduling_plan
*/
class TaskSchedulingPlanController extends BaseLikeAdminController
{
/**
* @notes 获取任务排期日历列表
* @return \think\response\Json
* @author likeadmin
* @date 2023/08/08 10:34
*/
public function lists()
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params=$this->request->post(['page_no','page_size','template_id','scheduling_id','status','start_time','end_time']);
$where = [];
if (isset($params['template_id']) && $params['template_id'] != '') {
$where[] = ['template_id', '=', $params['template_id']];
}
if (isset($params['scheduling_id']) && $params['scheduling_id'] != '') {
$where[] = ['scheduling_id', '=', $params['scheduling_id']];
}
if (isset($params['status']) && $params['status'] != '') {
$where[] = ['status', '=', $params['status']];
}
if (isset($params['start_time']) && $params['start_time'] != '') {
$where[] = ['start_time', '>=', strtotime($params['start_time'])];
}
if (isset($params['end_time']) && $params['end_time'] != '') {
$where[] = ['end_time', '<=', strtotime($params['end_time'])];
}
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$data = TaskSchedulingPlan::where($where)
->with(['template','templateInfo'])
->page($pageNo, $pageSize)
->order(['id' => 'desc'])
->select()
->toArray();
$count = TaskSchedulingPlan::where($where)->count();
$result = [
'lists' => $data,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
}

View File

@ -0,0 +1,142 @@
<?php
namespace app\middleapi\controller;
use app\common\logic\task_template\TaskTemplateLogic;
use app\adminapi\validate\task_template\TaskTemplateValidate;
use app\common\model\Company;
use app\common\model\task_template\TaskTemplate;
use app\common\model\task_scheduling\TaskScheduling;
use app\common\controller\BaseLikeAdminController;
/**
* 任务模板控制器
* Class TaskTemplateController
* @package app\adminapi\controller\task_template
*/
class TaskTemplateController extends BaseLikeAdminController
{
/**
* @notes 获取任务模板列表
* @return \think\response\Json
* @author likeadmin
* @date 2023/08/06 17:30
*/
public function lists()
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params=$this->request->post(['page_no','page_size','title', 'type', 'status', 'company_id']);
$where = [];
if (isset($params['title']) && $params['title'] != '') {
$where[] = ['title', 'like', '%' . $params['title'] . '%'];
}
if (isset($params['type']) && $params['type'] != '') {
$where[] = ['type', '=', $params['type']];
}
if (isset($params['status']) && $params['status'] != '') {
$where[] = ['status', '=', $params['status']];
}
if (isset($params['company_id']) && $params['company_id'] != '') {
$where[] = ['company_id', '=', $params['company_id']];
}
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$data = TaskTemplate::where($where)
->with(['admin','data_type'])
->page($pageNo, $pageSize)
->order(['id' => 'desc'])
->select()
->toArray();
$count = TaskTemplate::where($where)->count();
$result = [
'lists' => $data,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
/**
* @notes 添加任务模板
* @return \think\response\Json
* @author likeadmin
* @date 2023/08/06 17:30
*/
public function add()
{
$params = (new TaskTemplateValidate())->post()->goCheck('add');
$params['admin_id'] = 1;
if (empty($params['extend'])) {
$params['extend'] = '{}';
}
$company = Company::find($params['company_id']);
if ($company->company_type == 41) {
// 创建 镇农科公司 任务模板
$result = TaskTemplateLogic::addTownTaskTemplate($params);
} else if ($company->company_type == 17) {
$result = TaskTemplateLogic::addVillageTaskTemplate($params);
} else {
$result = TaskTemplateLogic::add($params);
}
if (true === $result) {
TaskTemplateLogic::initCompanyWithdrawDeadline($params['company_id']);
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(TaskTemplateLogic::getError());
}
/**
* @notes 编辑任务模板
* @return \think\response\Json
* @author likeadmin
* @date 2023/08/06 17:30
*/
public function edit()
{
$params = (new TaskTemplateValidate())->post()->goCheck('edit');
if (empty($params['extend'])) {
$params['extend'] = '{}';
}
$params['admin_id'] = 1;
$result = TaskTemplateLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(TaskTemplateLogic::getError());
}
/**
* @notes 删除任务模板
* @return \think\response\Json
* @author likeadmin
* @date 2023/08/06 17:30
*/
public function delete()
{
$params = (new TaskTemplateValidate())->post()->goCheck('delete');
TaskTemplateLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取任务模板详情
* @return \think\response\Json
* @author likeadmin
* @date 2023/08/06 17:30
*/
public function detail()
{
$params = (new TaskTemplateValidate())->post()->goCheck('detail');
$result = TaskTemplateLogic::detail($params);
return $this->data($result);
}
}

View File

@ -0,0 +1,64 @@
<?php
namespace app\middleapi\controller;
use app\common\enum\user\AccountLogEnum;
use app\common\model\user\User;
use app\common\enum\user\UserTerminalEnum;
use think\facade\Db;
use app\common\controller\BaseLikeAdminController;
/***
* 用户控制器
* Class AccountLogController
* @package app\adminapi\controller
*/
class UserController extends BaseLikeAdminController
{
/**
* @notes 账户流水明细
* @return \think\response\Json
* @author 段誉
* @date 2023/2/24 15:25
*/
public function lists()
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['page_no','page_size', 'account', 'mobile', 'company_id']);
$where = [];
if(isset($params['company_id']) && $params['company_id'] > 0){
$where[] = ['company_id', '=', $params['company_id']];
}
if(isset($params['account']) && $params['account'] != ''){
$where[] = ['account', '=', $params['account']];
}
if(isset($params['mobile']) && $params['mobile'] != ''){
$where[] = ['mobile', 'like', '%'.$params['mobile'].'%'];
}
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$field = "id,id contract,sn,nickname,sex,avatar,account,mobile,channel,create_time,admin_id,company_id,street,street as street_name,is_contract";
$lists = User::where($where)
->with(['company'])
->page($pageNo, $pageSize)
->field($field)
->order('id desc')
->select()
->toArray();
foreach ($lists as &$item) {
$item['channel'] = UserTerminalEnum::getTermInalDesc($item['channel']);
}
$count = User::where($where)->count();
$result = [
'lists' => $lists,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
}

View File

@ -0,0 +1,314 @@
<?php
namespace app\middleapi\controller;
use app\api\controller\JunziqianController;
use app\common\controller\BaseLikeAdminController;
use app\common\enum\notice\NoticeEnum;
use app\common\model\contract\VehicleContract;
use app\common\model\vehicle\VehicleRent;
use think\response\Json;
class VehicleController extends BaseLikeAdminController
{
//三轮车合同列表
public function lists(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$param = $this->request->post(['page_no','page_size','company_name','contract_no','status']);
$where = [];
if(isset($param['company_name'])){
$where[] = ['company_b_name','like','%'.$param['company_name'].'%'];
}
if(isset($param['contract_no'])){
$where[] = ['contract_no','like','%'.$param['contract_no'].'%'];
}
if(isset($param['status']) && in_array($param['status'],[0,1])){
if($param['status'] == 1){
$where[] = ['status','in', '1,2,3'];
}else{
$where[] = ['status','=', $param['status']];
}
}else{
$where[] = ['status','in', '0,1,2,3'];
}
$pageNo = !empty($param['page_no']) ? $param['page_no'] : 1;
$pageSize = !empty($param['page_size']) ? $param['page_size'] : 20;
$data = VehicleContract::where($where)
->page($pageNo, $pageSize)
->order('create_time desc')
->select()->each(function($item){
$item['cars_info'] = json_decode($item['cars_info'],true);
});
return $this->success('success',['lists'=>$data->toArray(),'page_no'=>$pageNo,'page_size'=>$pageSize,'count'=>$data->count()]);
}
//三轮车合同详情
public function detail(): Json
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$id = $this->request->post('id');
if(empty($id)){
$this->fail('参数错误');
}
$data = VehicleContract::where('id',$id)->findOrEmpty();
if($data->isEmpty()){
return $this->fail('未查找到数据');
}
$cars = json_decode($data['cars_info'],true);
//判断合同类型
if(!empty($data['contract_logistic_id']) && $data['type'] == 0){
$carList = curl_get(env('project.logistic_domain').'/api/getAvailableVehicles');
$data['car_list'] = $carList&&$carList['code']==1 ? $carList['data'] : [];
}
if(!empty($cars)){
foreach ($cars as $k=>$v) {
if($data['type'] == 0){
$cars[$k]['type'] = 0;
}
if($data['type'] == 1){
if(empty($v['id'])){
$cars[$k]['type'] = 1;
}else{
$rentInfo = VehicleRent::where('car_id',$v['id'])->findOrEmpty();
if($rentInfo->isEmpty()){
$cars[$k]['type'] = 0;
}else{
$cars[$k]['type'] = $rentInfo['type'];
}
}
}
if($data['type'] == 2){
$rentInfo = VehicleRent::where('car_id',$v['id'])->findOrEmpty();
if($rentInfo->isEmpty()){
$cars[$k]['type'] = 0;
}else{
$cars[$k]['type'] = $rentInfo['type'];
}
}
if($data['type'] == 3){
$rentInfo = VehicleRent::where('car_id',$v['id'])->findOrEmpty();
if($rentInfo->isEmpty()){
$cars[$k]['type'] = 2;
}else{
$cars[$k]['type'] = $rentInfo['type'];
}
}
$cars[$k]['rent_time'] = $data['update_time'];
}
}
$data['cars_info'] = $cars;
return $this->success('success',$data->toArray());
}
//上传三轮车合同
public function uploadContract(): Json
{
//获取参数
$params = $this->request->post(['id','file','cars']);
if(empty($params['id']) || empty($params['file'])){
return $this->fail('缺少必要参数');
}
//获取合同信息
$vehicle_contract = VehicleContract::where('id',$params['id'])->findOrEmpty();
if($vehicle_contract->isEmpty()){
return $this->fail('合同信息错误');
}
if($vehicle_contract['type']==0 && $vehicle_contract['contract_logistic_id'] != 0){
if(empty($params['cars'])){
return $this->fail('缺少必要参数cars');
}
$cars = json_decode($params['cars'],true);
if(empty($cars)){
return $this->fail('参数cars无效');
}
}
if($vehicle_contract['status'] != 0){
return $this->fail('合同状态错误');
}
//更新本地
try {
$data = [
'id' => $vehicle_contract['contract_logistic_id'],
'file' => $params['file'],
'status' => 1,
'update_time' => time()
];
//判断合同类型
if($vehicle_contract['type'] == 0 && $vehicle_contract['contract_logistic_id'] != 0){
$data['cars_info'] = $params['cars'];
}
if(!empty($vehicle_contract['contract_logistic_id'])){
//更新物流系统
curl_post(env('project.logistic_domain').'/api/contractUpdate',[],$data);
}
unset($data['id']);
VehicleContract::where('id', $params['id'])->update($data);
}catch (\Exception $e){
return $this->fail($e->getMessage());
}
return $this->success('上传成功', [], 1, 1);
}
//发起三轮车合同
public function initiatingContract(): Json
{
//获取参数
$params = $this->request->post(['id']);
if(empty($params['id'])){
return $this->fail('缺少必要参数');
}
//获取数据
$contract = VehicleContract::where('id',$params['id'])->findOrEmpty();
if($contract->isEmpty()){
return $this->fail('数据不存在');
}
if(!($contract['status'] == 1 || ($contract['status'] == 2 && $contract['signing_timer'] != 2))){
return $this->fail('合同状态错误');
}
$signData = [
'name' => $contract['company_a_name'] . '的合同',
'signatories' => [
['fullName' => $contract['company_a_name'], 'identityType' => 12, 'identityCard' => $contract['company_a_code'], 'email' => $contract['company_a_email'], 'noNeedVerify' => 1, 'signLevel' => 1],
['fullName' => $contract['company_b_name'], 'identityType' => 12, 'identityCard' => $contract['company_b_code'], 'email' => $contract['company_b_email'], 'noNeedVerify' => 1, 'signLevel' => 1]
],
'url' => $contract['file']
];
$notify_url = '';
$smsTitle = '';
if($contract['type'] == 0){
$smsTitle = '《租赁合同》';
if(empty($contract['contract_logistic_id'])){
$notify_url = env('project.website_domain').'/api/index/systemCarRent';
}else{
$notify_url = env('project.website_domain').'/api/index/townCarRent';
}
}elseif($contract['type'] == 1){
$smsTitle = '《自有车辆上传合同》';
$notify_url = env('project.website_domain').'/api/index/selfCarRent';
}elseif($contract['type'] == 2){
$smsTitle = '《解约合同》';
$notify_url = env('project.website_domain').'/api/index/cancelRent';
}elseif($contract['type'] == 3){
$smsTitle = '《购买合同》';
$notify_url = env('project.website_domain').'/api/index/buyCar';
}
$signRes = app(JunziqianController::class)->VehicleRentSigning($signData, $params['id'],$notify_url);
if ($signRes->success) {
$contract->save([
'id' => $contract['id'],
'contract_no' => $signRes->data,
'status' => 2,
'signing_timer' => 0
]);
if(!empty($contract['contract_logistic_id'])){
curl_post(env('project.logistic_domain').'/api/contractUpdate',[],[
'id' => $contract['contract_logistic_id'],
'contract_no' => $signRes->data,
'status' => 2,
'signing_timer' => 0,
'update_time' => time()
]);
}
$this->sendSms($params['id'],$smsTitle);
return $this->success('合同发送成功');
} else {
return $this->fail($signRes->msg);
}
}
//重新发送三轮车合同短信
public function sendSmsAgain(): Json
{
//获取参数
$id = $this->request->post('id');
if(empty($id)){
return $this->fail('参数错误');
}
//获取数据
$contract = VehicleContract::where('id',$id)->find();
if(empty($contract)){
return $this->fail('数据错误');
}
$smsTitle = '';
if($contract['type'] == 0){
$smsTitle = '《租赁合同》';
}elseif($contract['type'] == 1){
$smsTitle = '《自有车辆上传合同》';
}elseif($contract['type'] == 2){
$smsTitle = '《解约合同》';
}elseif($contract['type'] == 3){
$smsTitle = '《购买合同》';
}
$this->sendSms($id,$smsTitle);
return $this->success('发送成功');
}
protected function sendSms($id,$title): bool
{
//获取合同数据
$contract = VehicleContract::where('id',$id)->findOrEmpty();
if (!$contract->isEmpty() && $contract['file'] != '') {
//发送短信
$data = [
//甲方
[
"applyNo" => $contract['contract_no'],
"fullName" => $contract['company_a_name'],
"identityCard" => $contract['company_a_code'],
"identityType" => 12,
"master_phone" => $contract['company_a_phone'],
"type"=>"party_a"
],
//乙方
[
"applyNo" => $contract['contract_no'],
"fullName" => $contract['company_b_name'],
"identityCard" => $contract['company_b_code'],
"identityType" => 12,
"master_phone" => $contract['company_b_phone'],
"type"=>"party_b"
],
];
$url = [];
foreach ($data as $v) {
$res = app(JunziqianController::class)->SigningLink($v);
if (!$res->success) {
return false;
}
if ($v['type'] == 'party_a') {
$url['party_a'] =$res->data;
} else {
$url['party_b'] =$res->data;
}
//发送短信
$sms = [
'mobile' => $v['master_phone'],
'name' => $v['fullName'],
'type' => $title,
'code' => 'api/Hetong/info?id='.$id.'&type='.$v['type'],
'scene' => 'WQ'
];
$scene = NoticeEnum::getSceneByTag($sms['scene']);
if (empty($scene)) {
throw new \Exception('场景值异常');
}
event('Notice', [
'scene_id' => $scene,
'params' => $sms
]);
}
VehicleContract::where('id', $id)->update(['url' => json_encode($url)]);
return true;
}else{
return false;
}
}
}

View File

@ -0,0 +1,106 @@
<?php
namespace app\middleapi\controller;
use app\adminapi\lists\finance\WithdrawLists;
use app\common\logic\finance\WithdrawLogic;
use app\common\model\user\Withdraw;
use think\Exception;
use app\common\controller\BaseLikeAdminController;
class WithdrawController extends BaseLikeAdminController
{
public function index()
{
if(!$this->request->isPost()){
return $this->fail('请求方式错误');
}
$params = $this->request->post(['page_no','page_size', 'order_sn', 'status']);
$where = [];
if (!empty($params['order_sn'])) {
$where[] = ['order_sn', '=', $params['order_sn']];
}
if (isset($params['status']) && $params['status'] != '') {
$where[] = ['status', '=', $params['status']];
}
$pageNo = !empty($params['page_no']) ? $params['page_no'] : 1;
$pageSize = !empty($params['page_size']) ? $params['page_size'] : 20;
$lists = Withdraw::where($where)
->append(['s_date', 'e_date', 'company_name'], true)
->with('user')
->withAttr('company_name', function ($value, $data) {
$company = Company::where(['admin_id'=>$data['admin_id']])->find();
return $company['company_name']??'';
})
->withAttr('s_date', function ($value, $data) {
$withdrawedCount = Withdraw::where(['user_id'=>$data['user_id'], 'status'=>3])->count();
$company = Company::where(['admin_id'=>$data['admin_id']])->find();
if ($withdrawedCount == 0) {
$firstUserLog = UserAccountLog::where(['company_id'=>$company['id'] ?? 0])->order('id', 'asc')->find();
return $firstUserLog['create_time'] ?? '';
} else {
$withdrawedCount = Withdraw::where(['user_id'=>$data['user_id'], 'status'=>3])->order('id', 'desc')->find();
return $withdrawedCount['transfer_end_cycel'] ?? '';
}
})
->withAttr('e_date', function ($value, $data) {
return date('Y-m-d H:i:s', $data['transfer_end_cycel']);
})
->order('id', 'desc')
->page($pageNo, $pageSize)
->select()
->toArray();
$count = Withdraw::where($where)->count();
$result = [
'lists' => $lists,
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize
];
return $this->success('请求成功',$result);
}
public function update()
{
$id = $this->request->param('id');
$status = $this->request->param('status');
if (empty($id)) {
return $this->fail('参数id不能为空');
}
if (!in_array($status, [1, 2, 3])) {
return $this->fail('参数status错误');
}
$data = Withdraw::find($id);
if (empty($data)) {
return $this->fail('数据不存在');
}
$data->status = $status;
$data->udpate_time = time();
$data->save();
return $this->success('操作成功', [], 1, 1);
}
/**
* 提现申请审核
*/
public function audit()
{
try {
$params = $this->request->param();
if (empty($params['id'])) {
return $this->fail('参数id不能为空');
}
if (empty($params['status'])) {
return $this->fail('参数status不能为空');
}
$re = WithdrawLogic::audit($params);
if (!$re) {
return $this->fail(WithdrawLogic::getError());
}
return $this->success('操作成功', [], 1, 1);
} catch (Exception $exception) {
return $this->fail($exception->getMessage());
}
}
}

View File

@ -0,0 +1,27 @@
<?php
namespace app\middleapi\http\middleware;
use app\middleapi\service\ApiSignService;
use app\common\service\JsonService;
class AuthMiddleware
{
public function handle($request, \Closure $next)
{
//获取header参数
$appid = $request->header('appid');
$timestamp = $request->header('timestamp');
$sign = $request->header('sign');
//验证参数
if(empty($appid) || empty($timestamp) || empty($sign)){
return JsonService::fail('缺少请求头参数', [], 0);
}
//验证签名
$checkSign = ApiSignService::verifySign(['appid'=>$appid,'timestamp'=>$timestamp,'sign'=>$sign],env('app.app_secret'));
if($checkSign['code'] == 0){
return JsonService::fail($checkSign['msg'],[],0);
}
return $next($request);
}
}

View File

@ -0,0 +1,39 @@
<?php
namespace app\middleapi\service;
class ApiSignService
{
//创建sign
public static function makeSign($data,$appSecret): string
{
ksort($data);
$string = "";
foreach ($data as $k => $v) {
if ($k == "sign" || is_array($v)) {
continue;
}
$string .= $k . "=" . $v . "&";
}
$string = trim($string, "&");
$string = $string . "&key=" . $appSecret;
$string = md5(md5($string));
return strtolower($string);
}
//检验sign是否正确
public static function verifySign($data,$appSecret): array
{
// 验证请求, 10秒钟失效
if (time() - $data['timestamp'] > 10) {
return ['code' => 0, 'msg' => '签名已失效'];
}
//比对签名
$clientSign = $data['sign'];
$serverSign = self::makeSign($data,$appSecret);
if ($clientSign == $serverSign) {
return ['code' => 1, 'msg' => '验证通过'];
} else {
return ['code' => 0, 'msg' => '签名校验失败'];
}
}
}

20
composer.lock generated
View File

@ -5301,11 +5301,22 @@
{
"name": "textalk/websocket",
"version": "1.6.3",
"source": {
"type": "git",
"url": "https://github.com/Textalk/websocket-php.git",
"reference": "67de79745b1a357caf812bfc44e0abf481cee012"
},
"dist": {
"type": "zip",
"url": "https://mirrors.cloud.tencent.com/repository/composer/textalk/websocket/1.6.3/textalk-websocket-1.6.3.zip",
"url": "https://api.github.com/repos/Textalk/websocket-php/zipball/67de79745b1a357caf812bfc44e0abf481cee012",
"reference": "67de79745b1a357caf812bfc44e0abf481cee012",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": "^7.4 | ^8.0",
@ -5325,6 +5336,7 @@
"WebSocket\\": "lib"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"ISC"
],
@ -5337,6 +5349,10 @@
}
],
"description": "WebSocket client and server",
"support": {
"issues": "https://github.com/Textalk/websocket-php/issues",
"source": "https://github.com/Textalk/websocket-php/tree/1.6.3"
},
"time": "2022-11-07T18:59:33+00:00"
},
{

View File

@ -1,30 +0,0 @@
<?php
use \Workerman\Worker;
use \GatewayWorker\BusinessWorker;
// 自动加载类
require_once __DIR__ . '/../../vendor/autoload.php';
// bussinessWorker 进程
$worker = new BusinessWorker();
// worker名称
$worker->name = 'PushBusinessWorker';
// bussinessWorker进程数量
$worker->count = 4;
// 服务注册地址
$worker->registerAddress = '127.0.0.1:1236';
// 注册服务类
$worker->eventHandler = 'workerim\Events';
// 如果不是在根目录启动则运行runAll方法
if(!defined('GLOBAL_START'))
{
Worker::runAll();
}

View File

@ -1,39 +0,0 @@
<?php
use \Workerman\Worker;
use \GatewayWorker\Gateway;
// 自动加载类
require_once __DIR__ . '/../../vendor/autoload.php';
// gateway 进程这里使用Text协议可以用telnet测试
$gateway = new Gateway("Websocket://0.0.0.0:8282");
// gateway名称status方便查看
$gateway->name = 'worker_im';
// gateway进程数一般设置2个就足够
$gateway->count = 4;
// 本机ip分布式部署时使用内网ip
$gateway->lanIp = '127.0.0.1';
// 内部通讯起始端口,假如$gateway->count=2起始端口为2900
// 则一般会使用2900 2901 2902 2903 4个端口作为内部通讯端口
$gateway->startPort = 2900;
// 服务注册地址
$gateway->registerAddress = '127.0.0.1:1236';
// 心跳间隔
$gateway->pingInterval = 20;
// 心跳数据
$gateway->pingData = '{"type":"ping"}';
// 如果不是在根目录启动则运行runAll方法
if(!defined('GLOBAL_START'))
{
Worker::runAll();
}

View File

@ -1,16 +0,0 @@
<?php
use \Workerman\Worker;
use \GatewayWorker\Register;
// 自动加载类
require_once __DIR__ . '/../../vendor/autoload.php';
// register 必须是text协议切记不能将register端口开放给外网
$register = new Register('text://127.0.0.1:1236');
// 如果不是在根目录启动则运行runAll方法
if(!defined('GLOBAL_START'))
{
Worker::runAll();
}

View File

@ -1 +0,0 @@
import o from"./error.ab90784a.js";import{d as r,o as i,c as p,U as m,L as e,a as t}from"./@vue.51d7f2d8.js";import"./element-plus.4328d892.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.ed71ac09.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const s="/admin/assets/no_perms.a56e95a5.png",a={class:"error404"},u=t("div",{class:"flex justify-center"},[t("img",{class:"w-[150px] h-[150px]",src:s,alt:""})],-1),T=r({__name:"403",setup(c){return(n,_)=>(i(),p("div",a,[m(o,{code:"403",title:"\u60A8\u7684\u8D26\u53F7\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650\uFF01","show-btn":!1},{content:e(()=>[u]),_:1})]))}});export{T as default};

View File

@ -1 +0,0 @@
import o from"./error.c52a2209.js";import{d as r,o as i,c as p,U as m,L as e,a as t}from"./@vue.51d7f2d8.js";import"./element-plus.b64c0a90.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.f190d0dd.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const s="/admin/assets/no_perms.a56e95a5.png",a={class:"error404"},u=t("div",{class:"flex justify-center"},[t("img",{class:"w-[150px] h-[150px]",src:s,alt:""})],-1),T=r({__name:"403",setup(c){return(n,_)=>(i(),p("div",a,[m(o,{code:"403",title:"\u60A8\u7684\u8D26\u53F7\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650\uFF01","show-btn":!1},{content:e(()=>[u]),_:1})]))}});export{T as default};

View File

@ -1 +0,0 @@
import o from"./error.12384e23.js";import{d as r,o as i,c as p,U as m,L as e,a as t}from"./@vue.51d7f2d8.js";import"./element-plus.4328d892.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.9fa57378.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const s="/admin/assets/no_perms.a56e95a5.png",a={class:"error404"},u=t("div",{class:"flex justify-center"},[t("img",{class:"w-[150px] h-[150px]",src:s,alt:""})],-1),T=r({__name:"403",setup(c){return(n,_)=>(i(),p("div",a,[m(o,{code:"403",title:"\u60A8\u7684\u8D26\u53F7\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650\uFF01","show-btn":!1},{content:e(()=>[u]),_:1})]))}});export{T as default};

View File

@ -0,0 +1 @@
import o from"./error.321207d6.js";import{d as r,o as i,c as p,U as m,L as e,a as t}from"./@vue.51d7f2d8.js";import"./element-plus.10e48c93.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.8604d989.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const s="/admin/assets/no_perms.a56e95a5.png",a={class:"error404"},u=t("div",{class:"flex justify-center"},[t("img",{class:"w-[150px] h-[150px]",src:s,alt:""})],-1),T=r({__name:"403",setup(c){return(n,_)=>(i(),p("div",a,[m(o,{code:"403",title:"\u60A8\u7684\u8D26\u53F7\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650\uFF01","show-btn":!1},{content:e(()=>[u]),_:1})]))}});export{T as default};

View File

@ -0,0 +1 @@
import o from"./error.4b32e03b.js";import{d as r,o as i,c as p,U as m,L as e,a as t}from"./@vue.51d7f2d8.js";import"./element-plus.10e48c93.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.f095bcc5.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const s="/admin/assets/no_perms.a56e95a5.png",a={class:"error404"},u=t("div",{class:"flex justify-center"},[t("img",{class:"w-[150px] h-[150px]",src:s,alt:""})],-1),T=r({__name:"403",setup(c){return(n,_)=>(i(),p("div",a,[m(o,{code:"403",title:"\u60A8\u7684\u8D26\u53F7\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650\uFF01","show-btn":!1},{content:e(()=>[u]),_:1})]))}});export{T as default};

View File

@ -1 +0,0 @@
import o from"./error.1b553d1e.js";import{d as r,o as i,c as p,U as m,L as e,a as t}from"./@vue.51d7f2d8.js";import"./element-plus.49ac63ff.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.e06d2f61.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const s="/admin/assets/no_perms.a56e95a5.png",a={class:"error404"},u=t("div",{class:"flex justify-center"},[t("img",{class:"w-[150px] h-[150px]",src:s,alt:""})],-1),T=r({__name:"403",setup(c){return(n,_)=>(i(),p("div",a,[m(o,{code:"403",title:"\u60A8\u7684\u8D26\u53F7\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650\uFF01","show-btn":!1},{content:e(()=>[u]),_:1})]))}});export{T as default};

View File

@ -1 +0,0 @@
import o from"./error.06f8098f.js";import{d as r,o as i,c as p,U as m,L as e,a as t}from"./@vue.51d7f2d8.js";import"./element-plus.b64c0a90.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.d710a8b7.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const s="/admin/assets/no_perms.a56e95a5.png",a={class:"error404"},u=t("div",{class:"flex justify-center"},[t("img",{class:"w-[150px] h-[150px]",src:s,alt:""})],-1),T=r({__name:"403",setup(c){return(n,_)=>(i(),p("div",a,[m(o,{code:"403",title:"\u60A8\u7684\u8D26\u53F7\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650\uFF01","show-btn":!1},{content:e(()=>[u]),_:1})]))}});export{T as default};

View File

@ -1 +0,0 @@
import o from"./error.b10dbad5.js";import{d as r,o as i,c as p,U as m,L as e,a as t}from"./@vue.51d7f2d8.js";import"./element-plus.4328d892.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.4ff2d535.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const s="/admin/assets/no_perms.a56e95a5.png",a={class:"error404"},u=t("div",{class:"flex justify-center"},[t("img",{class:"w-[150px] h-[150px]",src:s,alt:""})],-1),T=r({__name:"403",setup(c){return(n,_)=>(i(),p("div",a,[m(o,{code:"403",title:"\u60A8\u7684\u8D26\u53F7\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650\uFF01","show-btn":!1},{content:e(()=>[u]),_:1})]))}});export{T as default};

View File

@ -1 +0,0 @@
import o from"./error.b20a557d.js";import{d as r,o as i,c as p,U as m,L as e,a as t}from"./@vue.51d7f2d8.js";import"./element-plus.4328d892.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.aa9bb752.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const s="/admin/assets/no_perms.a56e95a5.png",a={class:"error404"},u=t("div",{class:"flex justify-center"},[t("img",{class:"w-[150px] h-[150px]",src:s,alt:""})],-1),T=r({__name:"403",setup(c){return(n,_)=>(i(),p("div",a,[m(o,{code:"403",title:"\u60A8\u7684\u8D26\u53F7\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650\uFF01","show-btn":!1},{content:e(()=>[u]),_:1})]))}});export{T as default};

View File

@ -0,0 +1 @@
import o from"./error.17edec42.js";import{d as r,o as i,c as p,U as m,L as e,a as t}from"./@vue.51d7f2d8.js";import"./element-plus.b0ecf6ae.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.2ce58885.js";import"./lodash.ffb5376d.js";import"./axios.f9df025a.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.4b0c77cb.js";import"./color.992612d2.js";import"./clone.d8d3ae9a.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const s="/admin/assets/no_perms.a56e95a5.png",a={class:"error404"},u=t("div",{class:"flex justify-center"},[t("img",{class:"w-[150px] h-[150px]",src:s,alt:""})],-1),R=r({__name:"403",setup(c){return(n,_)=>(i(),p("div",a,[m(o,{code:"403",title:"\u60A8\u7684\u8D26\u53F7\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650\uFF01","show-btn":!1},{content:e(()=>[u]),_:1})]))}});export{R as default};

View File

@ -0,0 +1 @@
import o from"./error.5c148a91.js";import{d as r,o as i,c as p,U as m,L as e,a as t}from"./@vue.51d7f2d8.js";import"./element-plus.b0ecf6ae.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.9e5a9063.js";import"./lodash.ffb5376d.js";import"./axios.f9df025a.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.4b0c77cb.js";import"./color.992612d2.js";import"./clone.d8d3ae9a.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const s="/admin/assets/no_perms.a56e95a5.png",a={class:"error404"},u=t("div",{class:"flex justify-center"},[t("img",{class:"w-[150px] h-[150px]",src:s,alt:""})],-1),R=r({__name:"403",setup(c){return(n,_)=>(i(),p("div",a,[m(o,{code:"403",title:"\u60A8\u7684\u8D26\u53F7\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650\uFF01","show-btn":!1},{content:e(()=>[u]),_:1})]))}});export{R as default};

View File

@ -0,0 +1 @@
import o from"./error.bc146cab.js";import{d as r,o as i,c as p,U as m,L as e,a as t}from"./@vue.51d7f2d8.js";import"./element-plus.10e48c93.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.c35b5194.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const s="/admin/assets/no_perms.a56e95a5.png",a={class:"error404"},u=t("div",{class:"flex justify-center"},[t("img",{class:"w-[150px] h-[150px]",src:s,alt:""})],-1),T=r({__name:"403",setup(c){return(n,_)=>(i(),p("div",a,[m(o,{code:"403",title:"\u60A8\u7684\u8D26\u53F7\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650\uFF01","show-btn":!1},{content:e(()=>[u]),_:1})]))}});export{T as default};

View File

@ -1 +0,0 @@
import o from"./error.c4961842.js";import{d as r,o as i,c as p,U as m,L as e,a as t}from"./@vue.51d7f2d8.js";import"./element-plus.4328d892.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.5a6ac86e.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const s="/admin/assets/no_perms.a56e95a5.png",a={class:"error404"},u=t("div",{class:"flex justify-center"},[t("img",{class:"w-[150px] h-[150px]",src:s,alt:""})],-1),T=r({__name:"403",setup(c){return(n,_)=>(i(),p("div",a,[m(o,{code:"403",title:"\u60A8\u7684\u8D26\u53F7\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650\uFF01","show-btn":!1},{content:e(()=>[u]),_:1})]))}});export{T as default};

View File

@ -0,0 +1 @@
import o from"./error.e393a83a.js";import{d as r,o as i,c as p,U as m,L as e,a as t}from"./@vue.51d7f2d8.js";import"./element-plus.10e48c93.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.8f8edf86.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const s="/admin/assets/no_perms.a56e95a5.png",a={class:"error404"},u=t("div",{class:"flex justify-center"},[t("img",{class:"w-[150px] h-[150px]",src:s,alt:""})],-1),T=r({__name:"403",setup(c){return(n,_)=>(i(),p("div",a,[m(o,{code:"403",title:"\u60A8\u7684\u8D26\u53F7\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650\uFF01","show-btn":!1},{content:e(()=>[u]),_:1})]))}});export{T as default};

View File

@ -1 +0,0 @@
import o from"./error.2cf7c512.js";import{d as r,o as i,c as p,U as m,L as e,a as t}from"./@vue.51d7f2d8.js";import"./element-plus.4328d892.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.3699e511.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const s="/admin/assets/no_perms.a56e95a5.png",a={class:"error404"},u=t("div",{class:"flex justify-center"},[t("img",{class:"w-[150px] h-[150px]",src:s,alt:""})],-1),T=r({__name:"403",setup(c){return(n,_)=>(i(),p("div",a,[m(o,{code:"403",title:"\u60A8\u7684\u8D26\u53F7\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650\uFF01","show-btn":!1},{content:e(()=>[u]),_:1})]))}});export{T as default};

View File

@ -1 +0,0 @@
import o from"./error.ce387314.js";import{d as r,o as i,c as p,U as m,L as e,a as t}from"./@vue.51d7f2d8.js";import"./element-plus.4328d892.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.37f7aea6.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const s="/admin/assets/no_perms.a56e95a5.png",a={class:"error404"},u=t("div",{class:"flex justify-center"},[t("img",{class:"w-[150px] h-[150px]",src:s,alt:""})],-1),T=r({__name:"403",setup(c){return(n,_)=>(i(),p("div",a,[m(o,{code:"403",title:"\u60A8\u7684\u8D26\u53F7\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650\uFF01","show-btn":!1},{content:e(()=>[u]),_:1})]))}});export{T as default};

View File

@ -1 +0,0 @@
import o from"./error.bfcea95a.js";import{d as r,o as i,c as p,U as m,L as e,a as t}from"./@vue.51d7f2d8.js";import"./element-plus.b64c0a90.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.760285cd.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const s="/admin/assets/no_perms.a56e95a5.png",a={class:"error404"},u=t("div",{class:"flex justify-center"},[t("img",{class:"w-[150px] h-[150px]",src:s,alt:""})],-1),T=r({__name:"403",setup(c){return(n,_)=>(i(),p("div",a,[m(o,{code:"403",title:"\u60A8\u7684\u8D26\u53F7\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650\uFF01","show-btn":!1},{content:e(()=>[u]),_:1})]))}});export{T as default};

View File

@ -1 +0,0 @@
import o from"./error.06f8098f.js";import{d as r,o as t,c as m,U as p}from"./@vue.51d7f2d8.js";import"./element-plus.b64c0a90.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.d710a8b7.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const i={class:"error404"},P=r({__name:"404",setup(e){return(u,c)=>(t(),m("div",i,[p(o,{code:"404",title:"\u54CE\u5440\uFF0C\u51FA\u9519\u4E86\uFF01\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\u2026"})]))}});export{P as default};

View File

@ -1 +0,0 @@
import o from"./error.c52a2209.js";import{d as r,o as t,c as m,U as p}from"./@vue.51d7f2d8.js";import"./element-plus.b64c0a90.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.f190d0dd.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const i={class:"error404"},P=r({__name:"404",setup(e){return(u,c)=>(t(),m("div",i,[p(o,{code:"404",title:"\u54CE\u5440\uFF0C\u51FA\u9519\u4E86\uFF01\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\u2026"})]))}});export{P as default};

View File

@ -0,0 +1 @@
import o from"./error.bc146cab.js";import{d as r,o as t,c as m,U as p}from"./@vue.51d7f2d8.js";import"./element-plus.10e48c93.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.c35b5194.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const i={class:"error404"},P=r({__name:"404",setup(e){return(u,c)=>(t(),m("div",i,[p(o,{code:"404",title:"\u54CE\u5440\uFF0C\u51FA\u9519\u4E86\uFF01\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\u2026"})]))}});export{P as default};

View File

@ -1 +0,0 @@
import o from"./error.12384e23.js";import{d as r,o as t,c as m,U as p}from"./@vue.51d7f2d8.js";import"./element-plus.4328d892.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.9fa57378.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const i={class:"error404"},P=r({__name:"404",setup(e){return(u,c)=>(t(),m("div",i,[p(o,{code:"404",title:"\u54CE\u5440\uFF0C\u51FA\u9519\u4E86\uFF01\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\u2026"})]))}});export{P as default};

View File

@ -0,0 +1 @@
import o from"./error.321207d6.js";import{d as r,o as t,c as m,U as p}from"./@vue.51d7f2d8.js";import"./element-plus.10e48c93.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.8604d989.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const i={class:"error404"},P=r({__name:"404",setup(e){return(u,c)=>(t(),m("div",i,[p(o,{code:"404",title:"\u54CE\u5440\uFF0C\u51FA\u9519\u4E86\uFF01\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\u2026"})]))}});export{P as default};

View File

@ -0,0 +1 @@
import o from"./error.4b32e03b.js";import{d as r,o as t,c as m,U as p}from"./@vue.51d7f2d8.js";import"./element-plus.10e48c93.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.f095bcc5.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const i={class:"error404"},P=r({__name:"404",setup(e){return(u,c)=>(t(),m("div",i,[p(o,{code:"404",title:"\u54CE\u5440\uFF0C\u51FA\u9519\u4E86\uFF01\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\u2026"})]))}});export{P as default};

View File

@ -1 +0,0 @@
import o from"./error.c4961842.js";import{d as r,o as t,c as m,U as p}from"./@vue.51d7f2d8.js";import"./element-plus.4328d892.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.5a6ac86e.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const i={class:"error404"},P=r({__name:"404",setup(e){return(u,c)=>(t(),m("div",i,[p(o,{code:"404",title:"\u54CE\u5440\uFF0C\u51FA\u9519\u4E86\uFF01\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\u2026"})]))}});export{P as default};

View File

@ -1 +0,0 @@
import o from"./error.b20a557d.js";import{d as r,o as t,c as m,U as p}from"./@vue.51d7f2d8.js";import"./element-plus.4328d892.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.aa9bb752.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const i={class:"error404"},P=r({__name:"404",setup(e){return(u,c)=>(t(),m("div",i,[p(o,{code:"404",title:"\u54CE\u5440\uFF0C\u51FA\u9519\u4E86\uFF01\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\u2026"})]))}});export{P as default};

View File

@ -1 +0,0 @@
import o from"./error.ab90784a.js";import{d as r,o as t,c as m,U as p}from"./@vue.51d7f2d8.js";import"./element-plus.4328d892.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.ed71ac09.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const i={class:"error404"},P=r({__name:"404",setup(e){return(u,c)=>(t(),m("div",i,[p(o,{code:"404",title:"\u54CE\u5440\uFF0C\u51FA\u9519\u4E86\uFF01\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\u2026"})]))}});export{P as default};

View File

@ -1 +0,0 @@
import o from"./error.2cf7c512.js";import{d as r,o as t,c as m,U as p}from"./@vue.51d7f2d8.js";import"./element-plus.4328d892.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.3699e511.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const i={class:"error404"},P=r({__name:"404",setup(e){return(u,c)=>(t(),m("div",i,[p(o,{code:"404",title:"\u54CE\u5440\uFF0C\u51FA\u9519\u4E86\uFF01\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\u2026"})]))}});export{P as default};

View File

@ -1 +0,0 @@
import o from"./error.1b553d1e.js";import{d as r,o as t,c as m,U as p}from"./@vue.51d7f2d8.js";import"./element-plus.49ac63ff.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.e06d2f61.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const i={class:"error404"},P=r({__name:"404",setup(e){return(u,c)=>(t(),m("div",i,[p(o,{code:"404",title:"\u54CE\u5440\uFF0C\u51FA\u9519\u4E86\uFF01\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\u2026"})]))}});export{P as default};

View File

@ -0,0 +1 @@
import o from"./error.17edec42.js";import{d as r,o as t,c as m,U as p}from"./@vue.51d7f2d8.js";import"./element-plus.b0ecf6ae.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.2ce58885.js";import"./lodash.ffb5376d.js";import"./axios.f9df025a.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.4b0c77cb.js";import"./color.992612d2.js";import"./clone.d8d3ae9a.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const i={class:"error404"},M=r({__name:"404",setup(e){return(u,c)=>(t(),m("div",i,[p(o,{code:"404",title:"\u54CE\u5440\uFF0C\u51FA\u9519\u4E86\uFF01\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\u2026"})]))}});export{M as default};

View File

@ -1 +0,0 @@
import o from"./error.b10dbad5.js";import{d as r,o as t,c as m,U as p}from"./@vue.51d7f2d8.js";import"./element-plus.4328d892.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.4ff2d535.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const i={class:"error404"},P=r({__name:"404",setup(e){return(u,c)=>(t(),m("div",i,[p(o,{code:"404",title:"\u54CE\u5440\uFF0C\u51FA\u9519\u4E86\uFF01\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\u2026"})]))}});export{P as default};

View File

@ -0,0 +1 @@
import o from"./error.5c148a91.js";import{d as r,o as t,c as m,U as p}from"./@vue.51d7f2d8.js";import"./element-plus.b0ecf6ae.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.9e5a9063.js";import"./lodash.ffb5376d.js";import"./axios.f9df025a.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.4b0c77cb.js";import"./color.992612d2.js";import"./clone.d8d3ae9a.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const i={class:"error404"},M=r({__name:"404",setup(e){return(u,c)=>(t(),m("div",i,[p(o,{code:"404",title:"\u54CE\u5440\uFF0C\u51FA\u9519\u4E86\uFF01\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\u2026"})]))}});export{M as default};

View File

@ -0,0 +1 @@
import o from"./error.e393a83a.js";import{d as r,o as t,c as m,U as p}from"./@vue.51d7f2d8.js";import"./element-plus.10e48c93.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.8f8edf86.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const i={class:"error404"},P=r({__name:"404",setup(e){return(u,c)=>(t(),m("div",i,[p(o,{code:"404",title:"\u54CE\u5440\uFF0C\u51FA\u9519\u4E86\uFF01\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\u2026"})]))}});export{P as default};

View File

@ -1 +0,0 @@
import o from"./error.ce387314.js";import{d as r,o as t,c as m,U as p}from"./@vue.51d7f2d8.js";import"./element-plus.4328d892.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.37f7aea6.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const i={class:"error404"},P=r({__name:"404",setup(e){return(u,c)=>(t(),m("div",i,[p(o,{code:"404",title:"\u54CE\u5440\uFF0C\u51FA\u9519\u4E86\uFF01\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\u2026"})]))}});export{P as default};

View File

@ -1 +0,0 @@
import o from"./error.bfcea95a.js";import{d as r,o as t,c as m,U as p}from"./@vue.51d7f2d8.js";import"./element-plus.b64c0a90.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.9f65afb1.js";import"./index.760285cd.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const i={class:"error404"},P=r({__name:"404",setup(e){return(u,c)=>(t(),m("div",i,[p(o,{code:"404",title:"\u54CE\u5440\uFF0C\u51FA\u9519\u4E86\uFF01\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\u2026"})]))}});export{P as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More