Explorar o código

Merge branch 'master' of http://47.100.37.243:10080/wutt/manHourHousekeeper

sunyadv %!s(int64=5) %!d(string=hai) anos
pai
achega
2b5a1d1b11

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

@@ -19,6 +19,7 @@ import org.springframework.stereotype.Service;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.sql.Timestamp;
+import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
@@ -170,7 +171,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                     .eq("action_type", 0))) {
                 totalWorkingTime += timeCalculation.getDuration();
             }
-            resultMap.put("time", totalWorkingTime);
+            resultMap.put("time", new DecimalFormat("#.00").format(totalWorkingTime / 3600));
             resultMap.put("project", projectMapper.selectList(new QueryWrapper<Project>()
                     .eq("company_id", userMapper.selectById(userId).getCompanyId())));
             httpRespMsg.data = resultMap;

+ 0 - 5
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ScreenshotServiceImpl.java

@@ -457,11 +457,8 @@ public class ScreenshotServiceImpl extends ServiceImpl<ScreenshotMapper, Screens
                     .last("LIMIT 1"));
             //单独记录当前的时间以便使用
             LocalTime currentTime = screenshot.getIndate().toLocalTime();
-            log.info("开始处理图片");
-            log.info("上一条记录latestRecord: " + latestRecord);
             if (latestRecord != null) {
                 //首先对比类型
-                log.info("类型是否相同: " + latestRecord.getActionType().equals(screenshot.getPicType()));
                 if (latestRecord.getActionType().equals(screenshot.getPicType())) {
                     //如果有记录的话 准备计算上次结束和新的开始的时间差
                     LocalTime estimatedTime = latestRecord.getEndTime();
@@ -469,14 +466,12 @@ public class ScreenshotServiceImpl extends ServiceImpl<ScreenshotMapper, Screens
                             + (currentTime.getMinute() - estimatedTime.getMinute()) * 60
                             + (currentTime.getSecond() - estimatedTime.getSecond()));
                     //断层不大于600秒的话
-                    log.info("间隔时间durationSecond: " + durationSecond + " 结果" + (durationSecond <= DETECTION_INTERVAL));
                     if (durationSecond <= DETECTION_INTERVAL) {
                         //确认连续 将状态改为连续
                         isConsecutive = true;
                     }
                 }
             }
-            log.info("连续状态: " + isConsecutive);
             if (isConsecutive) {
                 //如果是连续的话那就准备修改上一条记录的最后时间和持续时间
                 LocalTime startTime = latestRecord.getStartTime();