Commit 69826f3f authored by 廖旭伟's avatar 廖旭伟

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

parent 2aa496a9
......@@ -213,7 +213,7 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
@Override
public List<StaffCheckSummaryVo> summaryCheck(StaffCheckSummaryQuery query) throws AppException {
if (StringUtils.isEmpty(query.getCheckTimeStart()) || StringUtils.isEmpty(query.getCheckTimeStart())) {
if (StringUtils.isEmpty(query.getCheckTimeStart()) || StringUtils.isEmpty(query.getCheckTimeEnd())) {
/* SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.DAY_OF_MONTH, 1);
......@@ -234,6 +234,17 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
}
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;
}
}
}
if(staffEntity.getAttendCheck()==0 && staffEntity.getEffectCheck()==0 && staffEntity.getGoworkCheck()==0 && staffEntity.getComplainCheck()==0){
continue;
}
......
......@@ -201,6 +201,17 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
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;
}
}
}
if(staffEntity.getAttendCheck()==0 && staffEntity.getEffectCheck()==0 && staffEntity.getGoworkCheck()==0 && staffEntity.getComplainCheck()==0){
continue;
}
......
......@@ -226,6 +226,17 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
}
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;
}
}
}
if(staffEntity.getAttendCheck()==0 && staffEntity.getEffectCheck()==0 && staffEntity.getGoworkCheck()==0 && staffEntity.getComplainCheck()==0){
continue;
}
......
......@@ -223,6 +223,17 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
}
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;
}
}
}
if(staffEntity.getAttendCheck()==0 && staffEntity.getEffectCheck()==0 && staffEntity.getGoworkCheck()==0 && staffEntity.getComplainCheck()==0){
continue;
}
......
......@@ -228,6 +228,17 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
}
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;
}
}
}
if(staffEntity.getAttendCheck()==0 && staffEntity.getEffectCheck()==0 && staffEntity.getGoworkCheck()==0 && staffEntity.getComplainCheck()==0){
continue;
}
......
......@@ -2,10 +2,12 @@ package com.mortals.xhx.module.check.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.service.IUser;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.common.code.StaffSatusEnum;
import com.mortals.xhx.common.pdu.WeightPdu;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.CheckWindowPerformEntity;
......@@ -105,6 +107,17 @@ public class CheckWindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImp
}
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;
}
}
}
if(staffEntity.getAttendCheck()==0 && staffEntity.getEffectCheck()==0 && staffEntity.getGoworkCheck()==0 && staffEntity.getComplainCheck()==0){
continue;
}
......
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