Merge branch 'master' of https://git.nuttyreading.com/zm/tougao
This commit is contained in:
@@ -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."]);
|
||||
}
|
||||
}
|
||||
//接收必须查重小于20%
|
||||
if ($data['state'] == 6 && $article_info['repetition'] > 25) {
|
||||
//接收必须查重小于25%,2026.5.29更改,获取查重的来源
|
||||
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");
|
||||
}
|
||||
//预接收有时间限定必须大于14天
|
||||
|
||||
@@ -741,6 +741,36 @@ class Base extends Controller
|
||||
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
|
||||
*/
|
||||
|
||||
@@ -186,6 +186,10 @@ class Workbench extends Base
|
||||
$aArticle[$key]['is_draft'] = 1;
|
||||
}
|
||||
|
||||
//查重信息
|
||||
$aArticle[$key]['repetition'] = $this->getArticleRepetition($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'];
|
||||
@@ -345,6 +349,11 @@ class Workbench extends Base
|
||||
public function updateArticleState(){
|
||||
//获取参数
|
||||
$aParam = empty($aParam) ? $this->request->post() : $aParam;
|
||||
|
||||
|
||||
Db::name('article')->where('article_id' ,$aParam['article_id'])->limit(1)->update(['is_user_act' => 2]);
|
||||
|
||||
|
||||
//主键ID
|
||||
$iActId = empty($aParam['act_id']) ? 0 : $aParam['act_id'];
|
||||
//主键父ID
|
||||
|
||||
Reference in New Issue
Block a user