Commit a82bc529 by leialin

Merge branch 'lal' into 'develop'

提交

See merge request 8timerv2/8timerapiv200!452
parents a8161011 9164b726
...@@ -1497,19 +1497,36 @@ public class ClockInController { ...@@ -1497,19 +1497,36 @@ public class ClockInController {
boolean sbdkkd = false;//针对于上班 未超过上班卡打卡 视为无效打卡 boolean sbdkkd = false;//针对于上班 未超过上班卡打卡 视为无效打卡
long punchcardtime = 0,punchstart = 0,punchend = 0;//应打卡时间,应打卡开始时间,应打卡结束时间 long punchcardtime = 0,punchstart = 0,punchend = 0;//应打卡时间,应打卡开始时间,应打卡结束时间
boolean chenexday = false;
ClockCollectData clockt = new ClockCollectData(); ClockCollectData clockt = new ClockCollectData();
// putime: 根据日期 得到打卡所需的详细信息 // putime: 根据日期 得到打卡所需的详细信息
AttendanceCardListDto attdate = MethodCall(qyid,userid,putime); AttendanceCardListDto attdate = MethodCall(qyid,userid,putime);
if(attgro != null) {//判断考勤组是否存在 if(attgro != null) {//判断考勤组是否存在
if(attdate.getAttgrouptype() != 3) { if(attdate.getAttgrouptype() != 3) {
//查询打卡当天是否有记录**********************************
List<AttSchedule> checknextday = attdate.getAttsch();
if(checknextday.size() > 0) {
for(int c=0;c<checknextday.size();c++) {
if(checknextday.get(c).getNextday() == 2) {
chenexday = true;
}
}
}
KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build(); KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build();
boolean dnck = false;
boolean crdk = false;//当次打卡是否存在次日打卡
if(chenexday) {
//查询打卡当天是否有记录**********************************
// KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build();
String dakariqi = new SimpleDateFormat("yy-MM-dd").format(Double.valueOf(startDateyesterday))+" "+ClockInTool.dateToWeek2(yesterday); String dakariqi = new SimpleDateFormat("yy-MM-dd").format(Double.valueOf(startDateyesterday))+" "+ClockInTool.dateToWeek2(yesterday);
//检查昨日的班次是否存在次日打卡 //检查昨日的班次是否存在次日打卡
KqglAssoDkjl balan = kqglassodkjlmapper.selectOne(new QueryWrapper<KqglAssoDkjl>().lambda().eq(KqglAssoDkjl::getUserId, userid).eq(KqglAssoDkjl::getAttdate, dakariqi).ne(KqglAssoDkjl::getBcid, 0).orderByDesc(KqglAssoDkjl :: getSort).last("LIMIT 1")); KqglAssoDkjl balan = kqglassodkjlmapper.selectOne(new QueryWrapper<KqglAssoDkjl>().lambda().eq(KqglAssoDkjl::getUserId, userid).eq(KqglAssoDkjl::getAttdate, dakariqi).ne(KqglAssoDkjl::getBcid, 0).orderByDesc(KqglAssoDkjl :: getSort).last("LIMIT 1"));
boolean dnck = false; // boolean dnck = false;
boolean crdk = false;//当次打卡是否存在次日打卡 // boolean crdk = false;//当次打卡是否存在次日打卡
if(balan != null) {//前一天是否打过卡 去班次id查询是否存在次日打卡 if(balan != null) {//前一天是否打过卡 去班次id查询是否存在次日打卡
//昨日的班次信息 //昨日的班次信息
KqglAssoBcsz shif = kqglassobcszmapper.selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, balan.getBcid())); KqglAssoBcsz shif = kqglassobcszmapper.selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, balan.getBcid()));
...@@ -1528,27 +1545,9 @@ public class ClockInController { ...@@ -1528,27 +1545,9 @@ public class ClockInController {
int isSbdk3Cr = shif.getIsSbdk3Cr();//上班3是否次日(0:否;1:是) int isSbdk3Cr = shif.getIsSbdk3Cr();//上班3是否次日(0:否;1:是)
int isXbdk3Cr = shif.getIsXbdk3Cr();//下班3是否次日(0:否;1:是) int isXbdk3Cr = shif.getIsXbdk3Cr();//下班3是否次日(0:否;1:是)
if(balan.getSort() <= dkcs) { if(balan.getSort() <= dkcs) {
if((isXbdk1Cr + isSbdk2Cr +isXbdk2Cr + isSbdk3Cr + isXbdk3Cr) > 0) { if((isXbdk1Cr + isSbdk2Cr +isXbdk2Cr + isSbdk3Cr + isXbdk3Cr) > 0) {
crdk = true; 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 { }else {
List<AttSchedule> ashss = attdate.getAttsch();//获取今天应打卡时间 List<AttSchedule> ashss = attdate.getAttsch();//获取今天应打卡时间
...@@ -1564,7 +1563,6 @@ public class ClockInController { ...@@ -1564,7 +1563,6 @@ public class ClockInController {
} }
} }
if(EmptyUtil.isNotEmpty(attdate.getAttsch()) && ashss.get(0).getId() != 0) {//班次不为空 if(EmptyUtil.isNotEmpty(attdate.getAttsch()) && ashss.get(0).getId() != 0) {//班次不为空
KqglAssoBcsz shifi = KqglAssoBcsz.builder().build().selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, ashss.get(0).getId())); KqglAssoBcsz shifi = KqglAssoBcsz.builder().build().selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, ashss.get(0).getId()));
int isXbdk1Cr = shifi.getIsXbdk1Cr();//下班1是否次日(0:否;1:是) int isXbdk1Cr = shifi.getIsXbdk1Cr();//下班1是否次日(0:否;1:是)
...@@ -1582,9 +1580,9 @@ public class ClockInController { ...@@ -1582,9 +1580,9 @@ public class ClockInController {
crdk = false; crdk = false;
} }
} }
} }
}
if(crdk && dnck) { if(crdk && dnck) {
dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid) dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid)
.ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday).eq(KqglAssoDkmx::getData, yesterday)); .ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday).eq(KqglAssoDkmx::getData, yesterday));
......
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