yxh
6 天以前 68ff33beff11310e830b0615b5a81f83fad0f683
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/checktype/CheckTypeController.java
@@ -26,6 +26,7 @@
import cn.lihu.jh.module.ecg.service.checktype.CheckTypeService;
import javax.annotation.Resource;
import javax.annotation.security.PermitAll;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
@@ -38,11 +39,17 @@
    @Resource
    private CheckTypeService checkTypeService;
    /** 【本次加固】检查项目改动后刷新排队模块的检查项目缓存(亲和项、候诊上限等),改完不用重启服务 */
    @Resource
    private cn.lihu.jh.module.ecg.service.queue.QueueService queueService;
    @PostMapping("/create")
    @Operation(summary = "创建检查类型")
    @PreAuthorize("@ss.hasPermission('ecg:check-type:create')")
    public CommonResult<Integer> createCheckType(@Valid @RequestBody CheckTypeSaveReqVO createReqVO) {
        return success(checkTypeService.createCheckType(createReqVO));
        Integer id = checkTypeService.createCheckType(createReqVO);
        queueService.initCheckType();
        return success(id);
    }
    @PutMapping("/update")
@@ -50,6 +57,7 @@
    @PreAuthorize("@ss.hasPermission('ecg:check-type:update')")
    public CommonResult<Boolean> updateCheckType(@Valid @RequestBody CheckTypeSaveReqVO updateReqVO) {
        checkTypeService.updateCheckType(updateReqVO);
        queueService.initCheckType();
        return success(true);
    }
@@ -59,6 +67,7 @@
    @PreAuthorize("@ss.hasPermission('ecg:check-type:delete')")
    public CommonResult<Boolean> deleteCheckType(@RequestParam("id") Integer id) {
        checkTypeService.deleteCheckType(id);
        queueService.initCheckType();
        return success(true);
    }
@@ -92,4 +101,11 @@
                        BeanUtils.toBean(list, CheckTypeRespVO.class));
    }
}
    @GetMapping("/list-simple-check-type")
    @Operation(summary = "获得简单检查类型列表")
    @PermitAll
    public CommonResult<List<SimpleCheckTypeRespVO>> getSimpleCheckTypeList() {
        List<CheckTypeDO> list = checkTypeService.getSimpleCheckTypeList();
        return success(BeanUtils.toBean(list, SimpleCheckTypeRespVO.class));
    }
}