Commit 4354baf1 by ilal Committed by chenzg

提交

parent 491dac4d
......@@ -194,47 +194,54 @@ public class ClockInController {
int isSbdk3Cr = shif.getIsSbdk3Cr();//上班3是否次日(0:否;1:是)
int isXbdk3Cr = shif.getIsXbdk3Cr();//下班3是否次日(0:否;1:是)
if(balan.getSort() < dkcs) {
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((isXbdk1Cr + isSbdk2Cr +isXbdk2Cr + isSbdk3Cr + isXbdk3Cr) > 0) {
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; }
// }
}
}else {
//无记录的话就找昨天的数据
// AttendanceCardListDto attdate1 = MethodCall(qyid,userid,yesterday);
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;
}
}
crdk = true;
attdate = MethodCall(qyid,userid,yesterday);
}
if(crdk && dnck) {
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);
attendance_date = startDateyesterday;
toweek = yesterday;
}else {
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;
toweek = putime;
}
......@@ -1456,11 +1463,10 @@ public class ClockInController {
// pbfs;// 排班方式 1:固定排班;2:自由排班;3:自由工时
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_);//转换打卡时间格式 年月日
Long startDate = DateUtil.getStartTime(0,DateUtil.getStringTime(putime,"yyyy-MM-dd")).getTime();//打卡当天开始时间
Long endDate = DateUtil.getnowEndTime(23,DateUtil.getStringTime(putime,"yyyy-MM-dd")).getTime();//打卡当天结束时间
......@@ -1545,14 +1551,14 @@ public class ClockInController {
}
if(crdk && dnck) {
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);
attendance_date = startDateyesterday;
toweek = yesterday;
putime = toweek;
}else {
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;
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