Commit efbfc1b2 authored by 赵啸非's avatar 赵啸非

整理代码

parent 8adc964e
...@@ -251,7 +251,9 @@ public class AttendanceRecordHikServiceImpl extends AbstractCRUDServiceImpl<Atte ...@@ -251,7 +251,9 @@ public class AttendanceRecordHikServiceImpl extends AbstractCRUDServiceImpl<Atte
} }
} }
stopWatch.stop(); stopWatch.stop();
if(stopWatch.getLastTaskTimeMillis()>500){
log.info("考勤数据计算耗时:{}ms", stopWatch.getLastTaskTimeMillis()); log.info("考勤数据计算耗时:{}ms", stopWatch.getLastTaskTimeMillis());
}
}); });
stopWatch.start("考勤新增与更新耗时"); stopWatch.start("考勤新增与更新耗时");
if (!ObjectUtils.isEmpty(saveList)) { if (!ObjectUtils.isEmpty(saveList)) {
......
...@@ -17,6 +17,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -17,6 +17,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.util.StopWatch;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -286,8 +287,10 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract { ...@@ -286,8 +287,10 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
} }
} }
//生成异常记录 //生成异常记录
StopWatch stopWatch = new StopWatch("stopwatch error");//耗时计算
stopWatch.start("生成异常记录耗时");
genErrorAttendRecord(commonData.getContext(), commonData.getDateStr(), commonData.getAttendanceRecordEntity(), commonData.getDetailEntityList()); genErrorAttendRecord(commonData.getContext(), commonData.getDateStr(), commonData.getAttendanceRecordEntity(), commonData.getDetailEntityList());
log.info("生成异常记录耗时:{}ms", stopWatch.getLastTaskTimeMillis());
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment