Просмотр исходного кода

up - 第三方订单在工程师确认服务完成后,直接无需用户再确认服务完成,变成工程师待结算/用户已确认服务完成

liugc 1 год назад
Родитель
Сommit
eef0d8f094

+ 8 - 1
app/adminapi/logic/works/ServiceWorkLogic.php

@@ -478,7 +478,14 @@ class ServiceWorkLogic extends BaseLogic
             }
 
             $work->finished_images = $params['finished_images'];
-            $work->user_confirm_status = 3;//待确认服务完成
+            // 是否有三方的订单来源,若存在说明三方有系统 则自动确认报价
+            $platformOrders = ExternalPlatformOrders::where('work_id',$work->id)->findOrEmpty();
+            if($platformOrders->isEmpty()){
+                $work->user_confirm_status = 3;//待确认服务完成
+            }else{
+                $work->work_status = 6;
+                $work->user_confirm_status = 4;
+            }
             $work->save();
 
             //添加变更日志

+ 1 - 1
app/common/controller/NotificTestController.php

@@ -53,7 +53,7 @@ class NotificTestController extends BaseLikeAdminController
 
     public function getNotificList(){
         $prams = $this->request->param();
-        return $this->success('', OnlineCustomerService::getBusinessAllocationValue($prams['admin_id'],$prams['business_type']), 1, 1);
+        return $this->success('', OnlineCustomerService::getNotificList($prams['admin_id'],$prams['business_type']), 1, 1);
     }
 
 

+ 11 - 1
app/common/service/OnlineCustomerService.php

@@ -14,6 +14,13 @@ class OnlineCustomerService
      *  $business_type: consultation servicework
      */
 
+    public array $business_types = [
+        'consultation',
+        'servicework'
+    ];
+
+
+
     public static function addOnlineCustomerService($admin_id){
         $customerOnlineServiceArr = Cache::store('common_redis')->get('customer_online_service_list');
         $max_code = 1;
@@ -96,15 +103,18 @@ class OnlineCustomerService
         switch ($business_type){
             case 'consultation':
                 $to_router = '/works/external_consultation';
+                $notificationTitle = '客咨消息';
                 break;
             case 'servicework':
                 $to_router = '/works/service_work';
+                $notificationTitle = '订单消息';
                 break;
             default:
                 $to_router = '/workbench';
+                $notificationTitle = '';
                 break;
         }
-        return ['type'=>$business_type,'unique_code'=> md5($count),'to_router'=>$to_router,'notific_count' => $count];
+        return ['type'=>$business_type,'unique_code'=> md5($count),'to_router'=>$to_router,'notificationTitle' => $notificationTitle,'notific_count' => $count];
     }