Commit 8cdaa173 authored by 廖旭伟's avatar 廖旭伟

绩效汇总时过滤已离职的员工

parent 69826f3f
......@@ -206,6 +206,18 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
List<StaffCheckSummaryVo> summaryVoList = dao.summaryCheck(query);
if (CollectionUtils.isNotEmpty(summaryVoList)) {
for (StaffCheckSummaryVo vo : summaryVoList) {
StaffEntity staffEntity = staffService.get(vo.getStaffId());
if(staffEntity.getStatus() == StaffSatusEnum.离职.getValue()) {
if(staffEntity.getLeaveDate()!=null){
String leaveDateStr = DateUtils.getStrDate(staffEntity.getLeaveDate());
String month = vo.getMonth()>9?String.valueOf(vo.getMonth()):"0"+vo.getMonth();
String summaryDate = vo.getYear()+"-"+month+"-01";
if(DateUtils.StrToDate(leaveDateStr).compareTo(DateUtils.StrToDate(summaryDate)) < 0){
//离职日期在统计日期之前不统计
continue;
}
}
}
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
staffPerformSummaryEntity.initAttrValue();
BeanUtils.copyProperties(vo, staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
......
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