|
@@ -1,5 +1,6 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
+import com.diagbot.biz.push.entity.Lis;
|
|
|
import com.diagbot.biz.push.entity.Pacs;
|
|
|
import com.diagbot.client.StandConvertServiceClient;
|
|
|
import com.diagbot.dto.IndicationDTO;
|
|
@@ -153,6 +154,75 @@ public class TestFacade {
|
|
|
msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
+ System.out.println(e.getMessage());
|
|
|
+ errMsg.add(indicationPushVO.getIdNum() + "行出错了");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ map.put("总条数", indicationPushVOList.size() + "条");
|
|
|
+ map.put("出错条数", msg.size() + "条");
|
|
|
+ map.put("出错信息", msg);
|
|
|
+ map.put("程序报错", errMsg);
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 开单项数据测试
|
|
|
+ *
|
|
|
+ * @param file
|
|
|
+ */
|
|
|
+ public Map<String, Object> importCriticalExcel(MultipartFile file, TestLineVO testLineVO) {
|
|
|
+ List<IndicationPushVO> indicationPushVOList = new ArrayList<>();
|
|
|
+ List<TestIndicationVO> data = ExcelUtils.importExcel(file, 0, 1, TestIndicationVO.class);
|
|
|
+ for (TestIndicationVO bean : data) {
|
|
|
+ if (StringUtil.isNotEmpty(testLineVO.getIdNum()) && !testLineVO.getIdNum().equals(bean.getIdNum())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ IndicationPushVO indicationPushVO = new IndicationPushVO();
|
|
|
+ indicationPushVO.setRuleType("1");
|
|
|
+ if (StringUtil.isNotBlank(bean.getCriticalAge()) && "成人".equals(bean.getCriticalAge())) {
|
|
|
+ indicationPushVO.setAge(20);
|
|
|
+ } else if (StringUtil.isNotBlank(bean.getCriticalAge()) && "新生儿".equals(bean.getCriticalAge())) {
|
|
|
+ indicationPushVO.setAge(1);
|
|
|
+ } else {
|
|
|
+ indicationPushVO.setAge(20);
|
|
|
+ }
|
|
|
+ indicationPushVO.setSex(1);
|
|
|
+ indicationPushVO.setIdNum(bean.getIdNum());
|
|
|
+
|
|
|
+ List<Lis> lisDetail = new ArrayList<>();
|
|
|
+ if (bean.getCriticalMin() != null) {
|
|
|
+ Lis lisDetailBean = new Lis();
|
|
|
+ lisDetailBean.setName(bean.getCriticalMeal());
|
|
|
+ lisDetailBean.setDetailName(bean.getCriticalLis());
|
|
|
+ lisDetailBean.setUniqueName(bean.getCriticalLis());
|
|
|
+ lisDetailBean.setValue(bean.getCriticalMin());
|
|
|
+ lisDetail.add(lisDetailBean);
|
|
|
+ } else if (bean.getCriticalMax() != null) {
|
|
|
+ Lis lisDetailBean = new Lis();
|
|
|
+ lisDetailBean.setName(bean.getCriticalMeal());
|
|
|
+ lisDetailBean.setDetailName(bean.getCriticalLis());
|
|
|
+ lisDetailBean.setUniqueName(bean.getCriticalLis());
|
|
|
+ lisDetailBean.setValue(bean.getCriticalMax());
|
|
|
+ lisDetail.add(lisDetailBean);
|
|
|
+ }
|
|
|
+ indicationPushVO.setLis(lisDetail);
|
|
|
+
|
|
|
+ indicationPushVOList.add(indicationPushVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, Object> map = new LinkedHashMap<>();
|
|
|
+
|
|
|
+ List<String> msg = new ArrayList<>();
|
|
|
+ List<String> errMsg = new ArrayList<>();
|
|
|
+ for (IndicationPushVO indicationPushVO : indicationPushVOList) {
|
|
|
+ try {
|
|
|
+ IndicationDTO indicationDTO = indicationFacade.indicationFac(indicationPushVO);
|
|
|
+ if (ListUtil.isEmpty(indicationDTO.getCriticalValList())) {
|
|
|
+ msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ System.out.println(e.getMessage());
|
|
|
errMsg.add(indicationPushVO.getIdNum() + "行出错了");
|
|
|
}
|
|
|
}
|