This commit is contained in:
wangjinlei
2022-10-17 18:14:27 +08:00
parent e4bc0f5906
commit 12a00f583c
6 changed files with 134 additions and 52 deletions

View File

@@ -193,10 +193,7 @@ class Production extends Controller
'title' => 'require',
'type' => 'require',
'icon' => 'require',
'tradition_tag' => 'require',
'tradition' => 'require',
'acknowledgment' => 'require',
'abbreviation' =>'require',
'keywords' => 'require',
'author_contribution'=>'require',
'abbr' => 'require'
@@ -212,14 +209,14 @@ class Production extends Controller
$update['journal_stage_id'] = $data['journal_stage_id'];
$update['type'] = trim($data['type']);
$update['icon'] = trim($data['icon']);
$update['tradition_tag'] = trim($data['tradition_tag']);
$update['tradition'] = trim($data['tradition']);
$update['tradition_tag'] = isset($data['tradition_tag'])?trim($data['tradition_tag']):'';
$update['tradition'] = isset($data['tradition'])?trim($data['tradition']):'';
$update['author_contribution'] = trim($data['author_contribution']);
$update['mhoo'] = isset($data['mhoo']) ? trim($data['mhoo']) : '';
$update['ltai'] = isset($data['ltai']) ? trim($data['ltai']) : '';
// $update['abstract'] = trim($data['abstract']);
$update['keywords'] = trim($data['keywords']);
$update['abbreviation'] = trim($data['abbreviation']);
$update['abbreviation'] = isset($data['abbreviation'])?trim($data['abbreviation']):'';
$update['acknowledgment'] = trim($data['acknowledgment']);
$update['abbr'] = trim($data['abbr']);
// $update['pub_date'] = trim($data['pub_date']);
@@ -375,7 +372,7 @@ class Production extends Controller
if (!$rule->check($data)) {
return jsonError($rule->getError());
}
$update['abstract'] = trim($data['abstract']);
$updata['abstract'] = trim($data['abstract']);
$updata['doi'] = $data['doi'];
$updata['pub_date'] = $data['pub_date'];
$this->production_article_obj->where('p_article_id',$data['p_article_id'])->update($updata);
@@ -423,6 +420,23 @@ class Production extends Controller
$pra['doi'] = $p_info['doi'];
$pra['abstract'] = $p_info['abstract'];
$pra['pub_date'] = $p_info['pub_date'];
$pra['abbr'] = $p_info['abbr'];
$pra['icon'] = $p_info['icon'];
if($p_info['file_sub']!=''){
$pra['file_sub'] = $p_info['file_sub'];
}
if($p_info['file_sub2']!=''){
$pra['file_sub2'] = $p_info['file_sub2'];
}
if($p_info['file_cdf']!=''){
$pra['file_cdf'] = $p_info['file_cdf'];
}
if($p_info['endnote']!=''){
$pra['endnote'] = $p_info['endnote'];
}
if($p_info['bibtex']!=''){
$pra['bibtex'] = $p_info['bibtex'];
}
$pra['file_pdf'] = $p_info['file_pdf'];
$pra['keywords'] = $p_info['keywords'];
$pra['npp'] = $p_info['npp'];
@@ -475,7 +489,7 @@ class Production extends Controller
$corrauthor = '';
$corremail = '';
foreach($corr_authors as $v){
$corrauthor .= $v['first_name']. ' '.$v['last_name'].'. ';
$corrauthor .= trim($v['first_name']). ' '.trim($v['last_name']).'. ';
$corremail .= $v['email'].'. ';
}
$typesetInfo['authorCorresponding'] = substr(trim($corrauthor),0,-1);
@@ -658,9 +672,9 @@ class Production extends Controller
$p_info = $this->production_article_obj->where('p_article_id', $data['p_article_id'])->find();
$insert['p_article_id'] = $data['p_article_id'];
$insert['article_id'] = $p_info['article_id'];
$insert['author_name'] = $data['first_name'] . ' ' . $data['last_name'];
$insert['first_name'] = $data['first_name'];
$insert['last_name'] = $data['last_name'];
$insert['author_name'] = trim($data['first_name']) . ' ' . trim($data['last_name']);
$insert['first_name'] = trim($data['first_name']);
$insert['last_name'] = trim($data['last_name']);
$insert['orcid'] = isset($data['orcid']) ? $data['orcid'] : '';
$insert['author_country'] = $data['author_country'];
$insert['is_first'] = $data['is_first'];
@@ -953,11 +967,18 @@ class Production extends Controller
}
}
$first_num = 0;//第一作者的总数
foreach($authors as $v){
if($v['is_first']==1){
$first_num++;
}
}
//构建数组字符串
$author = '';
foreach ($authors as $v) {
$cache_str = $v['first_name'] . ' ' . $v['last_name'] . '<q>';
$cache_str = trim($v['first_name']) . ' ' . trim($v['last_name']) . '<q>';
$cac = $this->production_article_author_to_organ_obj
->field('t_production_article_organ.*')
->join('t_production_article_organ','t_production_article_organ.p_article_organ_id = t_production_article_author_to_organ.p_article_organ_id','left')
@@ -965,15 +986,16 @@ class Production extends Controller
->where('t_production_article_author_to_organ.state',0)
->select();
foreach ($cac as $val) {
$cache_str .= (intval(search_array_val($address, $val['organ_name'])) + 1) . " ";
}
if ($v['is_first'] == 1) {
$cache_str .= '*';
}
if ($v['is_report'] == 1) {
$cache_str .= '#';
$cache_str .= (intval(search_array_val($address, $val['organ_name'])) + 1) . ", ";
}
$cache_str = trim($cache_str);
$cache_str = substr($cache_str,0,-1);
if ($first_num>1&&$v['is_first'] == 1) {
$cache_str .= '#';
}
if ($v['is_report'] == 1) {
$cache_str .= '*';
}
$cache_str .= '</q>';
$author .= $cache_str;
}