Commit cdb7f41d by leialin

Merge branch 'lal' into 'develop'

提交

See merge request 8timerv2/8timerapiv200!409
parents e26d15fc 375c22c1
......@@ -1534,7 +1534,7 @@ public class ClockInController {
if(ashssyebo.size() > 0) {
Date sd1=df1.parse(ClockInTool.stampToDate(String.valueOf(ashssyebo.get(0).getTime())));//当天应打的首次上班卡时间
Date sd2=df1.parse(current_time);//当前时间
if(sd1.after(sd2)) {//大于
if(sd2.after(sd1)) {//大于
dnck = true;
}
}
......@@ -1549,6 +1549,7 @@ public class ClockInController {
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));
......@@ -2566,6 +2567,7 @@ public class ClockInController {
int bc = 0;
int bsz = 0;
int cr = 0;
boolean iscrdk = true;
/****************次日开始***************/
int sb1 = 0,xb1 = 0,sb2 = 0,xb2 = 0,sb3 = 0,xb3 = 0;
//先判断前一天是否存在次日打卡的方式
......@@ -2599,6 +2601,7 @@ public class ClockInController {
for(AttSchedule befo : beforeattsch) {
boolean isdkjl = true;
if(befo.getNextday() == 1) {
iscrdk = false;
cr++;
AttSchedule attschbefo = AttSchedule.builder().build();
BeanUtil.copyProperties(befo, attschbefo,"nextdaycard","dajl");
......@@ -2626,6 +2629,7 @@ public class ClockInController {
if(ectivedate) {
if(isdkjl) {
bsz = 1;
bc--;
attschbefo.setIsdk(0);
}
......@@ -2779,12 +2783,6 @@ public class ClockInController {
}
}
////
// List<KqglAssoDkjl> dajllist_ = kqglassodkjlmapper.getDetailedRecordClock(startDate,endDate,userBean.getEmpNum());
// dkcs = dajllist_.size();
//attsch.get(0).getId()
// KqglAssoBcsz bcsc = KqglAssoBcsz.builder().id(attsch.get(0).getId()).build().selectById();
String afterday = ClockInTool.requires_extra_times(str,+1,3,1);//后一天
Long endDateafterday = DateUtil.getnowEndTime(23,DateUtil.getStringTime(afterday,"yyyy-MM-dd")).getTime();
......@@ -2860,7 +2858,7 @@ public class ClockInController {
if(ash.getIsdk() == 1 && b.after(tt) && dkjl.getDktime() == null && dkjl.getId() == null && dkcs > 0) {
dkjl.setStatus(17);//缺卡
dkjl.setSort(ash.getSort());
dkjl.setId(888);
dkjl.setId(8881);
//更新打卡关闭
ash.setIsupdate(0);
ash.setIsdk(1);
......@@ -2959,29 +2957,42 @@ public class ClockInController {
}
//全部为缺卡时 没有打卡按钮显示
if(attsch.get(0).getDajl().getId() != null) {
if(attsch.get(0).getDajl().getId() != null && iscrdk) {
if(attdate.getAttsch().size() == 2 || attdate.getAttsch().size() == 4 || attdate.getAttsch().size() == 6) {
if(attsch.get(0).getDajl().getId() == 888 && attsch.get(0).getDajl().getStatus() == 17
&&attsch.get(1).getDajl().getId() == 888 && attsch.get(1).getDajl().getStatus() == 17) {
if(attsch.get(0).getDajl().getId() != null && attsch.get(0).getDajl().getId() == 888 && attsch.get(0).getDajl().getStatus() == 17
&& attsch.get(1).getDajl().getId() != null && attsch.get(1).getDajl().getId() == 888 && attsch.get(1).getDajl().getStatus() == 17) {
lcdkgb = false;
}
}else if(attdate.getAttsch().size() == 4 || attdate.getAttsch().size() == 6) {
if(attsch.get(2).getDajl().getId() == 888 && attsch.get(2).getDajl().getStatus() == 17
&&attsch.get(3).getDajl().getId() == 888 && attsch.get(3).getDajl().getStatus() == 17) {
if(attsch.get(2).getDajl().getId() != null && attsch.get(2).getDajl().getId() == 888 && attsch.get(2).getDajl().getStatus() == 17
&& attsch.get(3).getDajl().getId() != null && attsch.get(3).getDajl().getId() == 888 && attsch.get(3).getDajl().getStatus() == 17) {
lcdkgb = false;
}
}else if(attdate.getAttsch().size() == 6) {
if(attsch.get(4).getDajl().getId() == 888 && attsch.get(4).getDajl().getStatus() == 17
&&attsch.get(5).getDajl().getId() == 888 && attsch.get(5).getDajl().getStatus() == 17) {
if(attsch.get(4).getDajl().getId() != null && attsch.get(4).getDajl().getId() == 888 && attsch.get(4).getDajl().getStatus() == 17
&& attsch.get(5).getDajl().getId()!= null && attsch.get(5).getDajl().getId() == 888 && attsch.get(5).getDajl().getStatus() == 17) {
lcdkgb = false;
}
}
}
boolean isdkjj = true;
if(attdate.getAttsch().size() == 2) {
if(attsch.get(1).getDajl().getId() != null && attsch.get(1).getDajl().getDktime() != null) {
isdkjj = false;
}
}else if(attdate.getAttsch().size() == 4) {
if(attsch.get(3).getDajl().getId() != null && attsch.get(3).getDajl().getDktime() != null) {
isdkjj = false;
}
}else if(attdate.getAttsch().size() == 6) {
if(attsch.get(5).getDajl().getId() != null && attsch.get(5).getDajl().getDktime() != null) {
isdkjj = false;
}
}
//全部为 1 时
if(bccs == bc && b.before(d) && lcdkgb) {
System.err.println(cr);
if(bccs == bc && b.before(d) && lcdkgb && isdkjj) {
KqglAssoDkjl dk = KqglAssoDkjl.builder().build().selectOne(new QueryWrapper<KqglAssoDkjl>().lambda().eq(KqglAssoDkjl::getQyid, userBean.getOrgCode())
.eq(KqglAssoDkjl::getUserId, userBean.getEmpNum()).ge(KqglAssoDkjl::getDktime, startDate).le(KqglAssoDkjl::getDktime, endDate)
.ne(KqglAssoDkjl::getSort, 0).ne(KqglAssoDkjl::getStatus, 2).ne(KqglAssoDkjl::getStatus, 0)
......
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