Commit 7a645016 by 陶湘宇 Committed by 284718418@qq.com

修复跨天打卡

parent 321794e9
...@@ -143,6 +143,7 @@ public class ClockInController { ...@@ -143,6 +143,7 @@ public class ClockInController {
/*******/ /*******/
long time_ = DateUtil.getStringTime(sStdIoTime, "yyyy-MM-dd HH:mm:ss");//打卡时间戳 long time_ = DateUtil.getStringTime(sStdIoTime, "yyyy-MM-dd HH:mm:ss");//打卡时间戳
long isFirsTimer=time_+60*60*1000;
String putime = new SimpleDateFormat("yyyy-MM-dd").format(time_);//转换打卡时间格式 年月日 String putime = new SimpleDateFormat("yyyy-MM-dd").format(time_);//转换打卡时间格式 年月日
String putimehhmm = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(time_);//转换打卡时间格式 年月日 String putimehhmm = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(time_);//转换打卡时间格式 年月日
...@@ -182,10 +183,11 @@ public class ClockInController { ...@@ -182,10 +183,11 @@ public class ClockInController {
List<AttSchedule> ashss = attdate.getAttsch();//获取今天应打卡时间 List<AttSchedule> ashss = attdate.getAttsch();//获取今天应打卡时间
if(ashss.size() > 0) { if(ashss.size() > 0) {
Date sd1=df1.parse(ClockInTool.stampToDate(String.valueOf(ashss.get(0).getTime())));//当天应打的首次上班卡时间 Date sd1=df1.parse(ClockInTool.stampToDate(String.valueOf(ashss.get(0).getTime())));//当天应打的首次上班卡时间
Date sd2=df1.parse(current_time);//当前时间 Date sd2=df1.parse(ClockInTool.stampToDate(String.valueOf(isFirsTimer)));//当前时间isFirsTimer
if(sd1.after(sd2)) { if(sd1.after(sd2)) {
dnck = true; dnck = true;
} }
//dnck = false;
} }
int isXbdk1Cr = shif.getIsXbdk1Cr();//下班1是否次日(0:否;1:是) int isXbdk1Cr = shif.getIsXbdk1Cr();//下班1是否次日(0:否;1:是)
int isSbdk2Cr = shif.getIsSbdk2Cr();//上班2是否次日(0:否;1:是) int isSbdk2Cr = shif.getIsSbdk2Cr();//上班2是否次日(0:否;1:是)
......
...@@ -290,7 +290,7 @@ public class AttendanceTaskTiming{ ...@@ -290,7 +290,7 @@ public class AttendanceTaskTiming{
y = y-1; y = y-1;
} }
log.error("getIsFdjjr: " + attgro.getIsFdjjr()); log.error("getIsFdjjr: "+attgro.getIsFdjjr()+"uid:" + user.getEmpnum()+"org_code:"+org_code);
if(attgro.getIsFdjjr().equals(1111)) { if(attgro.getIsFdjjr().equals(1111)) {
if(Arrays.asList(holidays).contains(String.valueOf(sdf1.format(date1)))){ if(Arrays.asList(holidays).contains(String.valueOf(sdf1.format(date1)))){
y = y-1; y = y-1;
......
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