|
@@ -179,11 +179,15 @@ class ProductionOrderService extends Service
|
|
|
public function fillData($data){
|
|
|
if(empty($data['data'])) return $data;
|
|
|
|
|
|
+ $production_map = $this->getProductionOrderQuantity($data['data']);
|
|
|
+
|
|
|
date_default_timezone_set("PRC");
|
|
|
foreach ($data['data'] as $key => $value){
|
|
|
$data['data'][$key]['out_order_no_time'] = $value['out_order_no_time'] ? date('Y-m-d',$value['out_order_no_time']) : '';
|
|
|
$data['data'][$key]['out_checker_time'] = $value['out_checker_time'] ? date('Y-m-d',$value['out_checker_time']) : '';
|
|
|
$data['data'][$key]['production_time'] = $value['production_time'] ? date('Y-m-d',$value['production_time']) : '';
|
|
|
+ $keys = $value['order_no'] . $value['technology_name'] . $value['wood_name'];
|
|
|
+ $data['data'][$key]['not_production'] = $value['order_quantity'] - ($production_map[$keys] ?? 0);
|
|
|
}
|
|
|
|
|
|
return $data;
|