1
This commit is contained in:
@@ -78,16 +78,28 @@ class Preaccept extends Base
|
|||||||
}
|
}
|
||||||
$p_info = $this->production_article_obj->where('article_id',$data['article_id'])->where('state',0)->find();
|
$p_info = $this->production_article_obj->where('article_id',$data['article_id'])->where('state',0)->find();
|
||||||
$pre_refer = $this->production_article_refer_obj->where('p_refer_id',$data['pre_p_refer_id'])->find();
|
$pre_refer = $this->production_article_refer_obj->where('p_refer_id',$data['pre_p_refer_id'])->find();
|
||||||
$this->production_article_refer_obj->where('p_article_id',$p_info['p_article_id'])->where("index",">",$pre_refer['index'])->where('state',0)->setInc('index');
|
|
||||||
$insert['p_article_id'] = $p_info['p_article_id'];
|
$insert['p_article_id'] = $p_info['p_article_id'];
|
||||||
$insert['refer_doi'] = $data['doi'];
|
$insert['refer_doi'] = $data['doi'];
|
||||||
$insert['index'] = $pre_refer['index']+1;
|
$insert['index'] = $pre_refer['index']+1;
|
||||||
$insert['ctime'] = time();
|
$insert['ctime'] = time();
|
||||||
$adId = $this->production_article_refer_obj->insertGetId($insert);
|
$adId = $this->production_article_refer_obj->insertGetId($insert);
|
||||||
my_doiToFrag2($this->production_article_refer_obj->where('p_refer_id',$adId)->find());
|
my_doiToFrag2($this->production_article_refer_obj->where('p_refer_id',$adId)->find());
|
||||||
return jsonSuccess([]);
|
//判断是否合法
|
||||||
|
$check = $this->production_article_refer_obj->where('p_refer_id',$adId)->find();
|
||||||
|
if($check['author']){//合法
|
||||||
|
$this->production_article_refer_obj->where('p_article_id',$p_info['p_article_id'])->where("p_refer_id","<>",$adId)->where("index",">",$pre_refer['index'])->where('state',0)->setInc('index');
|
||||||
|
return jsonSuccess([]);
|
||||||
|
}else{//非法
|
||||||
|
$this->production_article_refer_obj->where('p_refer_id',$adId)->update(['state'=>1]);
|
||||||
|
return jsonError("Doi error");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public function aaa(){
|
||||||
|
// $list = $this->production_article_refer_obj->where('p_article_id',423)->where('state',0)->where('index',">",0)->setInc('index');
|
||||||
|
// dump($list);
|
||||||
|
// }
|
||||||
|
|
||||||
/**删除refer
|
/**删除refer
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
* @throws \think\Exception
|
* @throws \think\Exception
|
||||||
@@ -105,7 +117,7 @@ class Preaccept extends Base
|
|||||||
return jsonError($rule->getError());
|
return jsonError($rule->getError());
|
||||||
}
|
}
|
||||||
$refer_info = $this->production_article_refer_obj->where('p_refer_id',$data['p_refer_id'])->find();
|
$refer_info = $this->production_article_refer_obj->where('p_refer_id',$data['p_refer_id'])->find();
|
||||||
$this->production_article_refer_obj->where('p_refer_id',$data['p_refer_id'])->where('index',">",$refer_info['index'])->setDec('index');
|
$this->production_article_refer_obj->where('p_article_id',$refer_info['p_article_id'])->where('index',">",$refer_info['index'])->where('state',0)->setDec('index');
|
||||||
$this->production_article_refer_obj->where('p_refer_id',$data['p_refer_id'])->update(['state'=>1]);
|
$this->production_article_refer_obj->where('p_refer_id',$data['p_refer_id'])->update(['state'=>1]);
|
||||||
return jsonSuccess([]);
|
return jsonSuccess([]);
|
||||||
}
|
}
|
||||||
@@ -150,14 +162,14 @@ class Preaccept extends Base
|
|||||||
}
|
}
|
||||||
$refer_info = $this->production_article_refer_obj->where('p_refer_id',$data['p_refer_id'])->find();
|
$refer_info = $this->production_article_refer_obj->where('p_refer_id',$data['p_refer_id'])->find();
|
||||||
if($data['act']=="up"){
|
if($data['act']=="up"){
|
||||||
$up_info = $this->production_article_refer_obj->where('p_article_id',$refer_info['p_article_id'])->where('index',$refer_info['index']-1)->find();
|
$up_info = $this->production_article_refer_obj->where('p_article_id',$refer_info['p_article_id'])->where('index',$refer_info['index']-1)->where('state',0)->find();
|
||||||
if(!$up_info){
|
if(!$up_info){
|
||||||
return jsonError("system error");
|
return jsonError("system error");
|
||||||
}
|
}
|
||||||
$this->production_article_refer_obj->where('p_refer_id',$up_info['p_refer_id'])->setInc("index");
|
$this->production_article_refer_obj->where('p_refer_id',$up_info['p_refer_id'])->setInc("index");
|
||||||
$this->production_article_refer_obj->where('p_refer_id',$refer_info['p_refer_id'])->setDec("index");
|
$this->production_article_refer_obj->where('p_refer_id',$refer_info['p_refer_id'])->setDec("index");
|
||||||
}else{
|
}else{
|
||||||
$down_info = $this->production_article_refer_obj->where('p_article_id',$refer_info['p_article_id'])->where('index',$refer_info['index']+1)->find();
|
$down_info = $this->production_article_refer_obj->where('p_article_id',$refer_info['p_article_id'])->where('index',$refer_info['index']+1)->where('state',0)->find();
|
||||||
if(!$down_info){
|
if(!$down_info){
|
||||||
return jsonError("system error");
|
return jsonError("system error");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,13 +51,13 @@ class Production extends Base
|
|||||||
if (count($files) == 0) {
|
if (count($files) == 0) {
|
||||||
return jsonError('No Manuscript');
|
return jsonError('No Manuscript');
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = "http://ts.tmrjournals.com/api/typeset/webReaddoc";
|
$url = "http://ts.tmrjournals.com/api/typeset/webReaddoc";
|
||||||
$program['fileRoute'] = "https://submission.tmrjournals.com/public/" . $files[0]['file_url'];
|
$program['fileRoute'] = "https://submission.tmrjournals.com/public/" . $files[0]['file_url'];
|
||||||
$res = object_to_array(json_decode(myPost($url, $program)));
|
$res = object_to_array(json_decode(myPost($url, $program)));
|
||||||
|
|
||||||
// return jsonSuccess($program);
|
|
||||||
$file_runs = $res['data'];
|
$file_runs = $res['data'];
|
||||||
|
|
||||||
|
// return jsonSuccess($file_runs);
|
||||||
//整理信息
|
//整理信息
|
||||||
$frag = [];
|
$frag = [];
|
||||||
$aa = [];
|
$aa = [];
|
||||||
@@ -86,6 +86,8 @@ class Production extends Base
|
|||||||
}
|
}
|
||||||
$frag['main'][] = $v;
|
$frag['main'][] = $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(!isset($frag['main'])){
|
if(!isset($frag['main'])){
|
||||||
return jsonError("manuscript file error!");
|
return jsonError("manuscript file error!");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,19 +139,18 @@ class User extends Base
|
|||||||
$this->user_to_yboard_obj->insert($insert);
|
$this->user_to_yboard_obj->insert($insert);
|
||||||
|
|
||||||
//发送通知邮件给用户
|
//发送通知邮件给用户
|
||||||
// $report_tt = "Dear " . $inser_data['realname'] . ',<br/><br/>';
|
$tt = 'Dear Dr. ' . ($user_info['realname'] == '' ? $user_info['account'] : $user_info['realname']) . ',<br><br>';
|
||||||
// $report_tt .= "We are delighted to welcome you as a new author for our journal, " . $journal_info['title'] . ". We have received your submission and are excited to review it for potential publication.<br/><br/>";
|
$tt .= "Thanks for your support to the journal ".$journal_info['title'].", Please note that your account of ".$journal_info['title']." has been created. The login credentials in the system is as below:<br><br>";
|
||||||
// $report_tt .= "As a next step, we have created an account for you on our journal's website. Your account is [Username: " . trim($v['email']) . " password:$password]";
|
$tt .= "Your username: ".$user_info['account']."<br/>";
|
||||||
// $report_tt .= "and you can access your account by visiting " . $journal_info['website'] . " and logging in.<br/><br/>";
|
$tt .= "Your original password:123456qwe, if you want to reset or forget the password, please click the <a href='https://submission.tmrjournals.com/retrieve'>Forgot password</a><br/><br/>";
|
||||||
// $report_tt .= "If you have any questions or need assistance with accessing your account, please don't hesitate to contact us. We are here to support you throughout the submission and review process.<br/><br/>";
|
$tt .= "If you have any questions or concerns, please do not hesitate to contact us.<br/><br/>";
|
||||||
// $report_tt .= "Thank you for choosing to submit your work to our journal. We look forward to working with you.<br/><br/>";
|
$tt .= "Sincerely,<br/>Editorial Office<br/>Subscribe to this journal ".$journal_info['title']."<br/>Email: ".$journal_info['email']."<br/>Website: ".$journal_info['website'];
|
||||||
// $report_tt .= "Best regards,<br>" . $journal_info['title'];
|
$maidata['email'] = $user_info['email'];
|
||||||
// $maidata['email'] = trim($v['email']);
|
$maidata['title'] = "Your Young Scientist Board Account of ".$journal_info['title']." has been Created";
|
||||||
// $maidata['title'] = $journal_info['title'];
|
$maidata['content'] = $tt;
|
||||||
// $maidata['content'] = $report_tt;
|
$maidata['tmail'] = $journal_info['email'];
|
||||||
// $maidata['tmail'] = $journal_info['email'];
|
$maidata['tpassword'] = $journal_info['epassword'];
|
||||||
// $maidata['tpassword'] = $journal_info['epassword'];
|
Queue::push('app\api\job\mail@fire', $maidata, "tmail");
|
||||||
// Queue::push('app\api\job\mail@fire', $maidata, "tmail");
|
|
||||||
|
|
||||||
return jsonSuccess([]);
|
return jsonSuccess([]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -494,7 +494,7 @@ function my_doiToFrag2($data)
|
|||||||
}
|
}
|
||||||
$update['is_ja'] = $joura == trim($bj[0]) ? 0 : 1;
|
$update['is_ja'] = $joura == trim($bj[0]) ? 0 : 1;
|
||||||
$update['dateno'] = str_replace(' ', '', str_replace('-', '–', trim($bj[1])));
|
$update['dateno'] = str_replace(' ', '', str_replace('-', '–', trim($bj[1])));
|
||||||
$update['doilink'] = "http://doi.org/" . $data['refer_doi'];
|
$update['doilink'] = strpos($data['refer_doi'],"http")===false?"http://doi.org/" . $data['refer_doi']:$data['refer_doi'];
|
||||||
$update['cs'] = 1;
|
$update['cs'] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user