|
|
@@ -27,10 +27,6 @@ class AddAgreementPdf extends Command
|
|
|
|
|
|
protected function execute(Input $input, Output $output)
|
|
|
{
|
|
|
- while (true) {
|
|
|
- echo date('Y-m-d H:i:s') . PHP_EOL;
|
|
|
- }
|
|
|
- return false;
|
|
|
$mq_config = Config::get('mq');
|
|
|
// 连接到RabbitMQ服务
|
|
|
$connection = new AMQPStreamConnection($mq_config['host'], $mq_config['port'], $mq_config['username'], $mq_config['password'], $mq_config['vhost']);
|
|
|
@@ -64,7 +60,7 @@ class AddAgreementPdf extends Command
|
|
|
mkdir ('./public/'.$path,0777,true);
|
|
|
}
|
|
|
$shell_ = 'wkhtmltopdf --page-height 297mm '.$url.' '.'public/'.$path.$pdf;
|
|
|
- shell_exec($shell_);
|
|
|
+ system($shell_);
|
|
|
$agreement = MasterWorkerAgree::where('code', $code)->findOrEmpty();
|
|
|
$agreement->pdf_url = $path.$pdf;
|
|
|
$agreement->save();
|