Răsfoiți Sursa

状态数统计

liugc 1 an în urmă
părinte
comite
072260d0a8
1 a modificat fișierele cu 30 adăugiri și 0 ștergeri
  1. 30 0
      app/adminapi/logic/notice/NoticeLogic.php

+ 30 - 0
app/adminapi/logic/notice/NoticeLogic.php

@@ -264,6 +264,26 @@ class NoticeLogic extends BaseLogic
                         $noticeInfo['to_router'] = '/works/service_work';
                     }
                     break;
+                case 'work_status_receive':
+                    // 用户下单待派单 service_status
+                    $serviceWorkCount = ServiceWork::where('work_status', 1)->where('work_pay_status','>', 0)->count('id');
+                    if($serviceWorkCount){
+                        $noticeInfo['confirm_code'] = 101;
+                        $noticeInfo['count'] = $serviceWorkCount;
+                        $noticeInfo['massage'] .= '您有'.$serviceWorkCount.'个工单待领单';
+                        $noticeInfo['to_router'] = '/works/service_work';
+                    }
+                    break;
+                case 'work_status_contact':
+                    // 用户下单待派单 service_status
+                    $serviceWorkCount = ServiceWork::where('work_status', 2)->where('work_pay_status','>', 0)->count('id');
+                    if($serviceWorkCount){
+                        $noticeInfo['confirm_code'] = 101;
+                        $noticeInfo['count'] = $serviceWorkCount;
+                        $noticeInfo['massage'] .= '您有'.$serviceWorkCount.'个工单待联系';
+                        $noticeInfo['to_router'] = '/works/service_work';
+                    }
+                    break;
                 case 'worker_register':
                     // 工程师入驻待审核
                     $workerRegisterCount = MasterWorkerRegister::where('status', 0)->count('id');
@@ -284,6 +304,16 @@ class NoticeLogic extends BaseLogic
                         $noticeInfo['to_router'] = '/works/service_work';
                     }
                     break;
+                case 'refund_approval':
+                    // 用户退款状态审核中
+                    $serviceWorkCount = ServiceWork::where('refund_approval', 1)->where('work_pay_status','>',0)->count('id');
+                    if($serviceWorkCount){
+                        $noticeInfo['confirm_code'] = 101;
+                        $noticeInfo['count'] = $serviceWorkCount;
+                        $noticeInfo['massage'] .= '您有'.$serviceWorkCount.'个工单退款审核中';
+                        $noticeInfo['to_router'] = '/works/service_work';
+                    }
+                    break;
             }
             return $noticeInfo;
         } catch (\Exception $e) {