|
|
@ -24,8 +24,22 @@ class TestCommand extends Command |
|
|
protected function execute(Input $input, Output $output) |
|
|
protected function execute(Input $input, Output $output) |
|
|
{ |
|
|
{ |
|
|
// 指令输出 |
|
|
// 指令输出 |
|
|
$obj = new ResourceAutoAllocation(); |
|
|
$output->writeln('开始测试自动排课任务(包含今天)...'); |
|
|
$obj->doJob(); |
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
$obj = new CourseScheduleJob(); |
|
|
|
|
|
$result = $obj->doJob(); |
|
|
|
|
|
|
|
|
|
|
|
if ($result) { |
|
|
|
|
|
$output->writeln('✅ 自动排课任务执行成功!'); |
|
|
|
|
|
} else { |
|
|
|
|
|
$output->writeln('❌ 自动排课任务执行失败!'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} catch (\Exception $e) { |
|
|
|
|
|
$output->writeln('❌ 执行异常:' . $e->getMessage()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$output->writeln('testcommand'); |
|
|
$output->writeln('testcommand'); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|