@ -1,5 +1,7 @@
package org.jeecg.modules.clockinlog.controller ;
package org.jeecg.modules.clockinlog.controller ;
import java.time.DayOfWeek ;
import java.time.LocalDateTime ;
import java.time.YearMonth ;
import java.time.YearMonth ;
import java.util.* ;
import java.util.* ;
import java.util.stream.Collectors ;
import java.util.stream.Collectors ;
@ -196,7 +198,7 @@ public class ClockinLogController extends JeecgController<ClockinLog, IClockinLo
@RequestMapping ( value = "/exportXls2" )
@RequestMapping ( value = "/exportXls2" )
public ModelAndView exportXls3 ( HttpServletRequest request , ClockinLog clockinLog ) {
public ModelAndView exportXls3 ( HttpServletRequest request , ClockinLog clockinLog ) {
return this . exportXls3 ( request , ClockInLogExportResp2 . class , "打卡" ) ;
return this . exportXls2 ( request , ClockInLogExportResp . class , "打卡" ) ;
}
}
/ / @RequestMapping ( value = "/exportXls2" )
/ / @RequestMapping ( value = "/exportXls2" )
@ -270,7 +272,14 @@ public class ClockinLogController extends JeecgController<ClockinLog, IClockinLo
yearMonthDay = nowYearMonth + "-0" + n ;
yearMonthDay = nowYearMonth + "-0" + n ;
}
}
List < ClockInLogResp > clockInLogExpeort = clockinLogMapper . getClockInLogExpeort ( yearMonthDay , clockInProject . getId ( ) , clockinTeamLog . getUserId ( ) ) ;
Date date = DateUtils2 . getDate ( yearMonthDay + " 23:59:59" ) ;
LocalDateTime localDateTime = DateUtils2 . dateToDateTime ( date ) ;
Integer type = 0 ;
if ( DayOfWeek . SATURDAY . equals ( localDateTime . getDayOfWeek ( ) ) | | DayOfWeek . SUNDAY . equals ( localDateTime . getDayOfWeek ( ) ) ) {
type = 1 ;
}
List < ClockInLogResp > clockInLogExpeort = clockinLogMapper . getClockInLogExpeort ( yearMonthDay , clockInProject . getId ( ) , clockinTeamLog . getUserId ( ) , type ) ;
String clockInTime = "" ;
String clockInTime = "" ;
for ( ClockInLogResp clockInLogResp : clockInLogExpeort ) {
for ( ClockInLogResp clockInLogResp : clockInLogExpeort ) {
@ -362,8 +371,14 @@ public class ClockinLogController extends JeecgController<ClockinLog, IClockinLo
for ( int day = 1 ; day < = daysInMonth ; day + + ) {
for ( int day = 1 ; day < = daysInMonth ; day + + ) {
String yearMonthDay = nowYearMonth + "-" + ( day < 10 ? "0" + day : day ) ;
String yearMonthDay = nowYearMonth + "-" + ( day < 10 ? "0" + day : day ) ;
Date date = DateUtils2 . getDate ( yearMonthDay + " 23:59:59" ) ;
LocalDateTime localDateTime = DateUtils2 . dateToDateTime ( date ) ;
Integer type = 0 ;
if ( DayOfWeek . SATURDAY . equals ( localDateTime . getDayOfWeek ( ) ) | | DayOfWeek . SUNDAY . equals ( localDateTime . getDayOfWeek ( ) ) ) {
type = 1 ;
}
List < ClockInLogResp > clockInLogs = clockinLogMapper . getClockInLogExpeort (
List < ClockInLogResp > clockInLogs = clockinLogMapper . getClockInLogExpeort (
yearMonthDay , clockInProject . getId ( ) , clockinTeamLog . getUserId ( )
yearMonthDay , clockInProject . getId ( ) , clockinTeamLog . getUserId ( ) , type
) ;
) ;
/ / 拼接打卡时间或标记 “ 缺卡 ”
/ / 拼接打卡时间或标记 “ 缺卡 ”