Commit 5d1d66d8 by ilal Committed by chenzg

提交

parent 45b0d404
......@@ -1504,23 +1504,28 @@ public class ClockInController {
int isXbdk2Cr = shif.getIsXbdk2Cr();//下班2是否次日(0:否;1:是)
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(balan.getSort() <= dkcs) {
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 {
//无记录的话就找昨天的数据
......@@ -1536,6 +1541,7 @@ public class ClockInController {
crdk = true;
attdate = MethodCall(qyid,userid,yesterday);
}
if(crdk && dnck) {
dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid)
......@@ -2559,6 +2565,7 @@ public class ClockInController {
if(EmptyUtil.isNotEmpty(attdate.getAttsch()) && attsch.get(0).getId() != 0) {//班次不为空
int bc = 0;
int bsz = 0;
int cr = 0;
/****************次日开始***************/
int sb1 = 0,xb1 = 0,sb2 = 0,xb2 = 0,sb3 = 0,xb3 = 0;
//先判断前一天是否存在次日打卡的方式
......@@ -2589,7 +2596,9 @@ public class ClockInController {
int p = 0;
for(AttSchedule befo : beforeattsch) {
boolean isdkjl = true;
if(befo.getNextday() == 1) {
cr++;
AttSchedule attschbefo = AttSchedule.builder().build();
BeanUtil.copyProperties(befo, attschbefo,"nextdaycard","dajl");
attschbefo.setNextdaycard(1);
......@@ -2598,10 +2607,12 @@ public class ClockInController {
for(KqglAssoDkjl ka : dajllistbefo) {
if(befo.getId() == ka.getBcid() && befo.getSort() == ka.getSort()) {//班次id和打卡顺序对应
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);
......@@ -2612,8 +2623,11 @@ public class ClockInController {
}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) {
bsz = 1;
attschbefo.setIsdk(0);
if(isdkjl) {
bsz = 1;
attschbefo.setIsdk(0);
}
}else {
bc++;
attschbefo.setIsdk(1);
......@@ -2941,13 +2955,14 @@ public class ClockInController {
//全部为 1 时
if(bccs == bc && b.before(d) && lcdkgb) {
System.err.println(cr);
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)
.orderByDesc(KqglAssoDkjl::getSort).last("LIMIT 1"));
if(dk != null && attdate.getAttsch().size() != dk.getSort()) {
AttSchedule att = attsch.get(dk.getSort());
AttSchedule att = attsch.get(dk.getSort()-cr);
att.setIsdk(0);
AttSchedule attw = attsch.get(dk.getSort()-1);
......
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