Browse Source

Merge remote-tracking branch 'origin/fyy' into fyy

cqpCow 2 years ago
parent
commit
35c69c2323
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/Service/Box/BoxService.php

+ 3 - 3
app/Service/Box/BoxService.php

@@ -238,7 +238,7 @@ class BoxService extends Service
         $model = SaleOrdersProduct::where('del_time',0)->wherein('id',$sale_order_ids)
             ->select('id','out_order_no','order_no','customer_no','customer_name','product_no','product_title','product_size','crt_time as production_time','id as sale_orders_product_id','finished_num as dispatch_complete_quantity','box_num','technology_name','wood_name','crt_time','order_quantity','technology_material','technology_name','wood_name','process_mark')
             ->orderBy('id','desc')->get()->toArray();
-        $product_list = ordersProduct::wherein('sale_orders_product_id',$sale_order_ids)->select('id','out_order_no','customer_no','customer_name','product_no','sale_orders_product_id','product_title','product_size','dispatch_complete_quantity','box_num','technology_name','wood_name','crt_time','production_quantity','technology_material','technology_name','wood_name','process_mark')->get()->toArray();
+        $product_list = ordersProduct::wherein('sale_orders_product_id',$sale_order_ids)->select('id','out_order_no','customer_no','customer_name','product_no','sale_orders_product_id','product_title','product_size','dispatch_complete_quantity','box_num','technology_name','wood_name','crt_time',DB::raw('(production_quantity - scrapp_num) as production_quantity '),DB::raw('finished_num as dispatch_complete_quantity '),'technology_material','technology_name','wood_name','process_mark')->get()->toArray();
         $model_key_list = [];
         foreach ($model as $v){
             $model_key_list[$v['id']] = $v;
@@ -306,7 +306,7 @@ class BoxService extends Service
                     'technology_name' => $v['technology_name'],
                     'wood_name' => $v['wood_name'],
                     'order_no' => $v['order_no'],
-                    'process_mark' => -$v['process_mark'],
+                    'process_mark' => $v['process_mark'],
                     'out_order_no' => $v['out_order_no'],
                     'production_time' => date('Y-m-d',$v['crt_time']),
                     'customer_no' => $v['customer_no'],
@@ -383,7 +383,7 @@ class BoxService extends Service
 
         $top_order_no = $data['top_order_no'];
         $list = new Box();
-        $list = $list->where('top_order_no',$top_order_no)->select('top_order_no','order_no','crt_time')->get()->toArray();
+        $list = $list->wherein('top_order_no',$top_order_no)->select('top_order_no','order_no','crt_time')->get()->toArray();
 
 
         return [true,$list];