This commit is contained in:
wyn
2026-06-02 09:58:07 +08:00
3 changed files with 41 additions and 2 deletions

View File

@@ -1574,8 +1574,8 @@ class Article extends Base
return json(['code' => 1, 'msg' => "Before proceeding to the next step, you need more than two available reviewer comments, and the total number of accept is greater than the total number of rejected."]); return json(['code' => 1, 'msg' => "Before proceeding to the next step, you need more than two available reviewer comments, and the total number of accept is greater than the total number of rejected."]);
} }
} }
//接收必须查重小于20% //接收必须查重小于25%,2026.5.29更改,获取查重的来源
if ($data['state'] == 6 && $article_info['repetition'] > 25) { if ($data['state'] == 6 && $this->getArticleRepetition($article_info['article_id']) > 25) {
return jsonError("Submissions with a repetition rate greater than thirty percent will not be accepted"); return jsonError("Submissions with a repetition rate greater than thirty percent will not be accepted");
} }
//预接收有时间限定必须大于14天 //预接收有时间限定必须大于14天

View File

@@ -741,6 +741,36 @@ class Base extends Controller
return $list; return $list;
} }
/**
* 获取文章查重百分比
*
* 规则优先取自动查重t_plagiarism_check最新一条已完成state=3的 similarity_score
* 没有自动查重结果时,回落到主表 t_article.repetition。
*
* @param int $article_id
* @return float 查重百分比(如 12.34
*/
public function getArticleRepetition($article_id)
{
$article_id = intval($article_id);
if ($article_id <= 0) {
return 0.0;
}
$auto = Db::name('plagiarism_check')
->where('article_id', $article_id)
->where('state', 3)
->order('check_id desc')
->value('similarity_score');
if ($auto !== null && $auto !== '') {
return floatval($auto);
}
$repetition = $this->article_obj->where('article_id', $article_id)->value('repetition');
return floatval($repetition);
}
/**获取标准化用户库的人 /**获取标准化用户库的人
* @return void * @return void
*/ */

View File

@@ -186,6 +186,10 @@ class Workbench extends Base
$aArticle[$key]['is_draft'] = 1; $aArticle[$key]['is_draft'] = 1;
} }
//查重信息
$aArticle[$key]['repetition'] = $this->getArticleRepetition($value['article_id']);
// //付款信息 // //付款信息
// $iPsId = empty($aOrder[$value['article_id']]) ? 0 : $aOrder[$value['article_id']]; // $iPsId = empty($aOrder[$value['article_id']]) ? 0 : $aOrder[$value['article_id']];
// $aArticle[$key]['pay_time'] = empty($aPaystation[$iPsId]['pay_time']) ? '' : $aPaystation[$iPsId]['pay_time']; // $aArticle[$key]['pay_time'] = empty($aPaystation[$iPsId]['pay_time']) ? '' : $aPaystation[$iPsId]['pay_time'];
@@ -345,6 +349,11 @@ class Workbench extends Base
public function updateArticleState(){ public function updateArticleState(){
//获取参数 //获取参数
$aParam = empty($aParam) ? $this->request->post() : $aParam; $aParam = empty($aParam) ? $this->request->post() : $aParam;
Db::name('article')->where('article_id' ,$aParam['article_id'])->limit(1)->update(['is_user_act' => 2]);
//主键ID //主键ID
$iActId = empty($aParam['act_id']) ? 0 : $aParam['act_id']; $iActId = empty($aParam['act_id']) ? 0 : $aParam['act_id'];
//主键父ID //主键父ID