Commit cad966c9 authored by hangjun83's avatar hangjun83

药敏康德更新

parent 63b2ec98
......@@ -180,20 +180,32 @@ class WuxiLabService
}
}
if(!$exist){
//转换
$package['p_pack_unit'] = strtolower($package['p_pack_unit']);
switch($package['p_pack_unit']){
case 'ul' : $package['p_pack_unit'] = 'µl';break;
case 'ug' : $package['p_pack_unit'] = 'µg';break;
}
if(!in_array($package['p_pack_unit'],$wuxiLabPackage)){
SimpleLogs::writeLog('unit_description:'.$package['p_pack'].strtolower($package['p_pack_unit']).'规格不在范围内,跳过', __CLASS__.':batchUpdatePackagesInfo');
continue;
}
try{
//如果包装数量不是数字,跳过
if(is_numeric($package['p_pack'])){
SimpleLogs::writeLog('unit_quantity:'.$package['p_pack'].' unit_type:'.strtolower($package['p_pack_unit']).' unit_description:'.$package['p_pack'].strtolower($package['p_pack_unit']), __CLASS__.':batchUpdatePackagesInfo');
$this->apiService->pushBatchUpdatePackages([
'unit_quantity' => $package['p_pack'], 'unit_type' => strtolower($package['p_pack_unit']), 'unit_description' => $package['p_pack'].strtolower($package['p_pack_unit'])
],$token);
SimpleLogs::writeLog('unit_quantity:'.$package['p_pack'].' unit_type:'.strtolower($package['p_pack_unit']).' unit_description:'.$package['p_pack'].strtolower($package['p_pack_unit']), __CLASS__.':batchUpdatePackagesInfo');
}else{
SimpleLogs::writeLog('unit_description:'.$package['p_pack'].strtolower($package['p_pack_unit']).'数量不是数字,跳过', __CLASS__.':batchUpdatePackagesInfo');
continue;
}
}catch(\Throwable $exception){
SimpleLogs::writeLog($exception->getMessage(), __CLASS__.':batchUpdatePackagesInfo', 'error');
}
}
}
sleep(5);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment