This commit is contained in:
wangjinlei
2025-01-07 10:07:35 +08:00
parent a54a837670
commit 28a0c44dab
5 changed files with 203 additions and 73 deletions

View File

@@ -913,14 +913,14 @@ class Production extends Base
}
public function bekjournal($str)
{
preg_match("/[0-9]{4}/", $str, $math);
$year = $math[0];
$frag[0] = trim(substr($str, 0, stripos($str, $year)));
$frag[1] = substr($str, stripos($str, $year));
return $frag;
}
// public function bekjournal($str)
// {
// preg_match("/[0-9]{4}/", $str, $math);
// $year = $math[0];
// $frag[0] = trim(substr($str, 0, stripos($str, $year)));
// $frag[1] = substr($str, stripos($str, $year));
// return $frag;
// }
public function prgeAuthor($author)
{
@@ -1214,10 +1214,14 @@ class Production extends Base
$mainList[] = $main_string;
}
$typesetInfo['mainText'] = json_encode($mainList);
$typesetInfo['images'] = $images;
$typesetInfo['tables'] = $tables;
$typesetInfo['images'] = $images==[]?null:$images;
$typesetInfo['tables'] = $tables==[]?null:$tables;
// $url = $this->ts_base_url."api/typeset/webGetDocx";
// return jsonSuccess($typesetInfo);
// $url = $this->ts_base_url."api/typeset/createDocx";
$url = "http://192.168.110.110:8081/typeset/createDocx";
// $url = "http://192.168.110.110:8081/typeset/testqt";
$res = object_to_array(json_decode(myPost1($url, $typesetInfo)));
@@ -1226,6 +1230,12 @@ class Production extends Base
return jsonError('create error');
}
$file_res = date('Ymd') . DS . $res['data']['file'];
$tf_insert['p_article_id'] = $p_info['p_article_id'];
$tf_insert['url'] = $file_res;
$tf_insert['ctime'] = time();
$this->production_article_frag_obj->insert($tf_insert);
return jsonSuccess($res);
}