小bug修复

This commit is contained in:
wangjinlei
2025-11-04 13:31:16 +08:00
parent f6c460bece
commit 2a4f5a9117
3 changed files with 36 additions and 7 deletions

View File

@@ -1306,6 +1306,15 @@ class Production extends Base
} }
private function abstractChange($str){
$html = preg_replace('/<strong(.*?)>(.*?)<\/strong>/', '{b}$2{/b}', $str);
$html = strip_tags($html);
$html = str_replace("{b}","<b>",$html);
$html = str_replace("{/b}","</b>",$html);
return $html;
}
public function doTypeSettingNew(){ public function doTypeSettingNew(){
$data = $this->request->post(); $data = $this->request->post();
$rule = new Validate([ $rule = new Validate([
@@ -1360,11 +1369,17 @@ class Production extends Base
$typesetInfo['little_author'] = $p_info['abbr']; $typesetInfo['little_author'] = $p_info['abbr'];
$typesetInfo['website'] = $journal_info['website']; $typesetInfo['website'] = $journal_info['website'];
$typesetInfo['acknowledgment'] = $p_info['acknowledgment']; $typesetInfo['acknowledgment'] = $p_info['acknowledgment'];
$typesetInfo['received_date'] = date("d F Y", $article_info['ctime']);;
$received_info = $this->article_msg_obj->where("article_id",$p_info['article_id'])->where("state_from",4)->where("state_to",1)->find();
$received_data = $received_info?$received_info['ctime']:$article_info['ctime'];
$typesetInfo['received_date'] = date("d F Y", $received_data);
$super_num = $this->article_author_obj->where("article_id",$p_info['article_id'])->where("state",0)->where("is_super",1)->count();
$typesetInfo['has_more'] = $super_num>1;
$typesetInfo['accepted_date'] = date("d F Y", $article_info['rtime']); $typesetInfo['accepted_date'] = date("d F Y", $article_info['rtime']);
$typesetInfo['online_date'] = $p_info['pub_date']; //这里可能会有问题 $typesetInfo['online_date'] = $p_info['pub_date']; //这里可能会有问题
$typesetInfo['abbreviation'] = $p_info['abbreviation']; $typesetInfo['abbreviation'] = $p_info['abbreviation'];
$typesetInfo['abstractText'] = $p_info['abstract']; $typesetInfo['abstractText'] = $this->abstractChange($p_info['abstract']);
$typesetInfo['keywords'] = $p_info['keywords']; $typesetInfo['keywords'] = $p_info['keywords'];
$typesetInfo['userAccount'] = $editor_info['nickname']; $typesetInfo['userAccount'] = $editor_info['nickname'];
@@ -1393,6 +1408,7 @@ class Production extends Base
$mainList = []; $mainList = [];
$images = []; $images = [];
$tables = []; $tables = [];
$nbsp = false;
foreach ($main_list as $k =>$item){ foreach ($main_list as $k =>$item){
if($start>=$k){ if($start>=$k){
continue; continue;
@@ -1418,10 +1434,13 @@ class Production extends Base
if($item['is_h1']==1){ if($item['is_h1']==1){
// $main_string = "<b><i>".$item['content']."</i></b>"; // $main_string = "<b><i>".$item['content']."</i></b>";
$main_string = "<tr>".strip_tags($item['content'])."</tr>"; $main_string = "<tr>".strip_tags($item['content'])."</tr>";
$nbsp = true;
}else if($item['is_h2']==1||$item['is_h3']==1){ }else if($item['is_h2']==1||$item['is_h3']==1){
$main_string = "<b>".$item['content']."</b>"; $main_string = "<b>".$item['content']."</b>";
$nbsp = false;
}else{ }else{
$main_string = $item['content']; $main_string = $nbsp?"<nbsp/>".$item['content']:$item['content'];
$nbsp = false;
} }
} }
$mainList[] = $main_string; $mainList[] = $main_string;
@@ -1456,8 +1475,8 @@ class Production extends Base
$typesetInfo['images'] = null; $typesetInfo['images'] = null;
$typesetInfo['tables'] = null; $typesetInfo['tables'] = null;
$url = $this->ts_base_url."api/typeset/createDocx"; // $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/createDocx";
// $url = "http://192.168.110.110:8081/typeset/testqt"; // $url = "http://192.168.110.110:8081/typeset/testqt";
$res = object_to_array(json_decode(myPost1($url, $typesetInfo))); $res = object_to_array(json_decode(myPost1($url, $typesetInfo)));
@@ -1476,6 +1495,14 @@ class Production extends Base
} }
public function readTest(){
$url = "http://192.168.110.110:8081/typeset/readdoc";
$typesetInfo['filename'] = "11.docx";
$res = object_to_array(json_decode(myPost($url, $typesetInfo)));
return jsonSuccess($res);
}
/** /**
* 获取生产实例详情 * 获取生产实例详情
*/ */

View File

@@ -330,7 +330,7 @@ class Web extends Base
]; ];
continue; continue;
} }
if($v['state_to']==4&&!$reciv&&$reviewer_has&& if($v['state_to']==4&&!$reciv&&count($reviewers)>0&&
(($article_info['journal_id']==1&&$p_info['journal_stage_id']>=453) (($article_info['journal_id']==1&&$p_info['journal_stage_id']>=453)
||$article_info['journal_id']==23 ||$article_info['journal_id']==23
||$article_info['journal_id']==2 ||$article_info['journal_id']==2

View File

@@ -15,13 +15,15 @@ return [
// 服务器地址 // 服务器地址
// 'hostname' => 'tmrdatebase.cubychyntk7p.ap-southeast-1.rds.amazonaws.com', // 'hostname' => 'tmrdatebase.cubychyntk7p.ap-southeast-1.rds.amazonaws.com',
'hostname' => 'localhost', 'hostname' => 'localhost',
// 'hostname' => 'ec2-13-229-30-239.ap-southeast-1.compute.amazonaws.com',
// 数据库名 // 数据库名
'database' => 'tougao', 'database' => 'tougao',
// 用户名 // 用户名
// 'username' => 'tmradmin', // 'username' => 'tmradmin',
'username' => 'root', 'username' => 'root',
// 'username' =>"tougao",
// 密码 // 密码
// 'password' => 'UhUKzkifVWkTnoJ63Qfs', // 'password' => 'Tmr751019!',
'password' => 'root', 'password' => 'root',
// 端口 // 端口
'hostport' => '3306', 'hostport' => '3306',