Browse Source

Merge branch 'master' into yang

ANG YU 4 years ago
parent
commit
de2f63f978

+ 66 - 5
app/Console/Commands/AccordingToOwnersManualBack.php

@@ -2,8 +2,10 @@
 
 namespace App\Console\Commands;
 
+use App\Components\Database;
 use App\OracleDOCOrderHeader;
 use App\Owner;
+use App\Services\OrderService;
 use App\ValueStore;
 use Carbon\Carbon;
 use Illuminate\Console\Command;
@@ -11,6 +13,7 @@ use Illuminate\Database\Eloquent\HigherOrderBuilderProxy;
 
 class AccordingToOwnersManualBack extends Command
 {
+    use Database;
     /**
      * The name and signature of the console command.
      *
@@ -40,9 +43,62 @@ class AccordingToOwnersManualBack extends Command
      */
     public function handle()
     {
-        $ownerCodes=Owner::query()->where('is_manual_back',1)->pluck('code');
-        $last_order_manual_back_at=$this->getOrderManualBackAt();
-        $now=Carbon::now()->toDateTimeString();
+        ini_set('max_execution_time', 2500);
+        ini_set('memory_limit', '512M');
+        $ownerCodes=Owner::query()->where('is_manual_back',1)->pluck('code');//自动回传货主
+        $last_order_manual_back_at=$this->getOrderManualBackAt();//上次回传时间
+        $now=Carbon::now()->toDateTimeString();//当前时间
+        try {
+            $ordernos=$this->allocation($last_order_manual_back_at, $now, $ownerCodes);//分配是创建状态订单
+            $this->manualBack($last_order_manual_back_at,$now, $ownerCodes,$ordernos);//回传
+        } catch (\Exception $e) {
+            app('LogService')->log(__METHOD__, __FUNCTION__, "自动回传失败" . $last_order_manual_back_at . ' || '
+                .$now. ' || ' . json_encode($ownerCodes).' || ' . json_encode($e->getMessage()));
+            dd($e->getMessage());
+        }
+        $this->setOrderManualBackAt();//回传结束时间标记
+    }
+
+    /**
+     * @param $last_order_manual_back_at
+     * @param $now
+     * @param $ownerCodes
+     * @return array|void
+     * 分配 状态:创建订单、部分预配、预配完成 的订单
+     */
+    private function allocation($last_order_manual_back_at,$now,$ownerCodes)
+    {
+        $orders=OracleDOCOrderHeader::query()
+            ->whereIn('sostatus',['00','10','20'])//状态:创建订单、部分预配、预配完成
+            ->where('edittime','>=',$last_order_manual_back_at)
+            ->where('edittime','<=',$now)
+            ->whereNotNull('soreference5') //快递单号不为空
+            ->whereIn('customerid',$ownerCodes) //指定货主
+            ->where('releasestatus','!=','H')//订单非冻结状态
+            ->get();
+        if($orders->count()==0)return;
+        /** @var OrderService $orderService */
+        $orderService=app("OrderService");
+        $conn = null;
+        $allocationOrderNos=[];
+        foreach ($orders as $order){
+            if (!$order->soreference5) continue;
+            if (!$conn)$conn = $this->getFluxConnection();
+            $res=$orderService->allocation($order->orderno,$order->warehouseid,$conn);
+            if (mb_substr($res,0,3)=='000') array_push($allocationOrderNos,$order->orderno);
+        }
+        if ($conn)$this->releaseFluxConnection($conn);
+        return $allocationOrderNos;
+    }
+
+    /**
+     * @param $last_order_manual_back_at
+     * @param $now
+     * @param $ownerCodes
+     * 回传修改标记状态
+     */
+    private function manualBack($last_order_manual_back_at,$now, $ownerCodes,$ordernos)
+    {
         OracleDOCOrderHeader::query()
             ->whereIn('sostatus',['40','50','60','61'])
             ->where('edittime','>=',$last_order_manual_back_at)
@@ -52,9 +108,14 @@ class AccordingToOwnersManualBack extends Command
             ->whereIn('customerid',$ownerCodes) //指定货主
             ->where('releasestatus','!=','H')
             ->update(['manualflag'=>'Y','edittime'=>$now]);
-        $this->setOrderManualBackAt();
+        if (count($ordernos)==0)return;
+        OracleDOCOrderHeader::query()
+            ->whereIn('orderno',$ordernos)
+            ->whereNotNull('soreference5')
+            ->where('manualflag','N')
+            ->where('releasestatus','!=','H')
+            ->update(['manualflag'=>'Y','edittime'=>$now]);
     }
-
     /**
      * @return HigherOrderBuilderProxy|mixed|null
      * 获取订单上次自动回传时间

+ 8 - 1
app/Filters/OrderIssueFilters.php

@@ -68,7 +68,8 @@ class OrderIssueFilters
         'archive_at_start',
         'archive_at_end',
         'result_explain',
-        'is_intercept'
+        'is_intercept',
+        'orderCode'
     ];
     protected $array_filter;
     protected $params = [];
@@ -461,4 +462,10 @@ class OrderIssueFilters
     {
         $this->queryBuilder->where('order_issues.is_intercept',1);
     }
+
+    public function orderCode($orderCode)
+    {
+        $this->getOrderQuery();
+        $this->searchWay($this->getOrderQuery(),$orderCode,'orders.code');
+    }
 }

+ 6 - 1
app/Filters/WorkOrderFilters.php

@@ -35,7 +35,8 @@ class WorkOrderFilters
         'is_issue_order',
         'order_issue_type',
         'grad',
-        'owner'
+        'owner',
+        'client_code',
     ];
     protected $array_filter;
     protected $params = [];
@@ -200,5 +201,9 @@ class WorkOrderFilters
         $this->searchWay($this->queryBuilder,$owner,'work_orders.owner_id');
     }
 
+    public function client_code($client_code)
+    {
+        $this->searchWay($this->getOrderQuery(),$client_code,'orders.client_code');
+    }
 
 }

+ 64 - 0
app/Http/Controllers/NotificationController.php

@@ -0,0 +1,64 @@
+<?php
+
+
+namespace App\Http\Controllers;
+
+use App\Components\AsyncResponse;
+use App\SeeLog;
+use App\User;
+use Illuminate\Database\Eloquent\Builder;
+use Illuminate\Support\Facades\Auth;
+
+class NotificationController
+{
+    use AsyncResponse;
+
+    /**
+     * @return User|\stdClass
+     */
+    private function getUser()
+    {
+        /** @var User|\stdClass $user */
+        $user = new User();
+        $user->id = Auth::id();
+        return $user;
+    }
+
+    public function regular()
+    {
+        $user = $this->getUser();
+        $user->loadCount(["seeLogs"=>function($query){
+            /** @var Builder $query */
+            $query->where("delivered",'0');
+        }]);
+        $user->load(["seeLogs"=>function($query){
+            /** @var Builder $query */
+            $query->limit(15)->orderBy("delivered")->orderByDesc("id");
+        }]);
+        $infos = $user->seeLogs;
+        $count = $user->see_logs_count;
+        return view("layouts.notification",compact("infos","count"));
+    }
+
+    public function toTarget()
+    {
+        $id = request("id");
+        if (!$id)$this->error("服务器异常");
+        $this->success(SeeLog::query()->where("id",$id)
+        ->where("delivered",'0')->update(["delivered"=>'1']));
+    }
+    public function getRegularData()
+    {
+        $id = request("id");
+        if (!$id)$this->error("服务器异常");
+        $page = request("page");
+        $user = $this->getUser();
+        $user->load(["seeLogs"=>function($query)use($id,$page){
+            /** @var Builder $query */
+            $query->limit("{$page},15")
+                ->orderBy("delivered")
+                ->orderByDesc("id");
+        }]);
+        $this->success($user->seeLogs);
+    }
+}

