|
|
@@ -870,63 +870,6 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
|
|
|
$service = app('OrderIssueService');
|
|
|
$service->updateByWmsOrders($orderHeaders);
|
|
|
}
|
|
|
- public function testCollectMethod()
|
|
|
- {
|
|
|
- $startDate=Carbon::parse('2020-11-11 23:59:59')->subSeconds(65)->format('Y-m-d H:i:s');
|
|
|
- $asnHerders=app(OracleDocAsnHerderService::class)->getWmsAsnOnStartDateCreate($startDate);
|
|
|
- if ($asnHerders->isEmpty())return null;
|
|
|
- /**
|
|
|
- * @var OwnerService $ownerService
|
|
|
- * @var WarehouseService $wareHouseService
|
|
|
- */
|
|
|
- $ownerService = app(OwnerService::class);
|
|
|
- $owners=$ownerService->getByWmsOrders($asnHerders);
|
|
|
- $wareHouseService=app(WarehouseService::class);
|
|
|
- $warehouses=$wareHouseService->getByWms($asnHerders);
|
|
|
- foreach ($owners as $owner) {
|
|
|
- $owners_code_map[$owner->code] = $owner;
|
|
|
- }
|
|
|
- foreach ($warehouses as $warehouse) {
|
|
|
- $warehouses_code_map[$warehouse->code] = $warehouse;
|
|
|
- }
|
|
|
- var_dump('createStoreParam_start',Carbon::now());
|
|
|
- $params=app(StoreService::class)->getParamsByAsnHeader($asnHerders,$owners_code_map,$warehouses_code_map);
|
|
|
- var_dump('createStoreParam_end',Carbon::now());
|
|
|
-
|
|
|
- var_dump('insertStore_start',Carbon::now());
|
|
|
- if(count($params)> 0){
|
|
|
- //app(StoreService::class)->insertStore($params);
|
|
|
- DB::table('stores')->insert($params);
|
|
|
- }
|
|
|
- var_dump('insertStore_end',Carbon::now());
|
|
|
- }
|
|
|
- public function testMethodSecond(){
|
|
|
- $param=[
|
|
|
- "asn_code" => "ASN2011120516",
|
|
|
- "warehouse_id" => 2,
|
|
|
- "owner_id" => 35,
|
|
|
- "stored_method" => "退货入库",
|
|
|
- "status" => "订单创建",
|
|
|
- "remark" => null,
|
|
|
- "created_at" => "2020-11-12 14:12:42",
|
|
|
- "updated_at" => "2020-11-12 14:12:42",
|
|
|
- ];
|
|
|
- var_dump('start',Carbon::now());
|
|
|
- //Store::query()->insert($param);
|
|
|
- app(StoreService::class)->insertStore($param);
|
|
|
- var_dump('end',Carbon::now());
|
|
|
- }
|
|
|
-
|
|
|
- public function testSyncAsn()
|
|
|
- {
|
|
|
- dump('start'.(string)Carbon::now());
|
|
|
-app(StoreService::class)->storeCreateByWms();
|
|
|
-// $start=ValueStore::query()->where('name','asn_last_created_sync_at')->value('value');
|
|
|
-// app(OracleDocAsnHerderService::class)->getWmsAsnOnStartDateCreate($start);
|
|
|
- app(StoreService::class)->storeUpdateByWms();
|
|
|
- dump('end'.(string)Carbon::now());
|
|
|
- }
|
|
|
-
|
|
|
public function changeOrder()
|
|
|
{
|
|
|
/**
|
|
|
@@ -1199,4 +1142,17 @@ app(StoreService::class)->storeCreateByWms();
|
|
|
if(count($update_params) == 0)return ;
|
|
|
$orderTrackingService->batchUpdate($update_params);
|
|
|
}
|
|
|
+ public function testUpdateSkuNameBarcodeToCommodity_id()
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+ public function testSyncAsn()
|
|
|
+ {
|
|
|
+ dump('start'.(string)Carbon::now());
|
|
|
+// $start=ValueStore::query()->where('name','asn_last_created_sync_at')->value('value');
|
|
|
+// app(OracleDocAsnHerderService::class)->getWmsAsnOnStartDateCreate($start);
|
|
|
+ app(StoreService::class)->storeCreateByWms();
|
|
|
+ //app(StoreService::class)->storeUpdateByWms();
|
|
|
+ dump('end'.(string)Carbon::now());
|
|
|
+ }
|
|
|
}
|