From c20c99f256e2f47bd45f0b48fb6b1bcc83960f1e Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 21 三月 2024 14:22:13 +0800
Subject: [PATCH] 代码提交
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonateorganController.java | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 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 4b621a4..7bceb2a 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
@@ -55,17 +55,18 @@
public TableDataInfo list(ServiceDonateorgan serviceDonateorgan) {
startPage();
List<ServiceDonateorgan> list = serviceDonateorganService.queryList(serviceDonateorgan);
- if (!CollectionUtils.isEmpty(list)) {
- List<ServiceDonateorganVO> serviceDonateorganVOS = DtoConversionUtils.sourceToTarget(list, ServiceDonateorganVO.class);
-// for (ServiceDonateorganVO serviceDonateorganVO : serviceDonateorganVOS) {
-// ServiceOrganallocation serviceOrganallocation = new ServiceOrganallocation();
-// serviceOrganallocation.setOrganid(serviceDonateorganVO.getId());
-// List<ServiceOrganallocation> serviceOrganallocations = serviceOrganallocationService.selectServiceOrganallocationList(serviceOrganallocation);
-// serviceDonateorganVO.setServiceOrganallocations(serviceOrganallocations);
-// }
- return getDataTable(serviceDonateorganVOS);
- }
+ return getDataTable(list);
+ }
+
+ /**
+ * 鍣ㄥ畼鍒嗛厤绱
+ */
+ @ApiOperation("鍣ㄥ畼鍒嗛厤绱")
+ @GetMapping("/countList")
+ public TableDataInfo countList(ServiceDonateorgan serviceDonateorgan) {
+ startPage();
+ List<ServiceDonateorgan> list = serviceDonateorganService.countList(serviceDonateorgan);
return getDataTable(list);
}
@@ -106,7 +107,7 @@
@ApiOperation("鏂板鎹愮尞鍣ㄥ畼淇℃伅")
//@PreAuthorize("@ss.hasPermi('project:donateorgan:add')")
@Log(title = "鎹愮尞鍣ㄥ畼绠$悊", businessType = BusinessType.INSERT)
- @PostMapping
+ @PostMapping("/add")
@RepeatSubmit
public AjaxResult add(@RequestBody ServiceDonateorgan serviceDonateorgan) {
String organNumber = serviceDonateorgan.getDonorno() + "." + serviceDonateorgan.getOrganno();
@@ -121,7 +122,8 @@
}
}
serviceDonateorgan.setOrgannumber(organNumber);
- return toAjax(serviceDonateorganService.save(serviceDonateorgan));
+ boolean save = serviceDonateorganService.save(serviceDonateorgan);
+ return AjaxResult.success(serviceDonateorgan);
}
--
Gitblit v1.9.3