+ 38 - 54
app/Http/Controllers/TestController.php

@@ -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"));
     }
 }

+ 50 - 0
app/Notifications/RoutineNotification.php

@@ -0,0 +1,50 @@
+<?php
+
+namespace App\Notifications;
+
+use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Notifications\Messages\BroadcastMessage;
+use Illuminate\Notifications\Notification;
+
+class RoutineNotification extends Notification implements ShouldQueue
+{
+    use Queueable;
+
+    /** @var array|mixed $seeLog */
+    private $seeLog;
+
+    public function __construct(array $seeLog)
+    {
+        $seeLog["no"] = $seeLog["id"];
+        unset($seeLog["id"]);
+        $this->seeLog = $seeLog;
+    }
+
+    /**
+     * Get the notification's delivery channels.
+     *
+     * @param  mixed  $notifiable
+     * @return array
+     */
+    public function via($notifiable):array
+    {
+        return ['broadcast'];
+    }
+
+    public function viaQueues():array
+    {
+        return [
+            'broadcast' => 'notification-broadcast',
+        ];
+    }
+    public function broadcastType():string
+    {
+        return 'common';
+    }
+
+    public function toBroadcast($notifiable):BroadcastMessage
+    {
+        return new BroadcastMessage($this->seeLog);
+    }
+}

+ 3 - 1
app/Providers/AppServiceProvider.php

@@ -183,6 +183,7 @@ use App\Services\WorkOrderService;
 use App\Services\WorkOrderTypeService;
 use App\Services\OrderPackageRemarkService;
 use App\Services\LaborCompanyService;
