|
@@ -220,6 +220,10 @@ public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, Proje
|
|
public ProjectInfoVo queryById(String id) {
|
|
public ProjectInfoVo queryById(String id) {
|
|
ProjectInfo projectInfo = getById(id);
|
|
ProjectInfo projectInfo = getById(id);
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
|
+ Map<String, String> ownerMap = commonApi.translateDictFromTableByKeys("sys_user", "realname", "id", projectInfo.getOwner(), "master")
|
|
|
|
+ .stream().collect(Collectors.toMap(DictModel::getValue, DictModel::getText));
|
|
|
|
+ Map<String, String> sysOrgCodeMap = commonApi.translateDictFromTableByKeys("sys_depart", "depart_name", "org_code", projectInfo.getSysOrgCode(), "master")
|
|
|
|
+ .stream().collect(Collectors.toMap(DictModel::getValue, DictModel::getText));
|
|
//按钮操作,0:编辑,1:查看
|
|
//按钮操作,0:编辑,1:查看
|
|
int btnOperation = ObjectUtil.equals(ProjectStatuseEnum.UNDER_PREPARATION.getType(), projectInfo.getStatus()) ? 0 : 1;
|
|
int btnOperation = ObjectUtil.equals(ProjectStatuseEnum.UNDER_PREPARATION.getType(), projectInfo.getStatus()) ? 0 : 1;
|
|
if (ObjectUtil.notEqual(projectInfo.getOwner(), user.getId())) {
|
|
if (ObjectUtil.notEqual(projectInfo.getOwner(), user.getId())) {
|
|
@@ -235,6 +239,8 @@ public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, Proje
|
|
}
|
|
}
|
|
ProjectInfoVo vo = new ProjectInfoVo();
|
|
ProjectInfoVo vo = new ProjectInfoVo();
|
|
BeanUtil.copyProperties(projectInfo, vo);
|
|
BeanUtil.copyProperties(projectInfo, vo);
|
|
|
|
+ vo.setOwner_dictText(ownerMap.getOrDefault(projectInfo.getOwner(), StrUtil.EMPTY));
|
|
|
|
+ vo.setSysOrgCode_dictText(sysOrgCodeMap.getOrDefault(projectInfo.getSysOrgCode(), StrUtil.EMPTY));
|
|
vo.setBtnOperation(btnOperation);
|
|
vo.setBtnOperation(btnOperation);
|
|
return vo;
|
|
return vo;
|
|
}
|
|
}
|