|
|
@@ -19,6 +19,7 @@ use app\api\logic\PerformanceLogic;
|
|
|
use app\common\model\dict\DictData;
|
|
|
use app\common\model\master_worker\MasterWorker;
|
|
|
use app\common\model\master_worker\MasterWorkerAccountLog;
|
|
|
+use app\common\model\master_worker\MasterWorkerRetentionMoneyLog;
|
|
|
use app\common\model\performance\PerformanceRules;
|
|
|
use app\common\model\recharge\OrderGoods;
|
|
|
use app\common\model\recharge\RechargeOrder;
|
|
|
@@ -490,6 +491,13 @@ class ServiceWorkLogic extends BaseLogic
|
|
|
|
|
|
//查收工程师提成金额
|
|
|
$result['change_amount'] = MasterWorkerAccountLog::where(['work_sn'=>$result['work_sn'],'action'=>1])->value('change_amount');
|
|
|
+
|
|
|
+ //质保金相关金额
|
|
|
+ $result['retention'] = MasterWorkerRetentionMoneyLog::where('work_id',$result['id'])->visible(['action','amount'])->select()
|
|
|
+ ->each(function ($item){
|
|
|
+ $item['amount'] = $item['action'] == 1 ? '+'.$item['amount'] : '-'.$item['amount'];
|
|
|
+ })->toArray();
|
|
|
+
|
|
|
return $result;
|
|
|
}
|
|
|
|