|
|
@@ -194,16 +194,11 @@ class QueryRefund extends Command
|
|
|
'id' => $recordId,
|
|
|
'refund_status' => RefundEnum::REFUND_SUCCESS,
|
|
|
]);
|
|
|
- Log::channel('re_fund')->info('1');
|
|
|
-
|
|
|
//更新工单退款状态以及处理工程师金额和物业金额
|
|
|
$order = RechargeOrder::where('id',$order_id)->findOrEmpty();
|
|
|
$work = ServiceWork::where('id',$order->work_id)->findOrEmpty();
|
|
|
- Log::channel('re_fund')->info(json_encode($work,JSON_UNESCAPED_UNICODE));
|
|
|
if(!$work->isEmpty()){
|
|
|
if(($work->work_pay_status == '1' || $work->work_pay_status == '2') and $work->service_status != '5' and $work->work_status != '9'){
|
|
|
- Log::channel('re_fund')->info(2);
|
|
|
-
|
|
|
//工程师余额变动
|
|
|
$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);
|
|
|
@@ -215,6 +210,8 @@ class QueryRefund extends Command
|
|
|
'work_id'=>$work->id,'worker_id'=>$work->master_worker_id,'amount'=>$retentionAmount,'remark'=>$remark,'source'=>2
|
|
|
],false);
|
|
|
}
|
|
|
+ Log::channel('re_fund')->info('工单ID'.$order->work_id.',工单退款金额:'.$change_amount);
|
|
|
+
|
|
|
//物业余额变动
|
|
|
$property_commission = PropertyCommission::where('work_id',$order->work_id)->findOrEmpty();
|
|
|
if(!$property_commission->isEmpty()){
|