Commit b38d42d5 by 叶立庆

Merge branch 'v5.5.0' of http://192.168.3.233:8090/dj/rpc-riskmanage into v5.5.0

2 parents abea3b7f bc851429
......@@ -258,13 +258,13 @@ public class LearningCenterCourseService {
public CourseStatisticsDTO getCourseStatistics(CourseSearchDTO request) {
CourseStatisticsDTO res = new CourseStatisticsDTO();
//根据手机号查询员工信息
BeiSenEmployeeListResonseDTO employeeInfo = getEmployeeInfoByStaffPhone(request.getStaffPhone());
if (employeeInfo == null) {
return res;
}
Integer userId = employeeInfo.getUserID();
// //根据手机号查询员工信息
// BeiSenEmployeeListResonseDTO employeeInfo = getEmployeeInfoByStaffPhone(request.getStaffPhone());
// if (employeeInfo == null) {
// return res;
// }
// Integer userId = employeeInfo.getUserID();
Integer userId = request.getUserId();
//计算累计学习时长
BigDecimal studyDuration = beiSenLearnStaffProgressDailyMapper.sumStudyDuration(userId, null, null);
if (studyDuration != null) {
......
......@@ -261,7 +261,7 @@ public class DateUtil {
* @return
*/
public static Date getMonthFirstDay(LocalDateTime now) {
LocalDateTime startOfMonth = now.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0);
LocalDateTime startOfMonth = now.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0).withNano(0);
return Date.from(startOfMonth.atZone(ZoneId.systemDefault()).toInstant());
}
......@@ -271,7 +271,7 @@ public class DateUtil {
* @return
*/
public static Date getPreMonthFirstDay(LocalDateTime now) {
LocalDateTime startOfMonth = now.minusMonths(1).withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0);
LocalDateTime startOfMonth = now.minusMonths(1).withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0).withNano(0);
return Date.from(startOfMonth.atZone(ZoneId.systemDefault()).toInstant());
}
......@@ -282,7 +282,7 @@ public class DateUtil {
*/
public static Date getMonthEndDay(LocalDateTime now) {
//计算本月最后一天
LocalDateTime endOfMonth = now.with(TemporalAdjusters.lastDayOfMonth()).withHour(23).withMinute(59).withSecond(59);
LocalDateTime endOfMonth = now.with(TemporalAdjusters.lastDayOfMonth()).withHour(23).withMinute(59).withSecond(59).withNano(0);
return Date.from(endOfMonth.atZone(ZoneId.systemDefault()).toInstant());
}
......@@ -293,7 +293,7 @@ public class DateUtil {
*/
public static Date getPreMonthEndDay(LocalDateTime now) {
//计算本月最后一天
LocalDateTime endOfMonth = now.minusMonths(1).with(TemporalAdjusters.lastDayOfMonth()).withHour(23).withMinute(59).withSecond(59);
LocalDateTime endOfMonth = now.minusMonths(1).with(TemporalAdjusters.lastDayOfMonth()).withHour(23).withMinute(59).withSecond(59).withNano(0);
return Date.from(endOfMonth.atZone(ZoneId.systemDefault()).toInstant());
}
......@@ -303,7 +303,8 @@ public class DateUtil {
* @return
*/
public static Date getWeekFirstDay(LocalDateTime now) {
LocalDateTime startOfWeek = now.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)).withHour(0).withMinute(0).withSecond(0);
LocalDateTime startOfWeek = now.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)).withHour(0).withMinute(0).withSecond(0).withNano(0);
//转为date, 时分秒不对
return Date.from(startOfWeek.atZone(ZoneId.systemDefault()).toInstant());
}
......@@ -313,7 +314,7 @@ public class DateUtil {
* @return
*/
public static Date getWeekEndDay(LocalDateTime now) {
LocalDateTime endOfWeek = now.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY)).withHour(23).withMinute(59).withSecond(59);
LocalDateTime endOfWeek = now.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY)).withHour(23).withMinute(59).withSecond(59).withNano(0);
return Date.from(endOfWeek.atZone(ZoneId.systemDefault()).toInstant());
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!