Selaa lähdekoodia

up - 1111内测

liugc 1 vuosi sitten
vanhempi
commit
b571fdeea3

+ 5 - 1
app/adminapi/controller/master_worker/MasterWorkerExamineController.php

@@ -101,5 +101,9 @@ class MasterWorkerExamineController extends BaseAdminController
         return $this->data($result);
     }
 
-
+    public function getStatus()
+    {
+        $result = MasterWorkerAgreeLogic::getStatus();
+        return $this->data(['count'=>$result]);
+    }
 }

+ 1 - 1
app/adminapi/lists/master_worker/MasterWorkerExamineLists.php

@@ -96,7 +96,7 @@ class MasterWorkerExamineLists extends BaseAdminDataLists implements ListsSearch
     public function count(): int
     {
         $queryWhere = $this->queryWhere();
-        return MasterWorkerAgree::where($this->searchWhere)->where($queryWhere)->count();
+        return MasterWorker::where($this->searchWhere)->where($queryWhere)->count();
     }
 
 }

+ 2 - 0
app/adminapi/lists/works/ServiceWorkLists.php

@@ -76,6 +76,8 @@ class ServiceWorkLists extends BaseAdminDataLists implements ListsSearchInterfac
             // 时间 超过15分钟未确认
             $time = time()-15*60;
             $where[] = ['update_time', '<', $time];
+            $where[] = ['refund_approval', '=', 0]; // 未退款
+            $where[] = ['work_pay_status', '>', 0]; // 已支付
         }
         if(isset($this->params['workid']) && !empty($this->params['workid'])){
             $where[] = ['master_worker_id', '=', $this->params['workid']];

+ 7 - 0
app/adminapi/logic/master_worker/MasterWorkerAgreeLogic.php

@@ -15,6 +15,7 @@
 namespace app\adminapi\logic\master_worker;
 
 
+use app\common\model\master_worker\MasterWorker;
 use app\common\model\master_worker\MasterWorkerAgree;
 use app\common\logic\BaseLogic;
 use think\facade\Db;
@@ -112,4 +113,10 @@ class MasterWorkerAgreeLogic extends BaseLogic
         return MasterWorkerAgree::where('id',is_array($params['id'])?'in':'=',$params['id'])->column('worker_id');
     }
 
+    public static function getStatus(): int
+    {
+        return MasterWorker::where('audit_state',0)->count();
+    }
+
+
 }

+ 1 - 1
app/adminapi/logic/notice/NoticeLogic.php

@@ -276,7 +276,7 @@ class NoticeLogic extends BaseLogic
                     break;
                 case 'appoint_approval':
                     // 用户更新工单上门时间超过15分钟工程师未确认
-                    $serviceWorkCount = ServiceWork::where('appoint_approval', 1)->where('work_pay_status','>',0)->where('update_time','<', time()-15*60)->count('id');
+                    $serviceWorkCount = ServiceWork::where('appoint_approval', 1)->where('refund_approval','=',0)->where('work_pay_status','>',0)->where('update_time','<', time()-15*60)->count('id');
                     if($serviceWorkCount){
                         $noticeInfo['confirm_code'] = 101;
                         $noticeInfo['count'] = $serviceWorkCount;

+ 1 - 1
app/adminapi/logic/works/ReturnWorkLogic.php

@@ -148,7 +148,7 @@ class ReturnWorkLogic extends BaseLogic
                 $model = new ReturnWork();
             } else {
                 if($model->return_work_status !== 0){
-                    throw new \Exception('返修工单状态非待返修,无法修改');
+                    //throw new \Exception('返修工单状态非待返修,无法修改'); 1111内测要求放开
                 }
             }
             $issueWork = IssueWork::findOrEmpty($params['issue_work_id']);