null]); $id = $respond['id'] ?? 0; if (empty($id)) { util::fail('订单号没有生成'); } return $prefix . $id; } //零售商订单号生成 shish 2021.1.19 public static function getOrderSn() { $prefix = 'KD_CS'; if (getenv('YII_ENV', 'local') == 'production') { $prefix = 'KD'; } $respond = \biz\order\classes\OrderSnClass::add(['id' => null]); $id = $respond['id'] ?? 0; if (empty($id)) { util::fail('订单号没有生成'); } return $prefix . $id; } //供货商采购单号 shish 2021.1.19 public static function getGhsPurchaseSn() { $prefix = 'PH_CS'; if (getenv('YII_ENV', 'local') == 'production') { $prefix = 'PH'; } $respond = PurchaseSnClass::add(['id' => null]); $id = $respond['id'] ?? 0; if (empty($id)) { util::fail('采购单号没有生成'); } return $prefix . $id; } //供货商盘点单号 shish 2021.1.19 public static function getGhsCheckSn() { $prefix = 'PD_CS'; if (getenv('YII_ENV', 'local') == 'production') { $prefix = 'PD'; } $respond = CheckSnClass::add(['id' => null]); $id = $respond['id'] ?? 0; if (empty($id)) { util::fail('盘点单号没有生成'); } return $prefix . $id; } //零售商采购单号 shish 2021.1.19 public static function getPurchaseSn() { $prefix = 'CG_CS'; if (getenv('YII_ENV', 'local') == 'production') { $prefix = 'CG'; } $respond = \biz\purchase\classes\PurchaseSnClass::add(['id' => null]); $id = $respond['id'] ?? 0; if (empty($id)) { util::fail('采购单号没有生成'); } return $prefix . $id; } }