新增期卷号处理
This commit is contained in:
@@ -850,6 +850,29 @@ function my_doiToFrag2($data)
|
||||
$update['refer_type'] = "journal";
|
||||
$update['is_ja'] = $joura == trim($bj[0]) ? 0 : 1;
|
||||
$update['dateno'] = str_replace(' ', '', str_replace('-', '–', trim($bj[1])));
|
||||
//新增处理 期卷页码 20251127 start
|
||||
if(!empty($update['dateno'])){
|
||||
$sStr = $update['dateno'];
|
||||
$aStr = explode(':', $sStr);
|
||||
if(!empty($aStr[1])){
|
||||
$parts = explode('–', $aStr[1]);
|
||||
if(count($parts) == 2){
|
||||
$prefix = empty($parts[0]) ? 0 : intval($parts[0]);
|
||||
$suffix = empty($parts[1]) ? 0 : intval($parts[1]);
|
||||
if($prefix > $suffix){
|
||||
$prefixLen = strlen($prefix);
|
||||
$suffixLen = strlen($sufix);
|
||||
$missingLen = $prefixLen - $suffixLen;
|
||||
if ($missingLen > 0) {
|
||||
$fillPart = substr($prefix, 0, $missingLen);
|
||||
$newSuffix = $fillPart . $suffix;
|
||||
$update['dateno'] = $aStr[0].':'.$prefix.'-'.$newSuffix;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//新增处理 期卷页码 20251127 end
|
||||
$update['doilink'] = strpos($data['refer_doi'],"http")===false?"https://doi.org/" . $data['refer_doi']:$data['refer_doi'];
|
||||
$update['cs'] = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user