|
|
@@ -18,6 +18,7 @@ use app\common\enum\PayEnum;
|
|
|
use app\common\enum\RefundEnum;
|
|
|
use app\common\enum\worker\WorkerAccountLogEnum;
|
|
|
use app\common\logic\WorkerAccountLogLogic;
|
|
|
+use app\common\model\master_worker\MasterWorkerAccountLog;
|
|
|
use app\common\model\property\PropertyCommission;
|
|
|
use app\common\model\property\PropertyHead;
|
|
|
use app\common\model\property\PropertyOrder;
|
|
|
@@ -201,7 +202,8 @@ class QueryRefund extends Command
|
|
|
$work->save();
|
|
|
if($work->work_pay_status == 1 || $work->work_pay_status == 2){
|
|
|
//师傅余额变动
|
|
|
- WorkerAccountLogLogic::addAccountLog($work,$order->worker_price,WorkerAccountLogEnum::UM_DEC_ADMIN,WorkerAccountLogEnum::DEC);
|
|
|
+ $change_amount = MasterWorkerAccountLog::where(['work_sn'=>$work->work_sn,'action'=>1])->value('change_amount');
|
|
|
+ WorkerAccountLogLogic::addAccountLog($work,$change_amount,WorkerAccountLogEnum::UM_DEC_ADMIN,WorkerAccountLogEnum::DEC);
|
|
|
//物业余额变动
|
|
|
$property_commission = PropertyCommission::where('work_id',$order->work_id)->findOrEmpty();
|
|
|
if(!$property_commission->isEmpty()){
|