|
...
|
...
|
@@ -28,8 +28,6 @@ class ProjectFilePDF extends Command |
|
|
|
*/
|
|
|
|
protected $description = '网站项目数据,生成PDF文件';
|
|
|
|
|
|
|
|
protected $AiccWechat;
|
|
|
|
|
|
|
|
protected $ProjectAssociation;
|
|
|
|
|
|
|
|
protected $DataFile;
|
|
...
|
...
|
@@ -48,7 +46,6 @@ class ProjectFilePDF extends Command |
|
|
|
*/
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
$this->AiccWechat = new ProjectAssociation();
|
|
|
|
$this->ProjectAssociation = new ProjectAssociation();
|
|
|
|
$this->DataFile = new DataFile();
|
|
|
|
$this->time = date("Y-m");
|
|
...
|
...
|
@@ -89,11 +86,11 @@ class ProjectFilePDF extends Command |
|
|
|
$this->debug_echo('pdf生成失败!');
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
$file_path = $file_path['data'];
|
|
|
|
$file_path = json_encode($file_path['data']);
|
|
|
|
$isRes = $this->DataFile->saveData(compact('project_id', 'user_id', 'friend_id', 'file_path') + ['time' => $this->time]);
|
|
|
|
if (!$isRes) {
|
|
|
|
if ($count == 2) {
|
|
|
|
$lists->status = 2;
|
|
|
|
$lists->is_pdf = 2;
|
|
|
|
$lists->save();
|
|
|
|
$this->debug_echo('项目文件数据保存失败! - 其他原因 - ' . $key);
|
|
|
|
} else {
|
|
...
|
...
|
@@ -101,7 +98,7 @@ class ProjectFilePDF extends Command |
|
|
|
$this->debug_echo('项目文件数据保存失败! - ' . $key);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$lists->status = 1;
|
|
|
|
$lists->is_pdf = 1;
|
|
|
|
$lists->save();
|
|
|
|
$this->debug_echo('项目文件数据保存成功!');
|
|
|
|
return 0;
|
|
...
|
...
|
@@ -162,6 +159,11 @@ class ProjectFilePDF extends Command |
|
|
|
// return 0;
|
|
|
|
// }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param $html
|
|
|
|
* @param $filename
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function savePDF($html, $filename)
|
|
|
|
{
|
|
|
|
|
...
|
...
|
|