Commit 46e374b9 authored by 廖旭伟's avatar 廖旭伟

绩效汇总列表接口返回值增加员工联系方式

No related merge requests found
......@@ -15,5 +15,8 @@ import java.util.Date;
*/
@Data
public class StaffPerformSummaryVo extends BaseEntityLong {
/**
* 联系电话
*/
private String phoneNumber;
}
\ No newline at end of file
package com.mortals.xhx.module.staff.service.impl;
import com.mortals.framework.model.PageInfo;
import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.service.StaffService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
......@@ -7,6 +12,9 @@ import com.mortals.xhx.module.staff.dao.StaffPerformSummaryDao;
import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity;
import com.mortals.xhx.module.staff.service.StaffPerformSummaryService;
import lombok.extern.slf4j.Slf4j;
import java.util.List;
/**
* StaffPerformSummaryService
* 员工绩效统计 service实现
......@@ -18,4 +26,19 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j
public class StaffPerformSummaryServiceImpl extends AbstractCRUDServiceImpl<StaffPerformSummaryDao, StaffPerformSummaryEntity, Long> implements StaffPerformSummaryService {
@Autowired
private StaffService staffService;
@Override
protected void findAfter(StaffPerformSummaryEntity params, PageInfo pageInfo, Context context, List<StaffPerformSummaryEntity> list) throws AppException {
if(CollectionUtils.isNotEmpty(list)){
for(StaffPerformSummaryEntity item:list) {
StaffEntity staffEntity = staffService.get(item.getStaffId());
if(staffEntity!=null){
item.setWorkNum(staffEntity.getWorkNum());
item.setPhoneNumber(staffEntity.getPhoneNumber());
}
}
}
}
}
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