소스 검색

忽略提交

haozi 5 년 전
부모
커밋
dfa807c5d0
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      app/LaborReport.php

+ 5 - 1
app/LaborReport.php

@@ -78,8 +78,12 @@ class LaborReport extends Model
     }
     }
     //本轮工作结束时间
     //本轮工作结束时间
     public function getThisRoundOnlineEndTimeAttribute(){
     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){
         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'])
             if ($laborReport['exit_at']&&$laborReport['check_out_at'])
                 return $laborReport['check_out_at'];
                 return $laborReport['check_out_at'];
         }
         }