|
|
@@ -141,7 +141,6 @@ class TestController extends Controller
|
|
|
$models = WaybillPriceModel::query()->get();
|
|
|
foreach ($models as $model){
|
|
|
if ($model->city_name == '汕头/汕尾'){
|
|
|
- LogService::log(__CLASS__,"修改运输计费",$model->toJson());
|
|
|
$region1 = Region::query()->where("name","汕头")->first();
|
|
|
$region2 = Region::query()->where("name","汕尾")->first();
|
|
|
$model->update([
|
|
|
@@ -159,6 +158,7 @@ class TestController extends Controller
|
|
|
'base_fee'=> $model->base_fee,
|
|
|
'initial_weight'=> $model->initial_weight
|
|
|
]);
|
|
|
+ LogService::log(__CLASS__,"修改运输计费",$model->toJson());
|
|
|
continue;
|
|
|
}
|
|
|
$obj = [];
|
|
|
@@ -169,8 +169,32 @@ class TestController extends Controller
|
|
|
$obj["city_id"] = app(RegionService::class)->getCity($model->city_name);;
|
|
|
}
|
|
|
if (count($obj)>0){
|
|
|
+ $model->update($obj);
|
|
|
LogService::log(__CLASS__,"修改运输计费",$model->toJson());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ dd("OK");
|
|
|
+ }
|
|
|
+
|
|
|
+ public function zzd1()
|
|
|
+ {
|
|
|
+ ini_set('max_execution_time',2500);
|
|
|
+ ini_set('memory_limit','1526M');
|
|
|
+ $models = Waybill::query()->whereNotNull("origination_city_id")
|
|
|
+ ->orWhereNotNull("destination_city_id")->get();
|
|
|
+ foreach ($models as $model){
|
|
|
+ $obj = [];
|
|
|
+ if ($model->origination_city_id){
|
|
|
+ $city = City::query()->find($model->origination_city_id)->name ?? null;
|
|
|
+ if ($city)$obj["origination_city_id"] = app(RegionService::class)->getCity($city);
|
|
|
+ }
|
|
|
+ if ($model->destination_city_id){
|
|
|
+ $city = City::query()->find($model->destination_city_id)->name ?? null;
|
|
|
+ if ($city)$obj["destination_city_id"] = app(RegionService::class)->getCity($city);
|
|
|
+ }
|
|
|
+ if (count($obj)>0){
|
|
|
$model->update($obj);
|
|
|
+ LogService::log(__CLASS__,"修改运输单",$model->toJson());
|
|
|
}
|
|
|
}
|
|
|
dd("OK");
|