mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 14:40:44 +00:00
库存
This commit is contained in:
parent
0b72923c4e
commit
12bfcb0241
@ -49,11 +49,12 @@ class CheckSkuQualityPeriod extends Command
|
|||||||
|
|
||||||
//查询未处理过的快过期的异常订单
|
//查询未处理过的快过期的异常订单
|
||||||
$purchaseRecords = DB::table('purchase_records as a')
|
$purchaseRecords = DB::table('purchase_records as a')
|
||||||
->select("a.created_at", "a.num", "b.title", "b.stock", "a.id", "b.id as sku_id", "b.external_sku_id")
|
->select("a.created_at","a.date", "a.num", "b.title", "b.stock", "a.id", "b.id as sku_id", "b.external_sku_id")
|
||||||
->leftJoin('goods_skus as b', 'a.sku_id', '=', 'b.id')
|
->leftJoin('goods_skus as b', 'a.external_sku_id', '=', 'b.external_sku_id')
|
||||||
->where("a.check_status", "=", 0)
|
->where("a.check_status", "=", 0)
|
||||||
->whereBetween('a.expire_time', [$startTime, $endTime])->get();
|
->whereBetween('a.expire_time', [$startTime, $endTime])->get();
|
||||||
Log::info('purchaseRecords', (array)$purchaseRecords);
|
Log::info('采购临期记录', [$purchaseRecords]);
|
||||||
|
|
||||||
if ($purchaseRecords->isNotEmpty()) {
|
if ($purchaseRecords->isNotEmpty()) {
|
||||||
$messageService = new MessageService();
|
$messageService = new MessageService();
|
||||||
$updateIds = [];
|
$updateIds = [];
|
||||||
@ -67,7 +68,6 @@ class CheckSkuQualityPeriod extends Command
|
|||||||
}
|
}
|
||||||
$updateIds[] = $v->id;
|
$updateIds[] = $v->id;
|
||||||
//更新下状态
|
//更新下状态
|
||||||
|
|
||||||
}
|
}
|
||||||
PurchaseRecords::query()->whereIn('id', $updateIds)->update([
|
PurchaseRecords::query()->whereIn('id', $updateIds)->update([
|
||||||
"check_status" => 1
|
"check_status" => 1
|
||||||
|
|||||||
1
public/nginx.htaccess
Normal file
1
public/nginx.htaccess
Normal file
@ -0,0 +1 @@
|
|||||||
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
Loading…
x
Reference in New Issue
Block a user