优化
This commit is contained in:
@ -50,6 +50,12 @@ public class BusConstructionUserVo implements Serializable {
|
||||
@ExcelProperty(value = "人脸照")
|
||||
private String facePic;
|
||||
|
||||
/**
|
||||
* 人脸照 url
|
||||
*/
|
||||
@ExcelProperty(value = "人脸照 url")
|
||||
private String facePicUrl;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
@ -80,6 +86,12 @@ public class BusConstructionUserVo implements Serializable {
|
||||
@ExcelProperty(value = "班组id")
|
||||
private Long teamId;
|
||||
|
||||
/**
|
||||
* 班组
|
||||
*/
|
||||
@ExcelProperty(value = "班组")
|
||||
private BusProjectTeamVo teamVo;
|
||||
|
||||
/**
|
||||
* 状态(0在职 1离职)
|
||||
*/
|
||||
|
||||
@ -22,10 +22,8 @@ import org.dromara.project.domain.req.constructionuser.ConstructionUserUpdateReq
|
||||
import org.dromara.project.domain.vo.BusConstructionUserVo;
|
||||
import org.dromara.project.domain.vo.BusContractorVo;
|
||||
import org.dromara.project.mapper.BusConstructionUserMapper;
|
||||
import org.dromara.project.service.IBusConstructionUserService;
|
||||
import org.dromara.project.service.IBusContractorService;
|
||||
import org.dromara.project.service.IBusProjectService;
|
||||
import org.dromara.project.service.IBusProjectTeamMemberService;
|
||||
import org.dromara.project.service.*;
|
||||
import org.dromara.system.service.ISysOssService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -58,6 +56,12 @@ public class BusConstructionUserServiceImpl extends ServiceImpl<BusConstructionU
|
||||
@Resource
|
||||
private IBusProjectTeamMemberService projectTeamMemberService;
|
||||
|
||||
@Resource
|
||||
private IBusProjectTeamService projectTeamService;
|
||||
|
||||
@Resource
|
||||
private ISysOssService ossService;
|
||||
|
||||
/**
|
||||
* 查询施工人员
|
||||
*
|
||||
@ -218,6 +222,16 @@ public class BusConstructionUserServiceImpl extends ServiceImpl<BusConstructionU
|
||||
if (contractorId != null) {
|
||||
constructionUserVo.setContractorVo(contractorService.queryById(contractorId));
|
||||
}
|
||||
// 关联查询用户头像url
|
||||
String facePic = constructionUser.getFacePic();
|
||||
if (StringUtils.isNotBlank(facePic)) {
|
||||
constructionUserVo.setFacePicUrl(ossService.getById(Long.parseLong(facePic)).getUrl());
|
||||
}
|
||||
// 关联查询班组信息
|
||||
Long teamId = constructionUser.getTeamId();
|
||||
if (teamId != null) {
|
||||
constructionUserVo.setTeamVo(projectTeamService.queryById(teamId));
|
||||
}
|
||||
return constructionUserVo;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user