|
@@ -1,5 +1,26 @@
|
|
package com.ywt.alipaympapi.service.impl;
|
|
package com.ywt.alipaympapi.service.impl;
|
|
|
|
|
|
|
|
+import com.google.protobuf.StringValue;
|
|
|
|
+import com.ywt.alipaympapi.core.utils.*;
|
|
|
|
+import com.ywt.alipaympapi.models.Constants;
|
|
|
|
+import com.ywt.alipaympapi.models.enums.PaymentChannelEnum;
|
|
|
|
+import com.ywt.alipaympapi.service.services.DoctorSrv;
|
|
|
|
+import com.ywt.alipaympapi.service.services.SystemSrv;
|
|
|
|
+import com.ywt.core.exception.AppMessageException;
|
|
|
|
+import com.ywt.gapi.ResultCode;
|
|
|
|
+import com.ywt.gapi.system.Dept;
|
|
|
|
+import com.ywt.gapi.system.SystemServiceGrpc;
|
|
|
|
+import com.ywt.gapi.taihe.register.CreateRegisteredRequest;
|
|
|
|
+import com.ywt.gapi.taihe.register.CreateRegisteredResponse;
|
|
|
|
+import com.ywt.gapi.taihe.register.TaiheRegisterServiceGrpc;
|
|
|
|
+import com.ywt.gapi.third.taihe.GetScheduleListRequest;
|
|
|
|
+import com.ywt.gapi.third.taihe.GetScheduleListResponse;
|
|
|
|
+import com.ywt.gapi.third.taihe.Schedule;
|
|
|
|
+import com.ywt.gapi.third.taihe.TaiheServiceGrpc;
|
|
|
|
+import com.ywt.gapi.user.DeptScheduleDoctor;
|
|
|
|
+import com.ywt.gapi.user.DoctorServiceGrpc;
|
|
|
|
+import com.ywt.gapi.user.GetDoctorByHisCodeRequest;
|
|
|
|
+import com.ywt.gapi.user.GetDoctorByHisCodeResponse;
|
|
import com.ywt.request.nucleic.NucleicItemListRequest;
|
|
import com.ywt.request.nucleic.NucleicItemListRequest;
|
|
import com.ywt.request.nucleic.NucleicOrderConfirmRequest;
|
|
import com.ywt.request.nucleic.NucleicOrderConfirmRequest;
|
|
import com.ywt.request.nucleic.NucleicQuestionnaireRequest;
|
|
import com.ywt.request.nucleic.NucleicQuestionnaireRequest;
|
|
@@ -12,9 +33,13 @@ import com.ywt.response.nucleic.NucleicQuestionnaireResultResponseData;
|
|
import com.ywt.response.nucleic.NucleicTimeListResponseData;
|
|
import com.ywt.response.nucleic.NucleicTimeListResponseData;
|
|
import com.ywt.alipaympapi.service.NucleicService;
|
|
import com.ywt.alipaympapi.service.NucleicService;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
+import redis.clients.jedis.JedisCommands;
|
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
+import java.util.stream.IntStream;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author
|
|
* @author
|
|
@@ -23,9 +48,40 @@ import java.util.List;
|
|
@Service
|
|
@Service
|
|
public class NucleicServiceImpl implements NucleicService {
|
|
public class NucleicServiceImpl implements NucleicService {
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private SystemServiceGrpc.SystemServiceBlockingStub systemServiceBlockingStub;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private JedisCommands jedisCommands;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private SystemSrv systemSrv;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private DoctorSrv doctorSrv;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private TaiheServiceGrpc.TaiheServiceBlockingStub taiheServiceBlockingStub;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private DoctorServiceGrpc.DoctorServiceBlockingStub doctorServiceBlockingStub;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private TaiheRegisterServiceGrpc.TaiheRegisterServiceBlockingStub taiheRegisterServiceBlockingStub;
|
|
|
|
+
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
- public List<NucleicItemResponseData> itemList(NucleicItemListRequest request) {
|
|
|
|
- return null;
|
|
|
|
|
|
+ public List<NucleicItemResponseData> itemList(NucleicItemListRequest request) throws Exception {
|
|
|
|
+
|
|
|
|
+ int hospitalId = BizUtil.getCurrentHospitalId();
|
|
|
|
+ if (Checker.isNone(request.getDeptCode())) {
|
|
|
|
+ throw new AppMessageException("depetCode不能为空");
|
|
|
|
+ }
|
|
|
|
+ String doctorCode = "";
|
|
|
|
+ String serviceCode = "";
|
|
|
|
+ List<NucleicItemResponseData> list = new ArrayList<>();
|
|
|
|
+ list = getScheduleListCommon(hospitalId, request.getDeptCode(), doctorCode, serviceCode, -1, -1);
|
|
|
|
+ return list;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -44,7 +100,308 @@ public class NucleicServiceImpl implements NucleicService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public NucleicOrderConfirmResponseData orderConfirm(NucleicOrderConfirmRequest request) {
|
|
|
|
- return null;
|
|
|
|
|
|
+ public NucleicOrderConfirmResponseData orderConfirm(NucleicOrderConfirmRequest request) throws Exception {
|
|
|
|
+ int hospitalId = BizUtil.getCurrentHospitalId();
|
|
|
|
+ String deptCode = Checker.getStringValue(request.getDeptCode());
|
|
|
|
+ String deptName = Checker.getStringValue(request.getDeptName());
|
|
|
|
+ if (Checker.isNone(deptCode) || Checker.isNone(deptName)) {
|
|
|
|
+ throw new AppMessageException("科室不存在");
|
|
|
|
+ }
|
|
|
|
+ String doctorCode = Checker.getStringValue(request.getDoctorCode());
|
|
|
|
+ String doctorName = Checker.getStringValue(request.getDoctorName());
|
|
|
|
+ if (Checker.isNone(doctorCode) || Checker.isNone(doctorName)) {
|
|
|
|
+ throw new AppMessageException("医生不存在");
|
|
|
|
+ }
|
|
|
|
+ Date date = new Date();
|
|
|
|
+ int deptId = 667;
|
|
|
|
+ if (request.getDeptCode().equals("500")) {
|
|
|
|
+ deptId = 670;
|
|
|
|
+ }
|
|
|
|
+ String startTime = Checker.getStringValue(request.getStartTime());
|
|
|
|
+ String endTime = Checker.getStringValue(request.getEndTime());
|
|
|
|
+ int userId = ContextHelper.getCurrentUserIdWrapped();
|
|
|
|
+ int source = ContextHelper.getCurrentTerminalWrapped();
|
|
|
|
+ CreateRegisteredRequest req = CreateRegisteredRequest.newBuilder()
|
|
|
|
+ .setDeptCode(deptCode)
|
|
|
|
+ .setDeptName(deptName)
|
|
|
|
+ .setDoctorCode(doctorCode)
|
|
|
|
+ .setDoctorName(doctorName)
|
|
|
|
+ .setTotal(0)
|
|
|
|
+ .setRegisteredFee(0)
|
|
|
|
+ .setMedicalFee(0)
|
|
|
|
+ .setRegisteredDate(date.getTime())
|
|
|
|
+ .setStartTime(startTime)
|
|
|
|
+ .setEndTime(endTime)
|
|
|
|
+ .setUserId(userId)
|
|
|
|
+ .setMedicalCardId(request.getMedicalId())
|
|
|
|
+ .setScheduleItemCode(request.getNucleicItemId())
|
|
|
|
+ .setPaymentChannel(PaymentChannelEnum.ALI_PAY.getValue())
|
|
|
|
+ .setSource(source)
|
|
|
|
+ .setPeriod(request.getDatePeriod())
|
|
|
|
+ .setDoctorTitle("")
|
|
|
|
+ .setDeptId(Checker.getIntegerValue(deptId))
|
|
|
|
+ .setLockQueueNo("")
|
|
|
|
+ .setAvailableNumStr(request.getAvailableNumStr())
|
|
|
|
+ .setHospitalId(hospitalId)
|
|
|
|
+ .build();
|
|
|
|
+ CreateRegisteredResponse res = taiheRegisterServiceBlockingStub.createRegistered(req);
|
|
|
|
+
|
|
|
|
+ if (res.getCode() != ResultCode.SUCCEED_VALUE) {
|
|
|
|
+ //预约失败
|
|
|
|
+ throw new AppMessageException(res.getMsg());
|
|
|
|
+ }
|
|
|
|
+ //非互联网医院名医诊区挂号
|
|
|
|
+ NucleicOrderConfirmResponseData data = new NucleicOrderConfirmResponseData();
|
|
|
|
+ data.setAmount("0");
|
|
|
|
+ data.setOrderId(String.valueOf(res.getOrderId()));
|
|
|
|
+ data.setOrderNo(res.getOrderNo());
|
|
|
|
+ return data;
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ private List<NucleicItemResponseData> getScheduleListCommon(int hospitalId, String deptCode, String doctorCode,
|
|
|
|
+ String serviceCode, int startOffset, int endOffset) throws AppMessageException {
|
|
|
|
+ String redisKeyPattern = "SCHEDULE_LIST_%s_%s_%d_%s";
|
|
|
|
+ String key = String.format(redisKeyPattern, deptCode, doctorCode, hospitalId, serviceCode);
|
|
|
|
+ if (startOffset >= 0 && endOffset >= 0) {
|
|
|
|
+ redisKeyPattern = "SCHEDULE_LIST_%s_%s_%d_%s_%d_%d";
|
|
|
|
+ key = String.format(redisKeyPattern, deptCode, doctorCode, hospitalId, serviceCode, startOffset, endOffset);
|
|
|
|
+ }
|
|
|
|
+// String value = jedisCommands.get(key);
|
|
|
|
+// if (!StringHelper.isNullOrWhiteSpace(value)) {
|
|
|
|
+// Map<String, Object> cacheMap = JsonSerializer.from(value, Map.class);
|
|
|
|
+// if (cacheMap != null) {
|
|
|
|
+// return cacheMap;
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+ List<Dept> deptList = systemSrv.getDeptListByHospitalId(hospitalId);
|
|
|
|
+ if (deptList == null || deptList.size() == 0) {
|
|
|
|
+ throw new AppMessageException(String.format("无法获取科室数据(%d)", hospitalId));
|
|
|
|
+ }
|
|
|
|
+ List<Dept> tmpDeptList = deptList.stream().filter(p -> p.getDeptCode().equals(deptCode)).collect(Collectors.toList());
|
|
|
|
+ if (tmpDeptList.size() == 0) {
|
|
|
|
+ throw new AppMessageException("暂无出诊信息");
|
|
|
|
+ }
|
|
|
|
+ Dept secDept = tmpDeptList.get(0);
|
|
|
|
+ tmpDeptList = deptList.stream().filter(p -> p.getDeptId() == secDept.getParentId()).collect(Collectors.toList());
|
|
|
|
+ if (tmpDeptList.size() == 0) {
|
|
|
|
+ throw new AppMessageException("暂无出诊信息");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
+ map.put("hospitalId", hospitalId);
|
|
|
|
+ map.put("hospitalName", BizUtil.getHospitalNameByIdSimply(hospitalId));
|
|
|
|
+ map.put("deptCode", deptCode);
|
|
|
|
+ map.put("deptName", secDept.getDeptName());
|
|
|
|
+
|
|
|
|
+ List<DeptScheduleDoctor> doctorList = doctorSrv.getDeptScheduleDoctorListFromCache();
|
|
|
|
+// doctorList = doctorList.stream().filter(p -> p.getDeptCode().equals(deptCode)).collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ // 批量日期查询 HIS 接口
|
|
|
|
+ boolean isTaihe = hospitalId == Constants.TAIHE_HOSPITAL_ID;
|
|
|
|
+ if (startOffset < 0 || endOffset < 0) {
|
|
|
|
+ startOffset = isTaihe ? 1 : 0;
|
|
|
|
+ endOffset = isTaihe ? 9 : 7;
|
|
|
|
+ }
|
|
|
|
+ List<NucleicItemResponseData> lst = getConvertedScheduleList(hospitalId, startOffset, endOffset, deptCode,
|
|
|
|
+ doctorCode, serviceCode);
|
|
|
|
+
|
|
|
|
+// jedisCommands.set(key, JsonSerializer.toJson(map));
|
|
|
|
+// jedisCommands.expire(key, 3 * 60);
|
|
|
|
+ return lst;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ private List<NucleicItemResponseData> getConvertedScheduleList(int hospitalId, int startOffset, int endOffset, String deptCode,
|
|
|
|
+ String doctorCode, String serviceCode) {
|
|
|
|
+ Calendar calendar = Calendar.getInstance();
|
|
|
|
+ if (startOffset > 0) {
|
|
|
|
+ calendar.add(Calendar.DATE, startOffset);
|
|
|
|
+ }
|
|
|
|
+ String startDate = DateUtil.formatDate(calendar.getTime(), "yyyy-MM-dd"); //日期
|
|
|
|
+ calendar = Calendar.getInstance();
|
|
|
|
+ calendar.add(Calendar.DATE, endOffset);
|
|
|
|
+ String endDate = DateUtil.formatDate(calendar.getTime(), "yyyy-MM-dd"); //日期
|
|
|
|
+
|
|
|
|
+ GetScheduleListRequest getScheduleListRequest = GetScheduleListRequest.newBuilder()
|
|
|
|
+ .setDeptCode(deptCode)
|
|
|
|
+ .setDoctorCode(doctorCode)
|
|
|
|
+ .setServiceDate(startDate)
|
|
|
|
+ .setServiceEndDate(endDate)
|
|
|
|
+ .setHospitalId(hospitalId)
|
|
|
|
+ .setServiceCode(serviceCode)
|
|
|
|
+ .build();
|
|
|
|
+ GetScheduleListResponse getScheduleListResponse = taiheServiceBlockingStub.getScheduleList(getScheduleListRequest);
|
|
|
|
+ List<Schedule> scheduleList;
|
|
|
|
+ if (getScheduleListResponse.getCode() == ResultCode.SUCCEED_VALUE) {
|
|
|
|
+ scheduleList = getScheduleListResponse.getSchedulesList();
|
|
|
|
+ } else {
|
|
|
|
+ scheduleList = new LinkedList<>();
|
|
|
|
+ }
|
|
|
|
+// // 单日查询的情况
|
|
|
|
+// if (startOffset == endOffset) {
|
|
|
|
+// Calendar c = Calendar.getInstance();
|
|
|
|
+// if (startOffset > 0) {
|
|
|
|
+// c.add(Calendar.DATE, startOffset);
|
|
|
|
+// }
|
|
|
|
+// String strDate = DateUtil.formatDate(c.getTime(), "yyyy-MM-dd"); //日期
|
|
|
|
+// List<Map<String, Object>> list = new ArrayList<>();
|
|
|
|
+// 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());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 排班记录转为Map
|
|
|
|
+ */
|
|
|
|
+ private NucleicItemResponseData convertToScheduleMap(List<Schedule> scheduleList, Calendar calendar, String strDate,
|
|
|
|
+ int offset, int hospitalId) {
|
|
|
|
+ NucleicItemResponseData data = new NucleicItemResponseData();
|
|
|
|
+ List<Map<String, Object>> forenoonList = new LinkedList<>();
|
|
|
|
+ List<Map<String, Object>> afternoonList = new LinkedList<>();
|
|
|
|
+ List<Map<String, Object>> nightList = new LinkedList<>();
|
|
|
|
+ List<Map<String, Object>> afterMidnightList = new LinkedList<>(); // 下半夜排班
|
|
|
|
+ List<Map<String, Object>> midnoonList = new ArrayList<>(); //午间排班记录
|
|
|
|
+ GetDoctorByHisCodeResponse getDoctorByHisCodeResponse;
|
|
|
|
+ String avatar;
|
|
|
|
+
|
|
|
|
+ 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));
|
|
|
|
+
|
|
|
|
+ for (Schedule s : scheduleList) {
|
|
|
|
+// if (doctorList.stream().noneMatch(p -> s.getDoctorCode().equals(p.getDoctorCode()))) {
|
|
|
|
+// continue;
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+ doctorId = 0;
|
|
|
|
+ avatar = Constants.DOCTOR_AVATAR_URL;
|
|
|
|
+// getDoctorByHisCodeResponse = getDoctorByHisCode(s.getDoctorCode(), hospitalId);
|
|
|
|
+//
|
|
|
|
+// if (getDoctorByHisCodeResponse.getResult().getCode() == ResultCode.SUCCEED) {
|
|
|
|
+// if (!StringHelper.isNullOrWhiteSpace(getDoctorByHisCodeResponse.getAvatar())) {
|
|
|
|
+// avatar = getDoctorByHisCodeResponse.getAvatar();
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// doctorId = getDoctorByHisCodeResponse.getDoctorId();
|
|
|
|
+// }
|
|
|
|
+// if (doctorId <= 0) {
|
|
|
|
+// continue;
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+ Map<String, Object> scheduleMap = new HashMap<>();
|
|
|
|
+ data.setNucleicItemId(s.getScheduleItemCode());
|
|
|
|
+ Integer fee = s.getFee();
|
|
|
|
+ String feeStr = fee.toString();
|
|
|
|
+ data.setNucleicItemFee(feeStr);
|
|
|
|
+ data.setNucleicItemDesc(s.getServiceDate() + " " + s.getDatePeriodName());
|
|
|
|
+ data.setNucleicItemName(s.getDoctorName());
|
|
|
|
+ data.setStartTime(s.getStartTime());
|
|
|
|
+ data.setEndTime(s.getEndTime());
|
|
|
|
+ data.setDatePeriod(s.getDatePeriod());
|
|
|
|
+ data.setDeptCode(s.getDeptCode());
|
|
|
|
+ data.setAvailableNumStr(s.getAvailableNumStr());
|
|
|
|
+ data.setDeptName(s.getDeptName());
|
|
|
|
+ data.setDoctorCode(s.getDoctorCode());
|
|
|
|
+ data.setDoctorName(s.getDoctorName());
|
|
|
|
+ data.setNucleicItemId(s.getScheduleItemCode());
|
|
|
|
+
|
|
|
|
+// scheduleMap.put("scheduleItemCode", s.getScheduleItemCode()); //门诊排班项记录标识
|
|
|
|
+// scheduleMap.put("serviceDate", s.getServiceDate()); //门诊排班日期(yyyy-MM-dd)
|
|
|
|
+// scheduleMap.put("datePeriod", s.getDatePeriod()); //排班时段代码
|
|
|
|
+// scheduleMap.put("datePeriodName", s.getDatePeriodName()); //排班时段名称
|
|
|
|
+// scheduleMap.put("deptCode", s.getDeptCode()); //科室代码
|
|
|
|
+// scheduleMap.put("deptName", s.getDeptName()); //科室名称
|
|
|
|
+// scheduleMap.put("doctorCode", s.getDoctorCode()); //医生代码
|
|
|
|
+// scheduleMap.put("doctorName", s.getDoctorName()); //医生名称
|
|
|
|
+// scheduleMap.put("doctorId", doctorId); //医生Id
|
|
|
|
+// scheduleMap.put("avatar", avatar); //医生图片链接
|
|
|
|
+// scheduleMap.put("doctorTitle", s.getDoctorTitle()); //医生职称
|
|
|
|
+// scheduleMap.put("doctorSpec", s.getDoctorSpec()); //医生专长
|
|
|
|
+// scheduleMap.put("fee", s.getFee()); //预约挂号总费用
|
|
|
|
+// scheduleMap.put("regFee", s.getRegFee()); //挂号费
|
|
|
|
+// scheduleMap.put("checkupFee", s.getCheckupFee()); //诊查费
|
|
|
|
+// scheduleMap.put("serviceFee", s.getServiceFee()); //服务费
|
|
|
|
+// scheduleMap.put("otherFee", s.getOtherFee()); //其它费
|
|
|
|
+// scheduleMap.put("admitAddress", s.getAdmitAddress()); //就诊地址
|
|
|
|
+// scheduleMap.put("scheduleStatus", s.getScheduleStatus()); //出诊状态(1-可预约 0-已满 2-停诊 3-其它(不可预约))
|
|
|
|
+// scheduleMap.put("availableTotalNum", s.getAvailableTotalNum()); //该时段可预约的总号源数
|
|
|
|
+// scheduleMap.put("availableLeftNum", s.getAvailableLeftNum()); //该时段剩余号源数
|
|
|
|
+// scheduleMap.put("serviceName", s.getServiceName()); //亚专科名称
|
|
|
|
+// scheduleMap.put("serviceCode", s.getServiceCode()); //亚专科代码
|
|
|
|
+//
|
|
|
|
+// String statusName = "";
|
|
|
|
+//
|
|
|
|
+// switch (s.getScheduleStatus()) {
|
|
|
|
+// case 1:
|
|
|
|
+// statusName = "可预约";
|
|
|
|
+// break;
|
|
|
|
+// case 0:
|
|
|
|
+// statusName = "已满";
|
|
|
|
+// break;
|
|
|
|
+// case 2:
|
|
|
|
+// statusName = "停诊";
|
|
|
|
+// break;
|
|
|
|
+// default:
|
|
|
|
+// statusName = "停诊";
|
|
|
|
+// break;
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// scheduleMap.put("scheduleStatusName", statusName);
|
|
|
|
+//
|
|
|
|
+// switch (s.getDatePeriod()) {
|
|
|
|
+// case 2:
|
|
|
|
+// forenoonList.add(scheduleMap);
|
|
|
|
+// break;
|
|
|
|
+// case 3:
|
|
|
|
+// afternoonList.add(scheduleMap);
|
|
|
|
+// break;
|
|
|
|
+// case 4:
|
|
|
|
+// nightList.add(scheduleMap);
|
|
|
|
+// break;
|
|
|
|
+// case 5:
|
|
|
|
+// afterMidnightList.add(scheduleMap);
|
|
|
|
+// break;
|
|
|
|
+// case 6: //午间排班记录返回数
|
|
|
|
+// midnoonList.add(scheduleMap);
|
|
|
|
+// break;
|
|
|
|
+//
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// groupMap.put("hasScheduling", hasScheduling ? 1 : 0); //当期日期是否有排班
|
|
|
|
+// groupMap.put("forenoonSchedules", forenoonList); //上午排班记录
|
|
|
|
+// groupMap.put("afternoonSchedules", afternoonList); //下午排班记录
|
|
|
|
+// groupMap.put("nightSchedules", nightList); //晚上排班记录
|
|
|
|
+// groupMap.put("afterMidnightSchedules", afterMidnightList); //晚上排班记录
|
|
|
|
+// groupMap.put("midnoonSchedules", midnoonList); //午间排班记录
|
|
|
|
+// return groupMap;
|
|
|
|
+ return data;
|
|
|
|
+ }
|
|
|
|
+ return data;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+// private GetDoctorByHisCodeResponse getDoctorByHisCode (String doctorCode,int hospitalId){
|
|
|
|
+// GetDoctorByHisCodeRequest getDoctorByHisCodeRequest = GetDoctorByHisCodeRequest.newBuilder()
|
|
|
|
+// .setHospitalId(hospitalId)
|
|
|
|
+// .setHisCode(doctorCode)
|
|
|
|
+// .build();
|
|
|
|
+// return doctorServiceBlockingStub.getDoctorByHisCode(getDoctorByHisCodeRequest);
|
|
|
|
+// }
|
|
|
|
+}
|