diff --git a/src/main/java/cn/timer/api/controller/kqgl/ClockInController.java b/src/main/java/cn/timer/api/controller/kqgl/ClockInController.java index 376af8a..d87ebde 100644 --- a/src/main/java/cn/timer/api/controller/kqgl/ClockInController.java +++ b/src/main/java/cn/timer/api/controller/kqgl/ClockInController.java @@ -2647,6 +2647,7 @@ public class ClockInController { int p = 0; if(EmptyUtil.isNotEmpty(beforeattdate.getAttsch()) && beforeattsch.get(0).getId() != 0) { + int g = 1; for(AttSchedule befo : beforeattsch) { boolean isdkjl = true; if(befo.getNextday() == 1) { @@ -2673,7 +2674,24 @@ public class ClockInController { } if(beforeattdate.getAttsch().size() == 2) { - + if(befo.getStarttime() != 0 && befo.getEndtime() != 0) { + boolean ectivedate = ClockInTool.hourMinuteBetween(new SimpleDateFormat("yyyy-MM-dd HH:mm").format(nowdate), new SimpleDateFormat("yyyy-MM-dd HH:mm").format(befo.getStarttime()), new SimpleDateFormat("yyyy-MM-dd HH:mm").format(befo.getEndtime()),"yyyy-MM-dd HH:mm"); + if(g == 1) { + if(ectivedate) { + attschbefo.setIsdk(0); + }else { + attschbefo.setIsdk(1); + } + } + if(g == 2) { + if(ectivedate) { + attschbefo.setIsdk(0); + }else { + attschbefo.setIsdk(1); + } + } + g++; + } }else { boolean ectivedate = ClockInTool.hourMinuteBetween(new SimpleDateFormat("yyyy-MM-dd HH:mm").format(nowdate), new SimpleDateFormat("yyyy-MM-dd HH:mm").format(befo.getStarttime()), new SimpleDateFormat("yyyy-MM-dd HH:mm").format(befo.getEndtime()),"yyyy-MM-dd HH:mm"); if(ectivedate) {