|
|
@@ -156,17 +156,9 @@ class TestController extends Controller
|
|
|
return call_user_func([$this, $method], $request);
|
|
|
}
|
|
|
|
|
|
- public function repairOwner()
|
|
|
+ public function test()
|
|
|
{
|
|
|
- foreach (OwnerStoragePriceModel::query()->get() as $item){
|
|
|
- $item->update(["price"=>[$item->price]]);
|
|
|
- }
|
|
|
- foreach (OwnerPriceExpressProvince::query()->get() as $item){
|
|
|
- $item->update([
|
|
|
- "initial_weight_price" => [[$item->initial_weight_price]],
|
|
|
- "additional_weight_price" => [[$item->additional_weight_price]],
|
|
|
- ]);
|
|
|
- }
|
|
|
+ return view("test");
|
|
|
}
|
|
|
public function assignBatch(){
|
|
|
$batches = collect([
|
|
|
@@ -212,110 +204,6 @@ class TestController extends Controller
|
|
|
];*/
|
|
|
}
|
|
|
|
|
|
- public function syncWeight()
|
|
|
- {
|
|
|
- $pack = OrderPackageCountingRecord::query()->get();
|
|
|
- foreach ($pack as $p) {
|
|
|
- $yesterday = $p->targeted_at;
|
|
|
- Cache::pull("weight." . $yesterday);
|
|
|
- OrderPackageCountingRecord::query()->where("targeted_at", $yesterday)->delete();
|
|
|
- $sql = <<<sql
|
|
|
-SELECT DATE_FORMAT(order_packages.created_at,'%Y-%m-%d') date,
|
|
|
-SUM(CASE WHEN order_packages.weighed_at IS NOT NULL THEN 1 ELSE 0 END) AS count,
|
|
|
-COUNT(1) total FROM order_packages LEFT JOIN orders ON order_packages.order_id=orders.id WHERE orders.wms_status != '订单取消'
|
|
|
-AND order_packages.created_at BETWEEN '{$yesterday} 00:00:00' AND '{$yesterday} 23:59:59' GROUP BY date
|
|
|
-sql;
|
|
|
- $result = DB::selectOne(DB::raw($sql));
|
|
|
- if (!$result) $obj = [
|
|
|
- "targeted_at" => $yesterday,
|
|
|
- "un_weigh_count" => 0,
|
|
|
- "total_count" => 0
|
|
|
- ]; else $obj = [
|
|
|
- "targeted_at" => $result->date,
|
|
|
- "un_weigh_count" => $result->count,
|
|
|
- "total_count" => $result->total,
|
|
|
- ];
|
|
|
- /** @var \stdClass $model */
|
|
|
- $model = OrderPackageCountingRecord::query()->create($obj);
|
|
|
- Cache::put("weight." . $yesterday, [
|
|
|
- "date" => $yesterday,
|
|
|
- "total" => $model->total_count,
|
|
|
- "count" => $model->un_weigh_count,
|
|
|
- "value" => $model->total_count ? intval(($model->un_weigh_count / $model->total_count) * 100) : 0
|
|
|
- ]);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public function sync()
|
|
|
- {
|
|
|
- ini_set('max_execution_time', 2500);
|
|
|
- ini_set('memory_limit', '1526M');
|
|
|
- foreach (Batch::query()->with("orders")->where("created_at", ">", "2021-01-20 15:00:00")->get() as $batch) {
|
|
|
- $order = [];
|
|
|
- $map = [];
|
|
|
- foreach ($batch->orders as $o) {
|
|
|
- $order[] = $o->code;
|
|
|
- $map[$o->code] = $o->id;
|
|
|
- }
|
|
|
- $sql = <<<sql
|
|
|
-SELECT ORDERNO,WAVENO,SEQNO,EDITTIME FROM DOC_WAVE_DETAILS WHERE WAVENO = ? AND ORDERNO IN (''
|
|
|
-sql;
|
|
|
- foreach ($order as $o) {
|
|
|
- $sql .= ",'" . $o . "'";
|
|
|
- }
|
|
|
- $sql .= ")";
|
|
|
- $re = DB::connection("oracle")->select(DB::raw($sql), [$batch->code]);
|
|
|
- foreach ($re as $r) {
|
|
|
- OrderBin::query()->firstOrCreate([
|
|
|
- 'order_id' => $map[$r->orderno],
|
|
|
- 'number' => $r->seqno,
|
|
|
- ]);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public function mergeCarrier()
|
|
|
- {
|
|
|
- $carriers = Carrier::query()->get();
|
|
|
- $logistics = [];
|
|
|
- $map = [];
|
|
|
- foreach ($carriers as $carrier) {
|
|
|
- $map[$carrier->name] = $carrier->id;
|
|
|
- $lo = Logistic::query()->where("name", $carrier->name)->first();
|
|
|
- if ($lo) {
|
|
|
- if ($lo->type == '快递') {
|
|
|
-// $lo->update(["type"=>"全部"]);$lo->save();
|
|
|
- }
|
|
|
- continue;
|
|
|
- };
|
|
|
- $logistics[] = [
|
|
|
- "name" => $carrier->name,
|
|
|
- 'mobile' => $carrier->mobile,
|
|
|
- 'delivery_fee' => $carrier->delivery_fee,
|
|
|
- 'remark' => $carrier->remark,
|
|
|
- "type" => "物流"
|
|
|
- ];
|
|
|
- }
|
|
|
- Logistic::query()->insert($logistics);
|
|
|
- $ls = Logistic::query()->where("type", "物流")->get();
|
|
|
- $result = [];
|
|
|
- foreach ($ls as $l) {
|
|
|
- if (isset($map[$l->name])) $result[$map[$l->name]] = $l->id;
|
|
|
- }
|
|
|
- LogService::log(__METHOD__, "同步承运商", json_encode($result));
|
|
|
- foreach ($result as $tag => $val) {
|
|
|
- Waybill::query()->where("logistic_id", $tag)->update([
|
|
|
- "logistic_id" => $val
|
|
|
- ]);
|
|
|
- WaybillPriceModel::query()->where("logistic_id", $tag)->update([
|
|
|
- "logistic_id" => $val
|
|
|
- ]);
|
|
|
- DB::table("logistic_user")->where("logistic_id", $tag)->update([
|
|
|
- "logistic_id" => $val
|
|
|
- ]);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
public function updateLaborRemark()
|
|
|
{
|
|
|
$laborReports = LaborReport::query()->with(['remarks' => function ($query) {
|
|
|
@@ -366,11 +254,6 @@ sql;
|
|
|
dd($uploaded . '/' . $count);
|
|
|
}
|
|
|
|
|
|
- function tlog(Request $request)
|
|
|
- {
|
|
|
- app('LogService')->log(__METHOD__, 'cczdelme' . __FUNCTION__, json_encode($request->all()), null);
|
|
|
- }
|
|
|
-
|
|
|
function setCache(Request $request)
|
|
|
{
|
|
|
$today = now();
|
|
|
@@ -564,12 +447,6 @@ sql;
|
|
|
return "OK";
|
|
|
}
|
|
|
|
|
|
- public function tNull()
|
|
|
- {
|
|
|
- User::query()->get()->toArray();
|
|
|
- User::query()->get()->toJson();
|
|
|
- }
|
|
|
-
|
|
|
public function deletePackageAuthority()
|
|
|
{
|
|
|
$authorities = Authority::where('name', 'like', '%包裹信息%')->get();
|
|
|
@@ -577,240 +454,6 @@ sql;
|
|
|
$authority->delete();
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
- function test()
|
|
|
- {
|
|
|
- $ids = [];
|
|
|
- $logs = Log::query()->select('description')->where('type', '同步时WMS中未找到这些订单')->get();
|
|
|
- foreach ($logs as $log) {
|
|
|
- $arr = [];
|
|
|
- eval("\$arr = " . $log->description . '; ');
|
|
|
- if (count($arr) < 1) continue;
|
|
|
- $ids = array_merge($ids, $arr);
|
|
|
- }
|
|
|
- $ids = array_unique($ids);
|
|
|
- $error = [];
|
|
|
- foreach ($ids as $id) {
|
|
|
- $package = Package::query()->find($id);
|
|
|
- /** @var OrderPackageService */
|
|
|
- $orderPackage = app('OrderPackageService')->firstOrCreate($package->logistic_number,
|
|
|
- ['batch_number' => $package->batch_number,
|
|
|
- 'batch_rule' => $package->batch_rule,
|
|
|
- 'bulk' => $package->bulk,
|
|
|
- 'weight' => $package->weight,
|
|
|
- 'length' => $package->length,
|
|
|
- 'width' => $package->width,
|
|
|
- 'height' => $package->height,
|
|
|
- 'paper_box_id' => $package->paper_box_id,
|
|
|
- 'measuring_machine_id' => $package->measuring_machine_id,
|
|
|
- 'weighed_at' => $package->weighed_at,
|
|
|
- 'status' => $package->status]);
|
|
|
- if (!$orderPackage) array_push($error, $package->id);
|
|
|
- }
|
|
|
- if (count($error) > 0) app('LogService')->log(__METHOD__, "同步时WMS中未找到这些订单_two", json_encode($error));
|
|
|
- }
|
|
|
-
|
|
|
- public function test5()
|
|
|
- {
|
|
|
- ini_set('max_execution_time', 2500);
|
|
|
- ini_set('memory_limit', '1526M');
|
|
|
- //清理冗余条码
|
|
|
-// $this->cleanBarcode();
|
|
|
-
|
|
|
- while (true) {
|
|
|
- $toDay = Carbon::now();
|
|
|
- $skus = DB::select(DB::raw('select sku from commodities group by sku,owner_id having count(*)>1 limit 500 '));
|
|
|
- $skus = array_column($skus, 'sku');
|
|
|
-
|
|
|
- $commodities = Commodity::query()->with('barcodes')->whereNotNull('owner_id')->whereIn('sku', $skus)->get();
|
|
|
-
|
|
|
-
|
|
|
- if (count($commodities) < 1) return "SUCCESS";
|
|
|
- $commodityMap = [];
|
|
|
- $commodityDel = [];
|
|
|
- $commodityTag = [];
|
|
|
- $commodityBar = [];
|
|
|
- $createBarcodes = [];
|
|
|
- $logs = [];
|
|
|
- foreach ($commodities as $commodity) {
|
|
|
- if ($commodityMap[$commodity->sku . '_' . $commodity->owner_id] ?? false) {
|
|
|
- $codes = $commodity->barcodes ? array_column($commodity->barcodes->toArray(), 'code') : [];
|
|
|
- $logs[] = [
|
|
|
- 'id' => $commodity->id,
|
|
|
- 'sku' => $commodity->sku,
|
|
|
- 'owner_id' => $commodity->owner_id,
|
|
|
- 'code' => $codes,
|
|
|
- ];
|
|
|
- $commodityDel[] = $commodity->id;
|
|
|
- $commodityTag[$commodity->id] = $commodityMap[$commodity->sku . '_' . $commodity->owner_id];
|
|
|
-
|
|
|
- $arr = array_diff($codes, $commodityBar[$commodity->sku . '_' . $commodity->owner_id]);
|
|
|
- foreach ($arr as $code) {
|
|
|
- if (!$code) continue;
|
|
|
- $createBarcodes[] = [
|
|
|
- 'code' => $code,
|
|
|
- 'commodity_id' => $commodityMap[$commodity->sku . '_' . $commodity->owner_id],
|
|
|
- 'created_at' => $toDay,
|
|
|
- ];
|
|
|
- }
|
|
|
- } else {
|
|
|
- $commodityMap[$commodity->sku . '_' . $commodity->owner_id] = $commodity->id;
|
|
|
- $commodityBar[$commodity->sku . '_' . $commodity->owner_id] = $commodity->barcodes ? array_column($commodity->barcodes->toArray(), 'code') : [];
|
|
|
- }
|
|
|
- }
|
|
|
- dd($commodityMap, $commodityDel, $commodityTag);
|
|
|
- app('LogService')->log(__METHOD__, '清理商品', json_encode($logs, JSON_UNESCAPED_UNICODE));
|
|
|
- app('LogService')->log(__METHOD__, '重新分配商品', json_encode($commodityTag, JSON_UNESCAPED_UNICODE));
|
|
|
-
|
|
|
- app('InventoryAccountMissionService')->batchUpdateItself('commodity_id', $commodityTag);//批量更新库存盘点任务
|
|
|
- app('InventoryCompareService')->batchUpdateItself('commodity_id', $commodityTag);//批量更新库存对比
|
|
|
- app('InventoryDailyLogService')->batchUpdateItself('commodity_id', $commodityTag);//批量更新库存每日记录
|
|
|
- app('ProcessesContentService')->batchUpdateItself('commodity_id', $commodityTag);//批量更新二次加工内容单
|
|
|
- app('StoreCheckingReceiveItemService')->batchUpdateItself('commodity_id', $commodityTag);//批量更新入库盘收一体
|
|
|
- app('OrderPackageCommoditiesService')->batchUpdateItself('commodity_id', $commodityTag);//批量更新订单商品
|
|
|
-
|
|
|
- app('LogService')->log(__METHOD__, '删除商品与对应条码', json_encode($commodityDel, JSON_UNESCAPED_UNICODE));
|
|
|
- CommodityBarcode::query()->whereIn('commodity_id', $commodityDel)->delete();
|
|
|
- Commodity::destroy($commodityDel);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- private function cleanBarcode()
|
|
|
- {
|
|
|
-
|
|
|
- $logCommodityBarcodes = CommodityBarcode::query()->where('code', "")->get();
|
|
|
- if (count($logCommodityBarcodes) > 0) app('LogService')->log(__METHOD__, "纠正商品-删除空条码", json_encode($logCommodityBarcodes, JSON_UNESCAPED_UNICODE));
|
|
|
-
|
|
|
- CommodityBarcode::query()->where('code', "")->delete();
|
|
|
- $barcodes = DB::select(DB::raw('select * from commodity_barcodes c
|
|
|
-where (c.code,c.commodity_id) in (select code,commodity_id from commodity_barcodes group by code,commodity_id having count(*) > 1) order by commodity_id'));
|
|
|
- $barcodeMap = [];
|
|
|
- $barcodeDelete = [];
|
|
|
- foreach ($barcodes as $barcode) {
|
|
|
- if (isset($barcodeMap[$barcode->code . '_' . $barcode->commodity_id])) $barcodeDelete[] = $barcode->id;
|
|
|
- else $barcodeMap[$barcode->code . '_' . $barcode->commodity_id] = $barcode->id;
|
|
|
- }
|
|
|
-
|
|
|
- $logCommodityBarcodes = CommodityBarcode::query()->whereIn('id', $barcodeDelete)->get();
|
|
|
- if (count($logCommodityBarcodes) > 0) app('LogService')->log(__METHOD__, "纠正商品-删除重复条码", json_encode($logCommodityBarcodes, JSON_UNESCAPED_UNICODE));
|
|
|
-
|
|
|
- CommodityBarcode::destroy($barcodeDelete);
|
|
|
- }
|
|
|
-
|
|
|
- private function multiCodes()
|
|
|
- {
|
|
|
-
|
|
|
- $barcode = 'BG10B1014C002100';
|
|
|
- $commodity = Commodity::whereHas('barcodes', function (Builder $query) use ($barcode) {
|
|
|
- $query->where('code', $barcode);
|
|
|
- })->where('owner_id', 4)->first();
|
|
|
- $codes = $commodity->barcodes->map(function ($barcode) {
|
|
|
- return $barcode->code ?? '';
|
|
|
- });
|
|
|
- foreach ($codes as $code) {
|
|
|
- $commodity = Commodity::whereHas('barcodes', function (Builder $query) use ($barcode) {
|
|
|
- $query->where('code', $barcode);
|
|
|
- })->where('owner_id', 4)->get();
|
|
|
- dump($commodity);
|
|
|
- }
|
|
|
- die();
|
|
|
- $commodityBuilder = Commodity::query();
|
|
|
- $commodityBuilder->where('owner_id', 4)->first();
|
|
|
- $commodityBuilder->whereHas('barcodes', function (Builder $query) use ($barcode, $codes) {
|
|
|
- foreach ($codes as $code) {
|
|
|
- $query->orWhere('code', $code);
|
|
|
- }
|
|
|
- });
|
|
|
- dd($commodity, $codes, $commodityBuilder->get());
|
|
|
- }
|
|
|
-
|
|
|
- public function correctCommodity()
|
|
|
- {
|
|
|
- ini_set('max_execution_time', 2500);
|
|
|
- ini_set('memory_limit', '1526M');
|
|
|
- //清理冗余条码
|
|
|
- //$this->cleanBarcode();
|
|
|
-
|
|
|
- //获取重复条码
|
|
|
- $commodities = DB::select(DB::raw('select commodities.name,commodities.sku,commodities.owner_id,commodity_barcodes.id as barcode_id,commodity_barcodes.code as barcode_code,commodity_barcodes.commodity_id from commodities LEFT JOIN commodity_barcodes on commodities.id = commodity_barcodes.commodity_id
|
|
|
-where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owner_id,commodity_barcodes.code from commodities LEFT JOIN commodity_barcodes on commodities.id = commodity_barcodes.commodity_id group by commodities.owner_id,commodity_barcodes.code having count(*) > 1) order by commodities.owner_id,commodity_barcodes.code'));
|
|
|
-
|
|
|
- //对比map池
|
|
|
- $commodityMap = [];
|
|
|
- //需要删除项
|
|
|
- $commodityDelete = [];
|
|
|
- foreach ($commodities as $index => $commodity) {
|
|
|
- $commodity->barcode_code = strtolower(trim($commodity->barcode_code));
|
|
|
- //货主+条码 为唯一key值 设想正常数据下同货主不应该有同条码
|
|
|
- $key = $commodity->owner_id . '_' . $commodity->barcode_code;
|
|
|
- //使用map池对比为重复数据
|
|
|
- if (isset($commodityMap[$key])) {
|
|
|
- //获取下标指针指向的源数据
|
|
|
- $c = $commodities[$commodityMap[$key]];
|
|
|
- //源数据不符合规范,当前数据替换掉它
|
|
|
- if (($c->sku == null || $c->sku == "") && ($commodity->sku != null && $commodity->sku != "")) {
|
|
|
- $commodityDelete[] = $commodityMap[$key];
|
|
|
- $commodityMap[$key] = $index;
|
|
|
- } else {
|
|
|
- //当前数据比源数据更符合预期,替换掉
|
|
|
- if (($c->sku == $commodity->sku) && (strlen($c->name) < strlen($commodity->name))) {
|
|
|
- $commodityDelete[] = $commodityMap[$key];
|
|
|
- $commodityMap[$key] = $index;
|
|
|
- } else {
|
|
|
- //扔进处理池
|
|
|
- $commodityDelete[] = $index;
|
|
|
- }
|
|
|
- }
|
|
|
- //第一次出现的新数据,val为下标,当作指针指向源数据
|
|
|
- } else $commodityMap[$key] = $index;
|
|
|
- }
|
|
|
- $createBarcodes = []; //批量生成条码
|
|
|
- $deleteCommodities = []; //批量删除商品及商品条码
|
|
|
-
|
|
|
- $updateCommodities = [];
|
|
|
- foreach ($commodityDelete as $index) {
|
|
|
- //获取到被处理数据 与 目标数据
|
|
|
- $del = $commodities[$index];
|
|
|
- $target = $commodities[$commodityMap[$del->owner_id . '_' . $del->barcode_code]];
|
|
|
-
|
|
|
- //记录ID删除商品与条码
|
|
|
- $deleteCommodities[] = $del->commodity_id;
|
|
|
-
|
|
|
- //有效条码合并
|
|
|
- $barcodes = DB::select(DB::raw("select * from
|
|
|
- (select * from commodity_barcodes where commodity_id = " . $del->commodity_id . ")a
|
|
|
- where (select count(1) as num from commodity_barcodes b
|
|
|
- where commodity_id = " . $target->commodity_id . " and b.code = a.code) = 0"));
|
|
|
- if (count($barcodes) > 0) {
|
|
|
- foreach ($barcodes as $barcode) {
|
|
|
- $createBarcodes[] = ['code' => $barcode->code, 'commodity_id' => $target->commodity_id];
|
|
|
- }
|
|
|
- }
|
|
|
- $updateCommodities[$del->commodity_id] = $target->commodity_id;
|
|
|
- }
|
|
|
- if (count($updateCommodities) > 0) {
|
|
|
- app('InventoryAccountMissionService')->batchUpdateItself('commodity_id', $updateCommodities);//批量更新库存盘点任务
|
|
|
- app('InventoryCompareService')->batchUpdateItself('commodity_id', $updateCommodities);//批量更新库存对比
|
|
|
- app('InventoryDailyLogService')->batchUpdateItself('commodity_id', $updateCommodities);//批量更新库存每日记录
|
|
|
- app('ProcessesContentService')->batchUpdateItself('commodity_id', $updateCommodities);//批量更新二次加工内容单
|
|
|
- app('StoreCheckingReceiveItemService')->batchUpdateItself('commodity_id', $updateCommodities);//批量更新入库盘收一体
|
|
|
- app('OrderPackageCommoditiesService')->batchUpdateItself('commodity_id', $updateCommodities);//批量更新订单商品
|
|
|
- }
|
|
|
-
|
|
|
- if (count($createBarcodes) > 0) app('LogService')->log(__METHOD__, "纠正商品-录入合并条码", json_encode(data_get($createBarcodes, '*.id'), JSON_UNESCAPED_UNICODE));
|
|
|
-
|
|
|
- CommodityBarcode::query()->insert($createBarcodes);
|
|
|
- $logCommodityBarcodes = CommodityBarcode::query()->whereIn('commodity_id', $deleteCommodities)->get();
|
|
|
- if (count($logCommodityBarcodes) > 0) app('LogService')->log(__METHOD__, "纠正商品-删除无用商品条码", json_encode(data_get($logCommodityBarcodes, '*.id'), JSON_UNESCAPED_UNICODE));
|
|
|
-
|
|
|
- CommodityBarcode::query()->whereIn('commodity_id', $deleteCommodities)->delete();
|
|
|
-
|
|
|
-// $logCommodities = Commodity::query()->whereIn('id',$deleteCommodities)->get();
|
|
|
- if (count($deleteCommodities) > 0) app('LogService')->log(__METHOD__, "纠正商品-删除无用商品", json_encode($deleteCommodities, JSON_UNESCAPED_UNICODE));
|
|
|
-
|
|
|
- Commodity::destroy($deleteCommodities);
|
|
|
- }
|
|
|
-
|
|
|
/*1*/
|
|
|
function socket(Request $request)
|
|
|
{/**/
|
|
|
@@ -896,16 +539,6 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
|
|
|
// ]))->save();
|
|
|
}
|
|
|
|
|
|
- public function usage()
|
|
|
- {
|
|
|
- dd(Request::all());
|
|
|
- }
|
|
|
-
|
|
|
- public function relating()
|
|
|
- {
|
|
|
- dd(OrderIssue::query()->where('id', 182)->paginate()->total());
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
public function changeOrder()
|
|
|
{
|
|
|
@@ -936,13 +569,6 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
|
|
|
// orderService getCreateOrderModelsByWMSOrderHeaders
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- public function view()
|
|
|
- {
|
|
|
- return view('test');
|
|
|
- }
|
|
|
-
|
|
|
public function cleanOrderRepeat()
|
|
|
{
|
|
|
|
|
|
@@ -1191,44 +817,6 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
|
|
|
if (count($updateParams) > 0) app(BatchUpdateService::class)->batchUpdate('store_items', $updateParams);
|
|
|
}
|
|
|
|
|
|
- function testUpdateStores()
|
|
|
- {
|
|
|
- $stores = Store::query()->where('stored_method', '快速入库')->get();
|
|
|
- $updated_at = Carbon::now()->toDateTimeString();
|
|
|
- $updateParams = [[
|
|
|
- 'id', 'is_fast_stored', 'updated_at'
|
|
|
- ]];
|
|
|
- foreach ($stores as $store) {
|
|
|
- if ($store->stored_method != '快速入库') continue;
|
|
|
- $updateParams[] = [
|
|
|
- 'id' => $store->id,
|
|
|
- 'is_fast_stored' => '快速入库',
|
|
|
- 'updated_at' => $updated_at,
|
|
|
- ];
|
|
|
- }
|
|
|
- if (count($updateParams) > 1) app(BatchUpdateService::class)->batchUpdate('stores', $updateParams);
|
|
|
- }
|
|
|
-
|
|
|
- public function testSyncAsn()
|
|
|
- {
|
|
|
-// dump('hendle...');
|
|
|
- dump((string)Carbon::now());
|
|
|
-// dump(memory_get_usage() / 1024 / 1024);
|
|
|
- $task = new WasSyncWmsAsnInformation();
|
|
|
- $task->handle();
|
|
|
- dump((string)Carbon::now());
|
|
|
-// dump('hendle...end');
|
|
|
-// dump(memory_get_usage() / 1024 / 1024);
|
|
|
-// dump(memory_get_peak_usage() / 1024 / 1024);
|
|
|
-// return view('test');
|
|
|
- }
|
|
|
-
|
|
|
- public function editOrderSyncAt()
|
|
|
- {
|
|
|
- ValueStore::query()->where('name', 'order_last_created_sync_at')->update(['value' => '2020-12-22 09:00:00']);
|
|
|
- ValueStore::query()->where('name', 'order_last_updated_sync_at')->update(['value' => '2020-12-22 09:00:00']);
|
|
|
- }
|
|
|
-
|
|
|
public function syncOrderTrackingTask()
|
|
|
{
|
|
|
$service = new OrderTrackingService();
|