1
This commit is contained in:
@@ -586,26 +586,15 @@ class Production extends Base
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$this->refuseReferIndex($data['p_article_id']);
|
||||
$list = $this->production_article_refer_obj
|
||||
// ->field("*,
|
||||
// CASE
|
||||
// WHEN refer_doi != ''
|
||||
// AND refer_doi IS NOT NULL
|
||||
// AND refer_doi IN (
|
||||
// SELECT refer_doi
|
||||
// FROM t_production_article_refer
|
||||
// WHERE p_article_id = ".$data['p_article_id']."
|
||||
// AND state = 0
|
||||
// GROUP BY refer_doi
|
||||
// HAVING COUNT(*) > 1
|
||||
// ) THEN 1
|
||||
// ELSE 0
|
||||
// END AS repeat
|
||||
// ")
|
||||
->where('p_article_id', $data['p_article_id'])->where('state', 0)->order("index")->select();
|
||||
|
||||
|
||||
// echo $this->production_article_refer_obj->getLastSql();
|
||||
$dois = $this->production_article_refer_obj->where("p_article_id", $data['p_article_id'])->where("refer_doi","<>","")->where("state",0)->group("refer_doi")->having("count(*)>1")->column("refer_doi");
|
||||
$list = $this->production_article_refer_obj->where('p_article_id', $data['p_article_id'])->where('state', 0)->order("index")->select();
|
||||
foreach ($list as $k => $v){
|
||||
if(in_array($v['refer_doi'],$dois)){
|
||||
$list[$k]['is_repeat'] = 1;
|
||||
}else{
|
||||
$list[$k]['is_repeat'] = 0;
|
||||
}
|
||||
}
|
||||
$re['refers'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
@@ -1209,7 +1198,13 @@ class Production extends Base
|
||||
$tables[$info['amt_id']] = $arr_table;
|
||||
$main_string = "<table tableId='".$info['amt_id']."'/>";
|
||||
}else{
|
||||
$main_string = $item['content'];
|
||||
if($item['is_h1']==1){
|
||||
$main_string = "<b><i>".$item['content']."</i></b>";
|
||||
}else if($item['is_h2']==1||$item['is_h3']==1){
|
||||
$main_string = "<b>".$item['content']."</b>";
|
||||
}else{
|
||||
$main_string = $item['content'];
|
||||
}
|
||||
}
|
||||
$mainList[] = $main_string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user