This commit is contained in:
wangjinlei
2025-02-06 11:24:08 +08:00
parent c0e20f5cfb
commit fb647bd6fa
5 changed files with 63 additions and 30 deletions

View File

@@ -76,7 +76,7 @@ class Monitor extends Base
while ($year<=date("Y")){
$s_time = strtotime($year."-1-1");
$e_time = strtotime($year."-12-31");
$n = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->count();
$n = $this->article_obj->where("ctime",">",$s_time)->where("state",">",-1)->where("ctime","<",$e_time)->count();
$frag[$year] = $n;
$year++;
}
@@ -107,7 +107,7 @@ class Monitor extends Base
while ($year<=date("Y")){
$s_time = strtotime($year."-1-1");
$e_time = strtotime($year."-12-31");
$n = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where($j_sql)->count();
$n = $this->article_obj->where("ctime",">",$s_time)->where("state",">",-1)->where("ctime","<",$e_time)->where($j_sql)->count();
$frag[$year] = $n;
$year++;
}
@@ -134,8 +134,8 @@ class Monitor extends Base
if($abbr=="PD"&&$year<2024){
$abbr = "PR";
}
$n = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("accept_sn","like",$abbr."%")->count();
$nj = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("accept_sn","like",$abbr."%")->where("journal_id","<>",$v['journal_id'])->count();
$n = $this->article_obj->where("ctime",">",$s_time)->where("state",">",-1)->where("ctime","<",$e_time)->where("accept_sn","like",$abbr."%")->count();
$nj = $this->article_obj->where("ctime",">",$s_time)->where("state",">",-1)->where("ctime","<",$e_time)->where("accept_sn","like",$abbr."%")->where("journal_id","<>",$v['journal_id'])->count();
// $frag[$year."-".$month] = $n."/".$nj;
// $n = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("journal_id",$v['journal_id'])->count();
$frag[$year] = $n."/".$nj;
@@ -173,8 +173,8 @@ class Monitor extends Base
if($abbr=="PD"&&$year<2024){
$abbr = "PR";
}
$n = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("accept_sn","like",$abbr."%")->count();
$nj = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("accept_sn","like",$abbr."%")->where("journal_id","<>",$v['journal_id'])->count();
$n = $this->article_obj->where("ctime",">",$s_time)->where("state",">",-1)->where("ctime","<",$e_time)->where("accept_sn","like",$abbr."%")->count();
$nj = $this->article_obj->where("ctime",">",$s_time)->where("state",">",-1)->where("ctime","<",$e_time)->where("accept_sn","like",$abbr."%")->where("journal_id","<>",$v['journal_id'])->count();
$frag[$year] = $n."/".$nj;
$year++;
}
@@ -230,8 +230,8 @@ class Monitor extends Base
while ($year<date("Y")||($year==date("Y")&&$month<=date("m"))){
$s_time = strtotime($year."-".$month."-1");
$e_time = strtotime("+1 month", $s_time) - 1;
$n = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("accept_sn","like",$v['abbr']."%")->count();
$nj = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("accept_sn","like",$v['abbr']."%")->where("journal_id","<>",$v['journal_id'])->count();
$n = $this->article_obj->where("state",">",-1)->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("accept_sn","like",$v['abbr']."%")->count();
$nj = $this->article_obj->where("state",">",-1)->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("accept_sn","like",$v['abbr']."%")->where("journal_id","<>",$v['journal_id'])->count();
$frag[$year."-".$month] = $n."/".$nj;
if($month==12){
$year++;
@@ -265,8 +265,8 @@ class Monitor extends Base
while ($year<date("Y")||($year==date("Y")&&$month<=date("m"))){
$s_time = strtotime($year."-".$month."-1");
$e_time = strtotime("+1 month", $s_time) - 1;
$n = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("accept_sn","like",$v['abbr']."%")->count();
$nj = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("accept_sn","like",$v['abbr']."%")->where("journal_id","<>",$v['journal_id'])->count();
$n = $this->article_obj->where("ctime",">",$s_time)->where("state",">",-1)->where("ctime","<",$e_time)->where("accept_sn","like",$v['abbr']."%")->count();
$nj = $this->article_obj->where("ctime",">",$s_time)->where("state",">",-1)->where("ctime","<",$e_time)->where("accept_sn","like",$v['abbr']."%")->where("journal_id","<>",$v['journal_id'])->count();
$frag[$year."-".$month] = $n."/".$nj;
if($month==12){
$year++;
@@ -293,8 +293,8 @@ class Monitor extends Base
while ($year<date("Y")||($year==date("Y")&&$month<=date("m"))){
$s_time = strtotime($year."-".$month."-1");
$e_time = strtotime("+1 month", $s_time) - 1;
$n = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("accept_sn","like",$v['abbr']."%")->count();
$nj = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where("accept_sn","like",$v['abbr']."%")->where("journal_id","<>",$v['journal_id'])->count();
$n = $this->article_obj->where("ctime",">",$s_time)->where("state",">",-1)->where("ctime","<",$e_time)->where("accept_sn","like",$v['abbr']."%")->count();
$nj = $this->article_obj->where("ctime",">",$s_time)->where("state",">",-1)->where("ctime","<",$e_time)->where("accept_sn","like",$v['abbr']."%")->where("journal_id","<>",$v['journal_id'])->count();
$frag[$year."-".$month] = $n."/".$nj;
if($month==12){
$year++;
@@ -324,7 +324,7 @@ class Monitor extends Base
while ($year<date("Y")||($year==date("Y")&&$month<=date("m"))){
$s_time = strtotime($year."-".$month."-1");
$e_time = strtotime("+1 month", $s_time) - 1;
$n = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->count();
$n = $this->article_obj->where("ctime",">",$s_time)->where("state",">",-1)->where("ctime","<",$e_time)->count();
// $frag[$year."-".$month."sql"] = $this->article_obj->getLastSql();
$frag[$year."-".$month] = $n;
if($month==12){
@@ -363,7 +363,7 @@ class Monitor extends Base
while ($year<date("Y")||($year==date("Y")&&$month<=date("m"))){
$s_time = strtotime($year."-".$month."-1");
$e_time = strtotime("+1 month", $s_time) - 1;
$n = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where($j_sql)->count();
$n = $this->article_obj->where("state",">",-1)->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where($j_sql)->count();
$frag[$year."-".$month] = $n;
if($month==12){
$year++;
@@ -393,7 +393,7 @@ class Monitor extends Base
while ($year<date("Y")||($year==date("Y")&&$month<=date("m"))){
$s_time = strtotime($year."-".$month."-1");
$e_time = strtotime("+1 month", $s_time) - 1;
$n = $this->article_obj->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where($j_sql)->count();
$n = $this->article_obj->where("state",">",-1)->where("ctime",">",$s_time)->where("ctime","<",$e_time)->where($j_sql)->count();
$frag[$year."-".$month] = $n;
if($month==12){
$year++;

View File

@@ -631,7 +631,8 @@ class Preaccept extends Base
return jsonError($rule->getError());
}
$doi = str_replace('/', '%2F', $data['doi']);
$url = "https://citation.crosscite.org/format?doi=$doi&style=cancer-translational-medicine&lang=en-US";
// $url = "https://citation.crosscite.org/format?doi=$doi&style=cancer-translational-medicine&lang=en-US";
$url = "https://citation.doi.org/format?doi=$doi&style=cancer-translational-medicine&lang=en-US";
$res = myGet($url);
$frag = trim(substr($res, strpos($res, '.') + 1));
if ($frag == "") {

View File

@@ -711,6 +711,38 @@ function addUserScoreLog($user_id, $score, $content, $ctime, $act = '+')
}
function getPaystationToken()
{
$client_id = $_ENV['CLIENT_ID'];
$client_secret = $_ENV['CLIENT_SECRET'];
$access_token_url = $_ENV['API_URL'] . '/oauth/token';
$guzzle = new Client(['base_uri' => $access_token_url]);
try {
$raw_response = $guzzle->post('', [
'headers' => ['Content-type' => 'application/json'],
'body' => json_encode([
'client_id' => $client_id,
'client_secret' => $client_secret,
'grant_type' => 'client_credentials',
'scope' => 'write'
]),
]);
$response = $raw_response->getBody()->getContents();
if ($response) {
$response_decoded = json_decode($response);
if ($response_decoded && isset($response_decoded->access_token)) {
return $response_decoded->access_token;
}
return null;
}
} catch (\GuzzleHttp\Exception\GuzzleException $e) {
//@todo: Replace with your own error handling
return null;
}
return null;
}
function my_doiToFrag2($data)
{
$p_refer_obj = Db::name('production_article_refer');

View File

@@ -485,17 +485,17 @@
},
{
"name": "myclabs/php-enum",
"version": "1.8.4",
"version_normalized": "1.8.4.0",
"version": "1.8.5",
"version_normalized": "1.8.5.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/php-enum.git",
"reference": "a867478eae49c9f59ece437ae7f9506bfaa27483"
"reference": "e7be26966b7398204a234f8673fdad5ac6277802"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/php-enum/zipball/a867478eae49c9f59ece437ae7f9506bfaa27483",
"reference": "a867478eae49c9f59ece437ae7f9506bfaa27483",
"url": "https://api.github.com/repos/myclabs/php-enum/zipball/e7be26966b7398204a234f8673fdad5ac6277802",
"reference": "e7be26966b7398204a234f8673fdad5ac6277802",
"shasum": ""
},
"require": {
@@ -505,9 +505,9 @@
"require-dev": {
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "1.*",
"vimeo/psalm": "^4.6.2"
"vimeo/psalm": "^4.6.2 || ^5.2"
},
"time": "2022-08-04T09:53:51+00:00",
"time": "2025-01-14T11:49:03+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -529,13 +529,13 @@
}
],
"description": "PHP Enum implementation",
"homepage": "http://github.com/myclabs/php-enum",
"homepage": "https://github.com/myclabs/php-enum",
"keywords": [
"enum"
],
"support": {
"issues": "https://github.com/myclabs/php-enum/issues",
"source": "https://github.com/myclabs/php-enum/tree/1.8.4"
"source": "https://github.com/myclabs/php-enum/tree/1.8.5"
},
"funding": [
{

View File

@@ -3,7 +3,7 @@
'name' => 'topthink/think',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '145b0ab8a5ed5ab6fd9c51ce4728a0e53c044f8c',
'reference' => 'c0e20f5cfb541206bf97787e1967d2e7de3db339',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -83,9 +83,9 @@
'dev_requirement' => false,
),
'myclabs/php-enum' => array(
'pretty_version' => '1.8.4',
'version' => '1.8.4.0',
'reference' => 'a867478eae49c9f59ece437ae7f9506bfaa27483',
'pretty_version' => '1.8.5',
'version' => '1.8.5.0',
'reference' => 'e7be26966b7398204a234f8673fdad5ac6277802',
'type' => 'library',
'install_path' => __DIR__ . '/../myclabs/php-enum',
'aliases' => array(),
@@ -220,7 +220,7 @@
'topthink/think' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '145b0ab8a5ed5ab6fd9c51ce4728a0e53c044f8c',
'reference' => 'c0e20f5cfb541206bf97787e1967d2e7de3db339',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),