20201112
This commit is contained in:
@@ -57,9 +57,14 @@ class Super extends Controller{
|
||||
}
|
||||
|
||||
public function getAllArticle(){
|
||||
$data = $this->request->post();
|
||||
$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();
|
||||
$list[$k]['SJ'] = $this->article_obj
|
||||
->where('journal_id',$v['journal_id'])
|
||||
->where('ctime','>',$data['start'])
|
||||
->where('ctime','<=',$data['end'])
|
||||
->count();
|
||||
}
|
||||
return jsonSuccess($list);
|
||||
}
|
||||
@@ -91,7 +96,6 @@ class Super extends Controller{
|
||||
$re['articles'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取录用率
|
||||
@@ -105,6 +109,12 @@ class Super extends Controller{
|
||||
->where('state','in','3,5')
|
||||
->group('state')
|
||||
->select();
|
||||
//获取全部总数
|
||||
$all = $this->article_obj
|
||||
->where('journal_id',$journalId)
|
||||
->where('ctime','>',$start_time)
|
||||
->where('ctime','<',$end_time)
|
||||
->count();
|
||||
$js = 0;
|
||||
$jj = 0;
|
||||
foreach ( $res as $v){
|
||||
@@ -114,7 +124,7 @@ class Super extends Controller{
|
||||
$js = $v['num'];
|
||||
}
|
||||
}
|
||||
return $js+$jj==0?0:$js/($js+$jj);
|
||||
return $all==0?0:$js/$all;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -157,6 +167,8 @@ class Super extends Controller{
|
||||
$res = $this->article_obj
|
||||
->where('journal_id',$journalId)
|
||||
->where('state',5)
|
||||
->where('type','<>','N')
|
||||
->where('type','<>','T')
|
||||
->where('ctime','>',$start_time)
|
||||
->where('ctime','<',$end_time)
|
||||
->select();
|
||||
@@ -173,6 +185,26 @@ class Super extends Controller{
|
||||
return $re;
|
||||
}
|
||||
|
||||
public function mutest(){
|
||||
$start_time = strtotime('2021-01-01');
|
||||
$end_time = strtotime('2021-04-15 23:59:59');
|
||||
$res = $this->getSJ(1, $start_time, $end_time);
|
||||
echo '<pre>';
|
||||
var_dump($res);
|
||||
echo '</pre>';
|
||||
die;
|
||||
}
|
||||
|
||||
public function mmmyyy(){
|
||||
$start = strtotime('2021-01-01');
|
||||
$end = strtotime('2021-04-22 11:30:12');
|
||||
$res = $this->getSJ(8, $start, $end);
|
||||
echo '<pre>';
|
||||
var_dump($res);
|
||||
echo '</pre>';
|
||||
die;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取时间异常
|
||||
*/
|
||||
@@ -191,7 +223,7 @@ class Super extends Controller{
|
||||
->where('ctime','<',$end_time)
|
||||
->where('state',5)
|
||||
->where('rtime','>',0)
|
||||
->where('(rtime-ctime)','<',3600*24*15)
|
||||
->where('(rtime-ctime) <'.(3600*24*15))
|
||||
->count();
|
||||
//文章接收时间大于120天
|
||||
$res['j120'] = $this->article_obj
|
||||
@@ -199,17 +231,23 @@ class Super extends Controller{
|
||||
->where('state',5)
|
||||
->where('ctime','>',$start_time)
|
||||
->where('ctime','<',$end_time)
|
||||
->where('rtime','>',0)
|
||||
->where('(rtime-ctime)','>',3600*24*120)
|
||||
->count();
|
||||
->where('rtime','>',0)
|
||||
->where('(rtime-ctime) > '.(3600*24*120))
|
||||
->count();
|
||||
//with editor时间超过三天(预留)
|
||||
|
||||
$journal_info = $this->journal_obj->where('journal_id',$journalId)->find();
|
||||
$zc_num = $this->article_obj->where('accept_sn','like',$journal_info['abbr'].'%')->where('journal_id','<>',$journalId)->where('ctime','>',$start_time)->where('ctime','<',$end_time)->count();
|
||||
$zr_num = $this->article_obj->where('accept_sn','not like',$journal_info['abbr'].'%')->where('journal_id',$journalId)->where('ctime','>',$start_time)->where('ctime','<',$end_time)->count();
|
||||
//获取全部总数
|
||||
$res['al'] = $this->article_obj
|
||||
$mq_num = $this->article_obj
|
||||
->where('journal_id',$journalId)
|
||||
->where('ctime','>',$start_time)
|
||||
->where('ctime','<',$end_time)
|
||||
->count();
|
||||
$res['mq'] = $mq_num;//文章总数
|
||||
$res['zc'] = $zc_num;//转出文章数
|
||||
$res['zr'] = $zr_num;//转入文章数
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user