1
This commit is contained in:
@@ -28,6 +28,8 @@ class Special extends Controller
|
||||
protected $article_file_obj = '';
|
||||
protected $article_msg_obj = '';
|
||||
protected $user_log_obj = '';
|
||||
protected $major_obj = "";
|
||||
protected $major_to_journal_obj = '';
|
||||
protected $user_black_obj = '';
|
||||
protected $user_to_special_obj = '';
|
||||
protected $chief_to_journal_obj = '';
|
||||
@@ -54,6 +56,8 @@ class Special extends Controller
|
||||
$this->article_file_obj = Db::name('article_file');
|
||||
$this->article_msg_obj = Db::name('article_msg');
|
||||
$this->user_log_obj = Db::name('user_log');
|
||||
$this->major_obj = Db::name("major");
|
||||
$this->major_to_journal_obj = Db::name('major_to_journal');
|
||||
$this->user_black_obj = Db::name('user_black');
|
||||
$this->user_to_special_obj = Db::name('user_to_special');
|
||||
$this->chief_to_journal_obj = Db::name('chief_to_journal');
|
||||
@@ -599,7 +603,7 @@ class Special extends Controller
|
||||
|
||||
if ($res && $res_author && $transr &&$res_add_user && $res_file1 && $res_file2 && $res_file3 && $res_log && $res_msg) {
|
||||
Db::commit();
|
||||
$this->ai_scor($data['article_id']);
|
||||
$this->ai_scor($res);
|
||||
return json(['code' => 0]);
|
||||
} else {
|
||||
Db::rollback();
|
||||
@@ -647,7 +651,8 @@ class Special extends Controller
|
||||
$url = "http://ts.tmrjournals.com/api/typeset/readPic";
|
||||
$program['fileRoute'] = "https://submission.tmrjournals.com/public/" . $files[0]['file_url'];
|
||||
$res = object_to_array(json_decode(myPost($url, $program)));
|
||||
$wp = $res['data'];
|
||||
$wp = isset($res['data']['pic'])?$res['data']['pic']:2;
|
||||
$tp = isset($res['data']['table'])?$res['data']['table']:2;
|
||||
|
||||
$pics = $this->article_file_obj->where('article_id',$article_id)->where('type_name','picturesAndTables')->select();
|
||||
$np = 0;
|
||||
@@ -662,9 +667,10 @@ class Special extends Controller
|
||||
}
|
||||
$p_num = $wp>$np?$wp:$np;
|
||||
|
||||
if($p_num>3){
|
||||
$all_num = $p_num+$tp;
|
||||
if($all_num>3){
|
||||
$b_fen = 2;
|
||||
}elseif($p_num>=1){
|
||||
}elseif($all_num>=1){
|
||||
$b_fen = 1;
|
||||
}else{
|
||||
$b_fen = 0;
|
||||
@@ -683,16 +689,19 @@ class Special extends Controller
|
||||
}
|
||||
//单位
|
||||
$dw_fen = 0;
|
||||
$report_author = $this->article_author_obj->where('email',$user_info['email'])->find();
|
||||
if($report_author){
|
||||
$ca_res = $this->company_top_obj->where('title',$report_author['company'])->find();
|
||||
if($ca_res){
|
||||
$dw_fen = 1.5;
|
||||
$fen+=1.5;
|
||||
$report_author = $this->article_author_obj->where('article_id', $article_id)->where('email', $user_info['email'])->find();
|
||||
if ($report_author) {
|
||||
$ca_res = $this->company_top_obj->where('title', $report_author['company'])->find();
|
||||
if ($ca_res) {
|
||||
if($ca_res['company_id']<=100||($ca_res['company_id']>201&&$ca_res['company_id']<=301)){
|
||||
$dw_fen = 1.5;
|
||||
$fen += 1.5;
|
||||
}else{
|
||||
$dw_fen = 1;
|
||||
$fen += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//领域
|
||||
$ly_fen = 0;
|
||||
$m = $this->major_obj->where('major_id',$article_info['major_id'])->find();
|
||||
@@ -703,7 +712,7 @@ class Special extends Controller
|
||||
|
||||
//基金
|
||||
$jj_fen = 0;
|
||||
if(strlen($article_info['fund'])>15){
|
||||
if(strlen($article_info['fund'])>10){
|
||||
$jj_fen = 0.5;
|
||||
$fen += 0.5;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user