|
@@ -1,18 +1,14 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
-import java.util.LinkedHashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
-import com.diagbot.util.EntityUtil;
|
|
|
-import org.springframework.stereotype.Component;
|
|
|
-
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.diagbot.dto.LisConfigDTO;
|
|
|
import com.diagbot.entity.LisConfig;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.service.impl.LisConfigServiceImpl;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
*
|
|
@@ -37,27 +33,4 @@ public class LisConfigFacade extends LisConfigServiceImpl {
|
|
|
List<LisConfigDTO> datas = BeanUtil.listCopyTo(data, LisConfigDTO.class);
|
|
|
return datas;
|
|
|
}
|
|
|
-
|
|
|
- /**
|
|
|
- * 根据医院编码获取化验项映射关系
|
|
|
- *
|
|
|
- * @param hospitalCode
|
|
|
- * @return
|
|
|
- */
|
|
|
- public Map<String, Map<String, String>> getLisConfigMapByHospitalCode(String hospitalCode) {
|
|
|
- Map<String, Map<String, String>> retMap = new LinkedHashMap<>();
|
|
|
- QueryWrapper<LisConfig> lisConfigQueryWrapper = new QueryWrapper<>();
|
|
|
- lisConfigQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .eq("hospital_code", hospitalCode);
|
|
|
- List<LisConfig> lisConfigList = this.list(lisConfigQueryWrapper);
|
|
|
- Map<String, List<LisConfig>> lisConfigMap = EntityUtil.makeEntityListMap(lisConfigList, "mealName");
|
|
|
- for (Map.Entry<String, List<LisConfig>> entry : lisConfigMap.entrySet()) {
|
|
|
- if (entry.getValue().size() > 0) {
|
|
|
- retMap.put(entry.getKey(), EntityUtil.makeMapWithKeyValue(entry.getValue(), "itemName", "uniqueName"));
|
|
|
- } else {
|
|
|
- retMap.put(entry.getKey(), null);
|
|
|
- }
|
|
|
- }
|
|
|
- return retMap;
|
|
|
- }
|
|
|
}
|