|
@@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -367,6 +368,7 @@ public class JcJyController {
|
|
|
try {
|
|
|
if (patientId == null || StringUtils.isBlank(patientId)) {
|
|
|
resultMap.put("code", -1);
|
|
|
+ resultMap.put("data", new ArrayList<>());
|
|
|
resultMap.put("message", "查询检验项目列表失败,病人门诊ID为空");
|
|
|
return resultMap;
|
|
|
}
|
|
@@ -379,12 +381,14 @@ public class JcJyController {
|
|
|
String firstDate = jcJyItemChargeService.queryFirstDateByPatientId(patientId);
|
|
|
if (StringUtils.isBlank(firstDate)) {
|
|
|
resultMap.put("code", -1);
|
|
|
+ resultMap.put("data", new ArrayList<>());
|
|
|
resultMap.put("message", "查询检验项目列表失败,没有查询到对应的检验申请时间");
|
|
|
return resultMap;
|
|
|
}
|
|
|
String lastDate = jcJyItemChargeService.queryLastDateByPatientId(patientId);
|
|
|
if (StringUtils.isBlank(lastDate)) {
|
|
|
resultMap.put("code", -1);
|
|
|
+ resultMap.put("data", new ArrayList<>());
|
|
|
resultMap.put("message", "查询检验项目列表失败,没有查询到对应的检验申请时间");
|
|
|
return resultMap;
|
|
|
}
|
|
@@ -394,6 +398,7 @@ public class JcJyController {
|
|
|
String reqDate = jcJyItemChargeService.queryDateByPatientIdAndTimes(patientId, times);
|
|
|
if (StringUtils.isBlank(reqDate)) {
|
|
|
resultMap.put("code", -1);
|
|
|
+ resultMap.put("data", new ArrayList<>());
|
|
|
resultMap.put("message", "查询检验项目列表失败,没有查询到对应的检验申请时间");
|
|
|
return resultMap;
|
|
|
}
|
|
@@ -403,6 +408,7 @@ public class JcJyController {
|
|
|
List<InspectionsIndex> data = jcJyItemChargeService.getJyList(patientId, beginTime, endTime);
|
|
|
if (data == null) {
|
|
|
resultMap.put("code", -1);
|
|
|
+ resultMap.put("data", new ArrayList<>());
|
|
|
resultMap.put("message", "查询检验项目列表失败,暂时没有对应的报告");
|
|
|
return resultMap;
|
|
|
}
|
|
@@ -414,12 +420,14 @@ public class JcJyController {
|
|
|
e.printStackTrace();
|
|
|
log.error("查询检验项目列表失败,错误信息{}", e);
|
|
|
resultMap.put("code", -1);
|
|
|
+ resultMap.put("data", new ArrayList<>());
|
|
|
resultMap.put("message", e.getMessage());
|
|
|
return resultMap;
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
log.error("查询检验项目列表失败,错误信息{}", e);
|
|
|
resultMap.put("code", -1);
|
|
|
+ resultMap.put("data", new ArrayList<>());
|
|
|
resultMap.put("message", "查询检验项目列表失败");
|
|
|
return resultMap;
|
|
|
}
|