|
|
@@ -88,6 +88,8 @@ class PurchaseOrderClass extends BaseClass
|
|
|
}
|
|
|
$productInfoList = ProductClass::getAllByCondition(['id' => ['in', $ids]], null, '*', 'id', true);
|
|
|
|
|
|
+ $hasChange = 0;
|
|
|
+
|
|
|
foreach ($cgItemList as $cgItem) {
|
|
|
$cgItemId = $cgItem->id ?? 0;
|
|
|
$cgItemNum = $cgItem->itemNum ?? 0;
|
|
|
@@ -210,8 +212,24 @@ class PurchaseOrderClass extends BaseClass
|
|
|
$giveGhsId = $giveGhs->id ?? 0;
|
|
|
$sendInfo->bookGhsGiveId = $giveGhsId;
|
|
|
$sendInfo->save();
|
|
|
+ $hasChange = 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ($hasChange == 1) {
|
|
|
+ //通知采购单页要刷新货位
|
|
|
+ $cacheKey = 'ghs_cg_order_staff_refresh_seat_' . $bookSn;
|
|
|
+ $mainId = $order->mainId ?? 0;
|
|
|
+ $staffList = ShopAdminClass::getAllByCondition(['mainId' => $mainId], null, '*', null, true);
|
|
|
+ if (!empty($staffList)) {
|
|
|
+ foreach ($staffList as $staff) {
|
|
|
+ $staffId = $staff->id ?? 0;
|
|
|
+ $params = $cgId . '-' . $staffId;
|
|
|
+ Yii::$app->redis->executeCommand('SADD', [$cacheKey, $params]);
|
|
|
}
|
|
|
}
|
|
|
+ $cacheKey = 'ghs_cg_order_guest_refresh_seat_' . $bookSn;
|
|
|
+ Yii::$app->redis->executeCommand('SADD', [$cacheKey, $cgId]);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1253,7 +1271,7 @@ class PurchaseOrderClass extends BaseClass
|
|
|
//是否需要提醒更新货位
|
|
|
$needRemindRefreshSeat = 0;
|
|
|
if (!empty($shopBookSn) && $shopBookSn == $bookSn) {
|
|
|
- if(isset($orderData['status']) && $orderData['status']==3){
|
|
|
+ if (isset($orderData['status']) && $orderData['status'] == 3) {
|
|
|
$needRemindRefreshSeat = 1;
|
|
|
}
|
|
|
}
|