yxh
6 天以前 68ff33beff11310e830b0615b5a81f83fad0f683
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/checktype/CheckTypeController.java
@@ -1,16 +1,12 @@
package cn.lihu.jh.module.ecg.controller.admin.checktype;
import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.validation.constraints.*;
import jakarta.validation.*;
import jakarta.servlet.http.*;
import java.util.*;
import java.io.IOException;
@@ -29,6 +25,11 @@
import cn.lihu.jh.module.ecg.dal.dataobject.checktype.CheckTypeDO;
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;
@Tag(name = "管理后台 - 检查类型")
@RestController
@RequestMapping("/ecg/check-type")
@@ -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);
    }