|
|
@@ -102,15 +102,25 @@ class NoticeController extends PublicController
|
|
|
//零售采购结账通知
|
|
|
if ($capitalType == dict::getDict('capitalType', 'xhPurchase', 'id')) {
|
|
|
$cg = PurchaseClass::getByCondition(['orderSn' => $orderSn], true);
|
|
|
+ $saleId = $cg->saleId ?? 0;
|
|
|
+ $order = OrderClass::getById($saleId, true);
|
|
|
|
|
|
- //不是预订单,并且采购人没有开批发店,则订单直接完成掉
|
|
|
- if (!empty($cg)) {
|
|
|
+ //不是预订单,并且采购人没有开批发店,供货商不是源花汇和小明鲜花,则订单直接完成掉,有三个地方要修改,请搜索关键词zjFinish
|
|
|
+ if (!empty($cg) && !empty($order)) {
|
|
|
if (isset($cg->book) && $cg->book == 0) {
|
|
|
- $cgShopId = $cg->shopId ?? 0;
|
|
|
- $cgShop = ShopClass::getById($cgShopId, true);
|
|
|
- if (!empty($cgShop)) {
|
|
|
- if (isset($cgShop->pfShopId) && $cgShop->pfShopId == 0) {
|
|
|
- PurchaseClass::confirmTake($cg);
|
|
|
+ $ghsShopId = $order->shopId ?? 0;
|
|
|
+ if (getenv('YII_ENV') == 'production') {
|
|
|
+ $specialList = [3, 10649, 8042];
|
|
|
+ } else {
|
|
|
+ $specialList = [36523];
|
|
|
+ }
|
|
|
+ if (!in_array($ghsShopId, $specialList)) {
|
|
|
+ $cgShopId = $cg->shopId ?? 0;
|
|
|
+ $cgShop = ShopClass::getById($cgShopId, true);
|
|
|
+ if (!empty($cgShop)) {
|
|
|
+ if (isset($cgShop->pfShopId) && $cgShop->pfShopId == 0) {
|
|
|
+ PurchaseClass::confirmTake($cg);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -136,8 +146,6 @@ class NoticeController extends PublicController
|
|
|
|
|
|
if (!empty($cg) && $cg->payStatus == 1) {
|
|
|
//微信通知
|
|
|
- $saleId = $cg->saleId ?? 0;
|
|
|
- $order = OrderClass::getById($saleId, true);
|
|
|
if (!empty($order)) {
|
|
|
//订单生成时唤起在线打印
|
|
|
if (isset($order->needPrint) && $order->needPrint == dict::getDict('needPrint', 'need')) {
|