+use App\Services\NotificationService;
 
 class AppServiceProvider extends ServiceProvider
 {
@@ -210,7 +211,6 @@ class AppServiceProvider extends ServiceProvider
     }
 
     private function loadingService(){
-        app()->singleton('ReviewService',ReviewService::class);
         app()->singleton('AllInventoryService',AllInventoryService::class);
         app()->singleton('AuthorityService',AuthorityService::class);
         app()->singleton('BatchService',BatchService::class);
@@ -266,6 +266,7 @@ class AppServiceProvider extends ServiceProvider
         app()->singleton('MaterialBoxService', MaterialBoxService::class);
         app()->singleton('MenuService',MenuService::class);
         app()->singleton('NewOrderCountingRecordService',NewOrderCountingRecordService::class);
+        app()->singleton('NotificationService',NotificationService::class);
         app()->singleton('OracleActAllocationDetailService', OracleActAllocationDetailService::class);
         app()->singleton('OracleBasCustomerService', OracleBasCustomerService::class);
         app()->singleton('OracleBasSkuService', OracleBasSkuService::class);
@@ -339,6 +340,7 @@ class AppServiceProvider extends ServiceProvider
         app()->singleton('RejectedService', RejectedService::class);
         app()->singleton('RequirementService',RequirementService::class);
         app()->singleton('RequirementUserService',RequirementUserService::class);
+        app()->singleton('ReviewService',ReviewService::class);
         app()->singleton('RoleService',RoleService::class);
         app()->singleton('SFDeliveryService',SFDeliveryService::class);
         app()->singleton('SFQHDDeliveryService',SFQHDDeliveryService::class);

+ 27 - 0
app/SeeLog.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace App;
+
+use App\Traits\ModelTimeFormat;
+use Illuminate\Database\Eloquent\Model;
+
+use App\Traits\ModelLogChanging;
+use Illuminate\Database\Eloquent\Relations\BelongsToMany;
+
+class SeeLog extends Model
+{
+    use ModelLogChanging,ModelTimeFormat;
+
+    protected $fillable = [
+        "message","title","delivered","link","mark"
+    ];
+
+    const MARK = [
+        0,//工单通知
+    ];
+
+    public function users():BelongsToMany
+    {
+        return $this->belongsToMany(User::class);
+    }
+}

+ 13 - 0
app/Services/AuthorityService.php

@@ -5,6 +5,7 @@ namespace App\Services;
 
 
 use App\Authority;
+use App\User;
 use Illuminate\Database\Eloquent\Builder;
 use Illuminate\Database\Eloquent\Collection;
 use Illuminate\Support\Facades\Auth;
@@ -123,4 +124,16 @@ class AuthorityService
         }
         return false;
     }
+
+    /**
+     * 通过权限CODE获取用户
+     */
+    public function authorityGetUsers(string $aliasName)
+    {
+        return User::query()->whereHas("roles",function ($query)use($aliasName){
+            $query->whereHas("authorities",function ($query)use($aliasName){
+                $query->where("alias_name",$aliasName);
+            });
+        })->orWhereIn("name",config("users.superAdmin"))->get();
+    }
 }

+ 32 - 0
app/Services/NotificationService.php

@@ -0,0 +1,32 @@
+<?php
+
+namespace App\Services;
+
+use App\Notifications\RoutineNotification;
+use App\SeeLog;
+use Illuminate\Support\Facades\Notification;
+
+class NotificationService
+{
+    static function SingleRegister(string $message,string $number,string $authorityName)
+    {
+
+        $default = [
+            "message"   => $message,
+            "title"     => "工单提示",
+            "link"      => "order/workOrder/index?client_code={$number}",
+            "mark"      => 0,
+            "delivered" => '0',
+        ];
+        /** @var SeeLog $info */
+        $info = SeeLog::query()->create($default);
+        $users = app("AuthorityService")->authorityGetUsers($authorityName);
+        if ($users->count()==0)return;
+        $ids = [];
+        foreach ($users as $user){
+            $ids[] = $user->id;
+            Notification::send($user,new RoutineNotification($info->toArray()));
+        }
+        $info->users()->sync($ids);
+    }
+}

+ 7 - 7
app/Services/OrderService.php

@@ -224,7 +224,8 @@ class OrderService
         if ($edisendflag) $sql.=" and edisendflag like '".$edisendflag."%'";
         if ($manualflag) $sql.=" and manualflag = '".$manualflag."'";
         if ($soreference1){
-            $arr=array_values(array_filter(preg_split('/[,, ]+/is', $soreference1)));
+            mb_regex_encoding('utf-8');
+            $arr=array_values(array_filter(preg_split('/[,, ]+/u', $soreference1,-1,PREG_SPLIT_NO_EMPTY)));
             if (count($arr)==1){
                 $sql.=" and soreference1 like '".$soreference1."%'";
             }
@@ -239,7 +240,6 @@ class OrderService
                 }
                 $sql.=")";
             }
-            if ($params['soreference']) $sql.=" and soreference1 like '".$params['soreference']."'";
         }
         return $sql;
     }
@@ -335,22 +335,22 @@ class OrderService
         if ($params['soreference1']??false){
             $arr=array_values(array_filter(preg_split('/[,, ]+/is', $params['soreference1'])));
             if (count($arr)==1){
-                $params['soreference']='';$sql = $this->getSql($params,$params['page'] ?? 1, $params['paginate'] ?? 50);
+                $params['soreference1']='';$sql = $this->getSql($params,$params['page'] ?? 1, $params['paginate'] ?? 50);
             }
             if (count($arr)>1 && !strpos($params['soreference1'],'%')){
-                $params['soreference']='';$sql = $this->getSql($params,$params['page'] ?? 1, $params['paginate'] ?? 50);
+                $params['soreference1']='';$sql = $this->getSql($params,$params['page'] ?? 1, $params['paginate'] ?? 50);
             }
             if (count($arr)>1 && strpos($params['soreference1'],'%')){
                 foreach ($arr as $index=>$str){
                     if ($index==0){
-                        $params['soreference']=$str; $sql=$this->getSql($params,$params['page'] ?? 1, $params['paginate'] ?? 50); continue;
+                        $params['soreference1']=$str; $sql=$this->getSql($params,$params['page'] ?? 1, $params['paginate'] ?? 50); continue;
                     }
-                    $params['soreference']=$str;
+                    $params['soreference1']=$str;
                     $sql.=" union ".$this->getSql($params,$params['page'] ?? 1, $params['paginate'] ?? 50);
                 }
             }
         }else{
-            $params['soreference']='';
+            $params['soreference1']='';
             $sql = $this->getSql($params,$params['page'] ?? 1, $params['paginate'] ?? 50);
         }
         if ($sql)$orders=DB::connection('oracle')->select(DB::raw($sql));

