6 changed files with 227 additions and 49 deletions
@ -0,0 +1,15 @@ |
|||
<?php |
|||
|
|||
namespace app\command\ClientCommand; |
|||
|
|||
use think\console\Command; |
|||
use think\console\Input; |
|||
use think\console\Output; |
|||
|
|||
class TestCommand extends Command |
|||
{ |
|||
protected function execute(Input $input, Output $output) |
|||
{ |
|||
$output->writeln('test'); |
|||
} |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
<?php |
|||
declare (strict_types = 1); |
|||
|
|||
namespace app\command; |
|||
|
|||
use app\job\transfer\schedule\ResourceAutoAllocation; |
|||
use think\console\Command; |
|||
use think\console\Input; |
|||
use think\console\input\Argument; |
|||
use think\console\input\Option; |
|||
use think\console\Output; |
|||
|
|||
class TestCommand extends Command |
|||
{ |
|||
protected function configure() |
|||
{ |
|||
// 指令配置 |
|||
$this->setName('testcommand') |
|||
->setDescription('the testcommand command'); |
|||
} |
|||
|
|||
protected function execute(Input $input, Output $output) |
|||
{ |
|||
// 指令输出 |
|||
$obj = new ResourceAutoAllocation(); |
|||
$obj->doJob(); |
|||
$output->writeln('testcommand'); |
|||
} |
|||
} |
|||
@ -1,20 +0,0 @@ |
|||
<?php |
|||
|
|||
namespace app\job\custmer; |
|||
|
|||
use app\model\customer_resources\CustomerResources; |
|||
use app\model\resource_sharing\ResourceSharing; |
|||
use core\base\BaseJob; |
|||
|
|||
class ResourceAutoAllocation extends BaseJob |
|||
{ |
|||
public function doJob() |
|||
{ |
|||
//获取当天的资源列表模型CustomerResources |
|||
// CustomerResources::where('created_at') |
|||
//获取当天销售获取资源的数量ResourceSharing |
|||
// ResourceSharing::where('shared_at')-> |
|||
//遍历资源列表按照资源数量的最少的人员优先分配 |
|||
return true; |
|||
} |
|||
} |
|||
Loading…
Reference in new issue