From bb38f6c6274d4e2cc656a005fd7ba526566adcfc Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期二, 11 十一月 2025 17:15:57 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mobile_community
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TOldsterWarningController.java | 66 ++++++++++++++++++++++++++++++++-
1 files changed, 64 insertions(+), 2 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TOldsterWarningController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TOldsterWarningController.java
index c9e9a27..f2977ea 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TOldsterWarningController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TOldsterWarningController.java
@@ -1,8 +1,25 @@
package com.ruoyi.web.controller.api;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.basic.PageInfo;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.system.model.TOldster;
+import com.ruoyi.system.model.TOldsterWarning;
+import com.ruoyi.system.model.TPartyBuilding;
+import com.ruoyi.system.query.OldsterListQuery;
+import com.ruoyi.system.query.TPartyBuildingQuery;
+import com.ruoyi.system.service.TOldsterService;
+import com.ruoyi.system.service.TOldsterWarningService;
+import com.ruoyi.system.service.TPartyBuildingService;
+import com.ruoyi.system.vo.TOldsterWarningVO;
+import com.ruoyi.system.vo.TPartyBuildingVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Objects;
/**
* <p>
@@ -12,9 +29,54 @@
* @author xiaochen
* @since 2025-11-06
*/
+@Api(tags = "老人预警管理")
@RestController
@RequestMapping("/t-oldster-warning")
public class TOldsterWarningController {
+ private final TOldsterWarningService oldsterWarningService;
+ private final TOldsterService oldsterService;
+ @Autowired
+ public TOldsterWarningController(TOldsterWarningService oldsterWarningService, TOldsterService oldsterService) {
+ this.oldsterWarningService = oldsterWarningService;
+ this.oldsterService = oldsterService;
+ }
+
+ /**
+ * 获取老人预警管理列表
+ */
+ @ApiOperation(value = "获取老人预警管理分页列表")
+ @PostMapping(value = "/pageList")
+ public R<PageInfo<TOldsterWarningVO>> pageList(@RequestBody OldsterListQuery query) {
+ return R.ok(oldsterWarningService.pageList(query));
+ }
+
+ /**
+ * 查看老人预警管理详情
+ */
+ @ApiOperation(value = "查看老人预警管理详情")
+ @GetMapping(value = "/getDetailById")
+ public R<TOldsterWarningVO> getDetailById(@RequestParam String id) {
+ TOldsterWarning oldsterWarning = oldsterWarningService.getById(id);
+ TOldsterWarningVO oldsterWarningVO = new TOldsterWarningVO();
+ BeanUtils.copyProperties(oldsterWarning, oldsterWarningVO);
+ // 查询老人信息
+ TOldster oldster = oldsterService.getById(oldsterWarning.getOldsterId());
+ if(Objects.nonNull(oldster)){
+ oldsterWarningVO.setOldsterName(oldster.getOldsterName());
+ oldsterWarningVO.setOldsterAge(oldster.getOldsterAge());
+ oldsterWarningVO.setOldsterSex(oldster.getOldsterSex());
+ oldsterWarningVO.setContactPhone(oldster.getContactPhone());
+ oldsterWarningVO.setGuardianName(oldster.getGuardianName());
+ oldsterWarningVO.setGuardianPhone(oldster.getGuardianPhone());
+ oldsterWarningVO.setAddress(oldster.getAddress());
+ oldsterWarningVO.setPassportPhoto(oldster.getPassportPhoto());
+ oldsterWarningVO.setIdCard(oldster.getIdCard());
+ oldsterWarningVO.setBirthDate(oldster.getBirthDate());
+ oldsterWarningVO.setOldsterType(oldster.getOldsterType());
+ }
+ return R.ok(oldsterWarningVO);
+ }
+
}
--
Gitblit v1.7.1