|
|
@@ -9,6 +9,10 @@ use App\Carrier;
|
|
|
use App\City;
|
|
|
use App\Commodity;
|
|
|
use App\CommodityBarcode;
|
|
|
+use App\Console\Commands\CreateOwnerAreaReport;
|
|
|
+use App\Console\Commands\CreateOwnerBillReport;
|
|
|
+use App\Console\Commands\CreateOwnerReport;
|
|
|
+use App\Console\Commands\SyncWmsCommoditiesInformation;
|
|
|
use App\Console\Commands\SyncWMSOrderTask;
|
|
|
use App\Events\CancelOrder;
|
|
|
use App\Http\Requests\ForeignHaiRobotic_taskUpdateRequest;
|
|
|
@@ -21,9 +25,11 @@ use App\Logistic;
|
|
|
use App\Menu;
|
|
|
use App\OracleActAllocationDetails;
|
|
|
use App\OracleBasSKU;
|
|
|
+use App\OracleDOCASNHeader;
|
|
|
use App\OracleDOCOrderHeader;
|
|
|
use App\OracleDocOrderPackingSummary;
|
|
|
use App\OracleDOCWaveDetails;
|
|
|
+use App\OracleDOCWaveHeader;
|
|
|
use App\Order;
|
|
|
use App\OrderBin;
|
|
|
use App\OrderCommodity;
|
|
|
@@ -223,19 +229,6 @@ class TestController extends Controller
|
|
|
dd($uploaded . '/' . $count);
|
|
|
}
|
|
|
|
|
|
- function issues()
|
|
|
- {
|
|
|
- /** @var OrderPackageService $orderPackageService */
|
|
|
- $orderPackageService = app('OrderPackageService');
|
|
|
- $ids = [741, 739, 738, 736, 735, 733, 732, 731, 730, 729, 728, 725, 724, 723, 721, 720, 719, 718, 717, 715, 714, 713, 712, 711, 710, 705, 703, 702, 701, 700, 699, 698, 696, 694, 693, 692, 691, 690];
|
|
|
- $orderIssues = OrderIssue::query()->whereIn('id', $ids)->get();
|
|
|
- $order_ids = data_get($orderIssues, '*.order_id');
|
|
|
- $orders = Order::query()->whereIn('id', $order_ids)->get();
|
|
|
- foreach ($orders as $item) {
|
|
|
- $orderPackageService->createdByOrder($item);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
function tlog(Request $request)
|
|
|
{
|
|
|
app('LogService')->log(__METHOD__, 'cczdelme' . __FUNCTION__, json_encode($request->all()), null);
|
|
|
@@ -256,7 +249,7 @@ class TestController extends Controller
|
|
|
|
|
|
function t1(Request $request)
|
|
|
{
|
|
|
- $user=City::query()->first();
|
|
|
+ $user=City::query()->firstx();
|
|
|
$user['created_at'] = '2020-12-23';
|
|
|
$user->save();
|
|
|
}
|
|
|
@@ -857,26 +850,6 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
|
|
|
unset($warehouse);
|
|
|
}
|
|
|
|
|
|
- public function syncSendOrder()
|
|
|
- {
|
|
|
- $order_issues = OrderIssue::query()->whereNotNull('second_client_no')->get();
|
|
|
- $client_nos = data_get($order_issues, '*.second_client_no');
|
|
|
- $orderHeaders = OracleDOCOrderHeader::query()->selectRaw(implode(',', OracleDOCOrderHeaderService::$columns))
|
|
|
- ->whereIn('SOReference1', $client_nos)
|
|
|
- ->with(['oracleBASCustomer' => function ($query) {
|
|
|
- $query->selectRaw('BAS_CUSTOMER.CustomerID,BAS_CUSTOMER.Customer_Type,BAS_CUSTOMER.Descr_C,BAS_CUSTOMER.Active_Flag');
|
|
|
- }, 'oracleDOCOrderDetails' => function ($query) {
|
|
|
- $query->selectRaw('doc_order_details.orderNo,doc_order_details.customerid,doc_order_details.sku,doc_order_details.QtyOrdered');
|
|
|
- }, 'actAllocationDetails' => function ($query) {
|
|
|
- $query->selectRaw('ACT_Allocation_Details.AllocationDetailsID,ACT_Allocation_Details.OrderNo,ACT_Allocation_Details.Qty_Each,ACT_Allocation_Details.PickToTraceID,ACT_Allocation_Details.CustomerID');
|
|
|
- }, 'oracleBASCode' => function ($query) {
|
|
|
- $query->selectRaw('BAS_Codes.CodeID,BAS_Codes.CodeName_C,BAS_Codes.Code');
|
|
|
- }])
|
|
|
- ->get();
|
|
|
- $service = app('OrderIssueService');
|
|
|
- $service->updateByWmsOrders($orderHeaders);
|
|
|
- }
|
|
|
-
|
|
|
public function changeOrder()
|
|
|
{
|
|
|
/**
|
|
|
@@ -1085,21 +1058,7 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
|
|
|
dd($requests);
|
|
|
}
|
|
|
|
|
|
- public function syncOrderTracking()
|
|
|
- {
|
|
|
- /** @var OrderTrackingService $orderTrackingService */
|
|
|
- $orderTrackingService = app('OrderTrackingService');
|
|
|
- /** @var OrderService $orderService */
|
|
|
- $orderService = app(OrderService::class);
|
|
|
- /*$owners = app(OrderTrackingOwnerService::class)->getTrackingOrderOwner();*/
|
|
|
- /*$startDate = \Illuminate\Support\Carbon::parse('2020-10-28 00:00:00')->toDateTimeString();*/
|
|
|
- $orderNos = ['SO201205001735', 'SO201204003891', 'SO201204003706', 'SO201204002877', 'SO201203003771'];
|
|
|
- $orderHeaders = OracleDOCOrderHeader::query()->with(['oracleDOCOrderDetails', 'actAllocationDetails', 'oracleBASCode'])
|
|
|
- ->whereIn('orderno', $orderNos)
|
|
|
- ->get();
|
|
|
- $orderService->updateByWmsOrders($orderHeaders);
|
|
|
- $orderTrackingService->createByWmsOrderHeader($orderHeaders);
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
public function testSyncOrderTask()
|
|
|
{
|
|
|
@@ -1254,8 +1213,6 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
|
|
|
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());
|
|
|
@@ -1264,19 +1221,13 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
|
|
|
public function testSyncCommodity()
|
|
|
{
|
|
|
dump('start' . (string)Carbon::now());
|
|
|
- /**@var CommodityService $commodityService */
|
|
|
- $commodityService = app(CommodityService::class);
|
|
|
- $commodityService->syncCommodityCreated();
|
|
|
- $commodityService->syncCommodityUpdated();
|
|
|
+ $syncCommodityTask=new SyncWmsCommoditiesInformation();
|
|
|
+ $syncCommodityTask->handle();
|
|
|
dump('end' . (string)Carbon::now());
|
|
|
}
|
|
|
|
|
|
public function testSyncCommodityByMaps()
|
|
|
{
|
|
|
-// $skus = ['5211900982001','5211900982002','5211900982003','5211900982004','5211200641701','5211200641702','5211200641703','5211200641704',
|
|
|
-// '5211800945001','5211800945002','5211800945003','5211800945004','5215300281002','5215300281003','5215300281004',
|
|
|
-// '5215300281005','5215300281006','5215300283102','5215300283103',];
|
|
|
-// $ownerIds=['2'];
|
|
|
dump('get_start' . (string)Carbon::now());
|
|
|
$bas_skus = OracleBasSKU::query()->where('addTime', '>=', '2020-12-14 00:00:00')->select('customerid', 'sku')->get();
|
|
|
|
|
|
@@ -1299,75 +1250,158 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
|
|
|
ValueStore::query()->where('name','order_last_updated_sync_at')->update(['value'=>'2020-12-22 09:00:00']);
|
|
|
}
|
|
|
|
|
|
+ public function syncOrderTrackingTask()
|
|
|
+ {
|
|
|
+ $service = new OrderTrackingService();
|
|
|
+ $start_data = Carbon::parse('2020-12-21 10:00:00');
|
|
|
+ $end_data = Carbon::parse('2020-12-21 10:05:00');
|
|
|
+ $orderNos = OracleDOCOrderHeader::query()->selectRaw('orderno')
|
|
|
+ ->where('addTime', '>=', $start_data)
|
|
|
+ ->where('addTime', '<=', $end_data)
|
|
|
+ ->get()->map(function($orderHeader){
|
|
|
+ return $orderHeader->orderno;
|
|
|
+ });
|
|
|
+ $order_no_list = $orderNos->chunk(3000);
|
|
|
+ foreach ($order_no_list as $order_nos) {
|
|
|
+ $orderHeaders = OracleDOCOrderHeader::query()->selectRaw(implode(',', OracleDOCOrderHeaderService::$columns))
|
|
|
+ ->with(['oracleBASCustomer' => function ($query) {
|
|
|
+ $query->selectRaw('BAS_CUSTOMER.CustomerID,BAS_CUSTOMER.Customer_Type,BAS_CUSTOMER.Descr_C,BAS_CUSTOMER.Active_Flag');
|
|
|
+ }, 'oracleDOCOrderDetails' => function ($query) {
|
|
|
+ $query->selectRaw('doc_order_details.orderNo,doc_order_details.customerid,doc_order_details.sku,doc_order_details.QtyOrdered,doc_order_details.Location');
|
|
|
+ }, 'actAllocationDetails' => function ($query) {
|
|
|
+ $query->selectRaw('ACT_Allocation_Details.AllocationDetailsID,ACT_Allocation_Details.OrderNo,ACT_Allocation_Details.Qty_Each,ACT_Allocation_Details.PickToTraceID,ACT_Allocation_Details.CustomerID,ACT_Allocation_Details.Sku,ACT_Allocation_Details.Location');
|
|
|
+ }, 'oracleBASCode' => function ($query) {
|
|
|
+ $query->selectRaw('BAS_Codes.CodeID,BAS_Codes.CodeName_C,BAS_Codes.Code');
|
|
|
+ }, 'orderType' => function ($query) {
|
|
|
+ $query->selectRaw('BAS_Codes.CodeID,BAS_Codes.CodeName_C,BAS_Codes.Code');
|
|
|
+ }])
|
|
|
+ ->whereIn('DOC_Order_Header.OrderNo', $order_nos)
|
|
|
+ ->get();
|
|
|
+ app(OrderService::class)->syncOrderByWMSOrderHeaders($orderHeaders);
|
|
|
+ app("OrderCommodityService")->syncOrderCommodity($orderHeaders);
|
|
|
+ app('OrderPackageService')->syncOrderPackage($orderHeaders);
|
|
|
+ app("OrderPackageCommoditiesService")->syncOrderPackageCommodities($orderHeaders);
|
|
|
+ $service->createByWmsOrderHeader($orderHeaders);
|
|
|
+ unset($orderHeaders);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public function syncOrderTask()
|
|
|
{
|
|
|
- $start_data = Carbon::parse('2020-12-10 00:00:00');
|
|
|
- $orderHeaders = OracleDOCOrderHeader::query()->selectRaw(implode(',', OracleDOCOrderHeaderService::$columns))
|
|
|
- ->with(['oracleBASCustomer' => function ($query) {
|
|
|
- $query->selectRaw('BAS_CUSTOMER.CustomerID,BAS_CUSTOMER.Customer_Type,BAS_CUSTOMER.Descr_C,BAS_CUSTOMER.Active_Flag');
|
|
|
- }, 'oracleDOCOrderDetails' => function ($query) {
|
|
|
- $query->selectRaw('doc_order_details.orderNo,doc_order_details.customerid,doc_order_details.sku,doc_order_details.QtyOrdered,doc_order_details.Location');
|
|
|
- }, 'actAllocationDetails' => function ($query) {
|
|
|
- $query->selectRaw('ACT_Allocation_Details.AllocationDetailsID,ACT_Allocation_Details.OrderNo,ACT_Allocation_Details.Qty_Each,ACT_Allocation_Details.PickToTraceID,ACT_Allocation_Details.CustomerID,ACT_Allocation_Details.Sku,ACT_Allocation_Details.Location');
|
|
|
- }, 'oracleBASCode' => function ($query) {
|
|
|
- $query->selectRaw('BAS_Codes.CodeID,BAS_Codes.CodeName_C,BAS_Codes.Code');
|
|
|
- }, 'orderType' => function ($query) {
|
|
|
- $query->selectRaw('BAS_Codes.CodeID,BAS_Codes.CodeName_C,BAS_Codes.Code');
|
|
|
- }])->where('DOC_Order_Header.AddTime', '>', $start_data)
|
|
|
- ->get();
|
|
|
$service = new OrderService();
|
|
|
- $service->syncOrder($orderHeaders);
|
|
|
+ $start_data = Carbon::parse('2020-12-21 10:00:00');
|
|
|
+ $end_data = Carbon::parse('2020-12-21 11:00:00');
|
|
|
+ $orderNos = OracleDOCOrderHeader::query()->selectRaw('orderno')
|
|
|
+ ->where('addTime', '>=', $start_data)
|
|
|
+ ->where('addTime', '<=', $end_data)
|
|
|
+ ->get()->map(function($orderHeader){
|
|
|
+ return $orderHeader->orderno;
|
|
|
+ });
|
|
|
+ $order_no_list = $orderNos->chunk(3000);
|
|
|
+ foreach ($order_no_list as $order_nos) {
|
|
|
+ $orderHeaders = OracleDOCOrderHeader::query()->selectRaw(implode(',', OracleDOCOrderHeaderService::$columns))
|
|
|
+ ->with(['oracleBASCustomer' => function ($query) {
|
|
|
+ $query->selectRaw('BAS_CUSTOMER.CustomerID,BAS_CUSTOMER.Customer_Type,BAS_CUSTOMER.Descr_C,BAS_CUSTOMER.Active_Flag');
|
|
|
+ }, 'oracleDOCOrderDetails' => function ($query) {
|
|
|
+ $query->selectRaw('doc_order_details.orderNo,doc_order_details.customerid,doc_order_details.sku,doc_order_details.QtyOrdered,doc_order_details.Location');
|
|
|
+ }, 'actAllocationDetails' => function ($query) {
|
|
|
+ $query->selectRaw('ACT_Allocation_Details.AllocationDetailsID,ACT_Allocation_Details.OrderNo,ACT_Allocation_Details.Qty_Each,ACT_Allocation_Details.PickToTraceID,ACT_Allocation_Details.CustomerID,ACT_Allocation_Details.Sku,ACT_Allocation_Details.Location');
|
|
|
+ }, 'oracleBASCode' => function ($query) {
|
|
|
+ $query->selectRaw('BAS_Codes.CodeID,BAS_Codes.CodeName_C,BAS_Codes.Code');
|
|
|
+ }, 'orderType' => function ($query) {
|
|
|
+ $query->selectRaw('BAS_Codes.CodeID,BAS_Codes.CodeName_C,BAS_Codes.Code');
|
|
|
+ }])
|
|
|
+ ->whereIn('DOC_Order_Header.OrderNo', $order_nos)
|
|
|
+ ->get();
|
|
|
+ $service->syncOrder($orderHeaders);
|
|
|
+ unset($orderHeaders);
|
|
|
+ }
|
|
|
}
|
|
|
- public function cleanOrderIssueRepeat()
|
|
|
+
|
|
|
+ public function testOrderissue()
|
|
|
{
|
|
|
- ini_set('max_execution_time', 6500);
|
|
|
- ini_set('memory_limit', '1526M');
|
|
|
- for ($i = 0; true; $i++) {
|
|
|
- $orderIssue_unique = \App\OrderIssue::withTrashed()
|
|
|
- ->selectRaw('count(1) as count,id,order_id')
|
|
|
- ->whereNotNull('order_id')
|
|
|
- ->orderByDesc('created_at')
|
|
|
- ->groupBy('order_id')
|
|
|
- ->having('count', '>', 1)
|
|
|
- ->limit(100)
|
|
|
+ $orderIssue_unique = \App\OrderIssue::withTrashed()
|
|
|
+ ->selectRaw('count(1) as count,id,order_id')
|
|
|
+ ->whereNotNull('order_id')
|
|
|
+ ->orderByDesc('created_at')
|
|
|
+ ->groupBy('order_id')
|
|
|
+ ->having('count', '>', 1)
|
|
|
+ ->limit(100)
|
|
|
+ ->get();
|
|
|
+ if ($orderIssue_unique->count() == 0) return;
|
|
|
+ foreach ($orderIssue_unique as $item) {
|
|
|
+ $orderIssue_delete = OrderIssue::withTrashed()->where('order_id', $item->order_id)->get();
|
|
|
+ /** @var OrderIssue $order_issue_unique */
|
|
|
+ $order_issue_unique = $orderIssue_delete->whereNull('deleted_at')->first();
|
|
|
+ if (!$order_issue_unique) $order_issue_unique = $orderIssue_delete->first();
|
|
|
+ $ids = [];
|
|
|
+ foreach ($orderIssue_delete as $key => $order_issue) {
|
|
|
+ if ($order_issue->id == $order_issue_unique->id) continue;
|
|
|
+ $ids[] = $order_issue->id;
|
|
|
+ if($order_issue['logistic_number_return'])$order_issue_unique['logistic_number_return'] =$order_issue['logistic_number_return'];
|
|
|
+ if($order_issue['rejecting_status']!='未退回')$order_issue_unique['rejecting_status'] =$order_issue['rejecting_status'];
|
|
|
+ if($order_issue['is_new_rejecting']!='无')$order_issue_unique['is_new_rejecting'] =$order_issue['is_new_rejecting'];
|
|
|
+ if($order_issue['user_workgroup_id'])$order_issue_unique['user_workgroup_id'] =$order_issue['user_workgroup_id'];
|
|
|
+ if($order_issue['imported_status']!='正常')$order_issue_unique['imported_status'] =$order_issue['imported_status'];
|
|
|
+ if($order_issue['custom_code'])$order_issue_unique['custom_code'] =$order_issue['custom_code'];
|
|
|
+ }
|
|
|
+ $order_issue_unique->save();
|
|
|
+ app('LogService')->log(__METHOD__, __FUNCTION__, '修改OrderIssue:' . json_encode($order_issue_unique));
|
|
|
+ $orderIssues = OrderIssue::query()->whereIn('id',$ids)->get();
|
|
|
+ $bool = OrderIssue::query()->whereIn('id',$ids)->forceDelete();
|
|
|
+ if($bool)app('LogService')->log(__METHOD__, __FUNCTION__, '删除OrderIssue:' . json_encode($orderIssues));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public function testChangeOrderTracking()
|
|
|
+ {
|
|
|
+ /** @var OrderTrackingService $service */
|
|
|
+ $service = app(OrderTrackingService::class);
|
|
|
+ $maxId= \App\OrderTracking::query()->orderByDesc('id')->first();
|
|
|
+ $orderTracking_min = \App\OrderTracking::query()->where('logistic_id',0)->orderBy('id')->first();
|
|
|
+ if(!$maxId)return;
|
|
|
+ $maxId = $maxId->id;
|
|
|
+ $minId= $orderTracking_min->id;
|
|
|
+ $logistic = \App\Logistic::query()->where('name','新杰物流')->first();
|
|
|
+ $logistic_zt = \App\Logistic::query()->where('name','自提')->first();
|
|
|
+ for ($i=$minId;$i<= $maxId;$i+=100){
|
|
|
+ $orderTrackings = \App\OrderTracking::query()
|
|
|
+ ->where('id','>=',$i)
|
|
|
+ ->where('id','<=',$i+100)
|
|
|
+ ->where('logistic_id','=',0)
|
|
|
+ ->where('created_at','!=','0000-00-00 00:00:00')
|
|
|
->get();
|
|
|
- if ($orderIssue_unique->count() == 0) return;
|
|
|
- foreach ($orderIssue_unique as $item) {
|
|
|
- $orderIssue_delete = OrderIssue::withTrashed()->where('order_id', $item->order_id)->get();
|
|
|
- /** @var OrderIssue $order_issue_unique */
|
|
|
- $order_issue_unique = $orderIssue_delete->whereNull('deleted_at')->first();
|
|
|
- if(!$order_issue_unique) $order_issue_unique = $orderIssue_delete->first();
|
|
|
- $ids = [];
|
|
|
- foreach ($orderIssue_delete as $key => $order_issue) {
|
|
|
- if ($order_issue->id == $order_issue_unique->id) continue;
|
|
|
- $ids[] = $order_issue->id;
|
|
|
- if ($order_issue['rejecting_status'] != '未退回') $order_issue_unique['rejecting_status'] = $order_issue['rejecting_status'];
|
|
|
- if ($order_issue['situation_explain']) $order_issue_unique['situation_explain'] = $order_issue['situation_explain'];
|
|
|
- if ($order_issue['order_issue_type_id']) $order_issue_unique['order_issue_type_id'] = $order_issue['order_issue_type_id'];
|
|
|
- if ($order_issue['second_order_id']) $order_issue_unique['second_order_id'] = $order_issue['second_order_id'];
|
|
|
- if ($order_issue['is_new_rejecting'] != '无') $order_issue_unique['is_new_rejecting'] = $order_issue['is_new_rejecting'];
|
|
|
- if ($order_issue['second_client_no']) $order_issue_unique['second_client_no'] = $order_issue['second_client_no'];
|
|
|
- if ($order_issue['final_status']) $order_issue_unique['final_status'] = $order_issue['final_status'];
|
|
|
- if ($order_issue['logistic_indemnity_money']) $order_issue_unique['logistic_indemnity_money'] = $order_issue['logistic_indemnity_money'];
|
|
|
- if ($order_issue['logistic_express_remission']) $order_issue_unique['logistic_express_remission'] = $order_issue['logistic_express_remission'];
|
|
|
- if ($order_issue['baoshi_indemnity_money']) $order_issue_unique['baoshi_indemnity_money'] = $order_issue['baoshi_indemnity_money'];
|
|
|
- if ($order_issue['baoshi_express_remission']) $order_issue_unique['baoshi_express_remission'] = $order_issue['baoshi_express_remission'];
|
|
|
- if ($order_issue['user_workgroup_id']) $order_issue_unique['user_workgroup_id'] = $order_issue['user_workgroup_id'];
|
|
|
- if ($order_issue['custom_code']) $order_issue_unique['custom_code'] = $order_issue['custom_code'];
|
|
|
- if ($order_issue['imported_status']) $order_issue_unique['imported_status'] = $order_issue['imported_status'];
|
|
|
+ if($orderTrackings->count() ==0) continue;
|
|
|
+ $update_params = [['id','logistic_id']];
|
|
|
+ $orderTrackings->each(function($orderTracking)use($logistic_zt,$logistic,&$update_params){
|
|
|
+ $order =$orderTracking->commodities->package->order;
|
|
|
+ $logistic_id = $order->logistic_id;
|
|
|
+ if($logistic_id!=null){
|
|
|
+ if($order->logistic_id == $logistic_zt->id)$logistic_id = $logistic->id;
|
|
|
+ if($logistic_id==0)dd($order,$logistic_id);
|
|
|
+ $update_params[] = [
|
|
|
+ 'id' => $orderTracking->id,
|
|
|
+ 'logistic_id' => $logistic_id,
|
|
|
+ ];
|
|
|
}
|
|
|
- if ($order_issue_unique['deleted_at']) $order_issue_unique['deleted_at'] = null;
|
|
|
- $order_issue_unique->save();
|
|
|
- $order_issue_unique->同步退单状态();
|
|
|
- OrderIssue:: withTrashed()->whereIn('id', $ids)->forceDelete();
|
|
|
- app('LogService')->log(__METHOD__, __FUNCTION__, 'orders_toCombine:' . json_encode($order_issue_unique) . '|toBe OrderId: ' . json_encode($order_issue_unique->id));
|
|
|
- $orderIssueProcessLogs = \App\OrderIssueProcessLog::query()->whereIn('order_issue_id', $ids)->get();
|
|
|
- app('LogService')->log(__METHOD__, __FUNCTION__, 'delete order_issue processLogs:' . json_encode($orderIssueProcessLogs));
|
|
|
- \App\OrderIssueProcessLog::query()->whereIn('order_issue_id', $ids)->forceDelete();
|
|
|
+ });
|
|
|
+ if(count($update_params) > 1){
|
|
|
+ $service->batchUpdate($update_params);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public function testHz(){
|
|
|
+ dump('start'.Carbon::now()->toDateTimeString());
|
|
|
+ $ownerAreaReportTask=new CreateOwnerAreaReport();
|
|
|
+ $ownerAreaReportTask->handle();
|
|
|
+ $ownerBillReportTask= new CreateOwnerBillReport();
|
|
|
+ $ownerBillReportTask->handle();
|
|
|
+ $ownerReportTask= new CreateOwnerReport();
|
|
|
+ $ownerReportTask->handle();
|
|
|
+ dump('end'.Carbon::now()->toDateTimeString());
|
|
|
+ }
|
|
|
+
|
|
|
public function testGetLogisticNumbers(): array
|
|
|
{
|
|
|
$orderPackageReceivedSyncService = new OrderPackageReceivedSyncService();
|