归纳总结病例

This commit is contained in:
wangjinlei
2025-09-02 10:17:21 +08:00
parent 4fe268d73e
commit d77f9ae56d
2 changed files with 57 additions and 0 deletions

View File

@@ -201,6 +201,30 @@ function proofState($article_id)
$p_article_obj->where('article_id', $article_id)->where('state', '<>', 1)->where('proof_etime', '<', time())->where('proof_state', 1)->update(['proof_state' => 2]);
}
function docxReader($file){
$phpWord = IOFactory::load($file);
$content = '';
foreach ($phpWord->getSections() as $section) {
foreach ($section->getElements() as $element) {
if ($element instanceof \PhpOffice\PhpWord\Element\TextRun) {
foreach ($element->getElements() as $text) {
if ($text instanceof \PhpOffice\PhpWord\Element\Text) {
$content .= $text->getText();
}
}
$content .= ";";
}
elseif ($element instanceof \PhpOffice\PhpWord\Element\Text) {
$content .= $element->getText() . ";";
}
}
}
return $content;
}
function readWordImg($article_id,$file){
$phpWord = IOFactory::load($file);