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; } //零售商采购单号 shish 2021.1.19 public static function getPurchaseClearSn() { $prefix = 'PC_CS'; if (getenv('YII_ENV', 'local') == 'production') { $prefix = 'PC'; } $respond = PurchaseClearSnClass::add(['id' => null]); $id = $respond['id'] ?? 0; if (empty($id)) { util::fail('单号没有生成'); } return $prefix . $id; } //供货商入库订单号 linqh 2021.1.23 public static function getGhsStockInSn() { $prefix = 'RK_CS'; if (getenv('YII_ENV', 'local') == 'production') { $prefix = 'RK'; } $respond = \bizGhs\order\classes\StockInSnClass::add(['id' => null]); $id = $respond['id'] ?? 0; if (empty($id)) { util::fail('入库单号没有生成'); } return $prefix . $id; } //供货商出库订单号 linqh 2021.1.23 public static function getGhsStockOutSn() { $prefix = 'CK_CS'; if (getenv('YII_ENV', 'local') == 'production') { $prefix = 'CK'; } $respond = \bizGhs\order\classes\StockOutSnClass::add(['id' => null]); $id = $respond['id'] ?? 0; if (empty($id)) { util::fail('出库单号没有生成'); } return $prefix . $id; } //充值单号 shish 2021.2.20 public static function getRechargeSn() { $prefix = 'CZ_CS'; if (getenv('YII_ENV', 'local') == 'production') { $prefix = 'CZ'; } $respond = RechargeSnClass::add(['id' => null]); $id = $respond['id'] ?? 0; if (empty($id)) { util::fail('充值单号没有生成'); } return $prefix . $id; } }