1
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace app\super\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\Validate;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
@@ -127,6 +128,14 @@ class Publish extends Controller {
|
||||
*/
|
||||
public function getAllDateForJournal() {
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"issn"=>"require",
|
||||
"start"=>"require",
|
||||
"end"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
|
||||
// $data['issn'] = '2703-4631';
|
||||
// $data['start'] = '2021-01-01';
|
||||
@@ -558,6 +567,26 @@ class Publish extends Controller {
|
||||
return $frag;
|
||||
}
|
||||
|
||||
|
||||
public function getGJHByIssn(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"issn"=>"require",
|
||||
"year"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$journal_info = $this->journal_obj->where("issn",$data['issn'])->find();
|
||||
$start = strtotime($data['year']."-01-01");
|
||||
$end = strtotime($data['year']."-12-31 23:59:59");
|
||||
$r = $this->getGJH($journal_info['journal_id'],$start,$end);
|
||||
$re['result'] = $r['list'];
|
||||
|
||||
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
private function getGJH($journal_id, $start, $end) {
|
||||
$stages = $this->journal_stage_obj
|
||||
->where('journal_id', $journal_id)
|
||||
|
||||
Reference in New Issue
Block a user