测试问题修改
This commit is contained in:
@@ -1081,15 +1081,17 @@ class Finalreview extends Base
|
||||
$aQuestion = empty($aQuestion) ? [] : array_column($aQuestion, null,'art_rev_id');
|
||||
|
||||
//查询复审
|
||||
$aReviewerRepeatLists = [];
|
||||
$aWhere = ['art_rev_id' => ['in',$aArtRevId],'recommend' => ['between',[1,3]]];
|
||||
$aReviewerRepeatLists = $aReviewerRepeatListsData = [];
|
||||
$aWhere = ['art_rev_id' => ['in',$aArtRevId],'recommend' => ['between',[0,3]]];
|
||||
$aReviewerRepeat = Db::name('article_reviewer_repeat')->field('art_rev_rep_id,art_rev_id,recommend,ctime,stime,state')->where($aWhere)->select();
|
||||
if(!empty($aReviewerRepeat)){
|
||||
foreach ($aReviewerRepeat as $key => $value) {
|
||||
$aReviewerRepeatLists[$value['art_rev_id']][] = $value;
|
||||
if(in_array($value['recommend'], [1,2,3])){
|
||||
$aReviewerRepeatLists[$value['art_rev_id']][] = $value;
|
||||
}
|
||||
$aReviewerRepeatListsData[$value['art_rev_id']][] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
//查询作者信息
|
||||
$aUserId = array_unique(array_column($aArticleReviewer, 'reviewer_id'));
|
||||
$aWhere = ['user_id' => ['in',$aUserId],'state' => 0];
|
||||
@@ -1101,9 +1103,9 @@ class Finalreview extends Base
|
||||
$value['score'] = empty($aQuestionData['score']) ? 0 : $aQuestionData['score'];
|
||||
$value['repeat'] = empty($aReviewerRepeatLists[$value['art_rev_id']]) ? [] : $aReviewerRepeatLists[$value['art_rev_id']];
|
||||
//判断是否复审
|
||||
$value['can_repeat'] = 1;
|
||||
if(!empty($value['repeat'])){
|
||||
$aEnd = end($value['repeat']);
|
||||
$value['can_repeat'] = empty($aQuestionData) ? 0 : 1;
|
||||
if(!empty($aReviewerRepeatListsData[$value['art_rev_id']])){
|
||||
$aEnd = end($aReviewerRepeatListsData[$value['art_rev_id']]);
|
||||
$iState = empty($aEnd['state']) ? 0 : $aEnd['state'];
|
||||
$iRecommend = empty($aEnd['recommend']) ? 0 : $aEnd['recommend'];
|
||||
if($iState == 1 && $iRecommend == 3){
|
||||
|
||||
Reference in New Issue
Block a user