+ 3 - 27
app/Services/StoreItemService.php

@@ -40,40 +40,16 @@ class StoreItemService
             $asnnos->add($asnHerder->asnno);
         }
         $asnnos = $asnnos->unique()->toArray();
-        $asnDetails=OracleDOCASNDetail::query()
+        return OracleDOCASNDetail::query()
             ->with(['lineStatus', 'qualityStatus'])
             ->whereIn('asnno',$asnnos)
             ->select('asnno','asnlineno','customerid','sku','skudescrc','linestatus','lotatt08','lotatt05','receivedqty','expectedqty','addtime','edittime')
             ->get();
-        //dd($asnDetails->first());
-//        $db = DB::connection('oracle');
-//        $sql = <<<sql
-//            SELECT d.asnno,d.ASNLINENO,d.SKUDESCRC,d.CUSTOMERID,d.SKU,c.CODENAME_C as lotatt08,b.CODENAME_C as linestatus,d.lotatt05,
-//            d.receivedqty,d.expectedqty,d.addtime,d.edittime FROM DOC_ASN_DETAILS d
-//            LEFT JOIN BAS_CODES b ON d.linestatus = b.code AND 'ASN_STS' = b.codeid
-//            LEFT JOIN BAS_CODES c ON d.lotatt08 = c.code AND 'QLT_STS' = c.codeid WHERE d.ASNNO in (
-//sql;
-//        $asno_str = '';
-//        foreach ($asnnos as $str) $asno_str .= "'" . $str . "',";
-//        $asno_str = rtrim($asno_str, ',');
-//        $sql=$sql.$asno_str.")";
-//        $asnDetails = $db->select(DB::raw($sql));
-//        $asnDetails=collect($asnDetails);
-
-
-//        $asnDetails = collect();
-//        $asnHerders->each(function ($asnHeader) use ($asnDetails) {
-//            $asnHeader->asnDetails->each(function ($asnDetail) use ($asnDetails) {
-//                $asnDetails->add($asnDetail);
-//            });
-//        });
-        return $asnDetails;
     }
 
     public function createStoreItem($asnDetails)
     {
         if ($asnDetails->isEmpty()) return null;
-        ini_set('memory_limit', '512M');
         $stores = Store::query()->whereIn('asn_code', array_unique(data_get($asnDetails, '*.asnno')))->get();
 
         $store_asn_code_map = [];
@@ -85,7 +61,7 @@ class StoreItemService
 
     }
 
-    public function getParamsByAsnDetails($asnDetails, $store_asn_code_map)
+    public function getParamsByAsnDetails($asnDetails, $store_asn_code_map): array
     {
         /**
          * @var DataHandlerService $dataHandlerService
@@ -199,7 +175,7 @@ class StoreItemService
             if ($asnDetail['lineStatus'] && $asnDetail['lineStatus']['codename_c'] == '完全收货') $status = '已入库';
             if ($asnDetail['lineStatus'] && $asnDetail['lineStatus']['codename_c'] == '订单创建') $status = '未入库';
             if ($storeItem->updated_at != $asnDetail['edittime']
-                || $storeItem->expected_amount!=$asnDetail['expectedqty']
+//                || $storeItem->expected_amount!=$asnDetail['expectedqty']
             ) {
                 $updateParams[] = [
                     'id' => $storeItem->id,

+ 14 - 26
app/Services/StoreService.php

@@ -20,6 +20,7 @@ use Illuminate\Support\Facades\Cache;
 
 use App\Traits\ServiceAppAop;
 use Illuminate\Support\Facades\DB;
+use Illuminate\Support\Facades\Log;
 
 
 class StoreService
@@ -86,21 +87,16 @@ class StoreService
         $oracleDocAsnHerderService = app(OracleDocAsnHerderService::class);
         $last_time = $this->getAsnLastSyncAt($updated_at, 'update');
         app('LogService')
-            ->log(__METHOD__, __FUNCTION__, '获取上次更新时间:' . $last_time );
+            ->log(__METHOD__, __FUNCTION__, '11 获取上次更新时间:' . $last_time );
         $asnHerders = $oracleDocAsnHerderService->getWmsAsnOnStartDateEdit($last_time);
         if (count($asnHerders)<1) return;
         $last_time = $asnHerders->first()['edittime'];
         $last_records = $asnHerders->where('edittime', $last_time);
         $this->createStore($asnHerders,"update");
-
         $this->updateStore($asnHerders);
-
         $this->createStoreRejected($asnHerders);
-
         $this->deleteCacheKey($update_set, $update_keys);
-
         $this->setLastRecordsByRedis($update_key, $update_set, $update_keys, $last_records);
-
         $this->setAsnLastSyncAt($updated_at, $last_time);
 
     }
@@ -137,9 +133,8 @@ class StoreService
         $rejectedBillService = app(RejectedBillService::class);
         $rejectedBillService->syncLoadedStatusByAsnHerder($asnHerders);
         if (!$isUpdate)$this->pushJob($asnHerders);
-        app('LogService')
-            ->log(__METHOD__, __FUNCTION__, '11 更新中创建createStore:' . $asnHerders );
-        unset($asnHerders, $owners_code_map, $warehouses_code_map);
+        if (!$isUpdate) unset($asnHerders);
+        unset($owners_code_map, $warehouses_code_map);
     }
 
     public function getParamsByAsnHeader($asnHerders, $owners_code_map, $warehouses_code_map)
@@ -233,11 +228,7 @@ class StoreService
                 ];
             }
         }
-        if (count($updateParams) > 1) {
-            $res=$this->batchUpdate($updateParams);
-            app('LogService')
-                ->log(__METHOD__, __FUNCTION__, '11 批量更新:' . $res . ' | '.json_encode($updateParams));
-        }
+        if (count($updateParams) > 1) {$this->batchUpdate($updateParams);}
         /** @var StoreItemService $storeItemService */
         $storeItemService = app(StoreItemService::class);
         $storeItemService->storeItemUpdateByWms($asnHerders);
@@ -245,8 +236,6 @@ class StoreService
         $rejectedBillService = app(RejectedBillService::class);
         $rejectedBillService->syncLoadedStatusByAsnHerder($asnHerders);
         $this->pushJob($asnHerders);
-        app('LogService')
-            ->log(__METHOD__, __FUNCTION__, '11 updateStore:'.$updateParams);
         unset($updateParams, $asnHerders);
     }
 
