Commit 43ee7101 authored by 廖旭伟's avatar 廖旭伟

绩效汇总列表默认查询当年当月

parent 46e374b9
package com.mortals.xhx.module.staff.service.impl;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.util.DateUtils;
import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.service.StaffService;
import org.apache.commons.collections4.CollectionUtils;
......@@ -13,6 +14,7 @@ import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity;
import com.mortals.xhx.module.staff.service.StaffPerformSummaryService;
import lombok.extern.slf4j.Slf4j;
import java.util.Calendar;
import java.util.List;
/**
......@@ -29,6 +31,20 @@ public class StaffPerformSummaryServiceImpl extends AbstractCRUDServiceImpl<Staf
@Autowired
private StaffService staffService;
@Override
protected StaffPerformSummaryEntity findBefore(StaffPerformSummaryEntity params, PageInfo pageInfo, Context context) throws AppException {
Calendar calendar = Calendar.getInstance();
int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH) + 1;
if(params.getYear()==null){
params.setYear(year);
}
if(params.getMonth()==null){
params.setMonth(month);
}
return params;
}
@Override
protected void findAfter(StaffPerformSummaryEntity params, PageInfo pageInfo, Context context, List<StaffPerformSummaryEntity> list) throws AppException {
if(CollectionUtils.isNotEmpty(list)){
......
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