| | |
| | | package cn.lihu.jh.module.ecg.controller.admin.queue; |
| | | |
| | | import cn.lihu.jh.framework.common.exception.ErrorCode; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | import cn.lihu.jh.framework.common.pojo.PageResult; |
| | | import cn.lihu.jh.framework.common.pojo.CommonResult; |
| | | import cn.lihu.jh.framework.common.util.object.BeanUtils; |
| | | |
| | | import static cn.lihu.jh.framework.common.pojo.CommonResult.error; |
| | | import static cn.lihu.jh.framework.common.pojo.CommonResult.success; |
| | | |
| | | import cn.lihu.jh.framework.excel.core.util.ExcelUtils; |
| | |
| | | @Operation(summary = "开诊设置") |
| | | @PreAuthorize("@ss.hasPermission('ecg:queue:setting')") |
| | | public CommonResult<Integer> openingSetting() { |
| | | // 从DB同步工位的患者队列数据到 工位优先队列, 可能有新开工位 |
| | | queueService.initQueue(); |
| | | return success(0); |
| | | } |
| | | |
| | | @GetMapping("/reorder") |
| | | @Operation(summary = "开诊前一刻,对就诊准备的人员重新排序") |
| | | @GetMapping("/startbiz") |
| | | @Operation(summary = "手动开诊") |
| | | @PreAuthorize("@ss.hasPermission('ecg:queue:setting')") |
| | | public CommonResult<Integer> queueReorder() { |
| | | queueService.reorderQueue(); |
| | | public CommonResult<Integer> startBiz() { |
| | | queueService.startBiz(); |
| | | return success(0); |
| | | } |
| | | |
| | | } |
| | | @GetMapping("/patient-jump") |
| | | @Operation(summary = "插队") |
| | | @Parameter(name = "patId", description = "患者编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:queue:jump')") |
| | | public CommonResult<String> queueJump( |
| | | @RequestParam("patId") String patId, |
| | | @RequestParam("jumpFlag") Byte jumpFlag) |
| | | { |
| | | Integer result = queueService.patientJump(patId, jumpFlag); |
| | | if (null == result || 0 == result) |
| | | return error( new ErrorCode(201, "找不到患者") ); |
| | | |
| | | return success("success"); |
| | | } |
| | | |
| | | } |