|
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.diagbot.client.CdssCoreClient;
|
|
import com.diagbot.client.CdssCoreClient;
|
|
|
|
+import com.diagbot.dto.LisDetailDTO;
|
|
import com.diagbot.dto.RespDTO;
|
|
import com.diagbot.dto.RespDTO;
|
|
import com.diagbot.entity.LisConfig;
|
|
import com.diagbot.entity.LisConfig;
|
|
import com.diagbot.enums.ConceptTypeEnum;
|
|
import com.diagbot.enums.ConceptTypeEnum;
|
|
@@ -23,6 +24,7 @@ import com.diagbot.vo.IdListVO;
|
|
import com.diagbot.vo.IdVO;
|
|
import com.diagbot.vo.IdVO;
|
|
import com.diagbot.vo.LisConfigListVO;
|
|
import com.diagbot.vo.LisConfigListVO;
|
|
import com.diagbot.vo.LisConfigPageVO;
|
|
import com.diagbot.vo.LisConfigPageVO;
|
|
|
|
+import com.diagbot.vo.RetrievalVO;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
@@ -42,7 +44,7 @@ import java.util.stream.Collectors;
|
|
* @time: 2020/7/29 15:03
|
|
* @time: 2020/7/29 15:03
|
|
*/
|
|
*/
|
|
@Component
|
|
@Component
|
|
-public class LisConfigFacade{
|
|
|
|
|
|
+public class LisConfigFacade {
|
|
@Autowired
|
|
@Autowired
|
|
private LisConfigService lisConfigService;
|
|
private LisConfigService lisConfigService;
|
|
@Autowired
|
|
@Autowired
|
|
@@ -259,7 +261,7 @@ public class LisConfigFacade{
|
|
List<LisConfig> lisConfigList = ExcelUtils.importExcel(file, 0, 1, LisConfig.class);
|
|
List<LisConfig> lisConfigList = ExcelUtils.importExcel(file, 0, 1, LisConfig.class);
|
|
if (ListUtil.isNotEmpty(lisConfigList)) {
|
|
if (ListUtil.isNotEmpty(lisConfigList)) {
|
|
importExcelRecords(lisConfigList);
|
|
importExcelRecords(lisConfigList);
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "校验失败,导入数据不能为空");
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "校验失败,导入数据不能为空");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -457,7 +459,7 @@ public class LisConfigFacade{
|
|
* @param uniqueNames
|
|
* @param uniqueNames
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public Map<String,Map<String,Long>> getUniqueNameConfigMap(Long hospitalId, List<String> hisNames, List<String> uniqueNames) {
|
|
|
|
|
|
+ public Map<String, Map<String, Long>> getUniqueNameConfigMap(Long hospitalId, List<String> hisNames, List<String> uniqueNames) {
|
|
Map<String, Map<String, Long>> retMap = new HashMap<>();
|
|
Map<String, Map<String, Long>> retMap = new HashMap<>();
|
|
QueryWrapper<LisConfig> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<LisConfig> queryWrapper = new QueryWrapper<>();
|
|
queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
@@ -513,4 +515,35 @@ public class LisConfigFacade{
|
|
String fileName = "检验映射模板.xls";
|
|
String fileName = "检验映射模板.xls";
|
|
ExcelUtils.exportExcel(new ArrayList<>(), null, "sheet1", LisConfig.class, fileName, response, 12.8f);
|
|
ExcelUtils.exportExcel(new ArrayList<>(), null, "sheet1", LisConfig.class, fileName, response, 12.8f);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 化验大项
|
|
|
|
+ *
|
|
|
|
+ * @param retrievalVO
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public List<String> getLisPacks(RetrievalVO retrievalVO) {
|
|
|
|
+ List<LisConfig> records = lisConfigService.getLisPacksIndex(retrievalVO);
|
|
|
|
+ List<String> lisNames
|
|
|
|
+ = records.stream().map(r -> r.getHisName()).distinct().collect(Collectors.toList());
|
|
|
|
+ return lisNames;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 化验小项
|
|
|
|
+ *
|
|
|
|
+ * @param retrievalVO
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public List<LisDetailDTO> getLis(RetrievalVO retrievalVO) {
|
|
|
|
+ List<LisDetailDTO> lisDetailNames = new ArrayList<>();
|
|
|
|
+ List<LisConfig> records = lisConfigService.getLisIndex(retrievalVO);
|
|
|
|
+ for (LisConfig lisConfig : records) {
|
|
|
|
+ LisDetailDTO lisDetailDTO = new LisDetailDTO();
|
|
|
|
+ lisDetailDTO.setName(lisConfig.getHisName());
|
|
|
|
+ lisDetailDTO.setUniqueName(lisConfig.getHisDetailName());
|
|
|
|
+ lisDetailNames.add(lisDetailDTO);
|
|
|
|
+ }
|
|
|
|
+ return lisDetailNames;
|
|
|
|
+ }
|
|
}
|
|
}
|