|  |  |  | 
|---|
|  |  |  | import javax.validation.Valid; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import cn.lihu.jh.module.ecg.dal.dataobject.room.RoomDO; | 
|---|
|  |  |  | import cn.lihu.jh.module.ecg.service.queue.QueueService; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  | import org.springframework.validation.annotation.Validated; | 
|---|
|  |  |  | import org.springframework.security.access.prepost.PreAuthorize; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private RoomService roomService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private QueueService queueService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private DeptApi deptApi; | 
|---|
|  |  |  | 
|---|
|  |  |  | return success( openingFlag ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @GetMapping("/start-biz") | 
|---|
|  |  |  | @Operation(summary = "手动开诊") | 
|---|
|  |  |  | @PreAuthorize("@ss.hasPermission('ecg:room:setting')") | 
|---|
|  |  |  | public CommonResult<Integer> startBiz() { | 
|---|
|  |  |  | queueService.startBiz(); | 
|---|
|  |  |  | return success(0); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @GetMapping("/close-biz") | 
|---|
|  |  |  | @Operation(summary = "手动闭诊") | 
|---|
|  |  |  | @PreAuthorize("@ss.hasPermission('ecg:room:setting')") | 
|---|
|  |  |  | public CommonResult<Integer> stopBiz() { | 
|---|
|  |  |  | queueService.closeBiz(); | 
|---|
|  |  |  | return success(0); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|