更新小队 和 结算的types3的屏蔽
This commit is contained in:
parent
6e8408a490
commit
4bd5427158
app
@ -21,6 +21,7 @@ use app\api\validate\SetUserInfoValidate;
|
|||||||
use app\api\validate\UserValidate;
|
use app\api\validate\UserValidate;
|
||||||
use app\common\logic\contract\ContractLogic;
|
use app\common\logic\contract\ContractLogic;
|
||||||
use app\common\model\contract\Contract;
|
use app\common\model\contract\Contract;
|
||||||
|
use app\common\model\user\User;
|
||||||
use Common;
|
use Common;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
@ -209,4 +210,14 @@ class UserController extends BaseApiController
|
|||||||
return $this->fail(ContractLogic::getError());
|
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);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,12 +75,13 @@ class TaskLogic extends BaseLogic
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if ($v['types'] == 3) {
|
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'));
|
$time = strtotime(date('Y-m-d'));
|
||||||
$TaskSchedulingPlan_data = [
|
$TaskSchedulingPlan_data = [
|
||||||
@ -177,7 +178,7 @@ class TaskLogic extends BaseLogic
|
|||||||
TaskTemplate::where('id', $v['id'])->inc('day_count')->update();
|
TaskTemplate::where('id', $v['id'])->inc('day_count')->update();
|
||||||
return true;
|
return true;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
Log::error('定时任务添加失败'.$e->getMessage().'line'.$e->getLine());
|
Log::error('定时任务添加失败'.$e->getMessage().'。line:'.$e->getLine());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user