|
@@ -131,63 +131,6 @@ public class IsvRegisterServiceImpl implements IsvRegisterService {
|
|
|
return dataList;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- @Override
|
|
|
- public List<QueryDoctorScheduleListResponseData> getDoctorScheduleList(QueryDoctorScheduleListRequest request) throws Exception {
|
|
|
- int hospitalId = Checker.getIntegerValue(request.getHospitalId());
|
|
|
- String deptCode = Checker.getStringValue(request.getDeptCode());
|
|
|
- String doctorCode = Checker.getStringValue(request.getDoctorCode());
|
|
|
- String serviceDate = Checker.getStringValue(request.getServiceDate());
|
|
|
- Integer period = Checker.getIntegerValue(request.getPeriod());
|
|
|
- if (StringHelper.isNullOrWhiteSpace(deptCode)) {
|
|
|
- throw new AppMessageException("科室不存在");
|
|
|
- }
|
|
|
- if (StringHelper.isNullOrWhiteSpace(doctorCode)) {
|
|
|
- throw new AppMessageException("医生不存在");
|
|
|
- }
|
|
|
-
|
|
|
- List<QueryDoctorScheduleListResponseData> dataList = new LinkedList<>();
|
|
|
-
|
|
|
- if (!StringHelper.isNullOrWhiteSpace(serviceDate)) {
|
|
|
- Date date = DateUtil.parseDate(serviceDate, "yyyy-MM-dd");
|
|
|
- if (date == null) {
|
|
|
- throw new AppMessageException("invalid serviceDate");
|
|
|
- }
|
|
|
- //查询医生某一天的排班分时信息
|
|
|
- if (period == null) {
|
|
|
- throw new AppMessageException("请选择时段");
|
|
|
- }
|
|
|
- if (DatePeriodEnum.valueOf(period) == null) {
|
|
|
- throw new AppMessageException("时段不存在");
|
|
|
- }
|
|
|
-
|
|
|
- String strDate = DateUtil.formatDate(date, "yyyy-MM-dd");
|
|
|
- QueryDoctorScheduleListResponseData map = getScheduleTimeInfoResponse(deptCode, doctorCode, strDate, period, hospitalId);
|
|
|
-
|
|
|
- if (map != null) {
|
|
|
- dataList.add(map);
|
|
|
- }
|
|
|
- } else {
|
|
|
- //取医生8天排班的分时信息
|
|
|
- int[] periods = {DatePeriodEnum.MORNING.getValue(), DatePeriodEnum.AFTERNOON.getValue()};
|
|
|
- Calendar calendar = Calendar.getInstance();
|
|
|
-
|
|
|
- for (int offset = 0; offset < 8; offset++) {
|
|
|
- calendar.add(Calendar.DATE, 1);
|
|
|
- String strDate = DateUtil.formatDate(calendar.getTime(), "yyyy-MM-dd");
|
|
|
-
|
|
|
- for (int p : periods) {
|
|
|
- QueryDoctorScheduleListResponseData map = getScheduleTimeInfoResponse(deptCode, doctorCode, strDate, p, hospitalId);
|
|
|
-
|
|
|
- if (map != null) {
|
|
|
- dataList.add(map);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return dataList;
|
|
|
- }
|
|
|
-
|
|
|
@Override
|
|
|
public PageVO<QueryDepDoctorListResponseData> queryDepDoctorList(QueryDepDoctorListRequest request) throws Exception {
|
|
|
int hospitalId = BizUtil.getCurrentHospitalId();
|