|
@@ -250,24 +250,25 @@ public class NucleicServiceImpl implements NucleicService {
|
|
|
// list.add(convertToScheduleMap(scheduleList, c, strDate, 0, hospitalId));
|
|
|
// return list;
|
|
|
// } else {
|
|
|
- return IntStream.range(startOffset, endOffset).mapToObj(offset -> {
|
|
|
- Calendar c = Calendar.getInstance();
|
|
|
- if (offset > 0) {
|
|
|
- c.add(Calendar.DATE, offset);
|
|
|
- }
|
|
|
- String strDate = DateUtil.formatDate(c.getTime(), "yyyy-MM-dd"); //日期
|
|
|
- return convertToScheduleMap(scheduleList.stream().filter(s -> strDate.equals(s.getServiceDate())).collect(Collectors.toList()),
|
|
|
- c, strDate, offset, hospitalId);
|
|
|
- }).collect(Collectors.toList());
|
|
|
+ return convertToScheduleMap(scheduleList, hospitalId);
|
|
|
+// return IntStream.range(startOffset, endOffset).mapToObj(offset -> {
|
|
|
+// Calendar c = Calendar.getInstance();
|
|
|
+// if (offset > 0) {
|
|
|
+// c.add(Calendar.DATE, offset);
|
|
|
+// }
|
|
|
+// String strDate = DateUtil.formatDate(c.getTime(), "yyyy-MM-dd"); //日期
|
|
|
+// return convertToScheduleMap(scheduleList.stream().filter(s -> strDate.equals(s.getServiceDate())).collect(Collectors.toList()),
|
|
|
+// c, strDate, offset, hospitalId);
|
|
|
+// }).collect(Collectors.toList());
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 排班记录转为Map
|
|
|
*/
|
|
|
- private NucleicItemResponseData convertToScheduleMap(List<Schedule> scheduleList, Calendar calendar, String strDate,
|
|
|
- int offset, int hospitalId) {
|
|
|
- NucleicItemResponseData data = new NucleicItemResponseData();
|
|
|
+ private List<NucleicItemResponseData> convertToScheduleMap(List<Schedule> scheduleList, int hospitalId) {
|
|
|
+ List<NucleicItemResponseData> list = new ArrayList<>();
|
|
|
+
|
|
|
List<Map<String, Object>> forenoonList = new LinkedList<>();
|
|
|
List<Map<String, Object>> afternoonList = new LinkedList<>();
|
|
|
List<Map<String, Object>> nightList = new LinkedList<>();
|
|
@@ -279,10 +280,10 @@ public class NucleicServiceImpl implements NucleicService {
|
|
|
int doctorId;
|
|
|
boolean hasScheduling = scheduleList.size() > 0; //当期日期是否有排班
|
|
|
|
|
|
- Map<String, Object> groupMap = new HashMap<>();
|
|
|
- groupMap.put("serviceDate", strDate);
|
|
|
- groupMap.put("offset", offset);
|
|
|
- groupMap.put("week", DateUtil.getDayOfWeekShort(calendar));
|
|
|
+// Map<String, Object> groupMap = new HashMap<>();
|
|
|
+// groupMap.put("serviceDate", strDate);
|
|
|
+// groupMap.put("offset", offset);
|
|
|
+// groupMap.put("week", DateUtil.getDayOfWeekShort(calendar));
|
|
|
|
|
|
for (Schedule s : scheduleList) {
|
|
|
// if (doctorList.stream().noneMatch(p -> s.getDoctorCode().equals(p.getDoctorCode()))) {
|
|
@@ -303,7 +304,7 @@ public class NucleicServiceImpl implements NucleicService {
|
|
|
// if (doctorId <= 0) {
|
|
|
// continue;
|
|
|
// }
|
|
|
-
|
|
|
+ NucleicItemResponseData data = new NucleicItemResponseData();
|
|
|
Map<String, Object> scheduleMap = new HashMap<>();
|
|
|
data.setNucleicItemId(s.getScheduleItemCode());
|
|
|
Integer fee = s.getFee();
|
|
@@ -391,9 +392,10 @@ public class NucleicServiceImpl implements NucleicService {
|
|
|
// groupMap.put("afterMidnightSchedules", afterMidnightList); //晚上排班记录
|
|
|
// groupMap.put("midnoonSchedules", midnoonList); //午间排班记录
|
|
|
// return groupMap;
|
|
|
- return data;
|
|
|
+// return data;
|
|
|
+ list.add(data);
|
|
|
}
|
|
|
- return data;
|
|
|
+ return list;
|
|
|
}
|
|
|
|
|
|
|