Commit 10bb7989 by ilal Committed by chenzg

提交

parent 4089f43e
......@@ -281,8 +281,9 @@ public class ClockInController {
}else {
long starttime1 = 0,starttime1ks = 0,starttime1js = 0,endtime1 = 0,endtime1ks = 0,endtime1js = 0,starttime2 = 0,starttime2ks = 0,starttime2js = 0,endtime2 = 0,endtime2ks = 0,endtime2js = 0,starttime3 = 0,starttime3ks = 0,starttime3js = 0,
endtime3 = 0,endtime3ks = 0,endtime3js = 0;
List<AttSchedule> ash = null;
if(attdate.getAttsch().size() > 0) {
List<AttSchedule> ash = attdate.getAttsch();
ash = attdate.getAttsch();
int y = 0;
clockt.setShifid(ash.get(y).getId());
shifid = ash.get(y).getId();//班次id
......@@ -537,6 +538,27 @@ public class ClockInController {
if(clockt.getShifid() != 0) {
boolean dddbdk = true;//
boolean dak2 = true;
//打卡无限制时 当前时间必须大于上班打卡时间 才能打下班卡
if(punchstart==0 && punchend==0 && (atttype == 2 || atttype == 4 || atttype == 6)) {
String xbdk = "";
if(atttype == 2) {
xbdk = String.valueOf(ash.get(0).getTime());
}else if(atttype == 4){
xbdk = String.valueOf(ash.get(2).getTime());
}else {
xbdk = String.valueOf(ash.get(4).getTime());
}
Date sd1=df1.parse(ClockInTool.stampToDate(String.valueOf(xbdk)));//当天应打的首次上班卡时间
Date sd2=df1.parse(current_time);//当前时间
if(sd2.before(sd1)) {//小于
dak2 = false;
}
}
if(!dak2) { dddbdk = false; }
if(dddbdk) {
KqglAssoBcsz shif = KqglAssoBcsz.builder().build();
if(attdate.getAttsch().size() > 0 && clockt.getShifid() > 0){//有无班次
shif = shif.selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, clockt.getShifid()));
......@@ -601,15 +623,15 @@ public class ClockInController {
.ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday));
attdateyesterday = MethodCall(qyid,userid,yesterday);
List<AttSchedule> ash = attdateyesterday.getAttsch();
List<AttSchedule> ash1 = attdateyesterday.getAttsch();
if(attdateyesterday.getAttsch().size() == 2 || attdateyesterday.getAttsch().size() == 4 || attdateyesterday.getAttsch().size() == 6) {
yesendtime1 = ash.get(1).getTime();
yesendtime1 = ash1.get(1).getTime();
}
if(attdateyesterday.getAttsch().size() == 4 || attdateyesterday.getAttsch().size() == 6) {
yesendtime2 = ash.get(3).getTime();
yesendtime2 = ash1.get(3).getTime();
}
if(attdateyesterday.getAttsch().size() == 6) {
yesendtime3 = ash.get(5).getTime();
yesendtime3 = ash1.get(5).getTime();
}
}
......@@ -877,6 +899,11 @@ public class ClockInController {
status_ = 2;
}
}else {
msg = "当前时间必须大于上班打卡时间 才能打下班卡";
sbyf = 0;
status_ = 2;
}
}else {
msg = "当前是休息时间";
sbyf = 0;
status_ = 2;
......@@ -1617,8 +1644,9 @@ public class ClockInController {
}else {
long starttime1 = 0,starttime1ks = 0,starttime1js = 0,endtime1 = 0,endtime1ks = 0,endtime1js = 0,starttime2 = 0,starttime2ks = 0,starttime2js = 0,endtime2 = 0,endtime2ks = 0,endtime2js = 0,starttime3 = 0,starttime3ks = 0,starttime3js = 0,
endtime3 = 0,endtime3ks = 0,endtime3js = 0;
List<AttSchedule> ash =null;
if(attdate.getAttsch().size() > 0) {
List<AttSchedule> ash = attdate.getAttsch();
ash = attdate.getAttsch();
int y = 0;
clockt.setShifid(ash.get(y).getId());
shifid = ash.get(y).getId();//班次id
......@@ -1893,7 +1921,27 @@ public class ClockInController {
}
if(clockt.getShifid() != 0) {
boolean dddbdk = true;//
boolean dak2 = true;
//打卡无限制时 当前时间必须大于上班打卡时间 才能打下班卡
if(punchstart==0 && punchend==0 && (atttype == 2 || atttype == 4 || atttype == 6)) {
String xbdk = "";
if(atttype == 2) {
xbdk = String.valueOf(ash.get(0).getTime());
}else if(atttype == 4){
xbdk = String.valueOf(ash.get(2).getTime());
}else {
xbdk = String.valueOf(ash.get(4).getTime());
}
Date sd1=df1.parse(ClockInTool.stampToDate(String.valueOf(xbdk)));//当天应打的首次上班卡时间
Date sd2=df1.parse(current_time);//当前时间
if(sd2.before(sd1)) {//小于
dak2 = false;
}
}
if(!dak2) { dddbdk = false; }
if(dddbdk) {
KqglAssoBcsz shif = KqglAssoBcsz.builder().build();
if(attdate.getAttsch().size() > 0 && clockt.getShifid() > 0){//有无班次
shif = shif.selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, clockt.getShifid()));
......@@ -1959,15 +2007,15 @@ public class ClockInController {
.ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday));
attdateyesterday = MethodCall(qyid,userid,yesterday);
List<AttSchedule> ash = attdateyesterday.getAttsch();
List<AttSchedule> ash1 = attdateyesterday.getAttsch();
if(attdateyesterday.getAttsch().size() == 2 || attdateyesterday.getAttsch().size() == 4 || attdateyesterday.getAttsch().size() == 6) {
yesendtime1 = ash.get(1).getTime();
yesendtime1 = ash1.get(1).getTime();
}
if(attdateyesterday.getAttsch().size() == 4 || attdateyesterday.getAttsch().size() == 6) {
yesendtime2 = ash.get(3).getTime();
yesendtime2 = ash1.get(3).getTime();
}
if(attdateyesterday.getAttsch().size() == 6) {
yesendtime3 = ash.get(5).getTime();
yesendtime3 = ash1.get(5).getTime();
}
}
......@@ -2237,6 +2285,11 @@ public class ClockInController {
status_ = 2;
}
}else {
msg = "当前时间必须大于上班打卡时间 才能打下班卡";
sbyf = 0;
status_ = 2;
}
}else {
msg = "当前是休息时间";
sbyf = 0;
status_ = 2;
......
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