更新
This commit is contained in:
parent
635120bbe3
commit
ab8969328c
@ -65,10 +65,10 @@ class AdminLogic extends BaseLogic
|
|||||||
// self::insertDept($admin_id, $params['dept_id'] ?? []);
|
// self::insertDept($admin_id, $params['dept_id'] ?? []);
|
||||||
// 岗位
|
// 岗位
|
||||||
// self::insertJobs($admin_id, $params['jobs_id'] ?? []);
|
// self::insertJobs($admin_id, $params['jobs_id'] ?? []);
|
||||||
self::createUser($params, $password, $admin_id);
|
// self::createUser($params, $password, $admin_id);
|
||||||
if($params['party_a']>0){
|
// if($params['party_a']>0){
|
||||||
self::contract($admin_id, $params);//生成合同
|
// self::contract($admin_id, $params);//生成合同
|
||||||
}
|
// }
|
||||||
Db::commit();
|
Db::commit();
|
||||||
return true;
|
return true;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
@ -132,18 +132,18 @@ class AdminLogic extends BaseLogic
|
|||||||
AdminJobs::delByUserId($params['id']);
|
AdminJobs::delByUserId($params['id']);
|
||||||
// 角色
|
// 角色
|
||||||
self::insertRole($params['id'], $role_id_arr);
|
self::insertRole($params['id'], $role_id_arr);
|
||||||
if($is_contract){
|
// if($is_contract){
|
||||||
$datas=[
|
// $datas=[
|
||||||
'party_a' => $params['party_a'],
|
// 'party_a' => $params['party_a'],
|
||||||
'party_b' => $params['id'],
|
// 'party_b' => $params['id'],
|
||||||
'contract_type' => $params['contract_type'],
|
// 'contract_type' => $params['contract_type'],
|
||||||
'type' => 2,
|
// 'type' => 2,
|
||||||
'file' => $params['file'],
|
// 'file' => $params['file'],
|
||||||
];
|
// ];
|
||||||
self::contract($params['id'], $datas);//生成合同
|
// self::contract($params['id'], $datas);//生成合同
|
||||||
}
|
// }
|
||||||
//修改用户同步信息
|
//修改用户同步信息
|
||||||
self::createUser($params, $data['password'] ?? '', $data['id']);
|
// self::createUser($params, $data['password'] ?? '', $data['id']);
|
||||||
// 部门
|
// 部门
|
||||||
// self::insertDept($params['id'], $params['dept_id'] ?? []);
|
// self::insertDept($params['id'], $params['dept_id'] ?? []);
|
||||||
// // 岗位
|
// // 岗位
|
||||||
|
@ -16,6 +16,8 @@ class CeshiController extends BaseApiController
|
|||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
$all=TaskSchedulingPlan::whereDay('end_time','yesterday')->where('is_pay',0)->with(['template_info','scheduling'])->select()->toArray();
|
||||||
|
halt($all);
|
||||||
$all=TaskSchedulingPlan::whereDay('start_time')->where('is_pay',0)->with(['template_info','scheduling'])->select()->toArray();
|
$all=TaskSchedulingPlan::whereDay('start_time')->where('is_pay',0)->with(['template_info','scheduling'])->select()->toArray();
|
||||||
foreach($all as $k=>$v){
|
foreach($all as $k=>$v){
|
||||||
queue(TaskInformationJob::class,$v);
|
queue(TaskInformationJob::class,$v);
|
||||||
|
@ -111,7 +111,7 @@ class TaskLogic extends BaseLogic
|
|||||||
$data['extend'] = json_encode($v['extend']);
|
$data['extend'] = json_encode($v['extend']);
|
||||||
$task_id = (new Task())->insertGetId($data);
|
$task_id = (new Task())->insertGetId($data);
|
||||||
TaskSchedulingPlan::where('id', $TaskSchedulingPlan['id'])->update(['task_id' => $task_id, 'is_execute' => 1]);
|
TaskSchedulingPlan::where('id', $TaskSchedulingPlan['id'])->update(['task_id' => $task_id, 'is_execute' => 1]);
|
||||||
// TaskTemplate::where('id', $v['id'])->update(['cron_time' => time()]);
|
TaskTemplate::where('id', $v['id'])->update(['cron_time' => time()]);
|
||||||
return true;
|
return true;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
Log::error('定时任务添加失败', [$e->getMessage()]);
|
Log::error('定时任务添加失败', [$e->getMessage()]);
|
||||||
|
@ -20,7 +20,7 @@ class TaskSettlementCron extends Task{
|
|||||||
*/
|
*/
|
||||||
protected function execute()
|
protected function execute()
|
||||||
{
|
{
|
||||||
|
//yesterday
|
||||||
$all=TaskSchedulingPlan::whereDay('end_time','yesterday')->where('is_pay',0)->with(['template_info','scheduling'])->select()->toArray();
|
$all=TaskSchedulingPlan::whereDay('end_time','yesterday')->where('is_pay',0)->with(['template_info','scheduling'])->select()->toArray();
|
||||||
foreach($all as $k=>$v){
|
foreach($all as $k=>$v){
|
||||||
queue(TaskInformationJob::class,$v);
|
queue(TaskInformationJob::class,$v);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user