|
@@ -491,7 +491,7 @@ class ScheduleService extends Service
|
|
->where('end_time', '<=', $endTimestamp)
|
|
->where('end_time', '<=', $endTimestamp)
|
|
->select('id')
|
|
->select('id')
|
|
->get()->toArray();
|
|
->get()->toArray();
|
|
- if(empty($schedule)) return [true, $return];
|
|
|
|
|
|
+ if(empty($schedule)) return [true, array_values($return)];
|
|
|
|
|
|
$construction = Construction::where('del_time',0)
|
|
$construction = Construction::where('del_time',0)
|
|
->whereIn('schedule_id',array_column($schedule,'id'))
|
|
->whereIn('schedule_id',array_column($schedule,'id'))
|
|
@@ -515,7 +515,7 @@ class ScheduleService extends Service
|
|
|
|
|
|
$construction = Construction::where('del_time',0)
|
|
$construction = Construction::where('del_time',0)
|
|
->whereIn('id',$order_id)
|
|
->whereIn('id',$order_id)
|
|
- ->select('id','order_number','crt_id')
|
|
|
|
|
|
+ ->select('id','order_number','crt_id','day_start_stamp','day_end_stamp')
|
|
->get()->toArray();
|
|
->get()->toArray();
|
|
if(empty($construction)) return [true, ""];
|
|
if(empty($construction)) return [true, ""];
|
|
$emp = Employee::whereIn('id',array_unique(array_column($construction,'crt_id')))
|
|
$emp = Employee::whereIn('id',array_unique(array_column($construction,'crt_id')))
|
|
@@ -538,10 +538,14 @@ class ScheduleService extends Service
|
|
|
|
|
|
$return = [];
|
|
$return = [];
|
|
foreach ($construction as $value){
|
|
foreach ($construction as $value){
|
|
|
|
+ $str = "";
|
|
|
|
+ if(! empty($value['day_start_stamp']) && ! empty($value['day_end_stamp'])) $str = date('Y-m-d H:i',$value['day_start_stamp']) . '-' . date("H:i",$value['day_end_stamp']);
|
|
|
|
+
|
|
$tmp = [
|
|
$tmp = [
|
|
'order_number' => $value['order_number'],
|
|
'order_number' => $value['order_number'],
|
|
'crt_name' => $emp[$value['crt_id']] ?? "",
|
|
'crt_name' => $emp[$value['crt_id']] ?? "",
|
|
'product' => $product_title[$value['id']],
|
|
'product' => $product_title[$value['id']],
|
|
|
|
+ 'crt_time' => $str,
|
|
];
|
|
];
|
|
$return[] = $tmp;
|
|
$return[] = $tmp;
|
|
}
|
|
}
|