Commit 4354baf1 by ilal Committed by chenzg

提交

parent 491dac4d
...@@ -194,47 +194,54 @@ public class ClockInController { ...@@ -194,47 +194,54 @@ public class ClockInController {
int isSbdk3Cr = shif.getIsSbdk3Cr();//上班3是否次日(0:否;1:是) int isSbdk3Cr = shif.getIsSbdk3Cr();//上班3是否次日(0:否;1:是)
int isXbdk3Cr = shif.getIsXbdk3Cr();//下班3是否次日(0:否;1:是) int isXbdk3Cr = shif.getIsXbdk3Cr();//下班3是否次日(0:否;1:是)
if(balan.getSort() < dkcs) { if(balan.getSort() < dkcs) {
if(balan.getSort()+1 == 2 && dkcs == 2) { if((isXbdk1Cr + isSbdk2Cr +isXbdk2Cr + isSbdk3Cr + isXbdk3Cr) > 0) {
if(isXbdk1Cr > 0) {//次日
crdk = true;
}
}
if(balan.getSort()+1 == 3 && dkcs == 4) {
if(isSbdk2Cr > 0) {//次日
crdk = true;
}
}
if(balan.getSort()+1 == 4 && dkcs == 4) {
if(isXbdk2Cr > 0) {//次日
crdk = true; crdk = true;
} }
// if(balan.getSort()+1 == 2 && dkcs == 2) {
// //次日
// if(isXbdk1Cr > 0) { crdk = true; }
// }
// if(balan.getSort()+1 == 3 && dkcs == 4) {
// if(isSbdk2Cr > 0) {crdk = true; }
// }
// if(balan.getSort()+1 == 4 && dkcs == 4) {
// if(isXbdk2Cr > 0) { crdk = true; }
// }
// if(balan.getSort()+1 == 5 && dkcs == 6) {
// if(isSbdk3Cr > 0) { crdk = true; }
// }
// if(balan.getSort()+1 == 6 && dkcs == 6) {
// if(isXbdk3Cr > 0) { crdk = true; }
// }
} }
if(balan.getSort()+1 == 5 && dkcs == 6) {
if(isSbdk3Cr > 0) {//次日 }else {
crdk = true; //无记录的话就找昨天的数据
AttendanceCardListDto attdate1 = MethodCall(qyid,userid,yesterday);
List<AttSchedule> ashssyebo = attdate1.getAttsch();//获取昨天应打卡时间
if(ashssyebo.size() > 0) {
Date sd1=df1.parse(ClockInTool.stampToDate(String.valueOf(ashssyebo.get(0).getTime())));//当天应打的首次上班卡时间
Date sd2=df1.parse(current_time);//当前时间
if(sd2.after(sd1)) {//大于
dnck = true;
} }
} }
if(balan.getSort()+1 == 6 && dkcs == 6) {
if(isXbdk3Cr > 0) {//次日
crdk = true; crdk = true;
}
}
}
}else { attdate = MethodCall(qyid,userid,yesterday);
//无记录的话就找昨天的数据
// AttendanceCardListDto attdate1 = MethodCall(qyid,userid,yesterday);
} }
if(crdk && dnck) { if(crdk && dnck) {
dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid) dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid)
.ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday)); .ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday).eq(KqglAssoDkmx::getData, yesterday));
attdate = MethodCall(qyid,userid,yesterday); attdate = MethodCall(qyid,userid,yesterday);
attendance_date = startDateyesterday; attendance_date = startDateyesterday;
toweek = yesterday; toweek = yesterday;
}else { }else {
dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid) dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid)
.ge(KqglAssoDkmx::getDksj, startDate).le(KqglAssoDkmx::getDksj, endDate)); .ge(KqglAssoDkmx::getDksj, startDate).le(KqglAssoDkmx::getDksj, endDate).eq(KqglAssoDkmx::getData, putime));
attendance_date = startDate; attendance_date = startDate;
toweek = putime; toweek = putime;
} }
...@@ -1457,7 +1464,6 @@ public class ClockInController { ...@@ -1457,7 +1464,6 @@ public class ClockInController {
long time_ = DateUtil.getStringTime(clock.getPunchtime(), "yyyy-MM-dd HH:mm:ss");//打卡时间戳 long time_ = DateUtil.getStringTime(clock.getPunchtime(), "yyyy-MM-dd HH:mm:ss");//打卡时间戳
String putime = sStdIoTime.substring(0, 10);////转换打卡时间格式 yyyy-MM-dd String putime = sStdIoTime.substring(0, 10);////转换打卡时间格式 yyyy-MM-dd
String putimehhmm = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(time_);//转换打卡时间格式 年月日 String putimehhmm = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(time_);//转换打卡时间格式 年月日
...@@ -1545,14 +1551,14 @@ public class ClockInController { ...@@ -1545,14 +1551,14 @@ public class ClockInController {
} }
if(crdk && dnck) { if(crdk && dnck) {
dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid) dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid)
.ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday)); .ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday).eq(KqglAssoDkmx::getData, yesterday));
attdate = MethodCall(qyid,userid,yesterday); attdate = MethodCall(qyid,userid,yesterday);
attendance_date = startDateyesterday; attendance_date = startDateyesterday;
toweek = yesterday; toweek = yesterday;
putime = toweek; putime = toweek;
}else { }else {
dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid) dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid)
.ge(KqglAssoDkmx::getDksj, startDate).le(KqglAssoDkmx::getDksj, endDate)); .ge(KqglAssoDkmx::getDksj, startDate).le(KqglAssoDkmx::getDksj, endDate).eq(KqglAssoDkmx::getData, putime));
attendance_date = startDate; attendance_date = startDate;
toweek = putime; toweek = putime;
} }
......
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