1013 lines
45 KiB
PHP
1013 lines
45 KiB
PHP
<?php
|
||
|
||
namespace app\api\controller;
|
||
|
||
use think\Controller;
|
||
use think\Db;
|
||
use think\Env;
|
||
use think\Queue;
|
||
use think\Validate;
|
||
use app\api\controller\Article as articlecontroller;
|
||
|
||
class Special extends Controller
|
||
{
|
||
protected $ts_base_url = "http://ts.tmrjournals.com/";
|
||
protected $user_obj = '';
|
||
protected $captcha_obj = '';
|
||
protected $user_act_obj = '';
|
||
protected $admin_obj = '';
|
||
protected $article_obj = '';
|
||
protected $user_reviewer_obj = '';
|
||
protected $journal_obj = '';
|
||
protected $country_obj = '';
|
||
protected $article_author_obj = '';
|
||
protected $reviewer_major_obj = '';
|
||
protected $reviewer_to_journal_obj = '';
|
||
protected $user_reviewer_info_obj = '';
|
||
protected $user_msg_obj = '';
|
||
protected $article_file_obj = '';
|
||
protected $article_msg_obj = '';
|
||
protected $user_log_obj = '';
|
||
protected $major_obj = "";
|
||
protected $major_to_journal_obj = '';
|
||
protected $user_black_obj = '';
|
||
protected $user_to_special_obj = '';
|
||
protected $chief_to_journal_obj = '';
|
||
protected $article_reviewer_obj = '';
|
||
protected $user_reviewer_recommend_obj = '';
|
||
protected $company_top_obj = '';
|
||
|
||
public function __construct(\think\Request $request = null)
|
||
{
|
||
parent::__construct($request);
|
||
$this->user_obj = Db::name('user');
|
||
$this->captcha_obj = Db::name('captcha');
|
||
$this->user_act_obj = Db::name('user_act');
|
||
$this->admin_obj = Db::name('admin');
|
||
$this->article_obj = Db::name('article');
|
||
$this->user_reviewer_obj = Db::name('user_reviewer_apply');
|
||
$this->journal_obj = Db::name('journal');
|
||
$this->reviewer_major_obj = Db::name('reviewer_major');
|
||
$this->reviewer_to_journal_obj = Db::name('reviewer_to_journal');
|
||
$this->user_reviewer_info_obj = Db::name('user_reviewer_info');
|
||
$this->user_msg_obj = Db::name('user_msg');
|
||
$this->country_obj = Db::name('country');
|
||
$this->article_author_obj = Db::name('article_author');
|
||
$this->article_file_obj = Db::name('article_file');
|
||
$this->article_msg_obj = Db::name('article_msg');
|
||
$this->user_log_obj = Db::name('user_log');
|
||
$this->major_obj = Db::name("major");
|
||
$this->major_to_journal_obj = Db::name('major_to_journal');
|
||
$this->user_black_obj = Db::name('user_black');
|
||
$this->user_to_special_obj = Db::name('user_to_special');
|
||
$this->chief_to_journal_obj = Db::name('chief_to_journal');
|
||
$this->article_reviewer_obj = Db::name('article_reviewer');
|
||
$this->user_reviewer_recommend_obj = Db::name('user_reviewer_recommend');
|
||
$this->company_top_obj = Db::name('company_top');
|
||
}
|
||
|
||
/**
|
||
* 注册功能
|
||
*/
|
||
public function register()
|
||
{
|
||
$data = $this->request->post();
|
||
|
||
//检测是否用户名和密码已经占用
|
||
$account = $data['username'];
|
||
$email = $data['email'];
|
||
$res_once = $this->user_obj->where("account='$account' or email = '$email'")->find();
|
||
if ($res_once != null) {
|
||
return json('existence');
|
||
}
|
||
//验证验证码
|
||
// if (!$this->my_checkcaptcha($data['code'], $data['random_num'])) {
|
||
// return json('errcaptcha');
|
||
// }
|
||
//存入数据
|
||
$inser_data['account'] = trim($account);
|
||
$inser_data['password'] = md5($data['password']);
|
||
$inser_data['email'] = $email;
|
||
$inser_data['phone'] = $data['phone'];
|
||
$inser_data['realname'] = $data['realname'];
|
||
$inser_data['ctime'] = time();
|
||
$id = $this->user_obj->insertGetId($inser_data);
|
||
//发送注册成功邮件
|
||
$tt = "Dear author,You have successfully registered<br><br>";
|
||
$content = $tt . '<p>Username:' . $account . '<br>Password:' . $data['password'] . '</p>';
|
||
|
||
$sendUser = [
|
||
'title' => 'Dear ' . $data['realname'], // 邮件标题
|
||
'content' => $content, //邮件内容
|
||
'user_id' => $id, //收件人ID
|
||
'email' => $email, // 收件人邮箱
|
||
'journal_id' => 0, // 期刊ID
|
||
'sendEmail' => Env::get('email.send_email'), // 期刊邮箱
|
||
'sendPassword' => Env::get('email.send_email_password'), // 期刊密码
|
||
'from_name' => 'TMR'
|
||
];
|
||
// Queue::push('app\api\job\domail@fire',$sendUser,'domail');
|
||
sendEmail($email, 'Dear ' . $data['realname'], 'TMR', $content);
|
||
return json($inser_data);
|
||
}
|
||
|
||
/**
|
||
* 登录功能
|
||
* @return type
|
||
*/
|
||
public function checkLogin()
|
||
{
|
||
$data = $this->request->post();
|
||
//判断是否管理员登录
|
||
if ($data['username'] == 'superadmin' || $data['username'] == 'wuxiongzhi2') {
|
||
$where_admin['account'] = $data['username'];
|
||
$where_admin['password'] = md5($data['password']);
|
||
$admin_info = $this->admin_obj->where($where_admin)->find();
|
||
if ($admin_info == null) {
|
||
return json(['code' => 1]);
|
||
} else {
|
||
$up_admin['last_login_time'] = time();
|
||
$up_admin['last_login_ip'] = $this->request->ip();
|
||
$this->admin_obj->where('admin_id = ' . $admin_info['admin_id'])->update($up_admin);
|
||
return json(['code' => 0, 'userinfo' => $admin_info]);
|
||
}
|
||
} else { //用户登录
|
||
// $where['account'] = $data['username'];
|
||
// $where['password'] = md5($data['password']);
|
||
$user_info = $this->user_obj->where('account|email', trim($data['username']))->where('password', md5($data['password']))->find();
|
||
if ($user_info == null) { //登陆失败
|
||
return json(['code' => 1]);
|
||
}
|
||
//黑名单验证
|
||
$blackCheck = $this->user_black_obj->where('user_id', $user_info['user_id'])->where('black_state', 0)->find();
|
||
if ($blackCheck) {
|
||
return jsonError("Your account has been blocked. Please contact the publisher for details: publisher@tmrjournals.com.");
|
||
}
|
||
$up_data['last_login_time'] = time();
|
||
$up_data['last_login_ip'] = $this->request->ip();
|
||
$this->user_obj->where('user_id = ' . $user_info['user_id'])->update($up_data);
|
||
return json(['code' => 0, 'userinfo' => $user_info]);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* 获取文章
|
||
*/
|
||
public function getArticles()
|
||
{
|
||
$data = $this->request->post();
|
||
$list = $this->article_obj
|
||
->where('special_num', $data['special_id'])
|
||
->where('user_id', $data['user_id'])
|
||
->where('state', 0)->select();
|
||
|
||
$re['articles'] = $list;
|
||
return json(['code' => 0, 'data' => ['articles' => $re]]);
|
||
}
|
||
|
||
/**
|
||
* 获取期刊的专刊列表
|
||
*/
|
||
public function getSpecialByIssn()
|
||
{
|
||
$data = $this->request->post();
|
||
$rule = new Validate([
|
||
'journal_issn' => 'require'
|
||
]);
|
||
if (!$rule->check($data)) {
|
||
return jsonError($rule->getError());
|
||
}
|
||
$base_url = Env::get('journal.base_url');
|
||
$res = object_to_array(json_decode(myPost($base_url . "/master/Special/getSpecialByIssn", ['journal_issn' => $data['journal_issn']])));
|
||
$specials = $res['data']['specials'];
|
||
foreach ($specials as $k => $v) {
|
||
unset($specials[$k]['journal_id']);
|
||
}
|
||
$re['specials'] = $specials;
|
||
return jsonSuccess($re);
|
||
}
|
||
|
||
|
||
/**
|
||
* 获取客座
|
||
*/
|
||
public function getSpecial(){
|
||
$data = $this->request->post();
|
||
$rule = new Validate([
|
||
'journal_id' => 'require'
|
||
]);
|
||
if (!$rule->check($data)) {
|
||
return jsonError($rule->getError());
|
||
}
|
||
$journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
|
||
$base_url = Env::get('journal.base_url');
|
||
$res = object_to_array(json_decode(myPost($base_url . "/master/Special/getSpecialByIssn", ['journal_issn' => $journal_info['issn']])));
|
||
$specials = isset($res['data']['specials'])?$res['data']['specials']:[];
|
||
foreach ($specials as $k => $v) {
|
||
unset($specials[$k]['journal_id']);
|
||
}
|
||
$re['specials'] = $specials;
|
||
return jsonSuccess($re);
|
||
}
|
||
|
||
/**
|
||
* 更改文章客座
|
||
*/
|
||
public function editArticleSpecial(){
|
||
$data = $this->request->post();
|
||
$rule = new Validate([
|
||
'article_id' => 'require',
|
||
'special_num' => 'require',
|
||
'special_title' =>'require'
|
||
]);
|
||
if (!$rule->check($data)) {
|
||
return jsonError($rule->getError());
|
||
}
|
||
$article_info = $this->article_obj->where('article_id',$data['article_id'])->find();
|
||
if($article_info['special_num']>0){
|
||
return jsonError('Failed! The attached special issue exists.');
|
||
}
|
||
$updata['special_num'] = $data['special_num'];
|
||
$updata['special_title'] = $data['special_title'];
|
||
$this->article_obj->where('article_id',$data['article_id'])->update($updata);
|
||
return jsonSuccess([]);
|
||
}
|
||
|
||
/**
|
||
* 获取客座审稿人文章列表
|
||
*/
|
||
public function getSpecialArticles()
|
||
{
|
||
$data = $this->request->post();
|
||
$rule = new Validate([
|
||
'user_id' => 'require',
|
||
'pageIndex' => 'require',
|
||
'pageSize' => 'require',
|
||
'special_id' => 'require',
|
||
'state' => 'require'
|
||
]);
|
||
if (!$rule->check($data)) {
|
||
return jsonError($rule->getError());
|
||
}
|
||
//构造查询条件
|
||
$specialIds = $this->user_to_special_obj->where('user_id', $data['user_id'])->where('uts_state', 0)->column('special_id');
|
||
$where['t_article.special_num'] = ['in', $specialIds];
|
||
if ($data['special_id'] != 0) {
|
||
$where['special_num'] = $data['special_id'];
|
||
}
|
||
if ($data['state'] > -1) {
|
||
$where['t_article.state'] = $data['state'];
|
||
}
|
||
if (isset($data['titleKey']) && $data['titleKey'] != '') {
|
||
$where['t_article.title'] = ['like', '%' . trim($data['titleKey']) . '%'];
|
||
}
|
||
if (isset($data['sn']) && $data['sn'] != '') {
|
||
$where['t_article.accept_sn'] = $data['sn'];
|
||
}
|
||
|
||
|
||
//分页查询数据
|
||
$limit_start = ($data['pageIndex'] - 1) * $data['pageSize'];
|
||
$res = $this->article_obj
|
||
->field('t_article.*,t_journal.title journalname,t_user.email,t_user.realname,t_user.phone')
|
||
->join('t_journal', 't_journal.journal_id = t_article.journal_id', 'LEFT')
|
||
->join('t_user', "t_user.user_id = t_article.user_id", 'left')
|
||
->where($where)
|
||
->order('article_id desc')
|
||
->limit($limit_start, $data['pageSize'])->select();
|
||
|
||
//添加国家信息
|
||
foreach ($res as $k => $v) {
|
||
$cache_author_list = $this->article_author_obj->where('article_id', $v['article_id'])->select();
|
||
$cache_country = [];
|
||
foreach ($cache_author_list as $key => $val) {
|
||
if ($val['country'] != '' && !in_array($val['country'], $cache_country)) {
|
||
$cache_country[] = $val['country'];
|
||
}
|
||
}
|
||
$res[$k]['countrys'] = $cache_country;
|
||
}
|
||
|
||
$count = $this->article_obj->where($where)->count();
|
||
|
||
$re['articles'] = $res;
|
||
$re['count'] = $count;
|
||
return jsonSuccess($re);
|
||
}
|
||
|
||
|
||
/**
|
||
* 更改文章状态客座编辑
|
||
*/
|
||
public function editArticle()
|
||
{
|
||
$data = $this->request->post();
|
||
$rule = new Validate([
|
||
'editname' => 'require',
|
||
'articleId' => 'require',
|
||
'state' => 'require'
|
||
]);
|
||
if (!$rule->check($data)) {
|
||
return jsonError($rule->getError());
|
||
}
|
||
|
||
$editor_info = $this->user_obj->where('account', $data['editname'])->find();
|
||
$article_info = $this->article_obj->where('article_id', $data['articleId'])->find();
|
||
$journal_info = $this->journal_obj->where('journal_id', $article_info['journal_id'])->find();
|
||
$user_info = $this->user_obj->where(['user_id' => $article_info['user_id']])->find();
|
||
|
||
//添加文章状态信息(如果状态未更新可做通话用,并结束操作)
|
||
$insert_data['article_id'] = $data['articleId'];
|
||
$insert_data['content'] = '';
|
||
$insert_data['state_from'] = $article_info['state'];
|
||
$insert_data['state_to'] = $data['state'];
|
||
$insert_data['ctime'] = time();
|
||
$this->article_msg_obj->insert($insert_data);
|
||
|
||
|
||
$update_data['state'] = $data['state'];
|
||
$update_data['editor_act'] = 1;
|
||
//更新文章状态
|
||
if ($data['state'] == 4) {
|
||
$update_data['ttime'] = time();
|
||
}
|
||
if ($data['state'] == 3) {
|
||
$update_data['rstime'] = time();
|
||
}
|
||
$this->article_obj->where('article_id', $data['articleId'])->update($update_data);
|
||
|
||
//拒稿或者录用 - 发送审稿意见
|
||
$articlecontroller = new articlecontroller();
|
||
if ($article_info['journal_id'] == 1 && ($data['state'] == 3 || $data['state'] == 5)) {
|
||
$articlecontroller->sendEmailToReviewer($data['articleId'], $data['state']);
|
||
}
|
||
|
||
//发送文章状态更改邮件
|
||
if ($data['state'] == 3) { //拒稿
|
||
$tt = '"' . $article_info['title'] . '"<br>';
|
||
$tt .= $article_info['accept_sn'] . '<br>';
|
||
$tt .= 'journal:' . $journal_info['title'] . '<br>';
|
||
$tt .= 'Dear Dr. ' . ($user_info['realname'] == '' ? $user_info['account'] : $user_info['realname']) . ',<br>';
|
||
$tt .= 'Thank you for submitting your paper to ' . $journal_info['title'] . '. Your manuscript has undergone review.<br>';
|
||
$tt .= 'Unfortunately the editors feel that ' . $journal_info['title'] . ' is not the appropriate venue for your manuscript,'
|
||
. ' and we are returning your manuscript to you so that you can submit it to another journal without delay. '
|
||
. '<br><br>Yours sincerely,<br><br>';
|
||
$tt .= 'Sincerely,<br>Editorial Office<br>';
|
||
} else if ($data['state'] == 5) { //录用
|
||
//录用后更新录用时间
|
||
$this->article_obj->where('article_id', $article_info['article_id'])->update(['rtime' => time()]);
|
||
|
||
$tt = 'Manuscript ID: ' . $article_info['accept_sn'] . '<br>';
|
||
$tt .= 'Manuscript Title: ' . $article_info['title'] . '<br>';
|
||
$tt .= 'Authors’ Name: ' . $articlecontroller->getArticleAuthors($article_info['article_id']) . '<br><br>';
|
||
$tt .= 'Dear Dr. ' . ($user_info['realname'] == '' ? $user_info['account'] : $user_info['realname']) . ',<br>It is a distinct pleasure to inform you that your manuscript has been accepted for publication in ' . $journal_info['title'] . ' (ISSN ' . $journal_info['issn'] . ').<br> The editor will contact you further by email soon.<br><br><br>';
|
||
$tt .= 'Sincerely,<br>Editorial Office<br>';
|
||
} else if ($data['state'] == 4) { //退修
|
||
$tt = $article_info['accept_sn'] . '<br>';
|
||
$tt .= 'Dear Dr. ' . ($user_info['realname'] == '' ? $user_info['account'] : $user_info['realname']) . ',<br>';
|
||
$tt .= 'Thank you for submitting the manuscript to ' . $journal_info['title'] . '. <br>';
|
||
$tt .= 'Please find the new comments in the "<a href="http://submission.tmrjournals.com/submission?journal=' . $journal_info['alias'] . '">Author Center</a>", Please submit your revised manuscript within two weeks.<br><br>';
|
||
$tt .= 'If you need more time to revise, you can send E-mial to tell us.<br>';
|
||
$tt .= 'Sincerely,<br>Editorial Office<br>';
|
||
} else if ($data['state'] == 6) { //终审
|
||
$tt = 'Dear Dr. ' . ($user_info['realname'] == '' ? $user_info['account'] : $user_info['realname']) . ',<br>';
|
||
$tt .= 'Manuscript status: Your manuscript "' . $article_info['title'] . '" is under reviewing by editorial member team of ' . $journal_info['title'] . '.';
|
||
} else {
|
||
$tt = '"' . $article_info['title'] . '"<br>';
|
||
$tt .= $article_info['accept_sn'] . '<br>';
|
||
$tt .= 'journal:' . $journal_info['title'] . '<br><br>';
|
||
$tt .= 'Dear Dr. ' . ($user_info['realname'] == '' ? $user_info['account'] : $user_info['realname']) . ',<br>Please check the new status of your manuscript online.<br><br>';
|
||
}
|
||
$tt .= $journal_info['title'] . '<br>';
|
||
$tt .= '<a href="https://www.tmrjournals.com/draw_up.html?issn=' . $journal_info['issn'] . '">Subscribe to this journal</a><br>';
|
||
$tt .= 'Email: ' . $journal_info['email'] . '<br>';
|
||
$tt .= 'Website: ' . $journal_info['website'];
|
||
if ($data['state'] != 5 || $journal_info['journal_id'] != 9) {
|
||
$sendUser['content'] = $tt;
|
||
// sendEmail($user_info['email'], $journal_info['title'], $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
|
||
}
|
||
if ($data['state'] == 6) { //进入终审,通知主编邮件
|
||
$chiefs = $this->chief_to_journal_obj->join('t_user', 't_user.user_id = t_chief_to_journal.user_id', 'left')->where('t_chief_to_journal.journal_id', $journal_info['journal_id'])->where('t_chief_to_journal.state', 0)->select();
|
||
foreach ($chiefs as $v) {
|
||
$tts = 'Dear Dr. ' . ($v['realname'] == '' ? $v['account'] : $v['realname']) . ',<br><br>';
|
||
$tts .= 'The manuscript entitled “' . $article_info['title'] . '” has been peer-reviewed, revised and about to be published in ' . $journal_info['title'] . '.<br><br>';
|
||
$tts .= 'If you want to review this article, you could use it Submission System (<a href="https://submission.tmrjournals.com">Plese click here</a>).<br>';
|
||
$tts .= 'Your username: ' . $v['account'] . '<br>';
|
||
$tts .= 'Password: 123456qwe (Original password)<br><br>';
|
||
$tts .= 'If you are unable to review it now, you may provide your comments at a later time at your convenience. Then ,there is no need to reply to this email.<br><br>';
|
||
$tts .= 'Any comments you make will be valued by the editorial board. Please bring into our knowledge if there is any potential Conflict of Interest.<br><br><br><br>';
|
||
$tts .= 'Sincerely,<br>Editorial Office<br>' . $journal_info['title'] . '<br>';
|
||
$tts .= 'Email: ' . $journal_info['email'] . '<br>';
|
||
$tts .= 'Website:<a href="' . $journal_info['website'] . '">' . $journal_info['website'] . '</a>';
|
||
$sendUser['user_id'] = $v['user_id'];
|
||
$sendUser['email'] = $v['email'];
|
||
$sendUser['content'] = $tts;
|
||
// sendEmail($v['email'], $journal_info['title'], $journal_info['title'], $tts, $journal_info['email'], $journal_info['epassword']);
|
||
}
|
||
}
|
||
|
||
//增加用户操作log
|
||
$log_data['user_id'] = $editor_info['user_id'];
|
||
$log_data['type'] = 1;
|
||
$log_data['content'] = $editor_info['account'] . "(" . $editor_info['realname'] . "),更改了一篇文章:(" . $article_info['title'] . ")的状态,更改时间是:" . date('Y-m-d H:i:s', time());
|
||
$log_data['ctime'] = time();
|
||
$this->user_log_obj->insert($log_data);
|
||
|
||
//增加usermsg
|
||
add_usermsg($article_info['user_id'], 'Your manuscript has new process: ' . $article_info['title'], '/articleDetail?id=' . $article_info['article_id']);
|
||
|
||
return json(['code' => 0]);
|
||
}
|
||
|
||
/**
|
||
* 添加专刊文章(作者)
|
||
*/
|
||
public function addArticle()
|
||
{
|
||
//接受参数,查询信息
|
||
$data = $this->request->post();
|
||
|
||
// $data['authorList'] = [
|
||
// [
|
||
// 'address'=>'111',
|
||
// 'company'=>'111',
|
||
// 'country'=>'china',
|
||
// 'department'=>'',
|
||
// 'email'=>'6541654@qq.com',
|
||
// 'firstname'=>'2222222',
|
||
// 'isReport'=>'true',
|
||
// 'isSuper'=>'false',
|
||
// 'lastname'=>'2222222',
|
||
// 'title'=>'Ph.D.'
|
||
// ],
|
||
// [
|
||
// 'address'=>'',
|
||
// 'company'=>'112221',
|
||
// 'country'=>'china',
|
||
// 'department'=>'',
|
||
// 'email'=>'2254@qq.com',
|
||
// 'firstname'=>'22212222',
|
||
// 'isReport'=>'false',
|
||
// 'isSuper'=>'true',
|
||
// 'lastname'=>'2222222',
|
||
// 'title'=>'Ph.D.'
|
||
// ]
|
||
// ];
|
||
// $data['abstrart'] = '1111';
|
||
// $data['coverLetter'] = '';
|
||
// $data['fund'] = '';
|
||
// $data['journal_issn'] = '2538-015X';
|
||
// $data['keyWords'] = '111,1111,1111';
|
||
// $data['title'] = "111";
|
||
// $data['major'] = '1';
|
||
// $data['cmajor'] = '26';
|
||
// $data['type'] = 'A';
|
||
// $data['approval'] = 'true';
|
||
// $data['username'] = "user1";
|
||
// $data['coverLetter'] = '';
|
||
// $data['picturesAndTables'] = '';
|
||
// $data['totalpage'] = '';
|
||
// $data['manuscirpt'] = '20210122/e08e82edcabe5dc9d9409d1947fccc82.png';
|
||
|
||
|
||
$user_res = $this->user_obj->where('account', $data['username'])->find();
|
||
$journal_info = $this->journal_obj->where('issn', $data['journal_issn'])->find();
|
||
$check_article = $this->article_obj->where('title',$data['title'])->find();
|
||
if($check_article){
|
||
return json(['code' => 1]);
|
||
}
|
||
|
||
Db::startTrans();
|
||
|
||
//添加文章基础信息
|
||
$inset_data['user_id'] = $user_res['user_id'];
|
||
$inset_data['journal_id'] = $journal_info['journal_id'];
|
||
$inset_data['editor_id'] = $journal_info['editor_id'];
|
||
$inset_data['title'] = $data['title'];
|
||
$inset_data['keywords'] = $data['keyWords'];
|
||
$inset_data['fund'] = $data['fund'];
|
||
$inset_data['special_num'] = $data['special_id'];
|
||
$inset_data['special_title'] = $data['special_title'];
|
||
$inset_data['accept_sn'] = getArticleSN($journal_info['abbr'], $data['type']);
|
||
$inset_data['type'] = $data['type'];
|
||
$inset_data['major_id'] = $data['major'];
|
||
$inset_data['cmajor_id'] = $data['cmajor'];
|
||
$inset_data['approval'] = $data['approval'] == 'true' ? 1 : 0;
|
||
$inset_data['abstrart'] = $data['abstrart'];
|
||
$inset_data['author_act'] = 1;
|
||
$inset_data['ctime'] = time();
|
||
$res = $this->article_obj->insertGetId($inset_data);
|
||
|
||
//上传文章作者信息
|
||
$authors = [];
|
||
$res_add_user = true;
|
||
foreach ($data['authorList'] as $v) {
|
||
if ($v['firstname'] == '') {
|
||
continue;
|
||
}
|
||
$i['article_id'] = $res;
|
||
$i['firstname'] = $v['firstname'];
|
||
$i['lastname'] = $v['lastname'];
|
||
$i['company'] = $v['company'];
|
||
$i['department'] = $v['department'];
|
||
$i['author_title'] = $v['title'];
|
||
$i['country'] = $v['country'];
|
||
$i['email'] = $v['email'];
|
||
$i['address'] = $v['address'];
|
||
$i['is_super'] = $v['isSuper'] == 'true' ? 1 : 0;
|
||
$i['is_report'] = $v['isReport'] == 'true' ? 1 : 0;
|
||
$authors[] = $i;
|
||
//通讯作者用户添加
|
||
if($v['isReport']=="true"){
|
||
$re_user_check = $this->user_obj->where('account|email',trim($v['email']))->find();
|
||
if(!$re_user_check){
|
||
$password = getRandPassword();
|
||
$inser_data['account'] = trim($v['email']);
|
||
$inser_data['password'] = md5($password);
|
||
$inser_data['email'] = trim($v['email']);
|
||
$inser_data['realname'] = trim($v['firstname']).' '.trim($v['lastname']);
|
||
$inser_data['ctime'] = time();
|
||
$c_res_add_user=$this->user_obj->insertGetId($inser_data);
|
||
if($res_add_user){
|
||
$res_add_user = $c_res_add_user;
|
||
}
|
||
|
||
//发送提示邮件给通讯作者
|
||
$report_tt = "Dear ".$inser_data['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/>";
|
||
$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]";
|
||
$report_tt .= "and you can access your account by visiting ".$journal_info['website']." and logging in.<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/>";
|
||
$report_tt .= "Thank you for choosing to submit your work to our journal. We look forward to working with you.<br/><br/>";
|
||
$report_tt .= "Best regards,<br>".$inser_data['realname'].'<br/>'.$journal_info['title'];
|
||
$maidata['email'] = trim($v['email']);
|
||
$maidata['title'] = $journal_info['title'];
|
||
$maidata['content'] = $report_tt;
|
||
$maidata['tmail'] = $journal_info['email'];
|
||
$maidata['tpassword'] = $journal_info['epassword'];
|
||
Queue::push('app\api\job\mail@fire', $maidata, "tmail");
|
||
}
|
||
}
|
||
}
|
||
$res_author = $this->article_author_obj->insertAll($authors);
|
||
|
||
//增加转投信息
|
||
$transr = true;
|
||
// if($data['istransfer']=='true'){
|
||
// foreach ($data['checkedjours'] as $val){
|
||
// $trans_insert['article_id'] = $res;
|
||
// $trans_insert['journal_id'] = $val;
|
||
// $trans_insert['ctime'] = time();
|
||
// $transr = $transr?$this->article_transfer_obj->insert($trans_insert):false;
|
||
// }
|
||
// }
|
||
//增加articlefile表的信息
|
||
$res_file1 = self::save_article_file($res, $user_res['user_id'], $user_res['account'], $data['coverLetter'], 'coverLetter');
|
||
$res_file2 = self::save_article_file($res, $user_res['user_id'], $user_res['account'], $data['picturesAndTables'], 'picturesAndTables');
|
||
// $res_file4 = self::save_article_file($res, $user_res['user_id'], $user_res['account'], $data['totalpage'], 'totalpage');
|
||
$res_file3 = self::save_article_file($res, $user_res['user_id'], $user_res['account'], $data['manuscirpt'], 'manuscirpt');
|
||
|
||
//发送邮件到编辑,提醒有待审文章
|
||
$editor_info = $this->user_obj->where('user_id', $journal_info['editor_id'])->find();
|
||
$tt = 'Dear editor,<br>';
|
||
$tt .= 'Please check the new manuscript in the submission system.';
|
||
sendEmail($editor_info['email'], $journal_info['title'], $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
|
||
|
||
//获取客座编辑
|
||
$iJournalSpecialId = empty($data['special_id']) ? 0 : $data['special_id'];
|
||
$aSpecialEditor = $this->getJournalSpecialEditor(['journal_special_id' => $iJournalSpecialId]);
|
||
$aSpecialEditorData = empty($aSpecialEditor['data']) ? [] : $aSpecialEditor['data'];
|
||
$aSpecialEditorData = empty($aSpecialEditorData['editors']) ? [] : $aSpecialEditorData['editors'];
|
||
if(!empty($aSpecialEditorData)){
|
||
foreach($aSpecialEditorData as $k => $v){
|
||
if(empty($v['email'])){
|
||
continue;
|
||
}
|
||
sendEmail($v['email'], $journal_info['title'], $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
|
||
}
|
||
}
|
||
// $sendEditor = [
|
||
// 'title' => $journal_info['title'], // 邮件标题
|
||
// 'content' => $tt, //邮件内容
|
||
// 'user_id' => $journal_info['editor_id'], //收件人ID
|
||
// 'email' => $editor_info['email'], // 收件人邮箱
|
||
// 'journal_id' => $journal_info['journal_id'], // 期刊ID
|
||
// 'sendEmail' => $journal_info['email'], // 期刊邮箱
|
||
// 'sendPassword' => $journal_info['epassword'], // 期刊密码
|
||
// 'from_name' => $journal_info['title']
|
||
// ];
|
||
// Queue::push('app\api\job\domail@fire',$sendEditor,'domail');
|
||
|
||
//增加用户操作log
|
||
$log_data['user_id'] = $user_res['user_id'];
|
||
$log_data['type'] = 0;
|
||
$log_data['content'] = $user_res['account'] . "(" . $user_res['realname'] . "),上传了一篇文章:" . $data['title'] . ",上传时间是:" . date('Y-m-d H:i:s', time());
|
||
$log_data['ctime'] = time();
|
||
$res_log = $this->user_log_obj->insert($log_data);
|
||
|
||
//增加usermsg
|
||
$res_msg = add_usermsg($journal_info['editor_id'], 'New manuscript', '/articleDetailEditor?id=' . $res);
|
||
|
||
if ($res && $res_author && $transr &&$res_add_user && $res_file1 && $res_file2 && $res_file3 && $res_log && $res_msg) {
|
||
Db::commit();
|
||
$this->ai_scor($res);
|
||
return json(['code' => 0]);
|
||
} else {
|
||
Db::rollback();
|
||
return json(['code' => 1]);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* 人工智能打分
|
||
*/
|
||
public function ai_scor($article_id)
|
||
{
|
||
$article_info = $this->article_obj->where('article_id', $article_id)->find();
|
||
$files = $this->article_file_obj->where('article_id', $article_id)->where('type_name', 'manuscirpt')
|
||
->order('ctime desc')
|
||
->limit(1)
|
||
->select();
|
||
|
||
$authors = $this->article_author_obj->where('article_id', $article_id)->where('is_report', 1)->where('state', 0)->select();
|
||
$user_id = $article_info['user_id'];
|
||
$g_index = 0;
|
||
$google_time = 0;
|
||
foreach ($authors as $v) {
|
||
$c_user = $this->user_obj->where('email', $v['email'])->find();
|
||
if ($google_time < $c_user['google_time']) {//应对h指数为0的用户文章,先取是否填写过h指数为0的情况
|
||
$google_time = $c_user['google_time'];
|
||
}
|
||
if ($c_user['google_index'] >= $g_index) {
|
||
$user_id = $c_user['user_id'];
|
||
$g_index = $c_user['google_index'];
|
||
}
|
||
}
|
||
$user_info = $this->user_obj->where('user_id', $user_id)->find();
|
||
$fen = 0;
|
||
//h指数分数
|
||
$h_fen = 0;
|
||
if ($user_info['google_index'] >= 20) {
|
||
$h_fen = 4;
|
||
} elseif ($user_info['google_index'] >= 6) {
|
||
$h_fen = 3;
|
||
} elseif ($user_info['google_index'] >= 2) {
|
||
$h_fen = 1;
|
||
} else {
|
||
$h_fen = 0;
|
||
}
|
||
$fen += $h_fen;
|
||
//图表
|
||
$b_fen = 0;
|
||
$p_num = 0;
|
||
$url = $this->ts_base_url."api/typeset/readPic";
|
||
$program['fileRoute'] = "https://submission.tmrjournals.com/public/" . $files[0]['file_url'];
|
||
$res = object_to_array(json_decode(myPost($url, $program)));
|
||
$wp = isset($res['data']['pic']) ? $res['data']['pic'] : 0;
|
||
$tp = isset($res['data']['table']) ? $res['data']['table'] : 0;
|
||
|
||
$pics = $this->article_file_obj->where('article_id', $article_id)->where('type_name', 'picturesAndTables')->select();
|
||
$np = 0;
|
||
foreach ($pics as $v) {
|
||
$ext = substr(strrchr($v['file_url'], '.'), 1);
|
||
if ($ext == 'zip') {
|
||
$cn = $this->readZip(ROOT_PATH . "public" . DS . $v['file_url']);
|
||
$np += $cn;
|
||
} else {
|
||
$np++;
|
||
}
|
||
}
|
||
$p_num = $wp > $np ? $wp : $np;
|
||
|
||
$all_num = $p_num + $tp;
|
||
if ($all_num > 3) {
|
||
$b_fen = 2;
|
||
} elseif ($all_num >= 1) {
|
||
$b_fen = 1;
|
||
} else {
|
||
$b_fen = 0;
|
||
}
|
||
|
||
//当h指数为0 并且是编辑填写的
|
||
if ($user_info['google_index'] == 0 && $google_time > 0) {
|
||
if ($all_num >= 8) {
|
||
$b_fen = 4;
|
||
} elseif ($all_num == 7) {
|
||
$b_fen = 3.5;
|
||
} elseif ($all_num == 6) {
|
||
$b_fen = 3;
|
||
} elseif ($all_num == 5) {
|
||
$b_fen = 2;
|
||
} elseif ($all_num == 4) {
|
||
$b_fen = 1.5;
|
||
} elseif ($all_num >= 1) {
|
||
$b_fen = 1;
|
||
} else {
|
||
$b_fen = 0;
|
||
}
|
||
}
|
||
|
||
|
||
$fen += $b_fen;
|
||
|
||
//图表扣分环节
|
||
if ($article_info['journal_id'] == 1) {
|
||
$jan_fen = 0;
|
||
if ($article_info['type'] == "A") {
|
||
if ($all_num < 1) {
|
||
$jan_fen = 2;
|
||
} elseif ($all_num < 2) {
|
||
$jan_fen = 1;
|
||
} elseif ($all_num < 3) {
|
||
$jan_fen = 0.5;
|
||
}
|
||
} elseif ($article_info['type'] == "B") {
|
||
if ($all_num == 0) {
|
||
$jan_fen = 1;
|
||
}
|
||
}
|
||
$b_fen = $b_fen - $jan_fen;
|
||
$fen = $fen - $jan_fen;
|
||
} else {
|
||
$jan_fen1 = 0;
|
||
if ($article_info['type'] == "A") {
|
||
if ($all_num < 1) {
|
||
$jan_fen1 = 1;
|
||
}
|
||
if ($all_num < 2) {
|
||
$jan_fen1 = 0.5;
|
||
}
|
||
} elseif ($article_info['type'] == "B") {
|
||
if ($all_num == 0) {
|
||
$jan_fen1 = 0.5;
|
||
}
|
||
}
|
||
|
||
$b_fen = $b_fen - $jan_fen1;
|
||
$fen = $fen - $jan_fen1;
|
||
}
|
||
|
||
|
||
//国家
|
||
$c_fen = 0;
|
||
$author = $this->article_author_obj->where('article_id', $article_id)->where('is_report', 1)->find();
|
||
if ($author['country'] != "") {
|
||
$coun = $this->country_obj->where('en_name', $author['country'])->find();
|
||
if ($coun && $coun['is_hot'] == 1) {
|
||
$c_fen = 1;
|
||
$fen += 1;
|
||
} elseif ($coun && $coun['en_name'] != "China" && $coun['en_name'] != "India") {
|
||
$c_fen = 0.5;
|
||
$fen += 0.5;
|
||
} else {
|
||
$c_fen = 0;
|
||
$fen += 0;
|
||
}
|
||
}
|
||
//单位
|
||
$dw_fen = 0;
|
||
$report_author = $this->article_author_obj->where('article_id', $article_id)->where('email', $user_info['email'])->find();
|
||
if ($report_author) {
|
||
$ca_res = $this->company_top_obj->where('title', $report_author['company'])->find();
|
||
if ($ca_res) {
|
||
if ($ca_res['company_id'] <= 100 || ($ca_res['company_id'] > 201 && $ca_res['company_id'] <= 301)) {
|
||
$dw_fen = 1.5;
|
||
$fen += 1.5;
|
||
} else {
|
||
$dw_fen = 1;
|
||
$fen += 1;
|
||
}
|
||
}
|
||
}
|
||
|
||
//领域
|
||
$ly_fen = 0;
|
||
$m = $this->major_obj->where('major_id', $article_info['major_id'])->find();
|
||
if ($m['is_hot'] == 1) {
|
||
$ly_fen = 1;
|
||
$fen += 1;
|
||
}
|
||
|
||
//基金
|
||
$jj_fen = 0;
|
||
if (strlen($article_info['fund']) > 10) {
|
||
$jj_fen = 0.5;
|
||
$fen += 0.5;
|
||
}
|
||
// return $fen;
|
||
$updata['scoring'] = $fen;
|
||
$updata['h_fen'] = $h_fen;
|
||
$updata['b_fen'] = $b_fen;
|
||
$updata['c_fen'] = $c_fen;
|
||
$updata['dw_fen'] = $dw_fen;
|
||
$updata['ly_fen'] = $ly_fen;
|
||
$updata['jj_fen'] = $jj_fen;
|
||
|
||
$this->article_obj->where('article_id', $article_id)->update($updata);
|
||
return jsonSuccess([]);
|
||
}
|
||
|
||
private function readZip($file){
|
||
$zip = new \ZipArchive();
|
||
if($zip->open($file)===true){
|
||
return $zip->numFiles;
|
||
}else{
|
||
return 0;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* 客座编辑添加审稿人
|
||
*/
|
||
public function addReviewerToArticleForSpecial()
|
||
{
|
||
$data = $this->request->post();
|
||
$rule = new Validate([
|
||
'editor_id' => 'require',
|
||
'email' => 'require|email',
|
||
'realname' => 'require',
|
||
'article_id' => 'require',
|
||
'major' => 'require',
|
||
'country' => 'require'
|
||
]);
|
||
if (!$rule->check($data)) {
|
||
return jsonError($rule->getError());
|
||
}
|
||
$article_info = $this->article_obj->where('article_id', $data['article_id'])->find();
|
||
$journal_info = $this->journal_obj->where('journal_id', $article_info['journal_id'])->find();
|
||
Db::startTrans();
|
||
//判断此用户是否存在
|
||
$reviewer_info = $this->user_obj->where('email', trim($data['email']))->where('state', 0)->find();
|
||
if ($reviewer_info == null) { //添加用户
|
||
$insert_user['account'] = $data['email'];
|
||
$insert_user['password'] = md5('123456qwe');
|
||
$insert_user['email'] = $data['email'];
|
||
$insert_user['realname'] = $data['realname'];
|
||
$insert_user['ctime'] = time();
|
||
$i_id = $this->user_obj->insertGetId($insert_user);
|
||
$reviewer_info = $this->user_obj->where('user_id', $i_id)->find();
|
||
}
|
||
//检验审稿实例是否存在
|
||
$check_repi = $this->article_reviewer_obj->where('article_id', $data['article_id'])->where('reviewer_id', $reviewer_info['user_id'])->find();
|
||
if ($check_repi != null) {
|
||
return jsonError('Cannot be added repeatedly');
|
||
}
|
||
//判断是否是此期刊审稿人
|
||
$rtj = $this->reviewer_to_journal_obj->where('journal_id', $article_info['journal_id'])->where('reviewer_id', $reviewer_info['user_id'])->where('state', 0)->find();
|
||
$res2 = true;
|
||
$res3 = true;
|
||
if ($rtj == null) {
|
||
//判断是否具有审稿人身份,并具有审稿人资料
|
||
$uri = $this->user_reviewer_info_obj->where('reviewer_id', $reviewer_info['user_id'])->where('state', 0)->find();
|
||
if ($uri == null) { //添加审稿人信息
|
||
$insert_reviewer_info['reviewer_id'] = $reviewer_info['user_id'];
|
||
$insert_reviewer_info['major'] = $data['major'];
|
||
// $insert_reviewer_info['cmajor'] = $data['cmajor'];
|
||
$insert_reviewer_info['country'] = $data['country'];
|
||
$insert_reviewer_info['test_from'] = "addReviewerToArticleForSpecial";
|
||
$res2 = $this->user_reviewer_info_obj->insert($insert_reviewer_info);
|
||
}
|
||
$insert_rtj['reviewer_id'] = $reviewer_info['user_id'];
|
||
$insert_rtj['journal_id'] = $journal_info['journal_id'];
|
||
$insert_rtj['account'] = $reviewer_info['account'];
|
||
$insert_rtj['journal_title'] = $journal_info['title'];
|
||
$insert_rtj['ctime'] = time();
|
||
$res3 = $this->reviewer_to_journal_obj->insert($insert_rtj);
|
||
}
|
||
|
||
//创建审稿实例
|
||
$insert_article_reviewer['reviewer_id'] = $reviewer_info['user_id'];
|
||
$insert_article_reviewer['article_id'] = $data['article_id'];
|
||
$insert_article_reviewer['editor_act'] = 1;
|
||
$insert_article_reviewer['ctime'] = time();
|
||
$arid = $this->article_reviewer_obj->insertGetId($insert_article_reviewer);
|
||
|
||
//修改文章状态->审稿中
|
||
$this->article_obj->where('article_id',$data['article_id'])->update(['state'=>2]);
|
||
|
||
//添加推荐审稿人信息
|
||
$insert_recommend['reviewer_id'] = $reviewer_info['user_id'];
|
||
$insert_recommend['recommend_user_id'] = $data['editor_id'];
|
||
$insert_recommend['urr_type'] = 1;
|
||
$insert_recommend['urr_ctime'] = time();
|
||
$res_recommend = $this->user_reviewer_recommend_obj->insert($insert_recommend);
|
||
|
||
if ($res2 && $res3 && $arid && $res_recommend) {
|
||
Db::commit();
|
||
$articlecontroller = new articlecontroller();
|
||
//发送email提醒审稿员
|
||
$tt = $article_info['accept_sn'] . '<br>';
|
||
$tt .= 'Dear Dr. ' . ($reviewer_info['realname'] == "" ? $reviewer_info['account'] : $reviewer_info['realname']) . '<br><br>';
|
||
$tt .= 'The manuscript entitled “' . $article_info['title'] . '” has'
|
||
. ' been submitted to the journal ' . $journal_info['title'] . '. The Editor-in-Chief would'
|
||
. ' be most grateful if you could offer an opinion regarding its suitability for publication'
|
||
. ' in the journal ' . $journal_info['title'] . '. <br>';
|
||
$tt .= 'Please bring into our knowledge if there is any potential Conflict of Interest. If you agree to review this manuscript, we ask you to complete your review and submit it by submission system within 10 days of receipt of the manuscript.<br><br>';
|
||
$tt .= 'Thank you for your consideration.<br> Look forward for your reply.<br>';
|
||
$tt .= '<a href="' . $articlecontroller->creatLoginUrlForreviewer($reviewer_info, $arid) . '">Click here to review the article</a><br>';
|
||
$tt .= '<a href="' . $articlecontroller->creatRejectUrlForReviewer($reviewer_info, $arid) . '">Click on the link to reject the review of this manuscript</a><br>';
|
||
$tt .= 'Your username:' . $reviewer_info['account'] . '<br><br>';
|
||
$tt .= 'Your original password:123456qwe, if you have reset the password, please login with the new one or click the "<a href="https://submission.tmrjournals.com/retrieve">forgot password</a>".<br>';
|
||
$tt .= 'Sincerely,<br>Editorial Office<br>';
|
||
$tt .= '<a href="https://www.tmrjournals.com/draw_up.html?issn=' . $journal_info['issn'] . '">Subscribe to this journal</a><br>';
|
||
$tt .= $journal_info['title'] . '<br>';
|
||
$tt .= 'Email:' . $journal_info['email'] . '<br>';
|
||
$tt .= 'Website:' . $journal_info['website'];
|
||
sendEmail($reviewer_info['email'], $journal_info['title'], $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
|
||
return jsonSuccess([]);
|
||
} else {
|
||
Db::rollback();
|
||
return jsonError("system error");
|
||
}
|
||
}
|
||
|
||
/**
|
||
* 上传文章的文件
|
||
*/
|
||
public function up_file($type)
|
||
{
|
||
$file = request()->file($type);
|
||
if ($file) {
|
||
$info = $file->move(ROOT_PATH . 'public' . DS . $type);
|
||
if ($info) {
|
||
return json(['code' => 0, 'upurl' => str_replace("\\", "/", $info->getSaveName())]);
|
||
} else {
|
||
return json(['code' => 1, 'msg' => $file->getError()]);
|
||
}
|
||
}
|
||
}
|
||
|
||
/**
|
||
* 获取领域分类
|
||
*/
|
||
public function getMajor()
|
||
{
|
||
$majors = $this->reviewer_major_obj->where('pid', 0)->select();
|
||
return json(['code' => 0, 'data' => $majors]);
|
||
}
|
||
|
||
/**
|
||
* 获取major子项目
|
||
*/
|
||
public function majorChild()
|
||
{
|
||
$majorid = $this->request->post('majorid');
|
||
$ds = $this->reviewer_major_obj->where('pid', $majorid)->select();
|
||
return json(['code' => 0, 'data' => $ds]);
|
||
}
|
||
|
||
/**
|
||
* 获取城市
|
||
*/
|
||
public function getCountrys()
|
||
{
|
||
$res = $this->country_obj->order('en_name')->select();
|
||
return json($res);
|
||
}
|
||
|
||
public function test()
|
||
{
|
||
echo strtotime('2021-1-1');
|
||
}
|
||
|
||
/**
|
||
* 存储article文件历史信息
|
||
*/
|
||
private function save_article_file($article_id, $user_id, $username, $url, $type_name)
|
||
{
|
||
//首先确定数据库里面是否存在此数据
|
||
$res = $this->article_file_obj->where(['file_url' => $url])->find();
|
||
if ($res) {
|
||
return true;
|
||
} else if ($type_name == 'picturesAndTables' && trim($url) == '') {
|
||
return true;
|
||
} else if ($type_name == 'coverLetter' && trim($url) == '') {
|
||
return true;
|
||
} else if ($type_name == 'totalpage' && trim($url) == '') {
|
||
return true;
|
||
}
|
||
$insert_data['article_id'] = $article_id;
|
||
$insert_data['user_id'] = $user_id;
|
||
$insert_data['username'] = $username;
|
||
$insert_data['file_url'] = $url;
|
||
$insert_data['type_name'] = $type_name;
|
||
$insert_data['ctime'] = time();
|
||
return $this->article_file_obj->insert($insert_data);
|
||
}
|
||
|
||
/**
|
||
* 获取期刊客座编辑
|
||
*/
|
||
private function getJournalSpecialEditor($aParam = []){
|
||
|
||
$iJournalSpecialId = empty($aParam['journal_special_id']) ? 0 : $aParam['journal_special_id'];
|
||
if(empty($iJournalSpecialId)){
|
||
return ['code' => 2,'msg' => 'journal_special_id is null'];
|
||
}
|
||
$sJournalUrl = 'http://journalapi.tmrjournals.com/public/index.php/';//'http://zmzm.journal.dev.com/';
|
||
$sUrl = $sJournalUrl."master/Special/getSpecialDetail";
|
||
$aResult = object_to_array(json_decode(myPost1($sUrl,$aParam)));
|
||
return $aResult;
|
||
}
|
||
}
|