虚拟清单基础页用户名显示
法规清单列表对应标准显示
This commit is contained in:
-9
@@ -137,10 +137,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
IPage<DummyInventoryBaseEO> pageList = this.page(page, queryWrapper);
|
||||
if (pageList.getRecords().size() != 0) {
|
||||
List<DummyInventoryBaseEO> records = pageList.getRecords();
|
||||
List<String> createByList = records.stream().map(DummyInventoryBaseEO::getCreateBy).collect(Collectors.toList());
|
||||
LambdaQueryWrapper<SysUser> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(SysUser::getUsername, createByList);
|
||||
List<SysUser> userList = sysUserService.list(lambdaQueryWrapper);
|
||||
//订阅标识
|
||||
List<String> ids = records.stream().map(DummyInventoryBaseEO::getId).collect(Collectors.toList());
|
||||
LambdaQueryWrapper<DummyReadEO> wrapper = new LambdaQueryWrapper<>();
|
||||
@@ -148,11 +144,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
List<DummyReadEO> dummyReadEOS = iDummyReadEOService.list(wrapper);
|
||||
List<String> dummyReadIdList = dummyReadEOS.stream().map(DummyReadEO::getDummyInventoryBaseId).collect(Collectors.toList());
|
||||
for (DummyInventoryBaseEO record : pageList.getRecords()) {
|
||||
String createBy = record.getCreateBy();
|
||||
List<SysUser> sysUserList = userList.stream().filter(e -> createBy.equals(e.getUsername())).collect(Collectors.toList());
|
||||
if (sysUserList.size() == 1) {
|
||||
record.setCreateByCn(sysUserList.get(0).getRealname());
|
||||
}
|
||||
//订阅标识
|
||||
if(dummyReadIdList.contains(record.getId())){
|
||||
record.setReadFlag(ReadFlagEnum.READ.getValue());
|
||||
|
||||
+29
-1
@@ -36,8 +36,8 @@ import com.jero.modules.system.mapper.SysUserMapper;
|
||||
import com.jero.modules.system.service.ISysAnnouncementService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@@ -292,7 +292,35 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
if(CollectionUtils.isNotEmpty(list)){
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
List<String> deliverableList = new ArrayList<>();
|
||||
List<String> correspondingStandardList = new ArrayList<>();
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEO : list) {
|
||||
if(StringUtils.isNotBlank(projectLawsInventoryEO.getCorrespondingStandard())){
|
||||
correspondingStandardList.addAll(Arrays.asList(projectLawsInventoryEO.getCorrespondingStandard().split(",")));
|
||||
}
|
||||
}
|
||||
List<BussDocumentLibraryEO> bussDocumentLibraryEOS = new ArrayList<>();
|
||||
if(correspondingStandardList.size() != 0){
|
||||
LambdaQueryWrapper<BussDocumentLibraryEO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(BussDocumentLibraryEO::getId,correspondingStandardList);
|
||||
bussDocumentLibraryEOS = iBussDocumentLibraryEOService.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEO : list) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if(StringUtils.isNotBlank(projectLawsInventoryEO.getCorrespondingStandard()) && bussDocumentLibraryEOS.size() != 0){
|
||||
for (String correspondingStandard : projectLawsInventoryEO.getCorrespondingStandard().split(",")) {
|
||||
List<BussDocumentLibraryEO> collect = bussDocumentLibraryEOS.stream().filter(e -> e.getId().equals(correspondingStandard)).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
sb.append(collect.get(0).getSerialNumber()+",");
|
||||
}else{
|
||||
sb.append(correspondingStandard+",");
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(sb)){
|
||||
String substring = sb.substring(0, sb.length() - 1);
|
||||
projectLawsInventoryEO.setCorrespondingStandard(substring);
|
||||
}
|
||||
}
|
||||
//认证工程师id
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId())){
|
||||
userIdList.add(projectLawsInventoryEO.getHomologationEngineerId());
|
||||
|
||||
Reference in New Issue
Block a user