|
|
@@ -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;
|