Commit ea0a26e7 authored by 廖旭伟's avatar 廖旭伟

考勤汇总修改离职判断逻辑,不再计算离职日期

parent abb3f7cf
...@@ -262,17 +262,18 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc ...@@ -262,17 +262,18 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
continue; continue;
} }
if(item.getStatus() == StaffSatusEnum.离职.getValue()){ if(item.getStatus() == StaffSatusEnum.离职.getValue()){
continue;
//离职状态时判断当前汇总日期是否在离职后 //离职状态时判断当前汇总日期是否在离职后
if(item.getLeaveDate()!=null){ // if(item.getLeaveDate()!=null){
String leaveDateStr = DateUtils.getStrDate(item.getLeaveDate()); // String leaveDateStr = DateUtils.getStrDate(item.getLeaveDate());
if(DateUtils.StrToDate(leaveDateStr).compareTo(DateUtils.StrToDate(query.getSummaryTime())) < 0){ // if(DateUtils.StrToDate(leaveDateStr).compareTo(DateUtils.StrToDate(query.getSummaryTime())) < 0){
//离职日期在统计日期之前不统计 // //离职日期在统计日期之前不统计
continue; // continue;
} // }
}else { // }else {
//没有离职日期也不统计 // //没有离职日期也不统计
continue; // continue;
} // }
} }
AttendanceStatEntity temp = this.selectOne(new AttendanceStatQuery().staffId(item.getStaffId()).year(item.getYear()).month(item.getMonth()).day(item.getDay())); AttendanceStatEntity temp = this.selectOne(new AttendanceStatQuery().staffId(item.getStaffId()).year(item.getYear()).month(item.getMonth()).day(item.getDay()));
...@@ -380,17 +381,18 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc ...@@ -380,17 +381,18 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
List<AttendanceStaffStatEntity> updateStaffStat = new ArrayList<>(); List<AttendanceStaffStatEntity> updateStaffStat = new ArrayList<>();
for (ErrorSummaryVo item : errorSummaryVoList) { for (ErrorSummaryVo item : errorSummaryVoList) {
if(item.getStatus() == StaffSatusEnum.离职.getValue()){ if(item.getStatus() == StaffSatusEnum.离职.getValue()){
continue;
//离职状态时判断当前汇总日期是否在离职后 //离职状态时判断当前汇总日期是否在离职后
if(item.getLeaveDate()!=null){ // if(item.getLeaveDate()!=null){
String leaveDateStr = DateUtils.getStrDate(item.getLeaveDate()); // String leaveDateStr = DateUtils.getStrDate(item.getLeaveDate());
if(DateUtils.StrToDate(leaveDateStr).compareTo(DateUtils.StrToDate(query.getSummaryTime())) < 0){ // if(DateUtils.StrToDate(leaveDateStr).compareTo(DateUtils.StrToDate(query.getSummaryTime())) < 0){
//离职日期在统计日期之前不统计 // //离职日期在统计日期之前不统计
continue; // continue;
} // }
}else { // }else {
//没有离职日期也不统计 // //没有离职日期也不统计
continue; // continue;
} // }
} }
AttendanceStatEntity temp = this.selectOne(new AttendanceStatQuery().staffId(item.getStaffId()).year(item.getYear()).month(item.getMonth()).day(item.getDay())); AttendanceStatEntity temp = this.selectOne(new AttendanceStatQuery().staffId(item.getStaffId()).year(item.getYear()).month(item.getMonth()).day(item.getDay()));
String staffName =""; String staffName ="";
...@@ -499,17 +501,18 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc ...@@ -499,17 +501,18 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
BigDecimal oneDay = new BigDecimal(1); BigDecimal oneDay = new BigDecimal(1);
for (LeaveSummaryVo item : leaveSummaryVoList) { for (LeaveSummaryVo item : leaveSummaryVoList) {
if(item.getStatus() == StaffSatusEnum.离职.getValue()){ if(item.getStatus() == StaffSatusEnum.离职.getValue()){
continue;
//离职状态时判断当前汇总日期是否在离职后 //离职状态时判断当前汇总日期是否在离职后
if(item.getLeaveDate()!=null){ // if(item.getLeaveDate()!=null){
String leaveDateStr = DateUtils.getStrDate(item.getLeaveDate()); // String leaveDateStr = DateUtils.getStrDate(item.getLeaveDate());
if(DateUtils.StrToDate(leaveDateStr).compareTo(DateUtils.StrToDate(query.getSummaryTime())) < 0){ // if(DateUtils.StrToDate(leaveDateStr).compareTo(DateUtils.StrToDate(query.getSummaryTime())) < 0){
//离职日期在统计日期之前不统计 // //离职日期在统计日期之前不统计
continue; // continue;
} // }
}else { // }else {
//没有离职日期也不统计 // //没有离职日期也不统计
continue; // continue;
} // }
} }
String attendanceSummary = ""; String attendanceSummary = "";
AttendanceStatEntity temp = this.selectOne(new AttendanceStatQuery().staffId(item.getStaffId()).year(item.getYear()).month(item.getMonth()).day(item.getDay())); AttendanceStatEntity temp = this.selectOne(new AttendanceStatQuery().staffId(item.getStaffId()).year(item.getYear()).month(item.getMonth()).day(item.getDay()));
......
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