yxh
22 小时以前 8c215c8be0f5076e8c95daf1b2203440ca7dfcad
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceEthicalreviewopinionsController.java
@@ -32,7 +32,7 @@
    /**
     * 查询伦理审查专家意见列表
     */
    //@PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:list')")
    //// @PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:list')")
    @GetMapping("/list")
    public TableDataInfo list(ServiceEthicalreviewopinions serviceEthicalreviewopinions) {
        startPage();
@@ -51,7 +51,7 @@
    /**
     * 导出伦理审查专家意见列表
     */
    //@PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:export')")
    //// @PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:export')")
    @Log(title = "伦理审查专家意见", businessType = BusinessType.EXPORT)
    @GetMapping("/export")
    public AjaxResult export(ServiceEthicalreviewopinions serviceEthicalreviewopinions) {
@@ -63,7 +63,7 @@
    /**
     * 获取伦理审查专家意见详细信息
     */
    //@PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:query')")
    //// @PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return AjaxResult.success(serviceEthicalreviewopinionsService.getById(id));
@@ -72,22 +72,33 @@
    /**
     * 新增伦理审查专家意见
     */
    //@PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:add')")
    //// @PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:add')")
    @Log(title = "伦理审查专家意见", businessType = BusinessType.INSERT)
    @RepeatSubmit
    @PostMapping("/add")
//    @NotRepeatCommit(key = "param:arg[1]", value = 30000)
    public AjaxResult add(@RequestBody ServiceEthicalreviewopinions serviceEthicalreviewopinions) {
        boolean save = serviceEthicalreviewopinionsService.save(serviceEthicalreviewopinions);
        // 2026-10-22:同一案例只允许一条未删除记录——已存在则更新,避免反复保存产生重复行
        if (serviceEthicalreviewopinions.getInfoid() != null) {
            ServiceEthicalreviewopinions query = new ServiceEthicalreviewopinions();
            query.setInfoid(serviceEthicalreviewopinions.getInfoid());
            List<ServiceEthicalreviewopinions> exist = serviceEthicalreviewopinionsService.queryList(query);
            if (exist != null && !exist.isEmpty()) {
                serviceEthicalreviewopinions.setId(exist.get(0).getId());
                serviceEthicalreviewopinionsService.updateById(serviceEthicalreviewopinions);
                return AjaxResult.success(serviceEthicalreviewopinions);
            }
        }
        serviceEthicalreviewopinionsService.save(serviceEthicalreviewopinions);
        return AjaxResult.success(serviceEthicalreviewopinions);
    }
    /**
     * 修改伦理审查专家意见
     */
    //@PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:edit')")
    //// @PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:edit')")
    @Log(title = "伦理审查专家意见", businessType = BusinessType.UPDATE)
    @PostMapping("/edit")
//    @RepeatSubmit
    @RepeatSubmit
    public AjaxResult edit(@RequestBody ServiceEthicalreviewopinions serviceEthicalreviewopinions) {
        return toAjax(serviceEthicalreviewopinionsService.updateById(serviceEthicalreviewopinions));
    }
@@ -95,7 +106,7 @@
    /**
     * 删除伦理审查专家意见
     */
    //@PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:remove')")
    //// @PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:remove')")
    @Log(title = "伦理审查专家意见", businessType = BusinessType.DELETE)
    @GetMapping("/remove/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {