|
@@ -59,7 +59,10 @@ public class LisMappingFacade extends LisMappingServiceImpl {
|
|
|
public IPage<LisMappingPageDTO> getLisMappingPage(LisMappingPageVO lisMappingPageVO) {
|
|
|
IPage<LisMappingPageDTO> dtoPage = this.lisMappingPage(lisMappingPageVO);
|
|
|
List<LisMappingPageDTO> records = dtoPage.getRecords();
|
|
|
- List<String> userIds = records.stream().map(record -> record.getModifier()).collect(Collectors.toList());
|
|
|
+ List<String> userIds = records
|
|
|
+ .stream()
|
|
|
+ .map(record -> record.getModifier())
|
|
|
+ .collect(Collectors.toList());
|
|
|
RespDTO<Map<String, String>> data = userServiceClient.getUserInfoByIds(userIds);
|
|
|
Map<String, String> userInfos = data.data;
|
|
|
for (LisMappingPageDTO record : records) {
|
|
@@ -101,10 +104,13 @@ public class LisMappingFacade extends LisMappingServiceImpl {
|
|
|
}
|
|
|
|
|
|
QueryWrapper<LisMapping> lisMappingQueryWrapper = new QueryWrapper<>();
|
|
|
- lisMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ lisMappingQueryWrapper
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("meal_id", lisMappingVO.getMealId());
|
|
|
if (lisMappingVO.getItemId() == null || lisMappingVO.getItemId().equals(0L)) {
|
|
|
- lisMappingQueryWrapper.and(i -> i.isNull("item_id").or(j -> j.eq("item_id", "0")));
|
|
|
+ lisMappingQueryWrapper
|
|
|
+ .and(i -> i.isNull("item_id")
|
|
|
+ .or(j -> j.eq("item_id", "0")));
|
|
|
} else {
|
|
|
lisMappingQueryWrapper.eq("item_id", lisMappingVO.getItemId());
|
|
|
}
|
|
@@ -141,7 +147,10 @@ public class LisMappingFacade extends LisMappingServiceImpl {
|
|
|
List<QuestionInfo> questionInfoList = respDTO.data;
|
|
|
if (ListUtil.isNotEmpty(questionInfoList)) {
|
|
|
IdListVO idListVO = new IdListVO();
|
|
|
- List<Long> idList = questionInfoList.stream().map(i -> i.getId()).collect(Collectors.toList());
|
|
|
+ List<Long> idList = questionInfoList
|
|
|
+ .stream()
|
|
|
+ .map(i -> i.getId())
|
|
|
+ .collect(Collectors.toList());
|
|
|
idListVO.setIdList(idList);
|
|
|
RespDTO<Boolean> cacheRespDTO = icssManServiceClient.clearCache(idListVO);
|
|
|
}
|
|
@@ -160,7 +169,9 @@ public class LisMappingFacade extends LisMappingServiceImpl {
|
|
|
lisMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("meal_id", lisMappingVO.getMealId());
|
|
|
if (lisMappingVO.getItemId() == null || lisMappingVO.getItemId().equals(0L)) {
|
|
|
- lisMappingQueryWrapper.and(i -> i.isNull("item_id").or(j -> j.eq("item_id", "0")));
|
|
|
+ lisMappingQueryWrapper
|
|
|
+ .and(i -> i.isNull("item_id")
|
|
|
+ .or(j -> j.eq("item_id", "0")));
|
|
|
} else {
|
|
|
lisMappingQueryWrapper.eq("item_id", lisMappingVO.getItemId());
|
|
|
}
|
|
@@ -206,7 +217,10 @@ public class LisMappingFacade extends LisMappingServiceImpl {
|
|
|
List<QuestionInfo> questionInfoList = respDTO.data;
|
|
|
if (ListUtil.isNotEmpty(questionInfoList)) {
|
|
|
IdListVO idListVO = new IdListVO();
|
|
|
- List<Long> idList = questionInfoList.stream().map(i -> i.getId()).collect(Collectors.toList());
|
|
|
+ List<Long> idList = questionInfoList
|
|
|
+ .stream()
|
|
|
+ .map(i -> i.getId())
|
|
|
+ .collect(Collectors.toList());
|
|
|
idListVO.setIdList(idList);
|
|
|
RespDTO<Boolean> cacheRespDTO = icssManServiceClient.clearCache(idListVO);
|
|
|
}
|
|
@@ -224,7 +238,8 @@ public class LisMappingFacade extends LisMappingServiceImpl {
|
|
|
public String getLisUniqueName(GetUniqueNameVO getUniqueNameVO) {
|
|
|
String uniqueName = "";
|
|
|
QueryWrapper<Concept> conceptQueryWrapper = new QueryWrapper<>();
|
|
|
- conceptQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ conceptQueryWrapper
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("lib_name", getUniqueNameVO.getMealName())
|
|
|
.eq("lib_type", LexiconTypeEnum.LIS_PACKAGE.getKey());
|
|
|
Concept mealConcept = conceptFacade.getOne(conceptQueryWrapper, false);
|
|
@@ -234,7 +249,8 @@ public class LisMappingFacade extends LisMappingServiceImpl {
|
|
|
Concept itemConcept = null;
|
|
|
if (StringUtil.isNotBlank(getUniqueNameVO.getItemName())) {
|
|
|
conceptQueryWrapper = new QueryWrapper<>();
|
|
|
- conceptQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ conceptQueryWrapper
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("lib_name", getUniqueNameVO.getItemName())
|
|
|
.eq("lib_type", LexiconTypeEnum.LIS_DETAILS.getKey());
|
|
|
itemConcept = conceptFacade.getOne(conceptQueryWrapper, false);
|
|
@@ -243,10 +259,13 @@ public class LisMappingFacade extends LisMappingServiceImpl {
|
|
|
}
|
|
|
}
|
|
|
QueryWrapper<LisMapping> lisMappingQueryWrapper = new QueryWrapper<>();
|
|
|
- lisMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ lisMappingQueryWrapper
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("meal_id", mealConcept.getId());
|
|
|
if (itemConcept == null) {
|
|
|
- lisMappingQueryWrapper.and(i -> i.isNull("item_id").or(j -> j.eq("item_id", 0L)));
|
|
|
+ lisMappingQueryWrapper
|
|
|
+ .and(i -> i.isNull("item_id")
|
|
|
+ .or(j -> j.eq("item_id", 0L)));
|
|
|
} else {
|
|
|
lisMappingQueryWrapper.eq("item_id", itemConcept.getId());
|
|
|
}
|
|
@@ -270,8 +289,12 @@ public class LisMappingFacade extends LisMappingServiceImpl {
|
|
|
Map<String, Object> paramMap = new HashMap<>();
|
|
|
paramMap.put("uniqueNames", uniqueNames);
|
|
|
List<LisMappingWrapper> lisMappingWrapperList = this.getLisMappingByName(paramMap);
|
|
|
- List<String> mealNames = lisMappingWrapperList.stream().map(i -> i.getMealName()).filter(j -> j != null)
|
|
|
- .distinct().collect(Collectors.toList());
|
|
|
+ List<String> mealNames = lisMappingWrapperList
|
|
|
+ .stream()
|
|
|
+ .map(i -> i.getMealName())
|
|
|
+ .filter(j -> j != null)
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.toList());
|
|
|
return mealNames;
|
|
|
}
|
|
|
|
|
@@ -285,8 +308,12 @@ public class LisMappingFacade extends LisMappingServiceImpl {
|
|
|
Map<String, Object> paramMap = new HashMap<>();
|
|
|
paramMap.put("itemNames", itemNames);
|
|
|
List<LisMappingWrapper> lisMappingWrapperList = this.getLisMappingByName(paramMap);
|
|
|
- List<String> mealNames = lisMappingWrapperList.stream().map(i -> i.getMealName())
|
|
|
- .filter(j -> j != null).distinct().collect(Collectors.toList());
|
|
|
+ List<String> mealNames = lisMappingWrapperList
|
|
|
+ .stream()
|
|
|
+ .map(i -> i.getMealName())
|
|
|
+ .filter(j -> j != null)
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.toList());
|
|
|
return mealNames;
|
|
|
}
|
|
|
}
|