Przeglądaj źródła

Merge branch 'master' of e.coding.net:zdap/weixiu/weixiu_api into equity-m

liugc 1 rok temu
rodzic
commit
479e80b288

+ 2 - 1
app/adminapi/lists/finance/WorkerAccountLogLists.php

@@ -24,7 +24,7 @@ class WorkerAccountLogLists extends BaseAdminDataLists implements ListsSearchInt
     public function setSearch(): array
     {
         return [
-            '=' => ['al.change_type'],
+            '=' => ['al.change_type','worker_number'],
         ];
     }
 
@@ -78,6 +78,7 @@ class WorkerAccountLogLists extends BaseAdminDataLists implements ListsSearchInt
             $item['change_type_desc'] = WorkerAccountLogEnum::getChangeTypeDesc($item['change_type']);
             $symbol = $item['action'] == WorkerAccountLogEnum::INC ? '+' : '-';
             $item['change_amount'] = $symbol . $item['change_amount'];
+            $item['total_amount'] = bcadd($item['left_amount'], $item['change_amount'], 2);
         }
 
         return $lists;

+ 2 - 2
app/api/logic/ServiceOrderLogic.php

@@ -431,7 +431,7 @@ class ServiceOrderLogic extends BaseLogic
     {
         try {
             $order_info =  \app\common\model\recharge\RechargeOrder::with(['order_goods'=>function ($query) {
-                $query->visible(['goods_name','goods_image','goods_number','good_unit']);
+                $query->visible(['goods_id','goods_name','goods_image','goods_number','good_unit']);
             },'service_work'=>function ($query) {
                 $query->visible(['work_sn','real_name','mobile','address','service_status','appointment_time','master_worker_id','work_images','explanation','finished_images','finished_time','spare_total','service_work_spare_id','refund_approval','property_activity_id'])->append(['service_status_text','user_service_status','user_service_status_text']);
             }])
@@ -614,7 +614,7 @@ class ServiceOrderLogic extends BaseLogic
 
 
             $order_info =  \app\common\model\recharge\RechargeOrder::with(['order_goods'=>function ($query) {
-                $query->visible(['goods_payment_type','goods_category_id']);
+                $query->visible(['goods_id','goods_payment_type','goods_category_id']);
             },'service_work'=>function ($query) {
                 $query->visible(['service_fee','spare_total','service_work_spare_id','goods_category_id']);
             }])

+ 1 - 0
app/api/logic/UserCouponLogic.php

@@ -173,6 +173,7 @@ class UserCouponLogic extends BaseLogic
 
     public static function categoryWithAmountLists($params)
     {
+        Log::info('coupon-'.json_encode($params));
         try{
             // 构建查询条件
             $query = UserCoupon::where('user_id', $params['user_id'])

+ 1 - 1
app/common/command/QueryRefund.php

@@ -204,7 +204,7 @@ class QueryRefund extends Command
         $order = RechargeOrder::where('id',$order_id)->findOrEmpty();
         $work = ServiceWork::where('id',$order->work_id)->findOrEmpty();
         if(!$work->isEmpty()){
-            if(($work->work_pay_status == '1' || $work->work_pay_status == '2') and $work->service_status != '5' and $work->work_status != '9'){
+            if(($work->work_pay_status == '1' || $work->work_pay_status == '2') and $work->work_status != '9'){
                 //工程师余额变动
                 $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);