@@ -295,7 +284,6 @@ class StoreService
             'name' => $key,
             'value' => $last_time,
         ]);
-        LogService::log(__METHOD__, __FUNCTION__, '11 setAsnLastSyncAt' . $key . json_encode($asnLastSyncAt));
         return $asnLastSyncAt;
     }
 
@@ -309,8 +297,6 @@ class StoreService
             }
             Cache::forget($keys);
         }
-        app('LogService')
-            ->log(__METHOD__, __FUNCTION__, '11 deleteCacheKey:' );
     }
 
     public function setLastRecordsByRedis($prefixKey, $set, $keys, $last_records)
@@ -322,8 +308,6 @@ class StoreService
         }
         Cache::put($keys, $cacheKeys);
         Cache::put($set, true);
-        app('LogService')
-            ->log(__METHOD__, __FUNCTION__, '11 setLastRecordsByRedis:'. $prefixKey.'||'. $set.'||'. $keys.'||'. $last_records);
     }
 
     public function createInstantBill(Store $store): bool
@@ -394,10 +378,14 @@ class StoreService
      */
     public function clearFeeInfo(string $docNumber)
     {
-        $models = OwnerFeeOperation::query()->where("doc_number",$docNumber)->get();
-        if ($models->count()==0)return;
-        OwnerFeeOperationDetail::query()->whereIn("owner_fee_operation_id",array_column($models->toArray(),"id"))->delete();
-        OwnerFeeOperation::query()->where("doc_number",$docNumber)->delete();
+        try {
+            $models = OwnerFeeOperation::query()->where("doc_number",$docNumber)->get();
+            if ($models->count()==0)return;
+            OwnerFeeOperationDetail::query()->whereIn("owner_fee_operation_id",array_column($models->toArray(),"id"))->delete();
+            OwnerFeeOperation::query()->where("doc_number",$docNumber)->delete();
+        }catch (\Exception $e){
+            Log::warning("清除费用信息发送错误",["ASN号:{$docNumber}",isset($models) ? $models->toJson() : "查费用信息时被锁定"]);
+        }
     }
 
     /**
@@ -431,7 +419,7 @@ class StoreService
         }
         if (count($insert_param)>0) StoreRejected::query()->insert($insert_param);
         app('LogService')
-            ->log(__METHOD__, __FUNCTION__, '11 createStoreRejected:'.$insert_param  );
+            ->log(__METHOD__, __FUNCTION__, '11 createStoreRejected:'.json_encode($insert_param));
     }
 
     /**

+ 9 - 0
app/Services/WorkOrderService.php

@@ -101,6 +101,15 @@ class WorkOrderService
         }
         if (isset($inner_params)) {
             WorkOrder::query()->insert($inner_params);
+            $workOrders = WorkOrder::query()->with('owner','order')->whereIn('order_id',data_get($inner_params,"*.order_id"))->where('created_at',">=",$data)->get();
+            foreach ($workOrders as $workOrder){
+                $user = Auth::user();
+                $remark = $workOrder->remark;
+                $ownerName = $workOrder->owner->name ?? '';
+                $clientCode = $workOrder->order->client_code ?? '';
+                $msg = $user["name"]."建立了新工单<br/>".$ownerName.":".$clientCode."<br/>".$remark;
+                NotificationService::SingleRegister($msg,$clientCode,"订单管理-问题件");
+            }
             return ['success' => true];
         }
         return ['success' => false, 'message' => '参数异常'];

+ 2 - 1
app/Services/common/BatchUpdateService.php

@@ -8,7 +8,8 @@ use Illuminate\Support\Facades\DB;
 use App\Traits\ServiceAppAop;
 
 
-class BatchUpdateService
+class
+BatchUpdateService
 {
     use ServiceAppAop,ErrorPush;
     public function batchUpdate($tableName = '', $multipleData = array(), $connection = 'mysql')

+ 6 - 0
app/User.php

@@ -3,6 +3,7 @@
 namespace App;
 
 use App\Traits\ModelLogChanging;
+use Illuminate\Database\Eloquent\Relations\BelongsToMany;
 use Illuminate\Database\Eloquent\SoftDeletes;
 use Illuminate\Notifications\Notifiable;
 use Illuminate\Foundation\Auth\User as Authenticatable;
@@ -177,4 +178,9 @@ class User extends Authenticatable
     {
         return $this->morphedByMany(UserOwnerGroup::class, 'user_authable');
     }
+
+    public function seeLogs():BelongsToMany
+    {
+        return $this->belongsToMany(SeeLog::class);
+    }
 }

+ 1 - 2
config/database.php

@@ -186,14 +186,13 @@ return [
     | such as APC or Memcached. Laravel makes it easy to dig right in.
     |
     */
