|
@@ -67,7 +67,6 @@ public class TestFacade {
|
|
|
|
|
|
/**
|
|
|
* 测试导出
|
|
|
- *
|
|
|
*/
|
|
|
public static void exportExcel(HttpServletResponse response) {
|
|
|
List<TestExport> testExportList = new ArrayList<>();
|
|
@@ -193,7 +192,7 @@ public class TestFacade {
|
|
|
symptom.append(bean.getNeoName()).append("”。");
|
|
|
indicationPushVO.setSymptom(symptom.toString());
|
|
|
break;
|
|
|
- case "7" : // 药品过敏原
|
|
|
+ case "7": // 药品过敏原
|
|
|
StringBuffer pastStr = new StringBuffer("");
|
|
|
String name = bean.getNeoName();
|
|
|
List<String> drugAll = new ArrayList<>();
|
|
@@ -203,7 +202,7 @@ public class TestFacade {
|
|
|
drugAll.addAll(drugList);
|
|
|
} else if ("药品类别".equals(bean.getDrugType())) {
|
|
|
for (String s : drugList) {
|
|
|
- List<String> drugRedis = (List<String>)redisUtil.get(RedisEnum.drugType.getName() + s);
|
|
|
+ List<String> drugRedis = (List<String>) redisUtil.get(RedisEnum.drugType.getName() + s);
|
|
|
if (ListUtil.isNotEmpty(drugRedis)) {
|
|
|
drugAll.addAll(drugRedis);
|
|
|
}
|
|
@@ -237,7 +236,7 @@ public class TestFacade {
|
|
|
indicationPushVO.setDiag(groupList);
|
|
|
break;
|
|
|
case "月经期":
|
|
|
- indicationPushVO.setSymptom("月经第" +(int)(Math.random() * 30) + "天");
|
|
|
+ indicationPushVO.setSymptom("月经第" + (int) (Math.random() * 30) + "天");
|
|
|
break;
|
|
|
case "幼儿":
|
|
|
indicationPushVO.setAgeNum(1D);
|
|
@@ -444,6 +443,13 @@ public class TestFacade {
|
|
|
item.setName(bean.getOtherTipNodeName());
|
|
|
diag.add(item);
|
|
|
indicationPushVO.setDiag(diag);
|
|
|
+ } else if ("禁忌人群".equals(bean.getOtherTipNodeType())) {
|
|
|
+ List<Item> groupList = new ArrayList<>();
|
|
|
+ Item group = new Item();
|
|
|
+ group.setName(bean.getOtherTipNodeName());
|
|
|
+ group.setUniqueName(bean.getOtherTipNodeName());
|
|
|
+ groupList.add(group);
|
|
|
+ indicationPushVO.setDiag(groupList);
|
|
|
}
|
|
|
List<Lis> lisList = new ArrayList<>();
|
|
|
Lis lis = new Lis();
|
|
@@ -875,7 +881,7 @@ public class TestFacade {
|
|
|
}
|
|
|
//化验
|
|
|
String lisAll = bean.getLisAll();
|
|
|
- if(StringUtil.isNotBlank(lisAll)) {
|
|
|
+ if (StringUtil.isNotBlank(lisAll)) {
|
|
|
String[] physiquelisAll = lisAll.split(",");
|
|
|
for (int i = 0; i < physiquelisAll.length; i++) {
|
|
|
|
|
@@ -1083,8 +1089,10 @@ public class TestFacade {
|
|
|
// 拼接返回数据
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
Future<Map> future = list.get(i);
|
|
|
- while(!future.isDone()); // 这一行代码很重要
|
|
|
- List<String> obj = (List<String>)future.get().get("出错信息");
|
|
|
+ while (!future.isDone()) {
|
|
|
+ ; // 这一行代码很重要
|
|
|
+ }
|
|
|
+ List<String> obj = (List<String>) future.get().get("出错信息");
|
|
|
if (ListUtil.isNotEmpty(obj)) {
|
|
|
errMsg.addAll(obj);
|
|
|
}
|
|
@@ -1158,20 +1166,16 @@ public class TestFacade {
|
|
|
File newfile = new File(filePath);
|
|
|
int bytesRead = 0;
|
|
|
byte[] buffer = new byte[8192];
|
|
|
- try
|
|
|
- {
|
|
|
+ try {
|
|
|
FileInputStream fis = new FileInputStream(newfile);
|
|
|
OutputStream os = item.getOutputStream();
|
|
|
while ((bytesRead = fis.read(buffer, 0, 8192))
|
|
|
- != -1)
|
|
|
- {
|
|
|
+ != -1) {
|
|
|
os.write(buffer, 0, bytesRead);
|
|
|
}
|
|
|
os.close();
|
|
|
fis.close();
|
|
|
- }
|
|
|
- catch (IOException e)
|
|
|
- {
|
|
|
+ } catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
return item;
|
|
@@ -1179,18 +1183,19 @@ public class TestFacade {
|
|
|
|
|
|
/**
|
|
|
* 随机获取0—size之间的一个数值
|
|
|
+ *
|
|
|
* @param size
|
|
|
* @return
|
|
|
*/
|
|
|
public int getRandomNum(int size) {
|
|
|
- return (int)(Math.random() * size);
|
|
|
+ return (int) (Math.random() * size);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 将列表按列表总长度划分
|
|
|
*
|
|
|
* @param originList 数据
|
|
|
- * @param num 份数
|
|
|
+ * @param num 份数
|
|
|
* @param <T>
|
|
|
* @return
|
|
|
*/
|
|
@@ -1215,11 +1220,10 @@ public class TestFacade {
|
|
|
List<TestIndicationVO> newdata = ExcelUtils.importExcelMultiSheets(file, 0, 1, testLineVO.getSheetIndex(), TestIndicationVO.class);
|
|
|
|
|
|
int size = data.size();
|
|
|
- for (TestIndicationVO testIndicationVO: newdata) {
|
|
|
+ for (TestIndicationVO testIndicationVO : newdata) {
|
|
|
if (testIndicationVO.getStandName().equals("标准名称")) {
|
|
|
size -= 1;
|
|
|
- }
|
|
|
- else {
|
|
|
+ } else {
|
|
|
int newid = Integer.parseInt(testIndicationVO.getIdNum()) + size;
|
|
|
testIndicationVO.setIdNum(String.valueOf(newid));
|
|
|
data.add(testIndicationVO);
|
|
@@ -1229,8 +1233,8 @@ public class TestFacade {
|
|
|
List<Map<String, Object>> res = getExcel(data, testLineVO);
|
|
|
|
|
|
String sheetname = "整合后";
|
|
|
- List<String> header = Arrays.asList("序号","标准名称","","开单项类型","","","","内容标准名称","禁忌类型","","状态");
|
|
|
- List<String> headerId = Arrays.asList("2","标准名称","","1实验室检查,\n2辅助检查名称,\n3手术和操作","套餐(大项)","明细(小项)","医学规则","内容标准名称","1性别,2实验室检查,3临床表现,4辅助检查名称描述,5疾病,6服用药品,7药物过敏原,8食物过敏原,9手术,10禁忌人群,11过敏原,12体征,13禁忌医疗器械及物品","系统拼接提示结果","");
|
|
|
+ List<String> header = Arrays.asList("序号", "标准名称", "", "开单项类型", "", "", "", "内容标准名称", "禁忌类型", "", "状态");
|
|
|
+ List<String> headerId = Arrays.asList("2", "标准名称", "", "1实验室检查,\n2辅助检查名称,\n3手术和操作", "套餐(大项)", "明细(小项)", "医学规则", "内容标准名称", "1性别,2实验室检查,3临床表现,4辅助检查名称描述,5疾病,6服用药品,7药物过敏原,8食物过敏原,9手术,10禁忌人群,11过敏原,12体征,13禁忌医疗器械及物品", "系统拼接提示结果", "");
|
|
|
List<String> colheader = Arrays.asList("idnum", "stdname", "", "orderType", "", "", "", "neoName", "neoType", "", "status");
|
|
|
ExcelUtils.exportExcel(sheetname, header, headerId, colheader, res);
|
|
|
Map<String, Object> summary = new HashMap<>();
|
|
@@ -1259,7 +1263,7 @@ public class TestFacade {
|
|
|
Map<String, Object> item = content.get(bean.getIdNum());
|
|
|
item.put("item", bean);
|
|
|
|
|
|
- if (null!=bean.getOrderType() && null!=bean.getNeoName()) {
|
|
|
+ if (null != bean.getOrderType() && null != bean.getNeoName()) {
|
|
|
if (bean.getOrderType().contains(xg) || bean.getNeoName().contains(xg)
|
|
|
|| (StringUtil.isNotBlank(bean.getStatus()) && bean.getStatus().contains(xg))) {
|
|
|
item.put("status", xg);
|
|
@@ -1274,13 +1278,13 @@ public class TestFacade {
|
|
|
Map<String, Object> item = content.get(id);
|
|
|
Map<String, Object> detail = new HashMap<>();
|
|
|
detail.put("idnum", id);
|
|
|
- detail.put("stdname", ((TestIndicationVO)item.get("item")).getStandName());
|
|
|
- detail.put("orderType", ((TestIndicationVO)item.get("item")).getOrderType());
|
|
|
- detail.put("neoName", ((TestIndicationVO)item.get("item")).getNeoName());
|
|
|
- detail.put("neoType", ((TestIndicationVO)item.get("item")).getNeoType());
|
|
|
+ detail.put("stdname", ((TestIndicationVO) item.get("item")).getStandName());
|
|
|
+ detail.put("orderType", ((TestIndicationVO) item.get("item")).getOrderType());
|
|
|
+ detail.put("neoName", ((TestIndicationVO) item.get("item")).getNeoName());
|
|
|
+ detail.put("neoType", ((TestIndicationVO) item.get("item")).getNeoType());
|
|
|
detail.put("status", "");
|
|
|
|
|
|
- if (null!=item.get("status")) {
|
|
|
+ if (null != item.get("status")) {
|
|
|
detail.put("status", item.get("status").toString());
|
|
|
}
|
|
|
res.add(detail);
|