Commit 4fc1f5fc by leialin

Merge branch 'lal' into 'develop'

提交

See merge request 8timerv2/8timerapiv200!405
parents 22174a8f 0c1d5758
...@@ -2595,61 +2595,64 @@ public class ClockInController { ...@@ -2595,61 +2595,64 @@ public class ClockInController {
List<AttSchedule> beforeattsch = beforeattdate.getAttsch(); List<AttSchedule> beforeattsch = beforeattdate.getAttsch();
int p = 0; int p = 0;
for(AttSchedule befo : beforeattsch) { if(EmptyUtil.isNotEmpty(beforeattdate.getAttsch()) && beforeattsch.get(0).getId() != 0) {
boolean isdkjl = true; for(AttSchedule befo : beforeattsch) {
if(befo.getNextday() == 1) { boolean isdkjl = true;
cr++; if(befo.getNextday() == 1) {
AttSchedule attschbefo = AttSchedule.builder().build(); cr++;
BeanUtil.copyProperties(befo, attschbefo,"nextdaycard","dajl"); AttSchedule attschbefo = AttSchedule.builder().build();
attschbefo.setNextdaycard(1); BeanUtil.copyProperties(befo, attschbefo,"nextdaycard","dajl");
attschbefo.setNextday(2);//昨日 attschbefo.setNextdaycard(1);
KqglAssoDkjl dkjlbefo = KqglAssoDkjl.builder().build(); attschbefo.setNextday(2);//昨日
for(KqglAssoDkjl ka : dajllistbefo) { KqglAssoDkjl dkjlbefo = KqglAssoDkjl.builder().build();
if(befo.getId() == ka.getBcid() && befo.getSort() == ka.getSort()) {//班次id和打卡顺序对应 for(KqglAssoDkjl ka : dajllistbefo) {
BeanUtil.copyProperties(ka, dkjlbefo,"attdate","remarks","userId","attime","dkmxid","commentary","punchequipment","punchmode"); if(befo.getId() == ka.getBcid() && befo.getSort() == ka.getSort()) {//班次id和打卡顺序对应
isdkjl = false; BeanUtil.copyProperties(ka, dkjlbefo,"attdate","remarks","userId","attime","dkmxid","commentary","punchequipment","punchmode");
isdkjl = false;
}
} }
}
if(dkjlbefo.getDktime() != null) {
bc++;
attschbefo.setIsdk(1);
}else {
attschbefo.setIsdk(0);
}
if(beforeattdate.getAttsch().size() == 2) {
}else { if(dkjlbefo.getDktime() != null) {
boolean ectivedate = ClockInTool.hourMinuteBetween(new SimpleDateFormat("yyyy-MM-dd HH:mm").format(nowdate), new SimpleDateFormat("yyyy-MM-dd HH:mm").format(befo.getStarttime()), new SimpleDateFormat("yyyy-MM-dd HH:mm").format(befo.getEndtime()),"yyyy-MM-dd HH:mm");
if(ectivedate) {
if(isdkjl) {
bsz = 1;
attschbefo.setIsdk(0);
}
}else {
bc++; bc++;
attschbefo.setIsdk(1); attschbefo.setIsdk(1);
}else {
attschbefo.setIsdk(0);
} }
if(beforeattdate.getAttsch().size() == 2) {
}else {
boolean ectivedate = ClockInTool.hourMinuteBetween(new SimpleDateFormat("yyyy-MM-dd HH:mm").format(nowdate), new SimpleDateFormat("yyyy-MM-dd HH:mm").format(befo.getStarttime()), new SimpleDateFormat("yyyy-MM-dd HH:mm").format(befo.getEndtime()),"yyyy-MM-dd HH:mm");
if(ectivedate) {
if(isdkjl) {
bsz = 1;
attschbefo.setIsdk(0);
}
}else {
bc++;
attschbefo.setIsdk(1);
}
}
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++;
} }
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