Parcourir la source

待分配时长2

Reiskuchen il y a 5 ans
Parent
commit
7273bc2151

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -174,7 +174,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 totalWorkingTime += timeCalculation.getDuration();
             }
             //把总秒数转为double后换算为小时并保留两位小数
-            resultMap.put("time", new DecimalFormat("#.00").format((double) totalWorkingTime / 3600));
+            resultMap.put("time", new DecimalFormat("0.00").format((double) totalWorkingTime / 3600));
             //顺便返回该公司全部的计划
             resultMap.put("project", projectMapper.selectList(new QueryWrapper<Project>()
                     .eq("company_id", userMapper.selectById(userId).getCompanyId())));

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TimeCalculationServiceImpl.java

@@ -179,7 +179,7 @@ public class TimeCalculationServiceImpl extends ServiceImpl<TimeCalculationMappe
                 dataMap.put("time", list);
                 //这里检查如果只需要一天记录的话 说明是pc端界面那个地方 那就再多计算一个当天总工作时间
                 if (dateList.size() == 1) {
-                    dataMap.put("total", new DecimalFormat("#.00").format((double) total / 3600));
+                    dataMap.put("total", new DecimalFormat("0.00").format((double) total / 3600));
                 }
                 resultList.add(dataMap);
             }