|
|
|
@ -5,6 +5,9 @@ import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import com.os.common.utils.DateUtils;
|
|
|
|
|
import com.os.common.utils.StringUtils;
|
|
|
|
|
import com.os.mes.base.domain.BaseTeamMembers;
|
|
|
|
|
import com.os.mes.base.mapper.BaseTeamMembersMapper;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import com.os.mes.base.mapper.BaseStaffInfoMapper;
|
|
|
|
@ -22,6 +25,9 @@ public class BaseStaffInfoServiceImpl implements IBaseStaffInfoService {
|
|
|
|
|
@Autowired
|
|
|
|
|
private BaseStaffInfoMapper baseStaffInfoMapper;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private BaseTeamMembersMapper baseTeamMembersMapper;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询员工信息
|
|
|
|
|
*
|
|
|
|
@ -41,7 +47,22 @@ public class BaseStaffInfoServiceImpl implements IBaseStaffInfoService {
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public List<BaseStaffInfo> selectBaseStaffInfoList(BaseStaffInfo baseStaffInfo) {
|
|
|
|
|
return baseStaffInfoMapper.selectBaseStaffInfoList(baseStaffInfo);
|
|
|
|
|
List<BaseStaffInfo> baseStaffInfos = baseStaffInfoMapper.selectBaseStaffInfoList(baseStaffInfo);
|
|
|
|
|
List<BaseTeamMembers> teamMembers = baseTeamMembersMapper.selectBaseTeamMembersList(new BaseTeamMembers());
|
|
|
|
|
for (BaseStaffInfo staffInfo : baseStaffInfos) {
|
|
|
|
|
if (StringUtils.isNotEmpty(staffInfo.getTeamCode())){
|
|
|
|
|
for (BaseTeamMembers teamMember : teamMembers) {
|
|
|
|
|
if (staffInfo.getTeamCode().contains(teamMember.getTeamCode())){
|
|
|
|
|
if (StringUtils.isEmpty(staffInfo.getTeamName())){
|
|
|
|
|
staffInfo.setTeamName(teamMember.getTeamName());
|
|
|
|
|
} else {
|
|
|
|
|
staffInfo.setTeamName(staffInfo.getTeamName() + "," + teamMember.getTeamName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return baseStaffInfos;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|