|
|
@@ -78,8 +78,12 @@ class LaborReport extends Model
|
|
|
}
|
|
|
//本轮工作结束时间
|
|
|
public function getThisRoundOnlineEndTimeAttribute(){
|
|
|
- $laborReports=LaborReport::where('enter_number',$this['enter_number'])->orderBy('id','asc')->get();
|
|
|
+ $laborReports=LaborReport::where('enter_number',$this['enter_number'])->get();
|
|
|
+// $maxId=$laborReports->max('id');
|
|
|
foreach ($laborReports as $laborReport){
|
|
|
+// if ($laborReport['id']==$maxId&&!$laborReport['exit_at']&&$laborReport['check_out_at']){
|
|
|
+// return $laborReport['check_out_at'];
|
|
|
+// }
|
|
|
if ($laborReport['exit_at']&&$laborReport['check_out_at'])
|
|
|
return $laborReport['check_out_at'];
|
|
|
}
|