|  |  | 
 |  |  | import cn.lihu.jh.module.ecg.service.queue.QueueService; | 
 |  |  | import cn.lihu.jh.module.ecg.service.room.RoomService; | 
 |  |  | import cn.lihu.jh.module.system.api.dept.DeptApi; | 
 |  |  | import org.springframework.dao.DuplicateKeyException; | 
 |  |  | import org.springframework.web.bind.annotation.*; | 
 |  |  | import org.springframework.validation.annotation.Validated; | 
 |  |  | import org.springframework.security.access.prepost.PreAuthorize; | 
 |  |  | 
 |  |  |             return error( new ErrorCode(101, "不是今天的预约用户")); | 
 |  |  | */ | 
 |  |  |  | 
 |  |  |         try { | 
 |  |  |         QueueSaveReqVO queueSaveReqVO = new QueueSaveReqVO(); | 
 |  |  |         queueSaveReqVO.setPatId( appointment.getPatId()); | 
 |  |  |         queueSaveReqVO.setPatName( appointment.getPatName() ); | 
 |  |  | 
 |  |  |         queueSaveReqVO.setPassed((byte)0); | 
 |  |  |         queueSaveReqVO.setExpired((byte)0); | 
 |  |  |         queueService.queue(queueSaveReqVO); | 
 |  |  |         } catch (DuplicateKeyException duplicateKeyException) { | 
 |  |  |             return success("您已经在排队中了"); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         return success("hello"); | 
 |  |  |     } |