cqpCow 2 år sedan
förälder
incheckning
e7d2a77bd4

+ 1 - 0
app/Service/DispatchService.php

@@ -191,6 +191,7 @@ class DispatchService extends Service
 
         $result = OrdersProduct::whereIn('id',$data['id'])
             ->select('id as order_product_id','sale_orders_product_id','order_no','table_header_mark','product_no','product_title','product_size','product_unit','production_quantity','technology_material','technology_name','wood_name','process_mark','table_body_mark','sale_orders_product_id','out_order_no_time')
+            ->orderBy('id','desc')
             ->get()->toArray();
 
         //已派工数据

+ 12 - 0
app/Service/EmployeeService.php

@@ -284,6 +284,18 @@ class EmployeeService extends Service
         return [true,''];
     }
 
+    public function teamDetail($data){
+        if($this->isEmpty($data,'id')) return [false,'ID不能为空!'];
+
+        $result = EmployeeTeamPermission::from('employee_team_permission as a')
+            ->leftJoin('employee as b','b.id','a.employee_id')
+            ->where('team_id',$data['id'])
+            ->select('b.id','b.emp_name','b.number as code')
+            ->get()->toArray();
+
+        return [true,$result];
+    }
+
     public function employeeRole($data){
         $role_ids = [];
         $employee_ids = [];

+ 1 - 0
app/Service/FinishedOrderService.php

@@ -184,6 +184,7 @@ class FinishedOrderService extends Service
 
         $result = DispatchSub::whereIn('id',$data['id'])
             ->select('order_product_id','dispatch_no','id as dispatch_id','order_no','table_header_mark','product_no','product_title','product_size','product_unit','dispatch_quantity','technology_material','technology_name','wood_name','process_mark','table_body_mark','process_id','equipment_id','team_id','dispatch_time_start','dispatch_time_end','crt_time as dispatch_time','sale_orders_product_id','out_order_no_time')
+            ->orderBy('id','desc')
             ->get()->toArray();
 
         //已完工数据

+ 3 - 1
app/Service/ProductionOrderService.php

@@ -183,7 +183,9 @@ class ProductionOrderService extends Service
         if(in_array(false, $data['quantity'], true) || in_array(0, $data['quantity'], true) || in_array('', $data['quantity'], true))return [false,'数量不能为空!'];
 
         $result = SaleOrdersProduct::whereIn('id',$data['id'])
-            ->select('id as sale_orders_product_id','order_no','out_order_no','out_order_no_time','customer_no','customer_name','table_header_mark','product_no','product_title','product_size','product_unit','order_quantity','technology_material','technology_name','wood_name','process_mark','table_body_mark','out_crt_man','out_checker_man','out_checker_time','production_quantity')->get()->toArray();
+            ->select('id as sale_orders_product_id','order_no','out_order_no','out_order_no_time','customer_no','customer_name','table_header_mark','product_no','product_title','product_size','product_unit','order_quantity','technology_material','technology_name','wood_name','process_mark','table_body_mark','out_crt_man','out_checker_man','out_checker_time','production_quantity')
+            ->orderBy('id','desc')
+            ->get()->toArray();
 
         foreach ($result as $key => $value){
             if($value['production_quantity'] + $data['quantity'][$key] > $value['order_quantity']) return [false,'生产数量不能大于订单数量'];