测试问题修改
This commit is contained in:
@@ -2224,12 +2224,36 @@ class Reviewer extends Base
|
||||
}
|
||||
|
||||
//查询文章期刊ID
|
||||
$article_info = $this->article_obj->field('journal_id')->where("article_id", $data['article_id'])->find();
|
||||
$article_info = $this->article_obj->field('user_id,journal_id')->where("article_id", $data['article_id'])->find();
|
||||
//查询文章作者
|
||||
$iUserId = empty($article_info['user_id']) ? 0 : $article_info['user_id'];
|
||||
$aUserId = [$iUserId];
|
||||
$article_info = $this->article_obj->field('user_id,journal_id')->where("article_id", $data['article_id'])->find();
|
||||
$aAuthorList = Db::name('article_author')->field('email,company')->where(['article_id'=>$data['article_id'],'state' => 0])->select();
|
||||
if(!empty($aAuthorList)){
|
||||
$aAuthorEmail = array_column($aAuthorList, 'email');
|
||||
$aWhere = ['email' => ['in',$aAuthorEmail],'state' => 0];
|
||||
$aUserId = Db::name('user')->where($aWhere)->column('user_id');
|
||||
if(!empty($aUserId)){
|
||||
array_push($aUserId, $iUserId);
|
||||
}
|
||||
}
|
||||
//查询提交文章作者详情 作者和审稿人的机构不一致
|
||||
$aReviewerCompany = [];
|
||||
if(!empty($aUserId)){
|
||||
//作者同机构的审稿人
|
||||
$aReviewerCompany = Db::name('user_reviewer_info')->where(['reviewer_id' => ['in',$aUserId],'state' => 0])->column('reviewer_id,company');
|
||||
}
|
||||
|
||||
//文章作者机构信息
|
||||
$aAuthorCompany = empty($aAuthorList) ? [] : array_unique(array_column($aAuthorList, 'company'));
|
||||
$aAuthorCompany = array_unique(array_merge($aAuthorCompany,$aReviewerCompany));
|
||||
//期刊ID
|
||||
$iJournalId = empty($article_info['journal_id']) ? 0 : $article_info['journal_id'];
|
||||
//查询文章现有审稿人
|
||||
$noids = $this->article_reviewer_obj->where('article_id', $data['article_id'])->column('reviewer_id');
|
||||
|
||||
$noids = empty($noids) ? [] : $noids;
|
||||
$noids = empty($aUserId) ? $noids : array_unique(array_merge($aUserId,$noids));
|
||||
//分页配置
|
||||
$limit_start = ($data['pageIndex'] - 1) * $data['pageSize'];
|
||||
|
||||
@@ -2251,6 +2275,10 @@ class Reviewer extends Base
|
||||
$where['t_user_reviewer_info.major'] = ['in',$this->majorids($data['major_id'])];
|
||||
}
|
||||
|
||||
//过滤审稿人机构
|
||||
if(!empty($aAuthorCompany)){
|
||||
$where['t_user_reviewer_info.company'] = ['not in', $aAuthorCompany];
|
||||
}
|
||||
// 计算10天之后的时间戳(10天 = 10 * 24 * 60 * 60秒)
|
||||
$iTeenDaysLater = strtotime('-10 days');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user