| | |
| | | RECALLED((byte)15, "å·²å¬å"), |
| | | READY((byte)20, "åè¯ä¸"), |
| | | ONSTAGE((byte)30, "å°±è¯ä¸"), |
| | | FINISH((byte)40, "已就è¯"); |
| | | RECEIVED((byte)40, "å·²é¢ç¨"), |
| | | FINISH((byte)50, "已就è¯"); |
| | | |
| | | public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(QueueStatusEnum::getStatus).toArray(); |
| | | |
| | |
| | | import cn.lihu.jh.framework.common.util.exception.ExceptionUtils; |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.devmanage.DeviceDO; |
| | | import cn.lihu.jh.module.ecg.service.devmanage.DeviceService; |
| | | import cn.lihu.jh.module.ecg.service.queue.QueueService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | @Resource |
| | | private DeviceService deviceService; |
| | | |
| | | @Resource |
| | | private QueueService queueService; |
| | | |
| | | @PostMapping("/dev-ready") |
| | | @Operation(summary = "设å¤åå¤") |
| | | @Operation(summary = "设å¤é¢ç¨") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") |
| | | public CommonResult<Long> devReady(@Valid @RequestBody DevRentSaveReqVO createReqVO) { |
| | | try { |
| | | return devRentService.readyOperation(createReqVO); |
| | | CommonResult<Long> result = devRentService.readyOperation(createReqVO); |
| | | queueService.startHurryUpOneBed(createReqVO.getRoomId(), createReqVO.getBedNo()); |
| | | return result; |
| | | } catch ( RuntimeException runtimeException ) { |
| | | String err = ExceptionUtils.formatException( runtimeException ); |
| | | log.error("devInstall: " + err); |
| | | log.error("devReady: " + err); |
| | | return CommonResult.error(DEV_INSTALL_EXCEPTION); |
| | | } |
| | | } |
| | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.time.LocalDateTime; |
| | |
| | | |
| | | @Schema(description = "已仿¬¾") |
| | | private Integer paid; |
| | | |
| | | @Schema(description = "è¯å®¤ç¼å·") |
| | | Long roomId; |
| | | |
| | | @Schema(description = "è¯åºç¼å·") |
| | | String bedNo; |
| | | } |
ÎļþÃû´Ó jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/queueMapper2.java ÐÞ¸Ä |
| | |
| | | * @author èéæºç |
| | | */ |
| | | @Mapper |
| | | public interface queueMapper2 extends BaseMapperX<QueueDO> { |
| | | public interface QueueMapper extends BaseMapperX<QueueDO> { |
| | | |
| | | default PageResult<QueueDO> selectPage(QueuePageReqVO reqVO) { |
| | | return selectPage(reqVO, new LambdaQueryWrapperX<QueueDO>() |
| | |
| | | " (select min(seq_num) as min_seq_num from lihu.queue where room_id = #{roomId} and bed_no = #{bedNo} and status = #{curStatus}) a )") |
| | | Integer updateQueueStatus(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("curStatus")Byte curStatus, @Param("newStatus")Byte newStatus); |
| | | |
| | | @Update("update lihu.queue set status = #{newStatus} where pat_id = #{patId} and status = #{curStatus}") |
| | | Integer updatePatientQueueStatus(@Param("patId")String patId, @Param("curStatus")Byte curStatus, @Param("newStatus")Byte newStatus); |
| | | |
| | | @Update("update lihu.queue set status = #{newStatus}, room_id = #{roomId}, room_name = #{roomName}, \n" + |
| | | " bed_no = #{bedNo}, seq_num = #{seqNum} where id = \n" + |
| | | " (select a.id from \n" + |
| | |
| | | |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO; |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.room.RoomDO; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.queue.queueMapper2; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.queue.QueueMapper; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.room.RoomMapper; |
| | | import cn.lihu.jh.module.ecg.enums.QueueStatusEnum; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | public class CallingScreenServiceImpl implements CallingScreenService { |
| | | |
| | | @Resource |
| | | private queueMapper2 queueMapper; |
| | | private QueueMapper queueMapper; |
| | | |
| | | @Resource |
| | | private RoomMapper roomMapper; |
| | |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.jobrecord.JobRecordDO; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.devmanage.DeviceMapper; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.jobrecord.JobRecordMapper; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.queue.QueueMapper; |
| | | import cn.lihu.jh.module.ecg.enums.DevRentStateEnum; |
| | | import cn.lihu.jh.module.ecg.enums.DevStateEnum; |
| | | import cn.lihu.jh.module.ecg.enums.QueueStatusEnum; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | } |
| | | |
| | | // æ£è
æéç¶æ æ´æ°ä¸º å·²é¢ç¨ |
| | | queueMapper. |
| | | queueMapper.updatePatientQueueStatus( createReqVO.getPatId(), |
| | | QueueStatusEnum.ONSTAGE.getStatus(), QueueStatusEnum.RECEIVED.getStatus()); |
| | | |
| | | return CommonResult.success(rent_id); |
| | | } |
| | |
| | | jobRecordDO.setUpdateTime(LocalDateTime.now()); |
| | | jobRecordMapper.updateById(jobRecordDO); |
| | | } |
| | | |
| | | // æ£è
æéç¶æ æ´æ°ä¸º å·²å°±è¯ |
| | | queueMapper.updatePatientQueueStatus( createReqVO.getPatId(), |
| | | QueueStatusEnum.RECEIVED.getStatus(), QueueStatusEnum.FINISH.getStatus()); |
| | | |
| | | return CommonResult.success(rent_id); |
| | | } |
| | | |
| | |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO; |
| | | import cn.lihu.jh.framework.common.pojo.PageResult; |
| | | import cn.lihu.jh.framework.common.util.object.BeanUtils; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.queue.queueMapper2; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.queue.QueueMapper; |
| | | import static cn.lihu.jh.module.ecg.enums.ErrorCodeConstants.*; |
| | | import static cn.lihu.jh.framework.common.exception.util.ServiceExceptionUtil.exception; |
| | | import static cn.lihu.jh.framework.common.pojo.CommonResult.error; |
| | |
| | | private OAuth2TokenApi oAuth2TokenApi; |
| | | |
| | | @Resource |
| | | private queueMapper2 queueMapper; |
| | | private QueueMapper queueMapper; |
| | | |
| | | @Resource |
| | | private RoomMapper roomMapper; |
| | |
| | | devRent.setState( DevRentStateEnum.FREE.getState() ); |
| | | devRentMapper.insert(devRent); |
| | | |
| | | startHurryUpOneCheckType(Integer.valueOf(queue.getBookCheckType())); |
| | | startHurryUpOneCheckType( queue.getBookCheckType() ); |
| | | } |
| | | |
| | | public void finishNextPatient(Long roomId, String bedNo) { |
| | |
| | | import cn.lihu.jh.module.ecg.dal.mysql.call.CallMapper; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.checktype.CheckTypeMapper; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.devrent.DevRentMapper; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.queue.queueMapper2; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.queue.QueueMapper; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.room.RoomMapper; |
| | | import cn.lihu.jh.module.ecg.enums.BedStatusEnum; |
| | | import cn.lihu.jh.module.ecg.enums.QueueStatusEnum; |
| | |
| | | private OAuth2TokenApi oAuth2TokenApi; |
| | | |
| | | @Resource |
| | | private queueMapper2 queueMapper; |
| | | private QueueMapper queueMapper; |
| | | |
| | | @Resource |
| | | private RoomMapper roomMapper; |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.lihu.jh.module.ecg.dal.mysql.queue.queueMapper2"> |
| | | <mapper namespace="cn.lihu.jh.module.ecg.dal.mysql.queue.QueueMapper"> |
| | | |
| | | <!-- |
| | | ä¸è¬æ
åµä¸ï¼å°½å¯è½ä½¿ç¨ Mapper è¿è¡ CRUD å¢å æ¹æ¥å³å¯ã |