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

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

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