Commit 8ca1b14e by ilal

提交

parent c3b6a3c1
...@@ -1591,18 +1591,23 @@ public class ClockInController { ...@@ -1591,18 +1591,23 @@ public class ClockInController {
if(dkmc == null) { if(dkmc == null) {
kskd = false; kskd = false;
if(attdate.getAttsch().size() == 2) {//一套上下班 上班1 if(attdate.getAttsch().size() == 2) {//一套上下班 上班1
if(clock.getType() == 1) {
Date sd1=df1.parse(ClockInTool.stampToDate(String.valueOf(starttime1)));//应打卡时间 boolean effectiveDate1 = ClockInTool.hourMinuteBetween(new SimpleDateFormat("yyyy-MM-dd HH:mm").format(time_), new SimpleDateFormat("yyyy-MM-dd HH:mm").format(starttime1ks), new SimpleDateFormat("yyyy-MM-dd HH:mm").format(starttime1js),"yyyy-MM-dd HH:mm");
Date sd2=df1.parse(sStdIoTime);//打卡时间 if (effectiveDate1) {//在范围内就打卡
Date sd3=df1.parse(ClockInTool.stampToDate(String.valueOf(endtime1)));//应打卡时间 atttype = clock.getType();
if(sd2.before(sd3)) { isRange = true;//在范围
atttype = 1; }else {
isRange = false;
}
}else if(clock.getType() == 2){
boolean effectiveDate2 = ClockInTool.hourMinuteBetween(new SimpleDateFormat("yyyy-MM-dd HH:mm").format(time_), new SimpleDateFormat("yyyy-MM-dd HH:mm").format(endtime1ks), new SimpleDateFormat("yyyy-MM-dd HH:mm").format(endtime1js),"yyyy-MM-dd HH:mm");
if (effectiveDate2) {//在范围内就打卡
atttype = clock.getType();
isRange = true;//在范围
}else {
isRange = false;
} }
if(sd2.after(sd1) && sd2.after(sd3)) {
atttype = 2;
} }
}else { }else {
boolean getinto = true; boolean getinto = true;
//打卡时间 对比班次 接近哪个时间就打哪个时间的卡 //打卡时间 对比班次 接近哪个时间就打哪个时间的卡
...@@ -1612,6 +1617,7 @@ public class ClockInController { ...@@ -1612,6 +1617,7 @@ public class ClockInController {
boolean effectiveDate1 = ClockInTool.hourMinuteBetween(new SimpleDateFormat("yyyy-MM-dd HH:mm").format(time_), new SimpleDateFormat("yyyy-MM-dd HH:mm").format(starttime1ks), new SimpleDateFormat("yyyy-MM-dd HH:mm").format(starttime1js),"yyyy-MM-dd HH:mm"); boolean effectiveDate1 = ClockInTool.hourMinuteBetween(new SimpleDateFormat("yyyy-MM-dd HH:mm").format(time_), new SimpleDateFormat("yyyy-MM-dd HH:mm").format(starttime1ks), new SimpleDateFormat("yyyy-MM-dd HH:mm").format(starttime1js),"yyyy-MM-dd HH:mm");
if (effectiveDate1) {//在范围内就打卡 if (effectiveDate1) {//在范围内就打卡
atttype = clock.getType(); atttype = clock.getType();
isRange = true;//在范围
getinto = false; getinto = false;
}else { }else {
if(getinto) { if(getinto) {
...@@ -2594,14 +2600,13 @@ public class ClockInController { ...@@ -2594,14 +2600,13 @@ public class ClockInController {
BeanUtil.copyProperties(ka, dkjlbefo,"attdate","remarks","userId","attime","dkmxid","commentary","punchequipment","punchmode"); BeanUtil.copyProperties(ka, dkjlbefo,"attdate","remarks","userId","attime","dkmxid","commentary","punchequipment","punchmode");
} }
} }
attschbefo.setDajl(dkjlbefo);
if(dkjlbefo.getDktime() != null) { if(dkjlbefo.getDktime() != null) {
attschbefo.setIsdk(1); attschbefo.setIsdk(1);
}else { }else {
attschbefo.setIsdk(0); attschbefo.setIsdk(0);
} }
if(beforeattdate.getAttsch().size() == 2) { if(beforeattdate.getAttsch().size() == 2) {
}else { }else {
...@@ -2615,6 +2620,18 @@ public class ClockInController { ...@@ -2615,6 +2620,18 @@ public class ClockInController {
} }
} }
Timestamp tt = Timestamp.valueOf(ClockInTool.stampToDate(String.valueOf(befo.getTime())));
if(attschbefo.getIsdk() == 1 && b.after(tt)) {
dkjlbefo.setStatus(17);//缺卡
dkjlbefo.setSort(befo.getSort());
dkjlbefo.setId(888);
//更新打卡关闭
attschbefo.setIsupdate(0);
}
attschbefo.setDajl(dkjlbefo);
attsch.add(p,attschbefo); attsch.add(p,attschbefo);
p++; p++;
} }
......
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