Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1081,15 +1081,17 @@ class Finalreview extends Base
|
|||||||
$aQuestion = empty($aQuestion) ? [] : array_column($aQuestion, null,'art_rev_id');
|
$aQuestion = empty($aQuestion) ? [] : array_column($aQuestion, null,'art_rev_id');
|
||||||
|
|
||||||
//查询复审
|
//查询复审
|
||||||
$aReviewerRepeatLists = [];
|
$aReviewerRepeatLists = $aReviewerRepeatListsData = [];
|
||||||
$aWhere = ['art_rev_id' => ['in',$aArtRevId],'recommend' => ['between',[1,3]]];
|
$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')->where($aWhere)->select();
|
$aReviewerRepeat = Db::name('article_reviewer_repeat')->field('art_rev_rep_id,art_rev_id,recommend,ctime,stime,state')->where($aWhere)->select();
|
||||||
if(!empty($aReviewerRepeat)){
|
if(!empty($aReviewerRepeat)){
|
||||||
foreach ($aReviewerRepeat as $key => $value) {
|
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'));
|
$aUserId = array_unique(array_column($aArticleReviewer, 'reviewer_id'));
|
||||||
$aWhere = ['user_id' => ['in',$aUserId],'state' => 0];
|
$aWhere = ['user_id' => ['in',$aUserId],'state' => 0];
|
||||||
@@ -1100,6 +1102,18 @@ class Finalreview extends Base
|
|||||||
$value['ctime'] = empty($aQuestionData['ctime']) ? $value['ctime'] : $aQuestionData['ctime'];
|
$value['ctime'] = empty($aQuestionData['ctime']) ? $value['ctime'] : $aQuestionData['ctime'];
|
||||||
$value['score'] = empty($aQuestionData['score']) ? 0 : $aQuestionData['score'];
|
$value['score'] = empty($aQuestionData['score']) ? 0 : $aQuestionData['score'];
|
||||||
$value['repeat'] = empty($aReviewerRepeatLists[$value['art_rev_id']]) ? [] : $aReviewerRepeatLists[$value['art_rev_id']];
|
$value['repeat'] = empty($aReviewerRepeatLists[$value['art_rev_id']]) ? [] : $aReviewerRepeatLists[$value['art_rev_id']];
|
||||||
|
//判断是否复审
|
||||||
|
$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){
|
||||||
|
$value['can_repeat'] = 1;
|
||||||
|
}else{
|
||||||
|
$value['can_repeat'] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
$value['rated'] = empty($aQuestionData['rated']) ? 0 : $aQuestionData['rated'];
|
$value['rated'] = empty($aQuestionData['rated']) ? 0 : $aQuestionData['rated'];
|
||||||
$value['realname'] = empty($aUser[$value['reviewer_id']]) ? '' : $aUser[$value['reviewer_id']];
|
$value['realname'] = empty($aUser[$value['reviewer_id']]) ? '' : $aUser[$value['reviewer_id']];
|
||||||
$value['recommend'] = empty($aQuestionData['recommend']) ? 0 : $aQuestionData['recommend'];
|
$value['recommend'] = empty($aQuestionData['recommend']) ? 0 : $aQuestionData['recommend'];
|
||||||
|
|||||||
@@ -1713,23 +1713,30 @@ return null;
|
|||||||
}
|
}
|
||||||
//查询参考文献数据
|
//查询参考文献数据
|
||||||
$aWhere = ['p_article_id' => $iPArticleId,'article_id' => $iArticleId,'state' => 0];
|
$aWhere = ['p_article_id' => $iPArticleId,'article_id' => $iArticleId,'state' => 0];
|
||||||
$iCount = Db::name('production_article_refer')->where($aWhere)->count();
|
$aRefer = Db::name('production_article_refer')->where($aWhere)->select();
|
||||||
if(empty($iCount)){
|
if(empty($aRefer)){
|
||||||
return json_encode(array('status' => 3,'msg' => 'Reference is empty','data' => ['total' => 0,'unprocessed_total' => 0,'processed_total' => 0]));
|
return json_encode(array('status' => 3,'msg' => 'Reference is empty','data' => ['total' => 0,'unprocessed_total' => 0,'processed_total' => 0]));
|
||||||
}
|
}
|
||||||
//获取未处理的数据
|
//获取总数量
|
||||||
$aWhere['is_deal'] = 2;
|
$iCount = empty($aRefer) ? 0 : count($aRefer);
|
||||||
$aUnprocessed = Db::name('production_article_refer')->where($aWhere)->select();
|
$aWhere["refer_doi"] = ["<>",""];
|
||||||
//获取已处理的数据
|
$aDoi = Db::name('production_article_refer')->field('count(p_article_id) as num,refer_doi')->where($aWhere)->group('refer_doi')->select();
|
||||||
$aWhere['is_deal'] = 1;
|
$aDoi = empty($aDoi) ? [] : array_column($aDoi, 'num','refer_doi');
|
||||||
$aProcessed = Db::name('production_article_refer')->where($aWhere)->select();
|
//数据处理
|
||||||
//未处理的数量
|
$iUnprocessed = $iProcessed = 0;
|
||||||
$iUnprocessed = empty($aUnprocessed) ? 0 : count($aUnprocessed);
|
foreach ($aRefer as $key => $value) {
|
||||||
//已处理的数量
|
if($value['is_deal'] == 1){
|
||||||
$iProcessed = empty($aProcessed) ? 0 : count($aProcessed);
|
$iProcessed++;
|
||||||
|
}
|
||||||
//数据组合
|
if($value['is_deal'] == 2){
|
||||||
$aRefer = array_merge($aUnprocessed,$aProcessed);
|
$iUnprocessed++;
|
||||||
|
}
|
||||||
|
$iIsRepat = 0;
|
||||||
|
if(!empty($value['refer_doi']) && (!empty($aDoi[$value['refer_doi']]) && $aDoi[$value['refer_doi']] > 1)){
|
||||||
|
$iIsRepat = 1;
|
||||||
|
}
|
||||||
|
$aRefer[$key]['is_repeat'] = $iIsRepat;
|
||||||
|
}
|
||||||
$aRefer = ['total' => $iCount,'unprocessed_total' => $iUnprocessed,'processed_total' => $iProcessed,'refer' => $aRefer];
|
$aRefer = ['total' => $iCount,'unprocessed_total' => $iUnprocessed,'processed_total' => $iProcessed,'refer' => $aRefer];
|
||||||
return json_encode(['status' => 1,'msg' => 'success','data' => $aRefer]);
|
return json_encode(['status' => 1,'msg' => 'success','data' => $aRefer]);
|
||||||
}
|
}
|
||||||
@@ -1749,10 +1756,10 @@ return null;
|
|||||||
if(empty($aArticle)){
|
if(empty($aArticle)){
|
||||||
return jsonError('No article information found');
|
return jsonError('No article information found');
|
||||||
}
|
}
|
||||||
$iIsBuy = empty($aArticle['is_buy']) ? 0 : $aArticle['is_buy'];
|
// $iIsBuy = empty($aArticle['is_buy']) ? 0 : $aArticle['is_buy'];
|
||||||
if($iIsBuy != 1){
|
// if($iIsBuy != 1){
|
||||||
return jsonError('Article unpaid');
|
// return jsonError('Article unpaid');
|
||||||
}
|
// }
|
||||||
$aWhere = ['article_id' => $iArticleId,'state' => 0];
|
$aWhere = ['article_id' => $iArticleId,'state' => 0];
|
||||||
$aProductionArticle = $this->production_article_obj->field('p_article_id')->where($aWhere)->find();
|
$aProductionArticle = $this->production_article_obj->field('p_article_id')->where($aWhere)->find();
|
||||||
if(!empty($aProductionArticle)) {
|
if(!empty($aProductionArticle)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user