diff --git a/application/api/controller/Production.php b/application/api/controller/Production.php index 85db62c..83fe7d2 100644 --- a/application/api/controller/Production.php +++ b/application/api/controller/Production.php @@ -1306,6 +1306,15 @@ class Production extends Base } + private function abstractChange($str){ + $html = preg_replace('/(.*?)<\/strong>/', '{b}$2{/b}', $str); + $html = strip_tags($html); + $html = str_replace("{b}","",$html); + $html = str_replace("{/b}","",$html); + return $html; + } + + public function doTypeSettingNew(){ $data = $this->request->post(); $rule = new Validate([ @@ -1360,11 +1369,17 @@ class Production extends Base $typesetInfo['little_author'] = $p_info['abbr']; $typesetInfo['website'] = $journal_info['website']; $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['online_date'] = $p_info['pub_date']; //这里可能会有问题 $typesetInfo['abbreviation'] = $p_info['abbreviation']; - $typesetInfo['abstractText'] = $p_info['abstract']; + $typesetInfo['abstractText'] = $this->abstractChange($p_info['abstract']); $typesetInfo['keywords'] = $p_info['keywords']; $typesetInfo['userAccount'] = $editor_info['nickname']; @@ -1393,6 +1408,7 @@ class Production extends Base $mainList = []; $images = []; $tables = []; + $nbsp = false; foreach ($main_list as $k =>$item){ if($start>=$k){ continue; @@ -1418,10 +1434,13 @@ class Production extends Base if($item['is_h1']==1){ // $main_string = "".$item['content'].""; $main_string = "".strip_tags($item['content']).""; + $nbsp = true; }else if($item['is_h2']==1||$item['is_h3']==1){ $main_string = "".$item['content'].""; + $nbsp = false; }else{ - $main_string = $item['content']; + $main_string = $nbsp?"".$item['content']:$item['content']; + $nbsp = false; } } $mainList[] = $main_string; @@ -1456,8 +1475,8 @@ class Production extends Base $typesetInfo['images'] = null; $typesetInfo['tables'] = null; - $url = $this->ts_base_url."api/typeset/createDocx"; -// $url = "http://192.168.110.110:8081/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/testqt"; $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); + } + + /** * 获取生产实例详情 */ diff --git a/application/api/controller/Web.php b/application/api/controller/Web.php index 6d81cf0..eafe438 100644 --- a/application/api/controller/Web.php +++ b/application/api/controller/Web.php @@ -330,7 +330,7 @@ class Web extends Base ]; 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']==23 ||$article_info['journal_id']==2 diff --git a/application/database.php b/application/database.php index 0915683..4520859 100644 --- a/application/database.php +++ b/application/database.php @@ -15,13 +15,15 @@ return [ // 服务器地址 // 'hostname' => 'tmrdatebase.cubychyntk7p.ap-southeast-1.rds.amazonaws.com', 'hostname' => 'localhost', +// 'hostname' => 'ec2-13-229-30-239.ap-southeast-1.compute.amazonaws.com', // 数据库名 'database' => 'tougao', // 用户名 // 'username' => 'tmradmin', 'username' => 'root', +// 'username' =>"tougao", // 密码 -// 'password' => 'UhUKzkifVWkTnoJ63Qfs', +// 'password' => 'Tmr751019!', 'password' => 'root', // 端口 'hostport' => '3306',