| | |
| | | |
| | | import cn.lihu.jh.module.ecg.Utils; |
| | | import cn.lihu.jh.module.ecg.controller.admin.room.vo.MonitorInfoVO; |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.appointment.AppointmentDO; |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.checktype.CheckTypeDO; |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.devrent.DevRentDO; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.appointment.AppointmentMapper; |
| | |
| | | @Override |
| | | public PageResult<QueueDO> getqueuePage(QueuePageReqVO pageReqVO) { |
| | | PageResult<QueueDO> queueDOPageResult = queueMapper.selectPage(pageReqVO); |
| | | queueDOPageResult.getList().forEach(queueDO -> { |
| | | queueDO.setTolerance(appointmentMapper.getByApplyNo(queueDO.getApplyNo()).getTolerance()); |
| | | }); |
| | | fillAppointmentInfo(queueDOPageResult.getList()); |
| | | return queueDOPageResult; |
| | | } |
| | | |
| | |
| | | |
| | | public List<QueueDO> getBedQueueByStatus(Long roomId, String bedNo, List<Integer> statusList) { |
| | | List<QueueDO> queueDOList = queueMapper.getBedQueueByStatus(roomId, bedNo, statusList); |
| | | if (!CollectionUtils.isEmpty(queueDOList)) { |
| | | queueDOList.forEach(queueDO -> { |
| | | queueDO.setTolerance(appointmentMapper.getByApplyNo(queueDO.getApplyNo()).getTolerance()); |
| | | }); |
| | | } |
| | | fillAppointmentInfo(queueDOList); |
| | | return queueDOList; |
| | | } |
| | | |
| | | /** |
| | | * 从预约单补齐 queue 表上没有的患者信息。 |
| | | * |
| | | * queue 表不存这些字段,但医生端列表接口需要展示,所以查询后按 applyNo 回查预约单填充: |
| | | * 多耐药、性别、出生日期、登记时间、开单医师、开单日期。 |
| | | */ |
| | | private void fillAppointmentInfo(List<QueueDO> queueDOList) { |
| | | if (CollectionUtils.isEmpty(queueDOList)) { |
| | | return; |
| | | } |
| | | queueDOList.forEach(queueDO -> { |
| | | if (null == queueDO.getApplyNo() || queueDO.getApplyNo().isEmpty()) { |
| | | return; |
| | | } |
| | | AppointmentDO appointment = appointmentMapper.getByApplyNo(queueDO.getApplyNo()); |
| | | if (null == appointment) { |
| | | return; |
| | | } |
| | | queueDO.setTolerance(appointment.getTolerance()); |
| | | queueDO.setPatGender(appointment.getPatGender()); |
| | | queueDO.setPatBirthday(appointment.getPatBirthday()); |
| | | queueDO.setRegisterDate(appointment.getRegisterDate()); |
| | | queueDO.setDoctor(appointment.getDoctor()); |
| | | queueDO.setDoctorTime(appointment.getDoctorTime()); |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | |
| | | public List<QueueDO> getRoomQueueByStatus(Long roomId, List<Integer> statusList) { |
| | | List<QueueDO> queueDOList = queueMapper.getRoomQueueByStatus(roomId, statusList); |
| | | if (!CollectionUtils.isEmpty(queueDOList)) { |
| | | queueDOList.forEach(queueDO -> { |
| | | queueDO.setTolerance(appointmentMapper.getByApplyNo(queueDO.getApplyNo()).getTolerance()); |
| | | }); |
| | | } |
| | | fillAppointmentInfo(queueDOList); |
| | | return queueDOList; |
| | | } |
| | | |