|
|
@@ -12,10 +12,11 @@ use App\ErrorTemp;
|
|
|
use App\Feature;
|
|
|
use App\Http\ApiControllers\LoginController;
|
|
|
use App\Http\Requests\OrderDelivering;
|
|
|
+use App\Jobs\BatchTaskJob;
|
|
|
use App\Jobs\CacheShelfTaskJob;
|
|
|
use App\Jobs\OrderCreateInstantBill;
|
|
|
use App\Jobs\OrderCreateWaybill;
|
|
|
-use App\Jobs\SettlementBillReportJob;
|
|
|
+use App\Jobs\SettlementBillReportTask;
|
|
|
use App\Jobs\StoreCreateInstantBill;
|
|
|
use App\Jobs\TestJob;
|
|
|
use App\Jobs\WeightUpdateInstantBill;
|
|
|
@@ -23,6 +24,7 @@ use App\LaborReport;
|
|
|
use App\LaborReportStatus;
|
|
|
use App\MaterialBox;
|
|
|
use App\MaterialBoxModel;
|
|
|
+use App\Notifications\RoutineNotification;
|
|
|
use App\OracleDOCASNHeader;
|
|
|
use App\OracleDOCOrderHeader;
|
|
|
use App\OracleDocOrderPackingSummary;
|
|
|
@@ -42,9 +44,11 @@ use App\OwnerPriceOperation;
|
|
|
use App\OrderPackageCountingRecord;
|
|
|
use App\ProcurementCheckSheet;
|
|
|
use App\RejectedBill;
|
|
|
+use App\SeeLog;
|
|
|
use App\Services\BatchService;
|
|
|
use App\Services\CacheShelfService;
|
|
|
use App\Services\ForeignHaiRoboticsService;
|
|
|
+use App\Services\NotificationService;
|
|
|
use App\Services\OrderPackageReceivedSyncService;
|
|
|
use App\Services\OrderPackageService;
|
|
|
use App\Services\OrderService;
|
|
|
@@ -77,12 +81,14 @@ use Illuminate\Database\Eloquent\Collection;
|
|
|
use Illuminate\Database\Eloquent\HigherOrderBuilderProxy;
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
use Illuminate\Http\Request;
|
|
|
+use Illuminate\Support\Facades\Broadcast;
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
use Illuminate\Support\Facades\Cookie;
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
use Illuminate\Support\Facades\Http;
|
|
|
use Illuminate\Support\Facades\Log;
|
|
|
+use Illuminate\Support\Facades\Notification;
|
|
|
use Illuminate\Support\Facades\URL;
|
|
|
use Illuminate\Support\Facades\Validator;
|
|
|
use Illuminate\Support\Str;
|
|
|
@@ -110,6 +116,22 @@ class TestController extends Controller
|
|
|
|
|
|
public function test()
|
|
|
{
|
|
|
+ $user = Auth::user();
|
|
|
+ $remark = "zengjunlj";
|
|
|
+ $ownerName = 'zengjunlj' ?? '';
|
|
|
+ $clientCode = 'zengjunljljlj' ?? '';
|
|
|
+ $msg = $user["name"]."建立了新工单<br/>".$ownerName.":".$clientCode."<br/>".$remark;
|
|
|
+ NotificationService::SingleRegister($msg,$clientCode,"订单管理-问题件");
|
|
|
+ dd(1);
|
|
|
+ $seeLog = SeeLog::query()->find(9);
|
|
|
+ Notification::send(Auth::user(),new RoutineNotification($seeLog->toArray()));
|
|
|
+ dd(1);
|
|
|
+ Broadcast::channel('notification', function ($user, $id) {
|
|
|
+ return (int) $user->id === (int) $id;
|
|
|
+ });
|
|
|
+ dd(1);
|
|
|
+ Notification::send(Auth::user(),new RoutineNotification($seeLog->toArray()));
|
|
|
+ dd(1);
|
|
|
$username = config('database.connections.oracle.username');
|
|
|
$password = config('database.connections.oracle.password');
|
|
|
$host = config('database.connections.oracle.host');
|
|
|
@@ -156,6 +178,7 @@ sql;
|
|
|
dispatch(new TestJob("10"))->delay(Carbon::parse($date));
|
|
|
dd(1);
|
|
|
|
|
|
+
|
|
|
Station::query()->where("station_type_id", 5)->update(["status" => 1]);
|
|
|
Cache::forget("CACHE_SHELF_AVAILABLE");
|
|
|
$station = ["HAIB1-01-01", "HAIB1-02-01"];
|
|
|
@@ -350,27 +373,25 @@ sql;
|
|
|
]);
|
|
|
}
|
|
|
|
|
|
- public function syncOrderPackage()
|
|
|
- {
|
|
|
- ini_set('memory_limit', '2048M');
|
|
|
+ public function syncOrderPackage(){
|
|
|
+ ini_set('memory_limit','500M');
|
|
|
ini_set('max_execution_time', 0);
|
|
|
$orderPackingSummary = OracleDocOrderPackingSummary::query()
|
|
|
- ->where('editTime', '>=', '2021-09-11 12:00:00')
|
|
|
- ->where('editTime', '<=', '2021-09-12 12:40:00')
|
|
|
+ ->where('editTime','>=','2021-09-11 12:00:00')
|
|
|
+ ->where('editTime','<=','2021-09-12 12:40:00')
|
|
|
->get();
|
|
|
|
|
|
$orderPackingSummary_chunk = $orderPackingSummary->chunk(200);
|
|
|
foreach ($orderPackingSummary_chunk as $orderPackingSummarys) {
|
|
|
foreach ($orderPackingSummarys as $orderPackingSummary) {
|
|
|
- $orderPackage = OrderPackage::query()->where('logistic_number', $orderPackingSummary->traceid)->first();
|
|
|
- if (!$orderPackage)continue;
|
|
|
+ $orderPackage = OrderPackage::query()->where('logistic_number',$orderPackingSummary->traceid)->first();
|
|
|
$orderPackage->update([
|
|
|
- 'uploaded_to_wms' => true,
|
|
|
- 'weight' => $orderPackingSummary->grossweight,
|
|
|
- 'length' => $orderPackingSummary->length,
|
|
|
- 'width' => $orderPackingSummary->width,
|
|
|
- 'height' => $orderPackingSummary->height,
|
|
|
- 'weighed_at' => $orderPackingSummary->edittime
|
|
|
+ 'uploaded_to_wms'=> true,
|
|
|
+ 'weight'=>$orderPackingSummary->grossweight,
|
|
|
+ 'length'=>$orderPackingSummary->length,
|
|
|
+ 'width'=>$orderPackingSummary->width,
|
|
|
+ 'height'=>$orderPackingSummary->height,
|
|
|
+ 'weighed_at'=>$orderPackingSummary->edittime
|
|
|
]);
|
|
|
dispatch(new WeightUpdateInstantBill($orderPackage));
|
|
|
}
|
|
|
@@ -382,50 +403,13 @@ sql;
|
|
|
{
|
|
|
/** @var OrderPackageService $service */
|
|
|
$service = app('OrderPackageService');
|
|
|
- return $service->collectUpload([
|
|
|
+ return $service->collectUpload([
|
|
|
'75803656098638',
|
|
|
'75803656098612'
|
|
|
]);
|
|
|
}
|
|
|
|
|
|
- public function init_在途异常()
|
|
|
- {
|
|
|
-// $logistic_numbers = OrderPackage::query()
|
|
|
-// ->select('logistic_number')
|
|
|
-// ->where('exception_status', 5)
|
|
|
-// ->where('created_at', '>=', now()->subDays(20)->toDateTimeString())
|
|
|
-// ->pluck('logistic_number');
|
|
|
- /** @var OrderPackageReceivedSyncService $service */
|
|
|
- $service = app('OrderPackageReceivedSyncService');
|
|
|
-// $service->syncLogisticRoute(false, $logistic_numbers);
|
|
|
-
|
|
|
-
|
|
|
- $logistic_numbers = OrderPackage::query()
|
|
|
- ->select(['logistic_number', 'order_id', 'id'])
|
|
|
- ->whereIn('order_id', function ($query) {
|
|
|
- $query->from('orders')->selectRaw('id')->whereIn('logistic_id', function ($builder) {
|
|
|
- $builder->from('logistics')->selectRaw('id')->where('type', '=', '快递')->whereNotIn('belong_company', ['顺丰', '中通', '韵达', '圆通', '京东']);
|
|
|
- });
|
|
|
- })
|
|
|
- ->where('created_at', '>=', now()->subDays(20)->toDateTimeString())
|
|
|
- ->whereNull('received_at')
|
|
|
- ->where('status', '!=',7)
|
|
|
- ->pluck('logistic_number');
|
|
|
- $service->syncLogisticRouteByAliJiSu($logistic_numbers);
|
|
|
- }
|
|
|
-
|
|
|
- public function update_order_packages_已签收()
|
|
|
- {
|
|
|
- OrderPackage::query()
|
|
|
- ->where('status', 7)
|
|
|
- ->where('exception_status','!=',0)
|
|
|
- ->update([
|
|
|
- 'exception_status' => 0,
|
|
|
- ]);
|
|
|
- }
|
|
|
-
|
|
|
- public function init_SettlementBillReportTask()
|
|
|
- {
|
|
|
- $this->dispatch(new SettlementBillReportJob('2021-08-01',[]));
|
|
|
+ public function teset12313(){
|
|
|
+ dd(route("discharge.storeApi"));
|
|
|
}
|
|
|
}
|