-
     'redis' => [
 
         'client' => env('REDIS_CLIENT', 'predis'),
 
         'options' => [
             'cluster' => env('REDIS_CLUSTER', 'predis'),
-            'prefix' => Str::slug(env('APP_NAME', 'laravel'), '_').'_database_',
+            'prefix' => '',//Str::slug(env('APP_NAME', 'laravel'), '_').'_database_',
         ],
 
         'default' => [

+ 36 - 0
database/migrations/2021_09_15_144213_create_see_logs_table.php

@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateSeeLogsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('see_logs', function (Blueprint $table) {
+            $table->id();
+            $table->string('message');
+            $table->string('title', 50);
+            $table->string("link")->nullable();
+            $table->tinyInteger("mark")->default(0);
+            $table->enum('delivered', [0, 1])->default(0);
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('see_logs');
+    }
+}

+ 31 - 0
database/migrations/2021_09_15_144836_create_see_log_user_table.php

@@ -0,0 +1,31 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateSeeLogUserTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('see_log_user', function (Blueprint $table) {
+            $table->bigInteger("user_id")->index();
+            $table->bigInteger("see_log_id");
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('see_log_user');
+    }
+}

+ 2 - 7
laravel-echo-server.json

@@ -1,12 +1,7 @@
 {
-	"authHost": "http://localhost",
+	"authHost": "http://bswas",
 	"authEndpoint": "/broadcasting/auth",
-	"clients": [
-		{
-			"appId": "85568e6915a996da",
-			"key": "4339d8623127f8f4e8819901cbf62833"
-		}
-	],
+	"clients": [],
 	"database": "redis",
 	"databaseConfig": {
 		"redis": {},

+ 18 - 1
resources/js/queryForm/header.js

@@ -556,7 +556,7 @@ window.Header = function getHeader(object) {
         div22.id = "setting-header-body";
         div22.style.display="none";
         let div221 = document.createElement("div");
-        div221.className = "row";
+        div221.className = "row mt-2";
         let text = document.createElement("label");
         text.innerText = "清除本地列宽设置:";
         text.className = "text-right col-3";
@@ -585,7 +585,24 @@ window.Header = function getHeader(object) {
             settingInfo.isCopyNoWrap = event.target.checked;
             localStorage.setItem("settingInfo",JSON.stringify(settingInfo));
         };
+        let div223 = document.createElement("div");
+        div223.className = "row";
+        let text3 = document.createElement("label");
+        text3.innerText = "消息通知:";
+        text3.className = "text-right col-3";
+        div223.appendChild(text3);
+        let btn3 = document.createElement("button");
+        btn3.className = "btn btn-sm btn-outline-info";
+        btn3.innerText = "打开消息面板";
+        btn3.onclick= function (){
+            let height = window.screen.height;
+            window.open ("https://"+window.location.host+"/notification/regular", 'newwindow', 'height='+(height*0.7)+', width=510 ,top='+(height*0.10)+
+                'toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no');
+        };
+        div223.appendChild(btn3);
+
         div222.appendChild(input);
+        div22.appendChild(div223);
         div22.appendChild(div221);
         div22.appendChild(div222);
         div2.appendChild(div22);

+ 197 - 0
resources/views/layouts/notification.blade.php

@@ -0,0 +1,197 @@
+<!DOCTYPE html>
+<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <link rel="icon" href="{{asset('icon/faviconc.ico')}}" type="image/x-icon"/>
+    <title>通知栏</title>
+    <!-- CSRF Token -->
+    <meta name="csrf-token" content="{{ csrf_token() }}">
+    <link href="{{ mix('css/app.css') }}" rel="stylesheet">
+    <style>
+        html{
+            height: 100%;
+            width: 100%;
+        }
+        body{
+            width: 510px;
+            margin : 0 auto;
+        }
+        .b-container{
+            background: RGB(245,250,245) !important;
+        }
+        li{
+            cursor: pointer;
+        }
+        ul{
+            max-height: 100%;
+            max-width: 100%;
+            overflow: auto;
+            border: RGB(204, 204, 204) solid 1px;
+            border-radius: 5px;
+        }
+        #msg{
+            width:266px;
+            position: fixed;
+            z-index:999;
+            top: 49%;
+            margin-top:-80px;
+            left:50%;
+            margin-left:-133px;
+            background:#fff;
+            box-shadow:5px 5px 8px #999;
+            font-size:17px;
+            color:#666;
+            border:1px solid #f8f8f8;
+            text-align: center;
+            line-height: 2rem;
+            display:inline-block;
+            padding-bottom:20px;
+            border-radius:5px;
+        }
+        #msg_top {
+            background: #f8f8f8;
+            padding: 5px 15px 5px 20px;
+            text-align: left;
+        }
+        #msg_top span{
+            font-size:22px;
+            float:right;
+            cursor:pointer;
+        }
+        #msg_cont{
+            padding:15px 20px 20px;
+            text-align:left;
+        }
+        #msg_clear{
+            background:#8fc31f;
+            float:right;
+        }
+        #msg_success{
+            background:#2a9055;
+            float:right;
+        }
+        .msg_btn{
+            display:inline-block;
+            color:#fff;
+            padding:1px 15px;
+            border-radius:2px;
+            margin-right:15px;
+            cursor:pointer;
+        }
+    </style>
+</head>
+<body class="h-100">
+    <div id="notification" class="w-100 h-100 b-container p-0 card">
+        <div class="card-header">
+            <label class="h3 text-center w-100">
+                <b style="font-family:STHupo">@{{ count }}</b>
+                <label class="text-secondary" style="font-family:STZhongsong">条未处理通知</label>
+            </label>
+        </div>
+        <div class="card-body p-0">
+            <ul class="list-group" id="scroll-list">
+                <li class="list-group-item mt-3" v-for="info in infos" @click="toTarget(info)">
+                    <div class="row">
+                        <div class="col-7 row">
+                            <div class="col-3 pr-0 h5" v-if="info.delivered=='0'"><span class="badge badge-secondary">New</span></div>
+                            <div v-else class="col-1"></div>
+                            <div class="text-left text-overflow-replace font-weight-bold col-8 p-0">@{{ info.title }}</div>
+                        </div>
+                        <div class="text-right text-secondary col-5">@{{ info.created_at }}</div>
+                    </div>
+                    <div class="offset-2 mt-2 text-muted" v-html="info.message">
+                    </div>
+                </li>
+            </ul>
+        </div>
+    </div>
+</body>
+<script src="{{ mix('js/app.js') }}"></script>
+<script type="text/javascript">
+        var audioPlay = false;
+        //重绘弹窗样式
+        function alert(e){
+            $("body").append('<div id="msg"><div id="msg_top">设置<span class="msg_close">×</span></div><div id="msg_cont">'+e+
+                '</div><div class="msg_close msg_btn" id="msg_clear">取消</div><div class="msg_close msg_btn" id="msg_success">确定</div></div>');
+            $("#msg_clear").click(function (){
+                $("#msg").remove();
+            });
+            $("#msg_success").click(function (){
+                audioPlay = true;
+                $("#msg").remove();
+            });
+        }
+        alert("是否开启音频?");
+        new Vue({
+            el:"#notification",
+            data:{
+                infos:{!! $infos !!},
+                loadSign:false,
+                count: {!! $count !!},
+                page:2,
+                mark:{
+                    "0" : "/storage/audio.mp3",
+                }
+            },
+            mounted(){
+                if(this.infos.length===15)this.bindListen();
+                $(document.body).append($('<audio id="audio" src="" autoplay></audio>'));
+                this.initBroadcast();
+            },
+            methods: {
+                bindListen(){
+                    $("#scroll-list").scroll(()=>{
+                        let element = $("#scroll-list");
+                        let scrollTop = element.scrollTop();
+                        let scrollHeight = element[0].scrollHeight;
+                        let height = element.height();
+                        if(scrollTop + height > scrollHeight-50){
+                            this.loadData();
+                        }
+                    });
+                },
+                initBroadcast() {
+                    initEcho();
+                    Echo.private('App.User.' + {{\Illuminate\Support\Facades\Auth::id()}})
+                        .notification((notification) => {
+                            console.log(notification);
+                            this.count++;
+                            this.infos.unshift(notification);
+                            if (notification.mark==0)this.playAudio(notification.mark);
+                        });
+                },
+                playAudio(mark){
+                    if (!audioPlay)return;
+                    let audio = document.getElementById('audio');
+                    audio.src = this.mark[mark];
+                    setTimeout(()=>{
+                        audio.play();
+                    },0);
+                },
+                toTarget(info = null){
+                    if (info.delivered==='0'){
+                        window.tempTip.postBasicRequest("{{url('notification/toTarget')}}",
+                            {id:info.no ? info.no : info.id},res=>{
+                                info.delivered = '1';
+                                this.count--;
+                            })
+                    }
+                    window.open('{{url('')}}'+'/'+info.link);
+                },
+                loadData(){
+                    if (this.loadSign)return;
+                    this.loadSign = true;
+                    let last = this.infos[this.infos.length-1];
+                    window.tempTip.postBasicRequest("{{url('notification/regular')}}",
+                        {id:last.no ? last.no : last.id,page:this.page},res=>{
+                            this.loadSign = false;
+                            this.page++;
+                            if (res)this.infos.push.apply(this.infos,res);
+                            if (!res || res.length<15)$("#scroll-list").unbind("scroll");
+                        })
+                }
+            }
+        });
+</script>
+</html>

