diff --git a/app/api/controller/UserController.php b/app/api/controller/UserController.php index 9ca60e57d..915a95c47 100755 --- a/app/api/controller/UserController.php +++ b/app/api/controller/UserController.php @@ -21,6 +21,7 @@ use app\api\validate\SetUserInfoValidate; use app\api\validate\UserValidate; use app\common\logic\contract\ContractLogic; use app\common\model\contract\Contract; +use app\common\model\user\User; use Common; use think\facade\Db; @@ -209,4 +210,14 @@ class UserController extends BaseApiController return $this->fail(ContractLogic::getError()); } } + + /** + * 获取公司以设置的小队 + */ + public function company_brigade(){ + $company_id=$this->userInfo['company_id']; + $res=User::where('company_id',$company_id)->where('is_captain',1)->column('brigade'); + return $this->success('发送成功', $res); + + } } diff --git a/app/common/logic/task/TaskLogic.php b/app/common/logic/task/TaskLogic.php index 536ff5438..0f7d93376 100644 --- a/app/common/logic/task/TaskLogic.php +++ b/app/common/logic/task/TaskLogic.php @@ -75,12 +75,13 @@ class TaskLogic extends BaseLogic { try { if ($v['types'] == 3) { - $task = Task::where('template_id', $v['id'])->find(); - if ($task) { - Task::where('template_id', $v['id'])->update(['start_time' => $task['start_time'] + 86400, 'end_time' => $task['end_time'] + 86400]); - TaskTemplate::where('id', $v['id'])->inc('day_count')->update(); - return true; - } + return true; + // $task = Task::where('template_id', $v['id'])->find(); + // if ($task) { + // Task::where('template_id', $v['id'])->update(['start_time' => strtotime($task['start_time']) + 86400, 'end_time' => strtotime($task['end_time']) + 86400]); + // TaskTemplate::where('id', $v['id'])->inc('day_count')->update(); + // return true; + // } } $time = strtotime(date('Y-m-d')); $TaskSchedulingPlan_data = [ @@ -177,7 +178,7 @@ class TaskLogic extends BaseLogic TaskTemplate::where('id', $v['id'])->inc('day_count')->update(); return true; } catch (\Exception $e) { - Log::error('定时任务添加失败'.$e->getMessage().'line'.$e->getLine()); + Log::error('定时任务添加失败'.$e->getMessage().'。line:'.$e->getLine()); return false; } }