|
@@ -1,50 +1,48 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
-import org.springframework.stereotype.Component;
|
|
|
-
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.diagbot.dto.IndexConfigDTO;
|
|
|
import com.diagbot.entity.IndexConfig;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.service.impl.IndexConfigServiceImpl;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
- *
|
|
|
* @author wangfeng
|
|
|
* @Description: TODO
|
|
|
* @date 2019年3月11日 下午4:20:09
|
|
|
*/
|
|
|
@Component
|
|
|
-public class IndexConfigFacade extends IndexConfigServiceImpl{
|
|
|
-
|
|
|
- /**
|
|
|
- * 根据疾病Id获取指标配置
|
|
|
- * @param indexConfigDiseaseIdVO
|
|
|
- * @return
|
|
|
- */
|
|
|
- public List<IndexConfigDTO> getindexConfig(Long diseaseId) {
|
|
|
- QueryWrapper<IndexConfig> IndexConfigQuery = new QueryWrapper<>();
|
|
|
+public class IndexConfigFacade extends IndexConfigServiceImpl {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据疾病Id获取指标配置
|
|
|
+ *
|
|
|
+ * @param diseaseId 疾病标签id
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<IndexConfigDTO> getindexConfig(Long diseaseId) {
|
|
|
+ QueryWrapper<IndexConfig> IndexConfigQuery = new QueryWrapper<>();
|
|
|
Map<String, Object> mapAll = new HashMap<>();
|
|
|
- if(diseaseId!=null){
|
|
|
- mapAll.put("disease_id", diseaseId);
|
|
|
+ if (null != diseaseId) {
|
|
|
+ mapAll.put("disease_id", diseaseId);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
mapAll.put("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
IndexConfigQuery.allEq(mapAll);
|
|
|
- List<IndexConfigDTO> data = new ArrayList<IndexConfigDTO>();
|
|
|
+ List<IndexConfigDTO> data = new ArrayList<>();
|
|
|
List<IndexConfig> datas = list(IndexConfigQuery);
|
|
|
-
|
|
|
- //过滤
|
|
|
+
|
|
|
+ //过滤
|
|
|
data = BeanUtil.listCopyTo(datas, IndexConfigDTO.class);
|
|
|
- return data;
|
|
|
- }
|
|
|
+ return data;
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
|
|
|
}
|