From 36c95e19d39eb855c7a3ae23b4468d5cd3cb88ed Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 30 十月 2025 18:24:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java | 76 +++++++++++++++++++++++---------------
1 files changed, 46 insertions(+), 30 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
index d0f6fa1..f04d30c 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
@@ -2,6 +2,7 @@
import com.github.pagehelper.ISelect;
import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
@@ -24,7 +25,9 @@
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
@@ -78,16 +81,16 @@
return success(patArchiveService.selectPatArchiveByPatid(patid));
}
-// /**
-// * 鏂板鎮h�呮。妗�
-// */
-// @ApiOperation("鏂板鎮h�呮。妗�")
-// //@PreAuthorize("@ss.hasPermi('smartor:patarchive:add')")
-// @Log(title = "鎮h�呮。妗�", businessType = BusinessType.INSERT)
-// @PostMapping("/add")
-// public AjaxResult add(@RequestBody PatArchive patArchive) {
-// return toAjax(patArchiveService.insertPatArchive(patArchive));
-// }
+ /**
+ * 鏂板鎮h�呮。妗�
+ */
+ @ApiOperation("鏂板鎮h�呮。妗�")
+ //@PreAuthorize("@ss.hasPermi('smartor:patarchive:add')")
+ @Log(title = "鎮h�呮。妗�", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ public AjaxResult add(@RequestBody PatArchive patArchive) {
+ return toAjax(patArchiveService.insertPatArchive(patArchive));
+ }
/**
* 鏂板鎮h�呮。妗�
@@ -189,8 +192,8 @@
long count = PageUtils.count(new ISelect() {
@Override
public void doSelect() {
- patArchive.setPageNum(null);
- patArchive.setPageSize(null);
+ patArchive.setPn(null);
+ patArchive.setPs(null);
patArchiveService.patInfoByContion(patArchive);
}
});
@@ -223,8 +226,10 @@
*/
@ApiOperation("鑾峰彇鎮h�呬俊鎭�")
@PostMapping("/getPatientInfo")
- public TableDataInfo getPatientInfo(@RequestBody PatArchiveReq patArchiveReq) {
- PageUtils.startPageByPost(patArchiveReq.getPageNum(), patArchiveReq.getPageSize());
+ public Map<String, Object> getPatientInfo(@RequestBody PatArchiveReq patArchiveReq) {
+ if (patArchiveReq.getPageSize() != null && patArchiveReq.getPageNum() != null)
+ patArchiveReq.setPageNum(PageUtils.getOffset(patArchiveReq.getPageNum(), patArchiveReq.getPageSize()));
+
LoginUser loginUser = getLoginUser();
SysUser user = loginUser.getUser();
patArchiveReq.setOrgid(user.getOrgid());
@@ -235,13 +240,17 @@
patArchiveReq.setLeaveldeptcodes(null);
}
List<PatArchiveOthreInfo> patientInfo = patArchiveService.getPatientInfo(patArchiveReq);
- long count = PageUtils.count(new ISelect() {
- @Override
- public void doSelect() {
- patArchiveService.getPatientInfo(patArchiveReq);
- }
- });
- return getDataTable2(count, patientInfo);
+
+ Map<String, Object> map = new HashMap<>();
+ map.put("code", HttpStatus.SUCCESS);
+ map.put("msg", "鏌ヨ鎴愬姛");
+ map.put("rows", patientInfo);
+
+ patArchiveReq.setPageNum(null);
+ patArchiveReq.setPageSize(null);
+ List<PatArchiveOthreInfo> count = patArchiveService.getPatientInfo(patArchiveReq);
+ map.put("total", count);
+ return map;
}
/**
@@ -249,8 +258,9 @@
*/
@ApiOperation("鑾峰彇鎮h�呬俊鎭�")
@PostMapping("/getPatientInfoQC")
- public TableDataInfo getPatientInfoQC(@RequestBody PatArchiveReq patArchiveReq) {
- PageUtils.startPageByPost(patArchiveReq.getPageNum(), patArchiveReq.getPageSize());
+ public Map<String, Object> getPatientInfoQC(@RequestBody PatArchiveReq patArchiveReq) {
+ patArchiveReq.setPageNum(PageUtils.getOffset(patArchiveReq.getPageNum(), patArchiveReq.getPageSize()));
+
LoginUser loginUser = getLoginUser();
SysUser user = loginUser.getUser();
patArchiveReq.setOrgid(user.getOrgid());
@@ -260,14 +270,20 @@
if (CollectionUtils.isEmpty(patArchiveReq.getLeaveldeptcodes()) || patArchiveReq.getLeaveldeptcodes().size() == 0) {
patArchiveReq.setLeaveldeptcodes(null);
}
+ System.out.println("--------11111111:" + patArchiveReq);
List<PatArchiveOthreInfo> patientInfo = patArchiveService.getPatientInfoQC(patArchiveReq);
- long count = PageUtils.count(new ISelect() {
- @Override
- public void doSelect() {
- patArchiveService.getPatientInfoQC(patArchiveReq);
- }
- });
- return getDataTable2(count, patientInfo);
+ System.out.println("--------222222:" + patientInfo.size());
+ patArchiveReq.setPageSize(null);
+ patArchiveReq.setPageNum(null);
+ List<PatArchiveOthreInfo> patientInfoQC = patArchiveService.getPatientInfoQC(patArchiveReq);
+
+// long count = PageUtils.count(new ISelect() {
+// @Override
+// public void doSelect() {
+// patArchiveService.getPatientInfoQC(patArchiveReq);
+// }
+// });
+ return getDataTable3(patientInfoQC.size(), patientInfo);
}
}
--
Gitblit v1.9.3