From 8c215c8be0f5076e8c95daf1b2203440ca7dfcad Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期五, 23 十月 2026 13:42:50 +0800
Subject: [PATCH] 修改了报销校验

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonateorganController.java |   28 +++++++++++++++++++---------
 1 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonateorganController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonateorganController.java
index 7bceb2a..9bc8a89 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonateorganController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonateorganController.java
@@ -50,7 +50,7 @@
      * 鏌ヨ鎹愮尞鍣ㄥ畼绠$悊鍒楄〃
      */
     @ApiOperation("鎹愮尞鍣ㄥ畼鍒楄〃")
-    //@PreAuthorize("@ss.hasPermi('project:donateorgan:list')")
+    //// @PreAuthorize("@ss.hasPermi('project:donateorgan:list')")
     @GetMapping("/list")
     public TableDataInfo list(ServiceDonateorgan serviceDonateorgan) {
         startPage();
@@ -82,7 +82,7 @@
      * 瀵煎嚭鎹愮尞鍣ㄥ畼绠$悊鍒楄〃
      */
     @ApiOperation("瀵煎嚭鎹愮尞鍣ㄥ畼鍒楄〃")
-    //@PreAuthorize("@ss.hasPermi('project:donateorgan:export')")
+    //// @PreAuthorize("@ss.hasPermi('project:donateorgan:export')")
     @Log(title = "鎹愮尞鍣ㄥ畼绠$悊", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public AjaxResult export(ServiceDonateorgan serviceDonateorgan) {
@@ -95,7 +95,7 @@
      * 鑾峰彇鎹愮尞鍣ㄥ畼绠$悊璇︾粏淇℃伅
      */
     @ApiOperation("閫氳繃id鑾峰緱鎹愮尞鍣ㄥ畼淇℃伅")
-    //@PreAuthorize("@ss.hasPermi('project:donateorgan:query')")
+    //// @PreAuthorize("@ss.hasPermi('project:donateorgan:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id) {
         return AjaxResult.success(serviceDonateorganService.getById(id));
@@ -105,7 +105,7 @@
      * 鏂板鎹愮尞鍣ㄥ畼绠$悊
      */
     @ApiOperation("鏂板鎹愮尞鍣ㄥ畼淇℃伅")
-    //@PreAuthorize("@ss.hasPermi('project:donateorgan:add')")
+    //// @PreAuthorize("@ss.hasPermi('project:donateorgan:add')")
     @Log(title = "鎹愮尞鍣ㄥ畼绠$悊", businessType = BusinessType.INSERT)
     @PostMapping("/add")
     @RepeatSubmit
@@ -131,7 +131,7 @@
      * 鏂板鎹愮尞鍣ㄥ畼绠$悊
      */
     @ApiOperation("鏂板鎹愮尞鍣ㄥ畼淇℃伅")
-    //@PreAuthorize("@ss.hasPermi('project:donateorgan:add')")
+    //// @PreAuthorize("@ss.hasPermi('project:donateorgan:add')")
     @Log(title = "鎹愮尞鍣ㄥ畼绠$悊", businessType = BusinessType.INSERT)
     @PostMapping("/addData")
     @RepeatSubmit
@@ -145,7 +145,7 @@
      * 淇敼鍣ㄥ畼鍒嗛厤
      */
     @ApiOperation("淇敼鍣ㄥ畼鍒嗛厤淇℃伅")
-    //@PreAuthorize("@ss.hasPermi('project:organallocation:edit')")
+    //// @PreAuthorize("@ss.hasPermi('project:organallocation:edit')")
     @Log(title = "鍣ㄥ畼鍒嗛厤", businessType = BusinessType.UPDATE)
     @PostMapping("/editarraydata")
     @RepeatSubmit
@@ -157,7 +157,7 @@
      * 淇敼鎹愮尞鍣ㄥ畼绠$悊
      */
     @ApiOperation("淇敼鎹愮尞鍣ㄥ畼淇℃伅")
-    //@PreAuthorize("@ss.hasPermi('project:donateorgan:edit')")
+    //// @PreAuthorize("@ss.hasPermi('project:donateorgan:edit')")
     @Log(title = "鎹愮尞鍣ㄥ畼绠$悊", businessType = BusinessType.UPDATE)
     @PostMapping("/edit")
     @RepeatSubmit
@@ -169,7 +169,7 @@
      * 鍒犻櫎鎹愮尞鍣ㄥ畼绠$悊
      */
     @ApiOperation("鍒犻櫎鎹愮尞鍣ㄥ畼淇℃伅")
-    //@PreAuthorize("@ss.hasPermi('project:donateorgan:remove')")
+    //// @PreAuthorize("@ss.hasPermi('project:donateorgan:remove')")
     @Log(title = "鎹愮尞鍣ㄥ畼绠$悊", businessType = BusinessType.DELETE)
     @GetMapping("/remove/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
@@ -297,13 +297,23 @@
         Boolean i = null;
         for (ServiceDonateorgan serviceDonateorgan : serviceDonateorganList) {
             log.info("鎹愮尞鍣ㄥ畼绉绘id鏄惁涓虹┖ : {},鍩虹琛ㄧ殑id涓� : {}", serviceDonateorgan.getId(), serviceDonateorgan.getInfoid());
+            // 2026-10-22锛氬悓涓�妗堜緥銆佸悓涓�鍣ㄥ畼鍙繚鐣欎竴鏉℃湭鍒犻櫎璁板綍鈥斺�斿凡瀛樺湪鍒欐洿鏂帮紝閬垮厤閲嶅鎻掑叆
+            ServiceDonateorgan query = new ServiceDonateorgan();
+            query.setInfoid(serviceDonateorgan.getInfoid());
+            query.setOrganno(serviceDonateorgan.getOrganno());
+            query.setDel_flag(0);
+            List<ServiceDonateorgan> exist = serviceDonateorganService.queryList(query);
+            if (!CollectionUtils.isEmpty(exist)) {
+                serviceDonateorgan.setId(exist.get(0).getId());
+            }
             if (serviceDonateorgan.getId() == null) {
                 i = serviceDonateorganService.save(serviceDonateorgan);
             } else {
                 i = serviceDonateorganService.updateById(serviceDonateorgan);
             }
         }
-        return toAjax(i);
+        // 鍥炰紶甯︿富閿殑鍒楄〃锛屼究浜庡墠绔洖濉� id
+        return AjaxResult.success(serviceDonateorganList);
     }
 
 }

--
Gitblit v1.9.3