20201112
This commit is contained in:
@@ -850,6 +850,7 @@ class Article extends Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 作者发送消息
|
* 作者发送消息
|
||||||
*/
|
*/
|
||||||
@@ -971,7 +972,8 @@ class Article extends Controller {
|
|||||||
$journal_info = $this->journal_obj->where('issn',$data['issn'])->find();
|
$journal_info = $this->journal_obj->where('issn',$data['issn'])->find();
|
||||||
$list = $this->article_obj
|
$list = $this->article_obj
|
||||||
->where('journal_id',$journal_info['journal_id'])
|
->where('journal_id',$journal_info['journal_id'])
|
||||||
->where('ctime','>',$data['ctime'])
|
->where('state','in','0,1,2,4')
|
||||||
|
// ->where('ctime','>',$data['ctime'])
|
||||||
->select();
|
->select();
|
||||||
|
|
||||||
$re['articles'] = $list;
|
$re['articles'] = $list;
|
||||||
|
|||||||
@@ -42,9 +42,23 @@ class Super extends Controller{
|
|||||||
$this->staff_to_journal_obj = Db::name('staff_to_journal');
|
$this->staff_to_journal_obj = Db::name('staff_to_journal');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function index() {
|
public function main() {
|
||||||
$res = $this->getLYL(1);
|
$list = $this->journal_obj->where('state',0)->select();
|
||||||
echo ($res*100).'%';
|
foreach ($list as $k => $v){
|
||||||
|
$list[$k]['LYL'] = $this->getLYL($v['journal_id']);
|
||||||
|
$list[$k]['CC'] = $this->getCC($v['journal_id']);
|
||||||
|
$list[$k]['WS'] = $this->getWS($v['journal_id']);
|
||||||
|
$list[$k]['SJ'] = $this->getSJ($v['journal_id']);
|
||||||
|
}
|
||||||
|
return jsonSuccess($list);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAllArticle(){
|
||||||
|
$list = $this->journal_obj->where('state',0)->select();
|
||||||
|
foreach ($list as $k => $v){
|
||||||
|
$list[$k]['SJ'] = $this->article_obj->where('journal_id',$v['journal_id'])->count();
|
||||||
|
}
|
||||||
|
return jsonSuccess($list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -53,6 +67,8 @@ class Super extends Controller{
|
|||||||
*/
|
*/
|
||||||
private function getLYL($journalId){
|
private function getLYL($journalId){
|
||||||
$res = $this->article_obj->field('state,count(state) as num')->where('journal_id',$journalId)->where('state','in','3,5')->group('state')->select();
|
$res = $this->article_obj->field('state,count(state) as num')->where('journal_id',$journalId)->where('state','in','3,5')->group('state')->select();
|
||||||
|
$js = 0;
|
||||||
|
$jj = 0;
|
||||||
foreach ( $res as $v){
|
foreach ( $res as $v){
|
||||||
if($v['state']==3){
|
if($v['state']==3){
|
||||||
$jj = $v['num'];
|
$jj = $v['num'];
|
||||||
@@ -69,18 +85,22 @@ class Super extends Controller{
|
|||||||
private function getCC($journalId){
|
private function getCC($journalId){
|
||||||
$res = $this->article_obj->where('journal_id',$journalId)->where('state',5)->select();
|
$res = $this->article_obj->where('journal_id',$journalId)->where('state',5)->select();
|
||||||
$low = 0;
|
$low = 0;
|
||||||
|
$low1 = 0;
|
||||||
$mid = 0;
|
$mid = 0;
|
||||||
$high = 0;
|
$high = 0;
|
||||||
foreach ($res as $v){
|
foreach ($res as $v){
|
||||||
if($v['repetition']<20){
|
if($v['repetition']<20){
|
||||||
$low++;
|
$low++;
|
||||||
}elseif($v['repetition']>=20 && $v['repetition']<50){
|
}elseif($v['repetition']>=20 && $v['repetition']<30){
|
||||||
|
$low1++;
|
||||||
|
}elseif($v['repetition']>=30 && $v['repetition']<50){
|
||||||
$mid++;
|
$mid++;
|
||||||
}else{
|
}else{
|
||||||
$high++;
|
$high++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$re['low'] = $low;
|
$re['low'] = $low;
|
||||||
|
$re['low1'] = $low1;
|
||||||
$re['mid'] = $mid;
|
$re['mid'] = $mid;
|
||||||
$re['high'] = $high;
|
$re['high'] = $high;
|
||||||
|
|
||||||
@@ -109,20 +129,17 @@ class Super extends Controller{
|
|||||||
* 获取时间异常
|
* 获取时间异常
|
||||||
*/
|
*/
|
||||||
private function getSJ($journalId){
|
private function getSJ($journalId){
|
||||||
$res = $this->article_obj->where('journal_id',$journalId)->where('state',5)->select();
|
//文章提交至接收超过48小时
|
||||||
foreach ($res as $v){
|
$res['t48'] = $this->article_obj->where('journal_id',$journalId)->where('state',0)->count();
|
||||||
//文章提交至接收超过48小时
|
//文章接受时间小于15天
|
||||||
$t48 = $this->article_obj->where('journal_id',$v['journal_id'])->where('state',0)->count();
|
$res['j15'] = $this->article_obj->where('journal_id',$journalId)->where('state',5)->where('rtime','>',0)->where('(rtime-ctime)','<',3600*24*15)->count();
|
||||||
//文章接受时间小于15天
|
//文章接收时间大于120天
|
||||||
|
$res['j120'] = $this->article_obj->where('journal_id',$journalId)->where('state',5)->where('rtime','>',0)->where('(rtime-ctime)','>',3600*24*120)->count();
|
||||||
//文章接收时间大于120天
|
//with editor时间超过三天(预留)
|
||||||
|
|
||||||
//with editor时间超过三天(预留)
|
//获取全部总数
|
||||||
|
$res['al'] = $this->article_obj->where('journal_id',$journalId)->count();
|
||||||
$cache_list = $this->article_obj->where('journal_id',$v['journal_id'])->where('state',5)->select();
|
return $res;
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,6 +121,21 @@ class User extends Controller {
|
|||||||
sendEmail($email, 'Dear ' . $data['name'], 'TMR', $tt,);
|
sendEmail($email, 'Dear ' . $data['name'], 'TMR', $tt,);
|
||||||
return json($inser_data);
|
return json($inser_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public function tttt(){
|
||||||
|
// echo 'dsss';
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public function mytestemail(){
|
||||||
|
// $journal_info = $this->journal_obj->where('journal_id',22)->find();
|
||||||
|
// //发送注册成功邮件
|
||||||
|
// $tt = 'Hello,<br><br>';
|
||||||
|
// $res = sendEmail('751475802@qq.com', 'Dear ' . $journal_info['title'], 'TMR', $tt,$journal_info['email'],$journal_info['epassword']);
|
||||||
|
// echo '<pre>';
|
||||||
|
// var_dump($res);
|
||||||
|
// echo '</pre>';
|
||||||
|
// die;
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取验证码图片(用户注册)
|
* 获取验证码图片(用户注册)
|
||||||
|
|||||||
Reference in New Issue
Block a user