增加根据username"登陆账号"返回"用户名(工号)方法,用在文档比对列表回显
This commit is contained in:
@@ -337,4 +337,9 @@ public interface ISysUserService extends IService<SysUser> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<String> LawsWorkingGroupUserSearch(String userName, String userWorkNo, String userRoleName, String userPostName);
|
List<String> LawsWorkingGroupUserSearch(String userName, String userWorkNo, String userRoleName, String userPostName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据username"登陆账号"返回"用户名(工号)"
|
||||||
|
*/
|
||||||
|
String getNameNoByUsername(String userName);
|
||||||
}
|
}
|
||||||
|
|||||||
+13
@@ -673,6 +673,19 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|||||||
return userRoles.stream().map(SysUser::getId).distinct().collect(Collectors.toList());
|
return userRoles.stream().map(SysUser::getId).distinct().collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNameNoByUsername(String userName) {
|
||||||
|
if (StringUtils.isBlank(userName)){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
LambdaQueryWrapper<SysUser> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(SysUser::getUsername, userName);
|
||||||
|
wrapper.eq(SysUser::getDelFlag, "0");
|
||||||
|
wrapper.last("limit 1");
|
||||||
|
SysUser sysUser = getOne(wrapper);
|
||||||
|
return sysUser == null ? userName : sysUser.getUsername() + "(" + sysUser.getWorkNo() + ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
|||||||
+6
-1
@@ -23,6 +23,7 @@ import com.jero.modules.laws.standard.entity.LawsOverseasStandard;
|
|||||||
import com.jero.modules.laws.standard.service.ILawsEnterpriseStandardService;
|
import com.jero.modules.laws.standard.service.ILawsEnterpriseStandardService;
|
||||||
import com.jero.modules.laws.standard.service.ILawsDomesticStandardService;
|
import com.jero.modules.laws.standard.service.ILawsDomesticStandardService;
|
||||||
import com.jero.modules.laws.standard.service.ILawsOverseasStandardService;
|
import com.jero.modules.laws.standard.service.ILawsOverseasStandardService;
|
||||||
|
import com.jero.modules.system.service.ISysUserService;
|
||||||
import com.jero.modules.system.util.MyStringUtils;
|
import com.jero.modules.system.util.MyStringUtils;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -63,6 +64,8 @@ public class SarFileCompareInfoController extends JeroController<SarFileCompareI
|
|||||||
private ILawsOverseasStandardService lawsOverseasStandardService; //海外标准
|
private ILawsOverseasStandardService lawsOverseasStandardService; //海外标准
|
||||||
@Autowired
|
@Autowired
|
||||||
private ILawsEnterpriseStandardService ILawsEnterpriseStandardService; //企业标准
|
private ILawsEnterpriseStandardService ILawsEnterpriseStandardService; //企业标准
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService sysUserService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
@@ -100,7 +103,7 @@ public class SarFileCompareInfoController extends JeroController<SarFileCompareI
|
|||||||
info.setReleaseStateTitle(ReleaseConditionEnum.getTextByValue(info.getReleaseState(), cut));
|
info.setReleaseStateTitle(ReleaseConditionEnum.getTextByValue(info.getReleaseState(), cut));
|
||||||
info.setFileTypeLeft(getFileTypeText(info.getFileTypeLeft(), cut));
|
info.setFileTypeLeft(getFileTypeText(info.getFileTypeLeft(), cut));
|
||||||
info.setFileTypeRight(getFileTypeText(info.getFileTypeRight(), cut));
|
info.setFileTypeRight(getFileTypeText(info.getFileTypeRight(), cut));
|
||||||
//根据左右标准编号赋值标准ID、标准来源4个字段值
|
//根据左右标准编号赋值标准ID、标准来源4个字段值,补充创建人
|
||||||
this.assignment(info);
|
this.assignment(info);
|
||||||
}
|
}
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
@@ -147,6 +150,8 @@ public class SarFileCompareInfoController extends JeroController<SarFileCompareI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
String nameNoByUsername = sysUserService.getNameNoByUsername(info.getCreateBy());
|
||||||
|
info.setCreateBy(nameNoByUsername);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getFileTypeText(String fileType, String cut) {
|
private String getFileTypeText(String fileType, String cut) {
|
||||||
|
|||||||
Reference in New Issue
Block a user