cqp 1 hónapja
szülő
commit
4fc03b9564
2 módosított fájl, 5 hozzáadás és 5 törlés
  1. 1 1
      app/Service/RDService.php
  2. 4 4
      app/Service/StatisticsService.php

+ 1 - 1
app/Service/RDService.php

@@ -312,7 +312,7 @@ class RDService extends Service
             $end_time = strtotime(date('Y-m-d',$value['order_time']) ." " . $value['end_time_hour'] . ":" . $value['end_time_min']);
             $data['data'][$key]['start_time'] = date("H:i",$start_time);
             $data['data'][$key]['end_time'] = date("H:i",$end_time);
-            $data['data'][$key]['total_hours'] = bcdiv($value['total_hours'],60,3);
+            $data['data'][$key]['total_hours'] = bcdiv($value['total_hours'],60,2);
         }
 
         return $data;

+ 4 - 4
app/Service/StatisticsService.php

@@ -127,7 +127,7 @@ class StatisticsService extends Service
             $employee[$key]['set_total_hours'] = $set_total_hours;
             //汇总研发工时单里的总工时
             $rd_total_hours = $employee_map[$value['id']] ?? 0;
-            $rd_total_hours = bcdiv($rd_total_hours,60,3);
+            $rd_total_hours = bcdiv($rd_total_hours,60,2);
             $employee[$key]['rd_total_hours'] = $rd_total_hours;
             //每个项目的工时
             $every_item_hours = $employee_map_2[$value['id']] ?? [];
@@ -136,7 +136,7 @@ class StatisticsService extends Service
             if(! empty($every_item_hours)){
                 foreach ($every_item_hours as $item => $item_hour){
                     if(isset($details[$item])) {
-                        $details[$item] = bcdiv($item_hour,60,3);
+                        $details[$item] = bcdiv($item_hour,60,2);
                     }
                     $code = $item_map[$item] ?? "";
                     if(! empty($code)) $my_item .= $code . ",";
@@ -265,7 +265,7 @@ class StatisticsService extends Service
             $device[$key]['set_total_hours'] = $set_total_hours;
             //汇总研发工时单里的总工时
             $rd_total_hours = $device_map[$value['id']] ?? 0;
-            $rd_total_hours = bcdiv($rd_total_hours,60,3);
+            $rd_total_hours = bcdiv($rd_total_hours,60,2);
             $device[$key]['rd_total_hours'] = $rd_total_hours;
             //每个项目的工时
             $every_item_hours = $device_map_2[$value['id']] ?? [];
@@ -275,7 +275,7 @@ class StatisticsService extends Service
             if(! empty($every_item_hours)){
                 foreach ($every_item_hours as $item => $item_hour){
                     if(isset($details[$item])) {
-                        $details[$item] = bcdiv($item_hour,60,3);
+                        $details[$item] = bcdiv($item_hour,60,2);
                     }
                     $code = $item_map[$item] ?? "";
                     if(! empty($code)) $my_item .= $code . ",";