Explorar o código

质保金金额

whitefang hai 1 ano
pai
achega
193f145671
Modificáronse 1 ficheiros con 2 adicións e 11 borrados
  1. 2 11
      app/workerapi/logic/RetentionMoneyLogic.php

+ 2 - 11
app/workerapi/logic/RetentionMoneyLogic.php

@@ -18,17 +18,8 @@ class RetentionMoneyLogic extends BaseLogic
             if($model->isEmpty()){
                 throw new \Exception('用户不存在');
             }
-            $where = [];
-            $where[] = ['worker_id','=',$params['worker_id']] ;
-            $incWhere =$where;
-            $incWhere[] = ['action', '=',WorkerAccountLogEnum::INC];
-            $data['amount_inc_total'] = MasterWorkerRetentionMoneyLog::where($incWhere)
-                ->sum('amount');
-            $outWhere = $where;
-            $outWhere[] =['action', '=',WorkerAccountLogEnum::DEC];
-            $data['amount_dec_total'] = MasterWorkerRetentionMoneyLog::where($outWhere)
-                ->sum('amount');
-            $data['amount_available_total'] = $data['amount_inc_total'] - $data['amount_dec_total'];
+            $data['earnest_money_usable'] =  $model->earnest_money_usable;
+            $data['earnest_money_freeze'] = $model->earnest_money_freeze;
             $data['retention_money_status'] = $model->retention_money_status;
             $data['retention_money_status_text'] = $model->retention_money_status_text;
             $data['retention_pay_status'] = $model->retention_pay_status;