+ 8 - 1
resources/views/order/index/delivering.blade.php

@@ -67,7 +67,14 @@
                             <input class="checkItem" type="checkbox" :value="order.orderno">
                         </td>
                         <td class="text-nowrap">
-                            <span>@{{ i+1 }}</span><span v-show="order.is_order_issue" class="badge badge-pill badge-danger">问题件</span>
+                            <span>@{{ i+1 }}</span>
+                            @can('订单管理-问题件')
+                                <a :href="'{{url("order/issue/index")}}'+'?orderCode='+order.orderno" target="order/issue/index?addtime=15">
+                                    <span v-show="order.is_order_issue" class="badge badge-pill badge-danger">问题件</span>
+                                </a>
+                            @else
+                                <span v-show="order.is_order_issue" class="badge badge-pill badge-danger">问题件</span>
+                            @endcan
                         </td>
                         <td class="text-dark font-weight-bold text-nowrap"><span>@{{ order.orderno }}</span></td>
                         <td class="text-muted text-nowrap"><span>@{{ order.ordercodename }}</span></td>

+ 2 - 2
resources/views/order/issue/index.blade.php

@@ -1186,8 +1186,8 @@
                                 }
                             }
                         }]
-
-                    }
+                    },
+                    {name:'orderCode',type:'input',tip: 'SO单号', placeholder: 'SO单号'}
                 ], [
                     {name: 'settlement_at_start', type: 'dateTime', tip: '完结起始日期'},
                     {name: 'settlement_at_end', type: 'dateTime', tip: '完结结束日期'},

+ 1 - 0
resources/views/order/workOrder/index.blade.php

@@ -294,6 +294,7 @@
                 ], [{name: 'review_at_start', type: 'time', tip: ['工单审核开始日期', '时间']},
                     {name: 'review_at_end', type: 'time', tip: ['工单审核结束日期', '时间']},
                     {name: 'order_issue_type', type: 'select', placeholder: '问题件类型', data: this.orderIssueTypes},
+                    {name: 'client_code', type: 'input', placeholder: '客户订单号'},
                     {name: 'is_review', type: 'checkbox', tip: '是否审核', data: [{name: 'true', value: '已审核'}]},
                 ]];
                 this.form = new query({

+ 18 - 17
resources/views/store/handInStorage/receiveDetailPage.blade.php

@@ -206,12 +206,12 @@
                                 if (res.data.asnDetail.lotatt05) this.info.lotatt05=res.data.asnDetail.lotatt05;
                                 this.basSku=res.data.basSku;
                                 this.$forceUpdate()
-                                return;
+                            }else {
+                                this.clearInfo();
+                                window.tempTip.setDuration(2000);
+                                window.tempTip.show(res.data.data);
+                                window.tempTip.showErrorAudio();
                             }
-                            this.clearInfo();
-                            window.tempTip.setDuration(2000);
-                            window.tempTip.show(res.data.data);
-                            window.tempTip.showErrorAudio();
                         }).catch(err=>{
                         window.tempTip.setDuration(2000);
                         window.tempTip.show("网络错误:"+err);
@@ -229,11 +229,11 @@
                                 if (res.data.asnDetail.lotatt05) this.info.lotatt05=res.data.asnDetail.lotatt05;
                                 this.basSku=res.data.basSku;
                                 this.$forceUpdate()
-                                return;
+                            }else {
+                                window.tempTip.setDuration(2000);
+                                window.tempTip.show(res.data.data);
+                                window.tempTip.showErrorAudio();
                             }
-                            window.tempTip.setDuration(2000);
-                            window.tempTip.show(res.data.data);
-                            window.tempTip.showErrorAudio();
                         }).catch(err=>{
                         window.tempTip.setDuration(2000);
                         window.tempTip.show("网络错误:"+err);
@@ -241,6 +241,7 @@
                     })
                 },
                 clearInfo(){
+                    this.info.sku='';
                     this.info.name='';
                     this.info.expectedqty=0;
                     this.info.receivedqty=0;
@@ -328,25 +329,25 @@
                     if (JSON.stringify(this.errors)==='{}') window.axios.post(url,{info:this.info})
                         .then(res=>{
                             if (res.data.success){
-                                tempTip.setDuration(2000);
-                                tempTip.cancelWaitingTip();
-                                tempTip.showSuccess('收货成功');
                                 // this.info={};
                                 this.clearInfo();
                                 this.asn_expectedqty=res.data.data.expectedqty;
                                 this.asn_receivedqty=res.data.data.receivedqty;
                                 this.asnDetails=[];
                                 this.$forceUpdate();
+                                tempTip.setDuration(2000);
+                                tempTip.cancelWaitingTip();
+                                tempTip.showSuccess('收货成功');
                                 document.getElementById("sku").focus();
                                 document.getElementById("sku").select();
                                 if (this.asn_expectedqty==this.asn_receivedqty)
                                     window.location.href="{{url('store/handInStorage/receive')}}";
-                                return;
+                            }else {
+                                tempTip.setDuration(3000);
+                                tempTip.cancelWaitingTip();
+                                tempTip.show(res.data.data);
+                                tempTip.showErrorAudio();
                             }
-                            tempTip.setDuration(3000);
-                            tempTip.cancelWaitingTip();
-                            tempTip.show(res.data.data);
-                            tempTip.showErrorAudio();
                         }).catch(err=>{
                             tempTip.setDuration(2000);
                             tempTip.cancelWaitingTip();

+ 6 - 0
routes/web.php

@@ -1045,5 +1045,11 @@ Route::group(['prefix'=>'package'],function(){
         });
     });
 
+    Route::group(['prefix' => 'notification'],static function () {
+            Route::get('/regular', 'NotificationController@regular');
+            Route::post('/regular', 'NotificationController@getRegularData');
+            Route::post('/toTarget', 'NotificationController@toTarget');
+        }
+    );
 });