From ac8a6e7621a31a3505ea9f21b90d1ac2b435142f Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Thu, 21 Sep 2023 09:28:05 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=8A=8A=E4=B9=8B=E5=89=8D=E7=9A=84?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E4=B8=8B=E5=8F=91=E9=99=90=E5=88=B6=E5=88=B0?= =?UTF-8?q?=E5=8F=AA=E4=B8=8B=E5=8F=91=E5=B0=8F=E7=BB=84=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=9B=A2=E9=98=9F=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/task/TaskCron.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/task/TaskCron.php b/app/task/TaskCron.php index 0e09578cd..a7e5485c2 100644 --- a/app/task/TaskCron.php +++ b/app/task/TaskCron.php @@ -20,7 +20,7 @@ class TaskCron extends Task // $this->everyMinute();//每分钟 } /** - * 执行任务 + * 小组服务公司执行任务下发 * @return mixed */ protected function execute() @@ -29,7 +29,8 @@ class TaskCron extends Task // $time=strtotime(date('Y-m-d',strtotime('-1 day'))); $time = strtotime(date('Y-m-d')); // $tiem_end=$time+86399; - $plan_all = TaskScheduling::where('cron_time', '<', $time)->where('status', 1)->with('company_info')->select()->toArray(); + // 查询系统目前小组公司的任务安排 + $plan_all = TaskScheduling::where('cron_time', '<', $time)->where('status', 1)->where('company_type', 18)->with('company_info')->select()->toArray(); $plan_ids = []; foreach ($plan_all as $k => $v) { $all = TaskTemplate::where('status', 1)->where('task_scheduling', $v['id'])->limit(30)->select()->toArray(); From a1c8cb2e2a5abceac791ed6f4b76b30061285006 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Thu, 21 Sep 2023 09:34:47 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=8A=8A=E4=B9=8B=E5=89=8D=E7=9A=84?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=BB=93=E7=AE=97=E9=99=90=E5=88=B6=E5=88=B0?= =?UTF-8?q?=E5=8F=AA=E7=BB=93=E7=AE=97=E5=B0=8F=E7=BB=84=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=9B=A2=E9=98=9F=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/task/TaskSettlementCron.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/app/task/TaskSettlementCron.php b/app/task/TaskSettlementCron.php index c28a2a343..efff52cb8 100644 --- a/app/task/TaskSettlementCron.php +++ b/app/task/TaskSettlementCron.php @@ -21,9 +21,20 @@ class TaskSettlementCron extends Task{ protected function execute() { //yesterday - $all=TaskSchedulingPlan::whereDay('end_time','yesterday')->where('is_pay',0)->with(['template_info','scheduling'=>function($query){ - $query->where('company_type', 18); - }])->select()->toArray(); +// $all=TaskSchedulingPlan::whereDay('end_time','yesterday') +// ->where('is_pay',0) +// ->with(['template_info','scheduling'=>function($query){ +// $query->where('company_type', 18); +// }]) +// ->select() +// ->toArray(); + $all = TaskSchedulingPlan::whereDay('end_time','yesterday') + ->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); } From 8ec2db7bb6bb62653b54a106460ddbe4184dbea7 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Thu, 21 Sep 2023 11:33:52 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E9=95=87=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=85=AC=E5=8F=B8=EF=BC=8C=E5=90=8C=E6=97=B6=E7=BB=99?= =?UTF-8?q?=E8=B4=9F=E8=B4=A3=E4=BA=BA=E8=AE=BE=E7=BD=AE=E9=95=87=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=85=AC=E5=8F=B8=E6=80=BB=E8=B4=9F=E8=B4=A3=E4=BA=BA?= =?UTF-8?q?=E7=9A=84=E5=89=8D=E5=90=8E=E5=8F=B0=E8=A7=92=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/CompanyLogic.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/common/logic/CompanyLogic.php b/app/common/logic/CompanyLogic.php index ead329db4..c38ca32e7 100644 --- a/app/common/logic/CompanyLogic.php +++ b/app/common/logic/CompanyLogic.php @@ -115,6 +115,10 @@ class CompanyLogic extends BaseLogic //小组服务公司 AdminLogic::insertRole($admin_id, [6]); $admin['group_id']=5; + } elseif ($params['company_type']==41) { + //镇管理公司 总负责人 + AdminLogic::insertRole($admin_id, [7]); //后台角色 + $admin['group_id']=15; // 前台角色 } $userSn = User::createUserSn(); $admin['admin_id']=$admin_id; From dbcce5bc0e41fa7a6f918dc2e5262ece8893c579 Mon Sep 17 00:00:00 2001 From: unknown <736250432@qq.com> Date: Thu, 21 Sep 2023 11:44:55 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E9=95=87=E8=A1=97?= =?UTF-8?q?=E5=85=AC=E5=8F=B8=E6=98=BE=E7=A4=BA=E5=90=88=E5=90=8C=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/VehicleController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/controller/VehicleController.php b/app/api/controller/VehicleController.php index 2c6bdc2e9..3e39d5a31 100644 --- a/app/api/controller/VehicleController.php +++ b/app/api/controller/VehicleController.php @@ -576,7 +576,7 @@ class VehicleController extends BaseApiController if($company['company_type'] != 16){ 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(); + $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(); return $this->success('请求成功',$data->toArray()); }