1
This commit is contained in:
@@ -116,7 +116,56 @@ class Production extends Base
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$url = "http://journalapi.tmrjournals.com/public/index.php/master/";
|
||||
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Article/getArticleMainsForSubmission";
|
||||
$pro['article_id'] = $data['article_id'];
|
||||
$res = object_to_array(json_decode(myPost($url,$pro)));
|
||||
$re['mains'] = $res['data']['mains'];
|
||||
$re['article'] = $res['data']['article'];
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
public function addWebMain(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"article_id"=>'require',
|
||||
"pre_id"=>"require",
|
||||
"type"=>"require",
|
||||
"content"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Article/addArticleMainAddForSubmission";
|
||||
$res = object_to_array(json_decode(myPost($url,$data)));
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
public function delWebMain(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"article_main_id"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Article/delArticleMainForSubmission";
|
||||
$res = object_to_array(json_decode(myPost($url,$data)));
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
public function editWebMain(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"article_main_id"=>"require",
|
||||
"type"=>"require",
|
||||
"content"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Article/editArticleMainForSubmission";
|
||||
$res = object_to_array(json_decode(myPost($url,$data)));
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -638,7 +687,6 @@ class Production extends Base
|
||||
if (!$rule->check($data)) {
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
// $data['p_article_id'] = 7;
|
||||
$p_info = $this->production_article_obj->where('p_article_id', $data['p_article_id'])->find();
|
||||
if ($p_info['state'] != 0) {
|
||||
return jsonError("Non repeatable submission");
|
||||
@@ -711,7 +759,9 @@ class Production extends Base
|
||||
|
||||
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||
if ($res['code'] == 0) {
|
||||
$this->production_article_obj->where('p_article_id', $data['p_article_id'])->update(['state' => 2,"w_article_id"=>$res['date']['article_id']]);
|
||||
$r_update['state'] = 2;
|
||||
$r_update['w_article_id'] = isset($res['date']['article_id'])?$res['date']['article_id']:0;
|
||||
$this->production_article_obj->where('p_article_id', $data['p_article_id'])->update($r_update);
|
||||
foreach($report_authors as $v){
|
||||
$iua['user_id'] = $v['user_id'];
|
||||
$iua['w_article_id'] = $res['date']['article_id'];
|
||||
|
||||
Reference in New Issue
Block a user