Commit 45b0d404 by ilal Committed by chenzg

提交

parent 42a10c09
......@@ -1591,18 +1591,23 @@ public class ClockInController {
if(dkmc == null) {
kskd = false;
if(attdate.getAttsch().size() == 2) {//一套上下班 上班1
Date sd1=df1.parse(ClockInTool.stampToDate(String.valueOf(starttime1)));//应打卡时间
Date sd2=df1.parse(sStdIoTime);//打卡时间
Date sd3=df1.parse(ClockInTool.stampToDate(String.valueOf(endtime1)));//应打卡时间
if(sd2.before(sd3)) {
atttype = 1;
}
if(sd2.after(sd1) && sd2.after(sd3)) {
atttype = 2;
}
if(clock.getType() == 1) {
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) {//在范围内就打卡
atttype = clock.getType();
isRange = true;//在范围
}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;
}
}
}else {
boolean getinto = true;
//打卡时间 对比班次 接近哪个时间就打哪个时间的卡
......@@ -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");
if (effectiveDate1) {//在范围内就打卡
atttype = clock.getType();
isRange = true;//在范围
getinto = false;
}else {
if(getinto) {
......@@ -2594,14 +2600,13 @@ public class ClockInController {
BeanUtil.copyProperties(ka, dkjlbefo,"attdate","remarks","userId","attime","dkmxid","commentary","punchequipment","punchmode");
}
}
attschbefo.setDajl(dkjlbefo);
if(dkjlbefo.getDktime() != null) {
attschbefo.setIsdk(1);
}else {
attschbefo.setIsdk(0);
}
if(beforeattdate.getAttsch().size() == 2) {
}else {
......@@ -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);
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