first commit

This commit is contained in:
Your Name
2026-09-08 11:40:15 +08:00
commit a5353f7eb5
9568 changed files with 1646214 additions and 0 deletions
@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
namespace app\common\service\pharmacy;
final class PharmacySupplyMode
{
/** @param array<string,mixed> $order */
public static function resolve(array $order): string
{
if (strtolower(trim((string) ($order['ship_mode'] ?? ''))) === 'direct') {
return 'direct';
}
if (trim((string) ($order['gancao_reciperl_order_no'] ?? '')) !== '') {
return 'gancao';
}
return 'self';
}
public static function label(string $mode): string
{
return match (strtolower(trim($mode))) {
'direct' => '洛阳直发',
'gancao' => '甘草',
default => '自营',
};
}
}