first commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package com.zzyl.nursing.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||
|
||||
/**
|
||||
* WebSocket配置
|
||||
*
|
||||
* @author Zhy
|
||||
* @version 1.0
|
||||
* @date 2025-03-12 12:00
|
||||
*/
|
||||
@Configuration
|
||||
public class WebSocketConfig {
|
||||
|
||||
/**
|
||||
* 注册基于 @ServerEndpoint 声明的 Websocket Endpoint
|
||||
*/
|
||||
@Bean
|
||||
public ServerEndpointExporter serverEndpointExporter() {
|
||||
return new ServerEndpointExporter();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
package com.zzyl.nursing.config;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.zzyl.common.exception.base.BaseException;
|
||||
import com.zzyl.nursing.vo.AlertNotifyVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.socket.config.annotation.EnableWebSocket;
|
||||
|
||||
import javax.websocket.*;
|
||||
import javax.websocket.server.PathParam;
|
||||
import javax.websocket.server.ServerEndpoint;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* WebSocket服务端
|
||||
*
|
||||
* @author Zhy
|
||||
* @version 1.0
|
||||
* @date 2025-03-12 12:00
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@EnableWebSocket
|
||||
@ServerEndpoint("/ws/{sid}")
|
||||
public class WebSocketServer {
|
||||
|
||||
private static Map<String, Session> sessionMap = new HashMap<>();
|
||||
|
||||
/**
|
||||
* 连接建立时触发
|
||||
*
|
||||
* @param session 会话
|
||||
* @param sid 用户id
|
||||
*/
|
||||
@OnOpen
|
||||
public void onOpen(Session session, @PathParam("sid") String sid) {
|
||||
log.info("有客户端连接到了服务器 , {}", sid);
|
||||
sessionMap.put(sid, session);
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务端接收到消息时触发
|
||||
*
|
||||
* @param session 会话
|
||||
* @param message 消息
|
||||
* @param sid 用户id
|
||||
*/
|
||||
@OnMessage
|
||||
public void onMessage(Session session, String message, @PathParam("sid") String sid) {
|
||||
log.info("接收到了客户端 {} 发来的消息 : {}", sid, message);
|
||||
}
|
||||
|
||||
/**
|
||||
* 连接关闭时触发
|
||||
*
|
||||
* @param session 会话
|
||||
* @param sid 用户id
|
||||
*/
|
||||
@OnClose
|
||||
public void onClose(Session session, @PathParam("sid") String sid) {
|
||||
System.out.println("连接断开:" + sid);
|
||||
sessionMap.remove(sid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通信发生错误时触发
|
||||
*
|
||||
* @param session 会话
|
||||
* @param sid 用户id
|
||||
* @param throwable 异常
|
||||
*/
|
||||
@OnError
|
||||
public void onError(Session session, @PathParam("sid") String sid, Throwable throwable) {
|
||||
System.out.println("出现错误:" + sid);
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
|
||||
/**
|
||||
* 广播消息
|
||||
*
|
||||
* @param message 消息
|
||||
*/
|
||||
public void sendMessageToAll(String message) throws IOException {
|
||||
Collection<Session> sessions = sessionMap.values();
|
||||
if (!CollectionUtils.isEmpty(sessions)) {
|
||||
for (Session session : sessions) {
|
||||
// 服务器向客户端发送消息
|
||||
session.getBasicRemote().sendText(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送websocket消息给指定消费者
|
||||
*
|
||||
* @param alertNotifyVo 报警消息
|
||||
* @param userIds 报警数据map
|
||||
*/
|
||||
public void sendMessageToConsumer(AlertNotifyVo alertNotifyVo, Collection<Long> userIds) {
|
||||
// 如果消费者为空,程序结束
|
||||
if (CollUtil.isEmpty(userIds)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 如果 Websocket 客户端为空,程序结束
|
||||
if (ObjectUtil.isEmpty(sessionMap)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 遍历消费者,发送消息
|
||||
// key为消息接收人id,value为报警数据id
|
||||
userIds.forEach(userId -> {
|
||||
// 获取该消费者的websocket连接,如果不存在,跳出本次循环
|
||||
Session session = sessionMap.get(String.valueOf(userId));
|
||||
if (ObjectUtil.isEmpty(session)) {
|
||||
return;
|
||||
}
|
||||
// 获取该消费者的websocket连接,并发送消息
|
||||
try {
|
||||
session.getBasicRemote().sendText(JSONUtil.toJsonStr(alertNotifyVo));
|
||||
} catch (IOException e) {
|
||||
throw new BaseException("websocket推送消息失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import com.zzyl.nursing.dto.AlertDataPageQueryDto;
|
||||
import com.zzyl.nursing.dto.HandleAlertDataDto;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.nursing.domain.AlertData;
|
||||
import com.zzyl.nursing.service.IAlertDataService;
|
||||
import com.zzyl.common.utils.poi.ExcelUtil;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 报警数据Controller
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
@Api(tags = "报警数据管理")
|
||||
@RestController
|
||||
@RequestMapping("/nursing/alertData")
|
||||
@RequiredArgsConstructor
|
||||
public class AlertDataController extends BaseController {
|
||||
|
||||
private final IAlertDataService alertDataService;
|
||||
|
||||
/**
|
||||
* 查询报警数据列表
|
||||
*/
|
||||
@ApiOperation("查询报警数据列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:alertData:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<List<AlertData>> pageQueryAlertData(
|
||||
@ApiParam("报警数据查询条件") AlertDataPageQueryDto alertDataPageQueryDto
|
||||
) {
|
||||
startPage();
|
||||
List<AlertData> list = alertDataService.pageQueryAlertData(alertDataPageQueryDto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出报警数据列表
|
||||
*/
|
||||
@ApiOperation("导出报警数据列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:alertData:export')")
|
||||
@Log(title = "报警数据", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(@ApiParam(value = "报警数据查询条件") HttpServletResponse response, AlertData alertData) {
|
||||
List<AlertData> list = alertDataService.selectAlertDataList(alertData);
|
||||
ExcelUtil<AlertData> util = new ExcelUtil<AlertData>(AlertData.class);
|
||||
util.exportExcel(response, list, "报警数据数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取报警数据详细信息
|
||||
*/
|
||||
@ApiOperation("获取报警数据详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:alertData:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R<AlertData> getInfo(@ApiParam("报警数据ID") @PathVariable("id") Long id) {
|
||||
return R.ok(alertDataService.selectAlertDataById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增报警数据
|
||||
*/
|
||||
@ApiOperation("新增报警数据")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:alertData:add')")
|
||||
@Log(title = "报警数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@ApiParam("报警数据信息") @RequestBody AlertData alertData) {
|
||||
return toAjax(alertDataService.insertAlertData(alertData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改报警数据
|
||||
*/
|
||||
@ApiOperation("修改报警数据")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:alertData:edit')")
|
||||
@Log(title = "报警数据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@ApiParam("报警数据信息") @RequestBody AlertData alertData) {
|
||||
return toAjax(alertDataService.updateAlertData(alertData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除报警数据
|
||||
*/
|
||||
@ApiOperation("删除报警数据")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:alertData:remove')")
|
||||
@Log(title = "报警数据", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@ApiParam("报警数据ID数组") @PathVariable Long[] ids) {
|
||||
return toAjax(alertDataService.deleteAlertDataByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理设备报警数据
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
@ApiOperation("处理设备报警数据")
|
||||
@PutMapping("/handleAlertData")
|
||||
public AjaxResult handleAlertData(@ApiParam("报警数据信息") @RequestBody HandleAlertDataDto handleAlertDataDto) {
|
||||
alertDataService.handleAlertData(handleAlertDataDto);
|
||||
return success();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.nursing.domain.AlertRule;
|
||||
import com.zzyl.nursing.service.IAlertRuleService;
|
||||
import com.zzyl.common.utils.poi.ExcelUtil;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 报警规则Controller
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
@Api(tags = "报警规则管理")
|
||||
@RestController
|
||||
@RequestMapping("/nursing/alertRule")
|
||||
@RequiredArgsConstructor
|
||||
public class AlertRuleController extends BaseController {
|
||||
|
||||
private final IAlertRuleService alertRuleService;
|
||||
|
||||
/**
|
||||
* 查询报警规则列表
|
||||
*/
|
||||
@ApiOperation("查询报警规则列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:AlertRule:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<List<AlertRule>> list(@ApiParam("报警规则查询条件") AlertRule alertRule) {
|
||||
startPage();
|
||||
List<AlertRule> list = alertRuleService.selectAlertRuleList(alertRule);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出报警规则列表
|
||||
*/
|
||||
@ApiOperation("导出报警规则列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:AlertRule:export')")
|
||||
@Log(title = "报警规则", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(@ApiParam(value = "报警规则查询条件") HttpServletResponse response, AlertRule alertRule) {
|
||||
List<AlertRule> list = alertRuleService.selectAlertRuleList(alertRule);
|
||||
ExcelUtil<AlertRule> util = new ExcelUtil<AlertRule>(AlertRule.class);
|
||||
util.exportExcel(response, list, "报警规则数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取报警规则详细信息
|
||||
*/
|
||||
@ApiOperation("获取报警规则详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:AlertRule:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R<AlertRule> getInfo(@ApiParam("报警规则ID") @PathVariable("id") Long id) {
|
||||
return R.ok(alertRuleService.selectAlertRuleById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改报警规则
|
||||
*/
|
||||
@ApiOperation("修改报警规则")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:AlertRule:edit')")
|
||||
@Log(title = "报警规则", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@ApiParam("报警规则信息") @RequestBody AlertRule alertRule) {
|
||||
return toAjax(alertRuleService.updateAlertRule(alertRule));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除报警规则
|
||||
*/
|
||||
@ApiOperation("删除报警规则")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:AlertRule:remove')")
|
||||
@Log(title = "报警规则", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@ApiParam("报警规则ID数组") @PathVariable Long[] ids) {
|
||||
return toAjax(alertRuleService.deleteAlertRuleByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增报警规则
|
||||
*/
|
||||
@ApiOperation("新增报警规则")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:AlertRule:add')")
|
||||
@Log(title = "报警规则", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@ApiParam("报警规则信息") @RequestBody AlertRule alertRule) {
|
||||
return toAjax(alertRuleService.insertAlertRule(alertRule));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.nursing.domain.Bed;
|
||||
import com.zzyl.nursing.service.IBedService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 床位Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/elder/bed")
|
||||
@Api(tags = "床位相关接口")
|
||||
public class BedController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBedService bedService;
|
||||
|
||||
/**
|
||||
* 查询床位列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('elder:bed:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询床位列表")
|
||||
public TableDataInfo list(Bed bed)
|
||||
{
|
||||
startPage();
|
||||
List<Bed> list = bedService.selectBedList(bed);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取床位详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('elder:bed:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取床位详细信息")
|
||||
public R<Bed> getInfo(@ApiParam(value = "床位ID", required = true) @PathVariable("id") Long id)
|
||||
{
|
||||
return R.ok(bedService.selectBedById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增床位
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('elder:bed:add')")
|
||||
@Log(title = "床位", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增床位")
|
||||
public AjaxResult add(@RequestBody Bed bed)
|
||||
{
|
||||
return toAjax(bedService.insertBed(bed));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改床位
|
||||
*/
|
||||
@ApiOperation("修改床位")
|
||||
@PreAuthorize("@ss.hasPermi('elder:bed:edit')")
|
||||
@Log(title = "床位", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Bed bed)
|
||||
{
|
||||
return toAjax(bedService.updateBed(bed));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除床位
|
||||
*/
|
||||
@ApiOperation("删除床位")
|
||||
@PreAuthorize("@ss.hasPermi('elder:bed:remove')")
|
||||
@Log(title = "床位", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@ApiParam(value = "床位ID", required = true) @PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(bedService.deleteBedByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.nursing.domain.CheckInConfig;
|
||||
import com.zzyl.nursing.service.ICheckInConfigService;
|
||||
import com.zzyl.common.utils.poi.ExcelUtil;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 入住配置表Controller
|
||||
*
|
||||
* @Author: Zhy
|
||||
* @Date: 2025-02-25
|
||||
*/
|
||||
@Api(tags = "入住配置表管理")
|
||||
@RestController
|
||||
@RequestMapping("/nursing/checkInConfig")
|
||||
@RequiredArgsConstructor
|
||||
public class CheckInConfigController extends BaseController
|
||||
{
|
||||
|
||||
private final ICheckInConfigService checkInConfigService;
|
||||
|
||||
/**
|
||||
* 查询入住配置表列表
|
||||
*/
|
||||
@ApiOperation("查询入住配置表列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:checkInConfig:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<List<CheckInConfig>> list(@ApiParam("入住配置表查询条件") CheckInConfig checkInConfig)
|
||||
{
|
||||
startPage();
|
||||
List<CheckInConfig> list = checkInConfigService.selectCheckInConfigList(checkInConfig);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出入住配置表列表
|
||||
*/
|
||||
@ApiOperation("导出入住配置表列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:checkInConfig:export')")
|
||||
@Log(title = "入住配置表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(@ApiParam(value = "入住配置表查询条件") HttpServletResponse response, CheckInConfig checkInConfig)
|
||||
{
|
||||
List<CheckInConfig> list = checkInConfigService.selectCheckInConfigList(checkInConfig);
|
||||
ExcelUtil<CheckInConfig> util = new ExcelUtil<>(CheckInConfig.class);
|
||||
util.exportExcel(response, list, "入住配置表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入住配置表详细信息
|
||||
*/
|
||||
@ApiOperation("获取入住配置表详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:checkInConfig:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R<CheckInConfig> getInfo(@ApiParam("入住配置表ID") @PathVariable("id") Long id)
|
||||
{
|
||||
return R.ok(checkInConfigService.selectCheckInConfigById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入住配置表
|
||||
*/
|
||||
@ApiOperation("新增入住配置表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:checkInConfig:add')")
|
||||
@Log(title = "入住配置表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@ApiParam("入住配置表信息") @RequestBody CheckInConfig checkInConfig)
|
||||
{
|
||||
return toAjax(checkInConfigService.insertCheckInConfig(checkInConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入住配置表
|
||||
*/
|
||||
@ApiOperation("修改入住配置表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:checkInConfig:edit')")
|
||||
@Log(title = "入住配置表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@ApiParam("入住配置表信息") @RequestBody CheckInConfig checkInConfig)
|
||||
{
|
||||
return toAjax(checkInConfigService.updateCheckInConfig(checkInConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入住配置表
|
||||
*/
|
||||
@ApiOperation("删除入住配置表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:checkInConfig:remove')")
|
||||
@Log(title = "入住配置表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@ApiParam("入住配置表ID数组") @PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(checkInConfigService.deleteCheckInConfigByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import com.zzyl.nursing.dto.CheckInApplyDto;
|
||||
import com.zzyl.nursing.vo.CheckInDetailVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.nursing.domain.CheckIn;
|
||||
import com.zzyl.nursing.service.ICheckInService;
|
||||
import com.zzyl.common.utils.poi.ExcelUtil;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 入住表Controller
|
||||
*
|
||||
* @Author: Zhy
|
||||
* @Date: 2025-02-25
|
||||
*/
|
||||
@Api(tags = "入住表管理")
|
||||
@RestController
|
||||
@RequestMapping("/nursing/checkIn")
|
||||
@RequiredArgsConstructor
|
||||
public class CheckInController extends BaseController {
|
||||
|
||||
private final ICheckInService checkInService;
|
||||
|
||||
/**
|
||||
* 查询入住表列表
|
||||
*/
|
||||
@ApiOperation("查询入住表列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:checkIn:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<List<CheckIn>> list(@ApiParam("入住表查询条件") CheckIn checkIn) {
|
||||
startPage();
|
||||
List<CheckIn> list = checkInService.selectCheckInList(checkIn);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出入住表列表
|
||||
*/
|
||||
@ApiOperation("导出入住表列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:checkIn:export')")
|
||||
@Log(title = "入住表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(@ApiParam(value = "入住表查询条件") HttpServletResponse response, CheckIn checkIn) {
|
||||
List<CheckIn> list = checkInService.selectCheckInList(checkIn);
|
||||
ExcelUtil<CheckIn> util = new ExcelUtil<>(CheckIn.class);
|
||||
util.exportExcel(response, list, "入住表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入住表详细信息
|
||||
*/
|
||||
@ApiOperation("获取入住表详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:checkIn:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R<CheckIn> getInfo(@ApiParam("入住表ID") @PathVariable("id") Long id) {
|
||||
return R.ok(checkInService.selectCheckInById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入住表
|
||||
*/
|
||||
@ApiOperation("新增入住表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:checkIn:add')")
|
||||
@Log(title = "入住表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@ApiParam("入住表信息") @RequestBody CheckIn checkIn) {
|
||||
return toAjax(checkInService.insertCheckIn(checkIn));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入住表
|
||||
*/
|
||||
@ApiOperation("修改入住表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:checkIn:edit')")
|
||||
@Log(title = "入住表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@ApiParam("入住表信息") @RequestBody CheckIn checkIn) {
|
||||
return toAjax(checkInService.updateCheckIn(checkIn));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入住表
|
||||
*/
|
||||
@ApiOperation("删除入住表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:checkIn:remove')")
|
||||
@Log(title = "入住表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@ApiParam("入住表ID数组") @PathVariable Long[] ids) {
|
||||
return toAjax(checkInService.deleteCheckInByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请入住
|
||||
*/
|
||||
@ApiOperation("申请入住")
|
||||
@Log(title = "入住表", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/apply")
|
||||
public AjaxResult apply(@ApiParam("申请入住请求DTO") @RequestBody CheckInApplyDto checkInApplyDto) {
|
||||
checkInService.apply(checkInApplyDto);
|
||||
return AjaxResult.success("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取老人入住详细信息
|
||||
*/
|
||||
@ApiOperation("获取老人入住详细信息")
|
||||
@GetMapping(value = "/detail/{id}")
|
||||
public R<CheckInDetailVo> getCheckInInfo(@ApiParam("入住记录ID") @PathVariable("id") Long id) {
|
||||
return R.ok(checkInService.getCheckInInfo(id));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.nursing.domain.Contract;
|
||||
import com.zzyl.nursing.service.IContractService;
|
||||
import com.zzyl.common.utils.poi.ExcelUtil;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 合同表Controller
|
||||
*
|
||||
* @Author: Zhy
|
||||
* @Date: 2025-02-25
|
||||
*/
|
||||
@Api(tags = "合同表管理")
|
||||
@RestController
|
||||
@RequestMapping("/nursing/contract")
|
||||
@RequiredArgsConstructor
|
||||
public class ContractController extends BaseController {
|
||||
|
||||
private final IContractService contractService;
|
||||
|
||||
/**
|
||||
* 查询合同表列表
|
||||
*/
|
||||
@ApiOperation("查询合同表列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:contract:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<List<Contract>> list(@ApiParam("合同表查询条件") Contract contract) {
|
||||
startPage();
|
||||
List<Contract> list = contractService.selectContractList(contract);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出合同表列表
|
||||
*/
|
||||
@ApiOperation("导出合同表列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:contract:export')")
|
||||
@Log(title = "合同表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(@ApiParam(value = "合同表查询条件") HttpServletResponse response, Contract contract) {
|
||||
List<Contract> list = contractService.selectContractList(contract);
|
||||
ExcelUtil<Contract> util = new ExcelUtil<>(Contract.class);
|
||||
util.exportExcel(response, list, "合同表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取合同表详细信息
|
||||
*/
|
||||
@ApiOperation("获取合同表详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:contract:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R<Contract> getInfo(@ApiParam("合同表ID") @PathVariable("id") Integer id) {
|
||||
return R.ok(contractService.selectContractById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增合同表
|
||||
*/
|
||||
@ApiOperation("新增合同表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:contract:add')")
|
||||
@Log(title = "合同表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@ApiParam("合同表信息") @RequestBody Contract contract) {
|
||||
return toAjax(contractService.insertContract(contract));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改合同表
|
||||
*/
|
||||
@ApiOperation("修改合同表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:contract:edit')")
|
||||
@Log(title = "合同表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@ApiParam("合同表信息") @RequestBody Contract contract) {
|
||||
return toAjax(contractService.updateContract(contract));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除合同表
|
||||
*/
|
||||
@ApiOperation("删除合同表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:contract:remove')")
|
||||
@Log(title = "合同表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@ApiParam("合同表ID数组") @PathVariable Integer[] ids) {
|
||||
return toAjax(contractService.deleteContractByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.huaweicloud.sdk.iotda.v5.model.ServiceCapability;
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import com.zzyl.nursing.dto.DeviceDto;
|
||||
import com.zzyl.nursing.vo.DeviceDetailVo;
|
||||
import com.zzyl.nursing.vo.DeviceReportDataVo;
|
||||
import com.zzyl.nursing.vo.ProductVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.nursing.domain.Device;
|
||||
import com.zzyl.nursing.service.IDeviceService;
|
||||
import com.zzyl.common.utils.poi.ExcelUtil;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备Controller
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-06
|
||||
*/
|
||||
@Api(tags = "设备管理")
|
||||
@RestController
|
||||
@RequestMapping("/nursing/device")
|
||||
@RequiredArgsConstructor
|
||||
public class DeviceController extends BaseController {
|
||||
|
||||
private final IDeviceService deviceService;
|
||||
|
||||
/**
|
||||
* 查询设备列表
|
||||
*/
|
||||
@ApiOperation("查询设备列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:device:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<List<Device>> list(@ApiParam("设备查询条件") Device device) {
|
||||
startPage();
|
||||
List<Device> list = deviceService.selectDeviceList(device);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备列表
|
||||
*/
|
||||
@ApiOperation("导出设备列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:device:export')")
|
||||
@Log(title = "设备", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(@ApiParam(value = "设备查询条件") HttpServletResponse response, Device device) {
|
||||
List<Device> list = deviceService.selectDeviceList(device);
|
||||
ExcelUtil<Device> util = new ExcelUtil<Device>(Device.class);
|
||||
util.exportExcel(response, list, "设备数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 从物联网平台同步产品列表
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
@ApiOperation("从物联网平台同步产品列表")
|
||||
@PostMapping("/syncProductList")
|
||||
public AjaxResult syncProductList() {
|
||||
deviceService.syncProductList();
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有产品列表
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
@ApiOperation("查询所有产品列表")
|
||||
@GetMapping(value = "/allProduct")
|
||||
public R<List<ProductVo>> allProduct() {
|
||||
return R.ok(deviceService.allProduct());
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册设备
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
@ApiOperation("注册设备")
|
||||
@PostMapping("/register")
|
||||
public AjaxResult registerProduct(@ApiParam("设备信息") @RequestBody DeviceDto deviceDto) {
|
||||
deviceService.registerProduct(deviceDto);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备详细数据
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
@ApiOperation("查询设备详细数据")
|
||||
@GetMapping("/{iotId}")
|
||||
public R<DeviceDetailVo> getProductByIotId(@ApiParam("设备标识码") @PathVariable("iotId") String iotId) {
|
||||
return R.ok(deviceService.queryDeviceDetail(iotId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备上报数据
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
@ApiOperation("查询设备详细数据")
|
||||
@GetMapping("/queryServiceProperties/{iotId}")
|
||||
public R<List<DeviceReportDataVo>> queryDeviceReportData(
|
||||
@ApiParam("设备标识码") @PathVariable("iotId") String iotId
|
||||
) {
|
||||
return R.ok(deviceService.queryDeviceReportData(iotId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
@ApiOperation("修改设备")
|
||||
@PutMapping
|
||||
public AjaxResult updateDevice(@ApiParam("设备数据") @RequestBody Device device) {
|
||||
deviceService.updateDevice(device);
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
@ApiOperation("修改设备")
|
||||
@DeleteMapping("/{iotId}")
|
||||
public AjaxResult deleteDevice(@ApiParam("设备标识码") @PathVariable("iotId") String iotId) {
|
||||
deviceService.deleteDeviceByIotId(iotId);
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取产品对应的服务信息
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
@ApiOperation("获取产品对应的服务信息")
|
||||
@GetMapping("/queryProduct/{productKey}")
|
||||
public R<List<ServiceCapability>> queryProductByProductKey(
|
||||
@ApiParam("产品key") @PathVariable("productKey") String productKey
|
||||
) {
|
||||
List<ServiceCapability> list = deviceService.queryProductByProductKey(productKey);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import com.zzyl.nursing.dto.DeviceDataPageReqDto;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.nursing.domain.DeviceData;
|
||||
import com.zzyl.nursing.service.IDeviceDataService;
|
||||
import com.zzyl.common.utils.poi.ExcelUtil;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备数据Controller
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-08
|
||||
*/
|
||||
@Api(tags = "设备数据管理")
|
||||
@RestController
|
||||
@RequestMapping("/nursing/data")
|
||||
@RequiredArgsConstructor
|
||||
public class DeviceDataController extends BaseController {
|
||||
|
||||
private final IDeviceDataService deviceDataService;
|
||||
|
||||
/**
|
||||
* 查询设备数据列表
|
||||
*/
|
||||
@ApiOperation("查询设备数据列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:data:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<DeviceData> list(@ApiParam("设备数据查询条件") DeviceDataPageReqDto deviceDataPageReqDto) {
|
||||
return deviceDataService.selectDeviceDataPageList(deviceDataPageReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备数据列表
|
||||
*/
|
||||
@ApiOperation("导出设备数据列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:data:export')")
|
||||
@Log(title = "设备数据", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(@ApiParam(value = "设备数据查询条件") HttpServletResponse response, DeviceData deviceData) {
|
||||
List<DeviceData> list = deviceDataService.selectDeviceDataList(deviceData);
|
||||
ExcelUtil<DeviceData> util = new ExcelUtil<>(DeviceData.class);
|
||||
util.exportExcel(response, list, "设备数据数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备数据详细信息
|
||||
*/
|
||||
@ApiOperation("获取设备数据详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:data:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R<DeviceData> getInfo(@ApiParam("设备数据ID") @PathVariable("id") Long id) {
|
||||
return R.ok(deviceDataService.selectDeviceDataById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备数据
|
||||
*/
|
||||
@ApiOperation("新增设备数据")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:data:add')")
|
||||
@Log(title = "设备数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@ApiParam("设备数据信息") @RequestBody DeviceData deviceData) {
|
||||
return toAjax(deviceDataService.insertDeviceData(deviceData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备数据
|
||||
*/
|
||||
@ApiOperation("修改设备数据")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:data:edit')")
|
||||
@Log(title = "设备数据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@ApiParam("设备数据信息") @RequestBody DeviceData deviceData) {
|
||||
return toAjax(deviceDataService.updateDeviceData(deviceData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备数据
|
||||
*/
|
||||
@ApiOperation("删除设备数据")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:data:remove')")
|
||||
@Log(title = "设备数据", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@ApiParam("设备数据ID数组") @PathVariable Long[] ids) {
|
||||
return toAjax(deviceDataService.deleteDeviceDataByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import com.zzyl.nursing.dto.ElderPageQuery;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.nursing.domain.Elder;
|
||||
import com.zzyl.nursing.service.IElderService;
|
||||
import com.zzyl.common.utils.poi.ExcelUtil;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 老人Controller
|
||||
*
|
||||
* @Author: Zhy
|
||||
* @Date: 2025-02-25
|
||||
*/
|
||||
@Api(tags = "老人管理")
|
||||
@RestController
|
||||
@RequestMapping("/nursing/elder")
|
||||
@RequiredArgsConstructor
|
||||
public class ElderController extends BaseController {
|
||||
|
||||
private final IElderService elderService;
|
||||
|
||||
/**
|
||||
* 查询老人列表
|
||||
*/
|
||||
@ApiOperation("查询老人列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:elder:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<List<Elder>> list(@ApiParam("老人查询条件") Elder elder) {
|
||||
startPage();
|
||||
List<Elder> list = elderService.selectElderList(elder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出老人列表
|
||||
*/
|
||||
@ApiOperation("导出老人列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:elder:export')")
|
||||
@Log(title = "老人", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(@ApiParam(value = "老人查询条件") HttpServletResponse response, Elder elder) {
|
||||
List<Elder> list = elderService.selectElderList(elder);
|
||||
ExcelUtil<Elder> util = new ExcelUtil<>(Elder.class);
|
||||
util.exportExcel(response, list, "老人数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取老人详细信息
|
||||
*/
|
||||
@ApiOperation("获取老人详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:elder:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R<Elder> getInfo(@ApiParam("老人ID") @PathVariable("id") Long id) {
|
||||
return R.ok(elderService.selectElderById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增老人
|
||||
*/
|
||||
@ApiOperation("新增老人")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:elder:add')")
|
||||
@Log(title = "老人", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@ApiParam("老人信息") @RequestBody Elder elder) {
|
||||
return toAjax(elderService.insertElder(elder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改老人
|
||||
*/
|
||||
@ApiOperation("修改老人")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:elder:edit')")
|
||||
@Log(title = "老人", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@ApiParam("老人信息") @RequestBody Elder elder) {
|
||||
return toAjax(elderService.updateElder(elder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除老人
|
||||
*/
|
||||
@ApiOperation("删除老人")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:elder:remove')")
|
||||
@Log(title = "老人", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@ApiParam("老人ID数组") @PathVariable Long[] ids) {
|
||||
return toAjax(elderService.deleteElderByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询已经入住的老人列表
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
@ApiOperation("查询已经入住的老人列表")
|
||||
@GetMapping("/pageQuery")
|
||||
public TableDataInfo<Elder> pageQuery(
|
||||
@ApiParam("分页查询老人信息") ElderPageQuery elderPageQuery
|
||||
) {
|
||||
return elderService.pageQuery(elderPageQuery);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import cn.hutool.core.lang.tree.Tree;
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.nursing.domain.Floor;
|
||||
import com.zzyl.nursing.service.IFloorService;
|
||||
import com.zzyl.nursing.vo.FloorVo;
|
||||
import com.zzyl.nursing.vo.TreeVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 楼层Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/elder/floor")
|
||||
@Api(tags = "楼层相关接口")
|
||||
public class FloorController extends BaseController {
|
||||
@Autowired
|
||||
private IFloorService floorService;
|
||||
|
||||
/**
|
||||
* 查询楼层列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('elder:floor:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询所有楼层列表")
|
||||
public R<List<Floor>> list() {
|
||||
List<Floor> list = floorService.list();
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取楼层详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('elder:floor:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取楼层详细信息")
|
||||
public R<Floor> getInfo(@ApiParam(value = "楼层ID", required = true) @PathVariable("id") Long id) {
|
||||
return R.ok(floorService.selectFloorById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增楼层
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('elder:floor:add')")
|
||||
@Log(title = "楼层", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增楼层")
|
||||
public AjaxResult add(@ApiParam(value = "楼层信息", required = true) @RequestBody Floor floor) {
|
||||
return toAjax(floorService.insertFloor(floor));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改楼层
|
||||
*/
|
||||
@ApiOperation("修改楼层")
|
||||
@PreAuthorize("@ss.hasPermi('elder:floor:edit')")
|
||||
@Log(title = "楼层", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@ApiParam(value = "楼层信息", required = true) @RequestBody Floor floor) {
|
||||
return toAjax(floorService.updateFloor(floor));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除楼层
|
||||
*/
|
||||
@ApiOperation("删除楼层")
|
||||
@PreAuthorize("@ss.hasPermi('elder:floor:remove')")
|
||||
@Log(title = "楼层", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@ApiParam(value = "楼层ID", required = true) @PathVariable Long[] ids) {
|
||||
return toAjax(floorService.deleteFloorByIds(ids));
|
||||
}
|
||||
|
||||
@GetMapping("/getAllFloorsWithNur")
|
||||
@ApiOperation(value = "获取所有楼层 (负责老人)", notes = "无需参数,获取所有楼层,返回楼层信息列表")
|
||||
public R<List<Floor>> getAllFloorsWithNur() {
|
||||
List<Floor> list = floorService.selectAllByNur();
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@GetMapping("/getRoomAndBedByBedStatus/{status}")
|
||||
@ApiOperation(value = "获取所有楼层所有房间中的空床位")
|
||||
public R<List<TreeVo>> getRoomAndBedByBedStatus(
|
||||
@ApiParam(value = "床位状态", required = true) @PathVariable("status") Integer status
|
||||
) {
|
||||
List<TreeVo> list = floorService.getRoomAndBedByBedStatus(status);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@GetMapping("/getRoomAndBedByBedStatus")
|
||||
@ApiOperation(value = "获取所有楼层所有房间中的空床位")
|
||||
public R<List<TreeVo>> getRoomAndBed( ) {
|
||||
List<TreeVo> list = floorService.getRoomAndBed();
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有装有智能设备的楼层
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
@GetMapping("/getAllFloorsWithDevice")
|
||||
@ApiOperation(value = "获取所有装有智能设备的楼层")
|
||||
public R<List<FloorVo>> getAllFloorsWithDevice() {
|
||||
List<FloorVo> list = floorService.getAllFloorsWithDevice();
|
||||
return R.ok(list);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import com.zzyl.nursing.dto.HealthAssessmentDto;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.nursing.domain.HealthAssessment;
|
||||
import com.zzyl.nursing.service.IHealthAssessmentService;
|
||||
import com.zzyl.common.utils.poi.ExcelUtil;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 健康评估Controller
|
||||
*
|
||||
* @Author: Zhy
|
||||
* @Date: 2025-02-28
|
||||
*/
|
||||
@Api(tags = "健康评估管理")
|
||||
@RestController
|
||||
@RequestMapping("/nursing/healthAssessment")
|
||||
@RequiredArgsConstructor
|
||||
public class HealthAssessmentController extends BaseController {
|
||||
|
||||
private final IHealthAssessmentService healthAssessmentService;
|
||||
|
||||
/**
|
||||
* 查询健康评估列表
|
||||
*/
|
||||
@ApiOperation("查询健康评估列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:healthAssessment:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<List<HealthAssessment>> list(@ApiParam("健康评估查询条件") HealthAssessment healthAssessment) {
|
||||
startPage();
|
||||
List<HealthAssessment> list = healthAssessmentService.selectHealthAssessmentList(healthAssessment);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出健康评估列表
|
||||
*/
|
||||
@ApiOperation("导出健康评估列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:healthAssessment:export')")
|
||||
@Log(title = "健康评估", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(
|
||||
@ApiParam(value = "健康评估查询条件") HttpServletResponse response, HealthAssessment healthAssessment
|
||||
) {
|
||||
List<HealthAssessment> list = healthAssessmentService.selectHealthAssessmentList(healthAssessment);
|
||||
ExcelUtil<HealthAssessment> util = new ExcelUtil<HealthAssessment>(HealthAssessment.class);
|
||||
util.exportExcel(response, list, "健康评估数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取健康评估详细信息
|
||||
*/
|
||||
@ApiOperation("获取健康评估详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:healthAssessment:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R<HealthAssessment> getInfo(@ApiParam("健康评估ID") @PathVariable("id") Long id) {
|
||||
return R.ok(healthAssessmentService.selectHealthAssessmentById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增健康评估
|
||||
*/
|
||||
@ApiOperation("新增健康评估")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:healthAssessment:add')")
|
||||
@Log(title = "健康评估", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@ApiParam("健康评估信息") @RequestBody HealthAssessmentDto healthAssessmentDto) {
|
||||
Long id = healthAssessmentService.insertHealthAssessment(healthAssessmentDto);
|
||||
return success(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改健康评估
|
||||
*/
|
||||
@ApiOperation("修改健康评估")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:healthAssessment:edit')")
|
||||
@Log(title = "健康评估", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@ApiParam("健康评估信息") @RequestBody HealthAssessment healthAssessment) {
|
||||
return toAjax(healthAssessmentService.updateHealthAssessment(healthAssessment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除健康评估
|
||||
*/
|
||||
@ApiOperation("删除健康评估")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:healthAssessment:remove')")
|
||||
@Log(title = "健康评估", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@ApiParam("健康评估ID数组") @PathVariable Long[] ids) {
|
||||
return toAjax(healthAssessmentService.deleteHealthAssessmentByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传体检报告
|
||||
*/
|
||||
@ApiOperation("上传体检报告")
|
||||
@PostMapping("/upload")
|
||||
public AjaxResult uploadFile(String idCardNo, MultipartFile file) {
|
||||
return healthAssessmentService.uploadFile(idCardNo, file);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.common.utils.poi.ExcelUtil;
|
||||
import com.zzyl.nursing.domain.NursingElder;
|
||||
import com.zzyl.nursing.dto.NursingElderDto;
|
||||
import com.zzyl.nursing.service.INursingElderService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 护理员老人关联Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/elder/nursingElder")
|
||||
@Api(tags = "护理员老人关联相关接口")
|
||||
public class NursingElderController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private INursingElderService nursingElderService;
|
||||
|
||||
@PostMapping("/setNursing")
|
||||
@ApiOperation("设置护理员")
|
||||
public AjaxResult setNursingElder(@RequestBody List<NursingElderDto> nursingElderDtos)
|
||||
{
|
||||
return AjaxResult.success(nursingElderService.setNursingElder(nursingElderDtos));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询护理员老人关联列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('elder:elder:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询护理员老人关联列表")
|
||||
public TableDataInfo list(NursingElder nursingElder)
|
||||
{
|
||||
startPage();
|
||||
List<NursingElder> list = nursingElderService.selectNursingElderList(nursingElder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出护理员老人关联列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('elder:elder:export')")
|
||||
@Log(title = "护理员老人关联", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, NursingElder nursingElder)
|
||||
{
|
||||
List<NursingElder> list = nursingElderService.selectNursingElderList(nursingElder);
|
||||
ExcelUtil<NursingElder> util = new ExcelUtil<NursingElder>(NursingElder.class);
|
||||
util.exportExcel(response, list, "护理员老人关联数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取护理员老人关联详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('elder:elder:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取护理员老人关联详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(nursingElderService.selectNursingElderById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增护理员老人关联
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('elder:elder:add')")
|
||||
@Log(title = "护理员老人关联", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增护理员老人关联")
|
||||
public AjaxResult add(@RequestBody NursingElder nursingElder)
|
||||
{
|
||||
return toAjax(nursingElderService.insertNursingElder(nursingElder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改护理员老人关联
|
||||
*/
|
||||
@ApiOperation("修改护理员老人关联")
|
||||
@PreAuthorize("@ss.hasPermi('elder:elder:edit')")
|
||||
@Log(title = "护理员老人关联", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody NursingElder nursingElder)
|
||||
{
|
||||
return toAjax(nursingElderService.updateNursingElder(nursingElder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除护理员老人关联
|
||||
*/
|
||||
@ApiOperation("删除护理员老人关联")
|
||||
@PreAuthorize("@ss.hasPermi('elder:elder:remove')")
|
||||
@Log(title = "护理员老人关联", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(nursingElderService.deleteNursingElderByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import com.zzyl.nursing.vo.NursingLevelVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.nursing.domain.NursingLevel;
|
||||
import com.zzyl.nursing.service.INursingLevelService;
|
||||
import com.zzyl.common.utils.poi.ExcelUtil;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 护理等级Controller
|
||||
*
|
||||
* @Author: alexis
|
||||
* @Date: 2024-12-30
|
||||
*/
|
||||
@Api(tags = "护理等级管理")
|
||||
@RestController
|
||||
@RequestMapping("/nursing/level")
|
||||
@RequiredArgsConstructor
|
||||
public class NursingLevelController extends BaseController {
|
||||
|
||||
private final INursingLevelService nursingLevelService;
|
||||
|
||||
/**
|
||||
* 查询护理等级列表
|
||||
*/
|
||||
@ApiOperation("查询护理等级列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:level:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<List<NursingLevelVo>> list(@ApiParam("护理等级查询条件") NursingLevel nursingLevel) {
|
||||
startPage();
|
||||
List<NursingLevelVo> list = nursingLevelService.selectNursingLevelVoList(nursingLevel);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出护理等级列表
|
||||
*/
|
||||
@ApiOperation("导出护理等级列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:level:export')")
|
||||
@Log(title = "护理等级", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(@ApiParam(value = "护理等级查询条件") HttpServletResponse response, NursingLevel nursingLevel) {
|
||||
List<NursingLevel> list = nursingLevelService.selectNursingLevelList(nursingLevel);
|
||||
ExcelUtil<NursingLevel> util = new ExcelUtil<NursingLevel>(NursingLevel.class);
|
||||
util.exportExcel(response, list, "护理等级数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取护理等级详细信息
|
||||
*/
|
||||
@ApiOperation("获取护理等级详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:level:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R<NursingLevel> getInfo(@ApiParam("护理等级ID") @PathVariable("id") Long id) {
|
||||
return R.ok(nursingLevelService.selectNursingLevelById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增护理等级
|
||||
*/
|
||||
@ApiOperation("新增护理等级")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:level:add')")
|
||||
@Log(title = "护理等级", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@ApiParam("护理等级信息") @RequestBody NursingLevel nursingLevel) {
|
||||
return toAjax(nursingLevelService.insertNursingLevel(nursingLevel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改护理等级
|
||||
*/
|
||||
@ApiOperation("修改护理等级")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:level:edit')")
|
||||
@Log(title = "护理等级", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@ApiParam("护理等级信息") @RequestBody NursingLevel nursingLevel) {
|
||||
return toAjax(nursingLevelService.updateNursingLevel(nursingLevel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除护理等级
|
||||
*/
|
||||
@ApiOperation("删除护理等级")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:level:remove')")
|
||||
@Log(title = "护理等级", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@ApiParam("护理等级ID数组") @PathVariable Long[] ids) {
|
||||
return toAjax(nursingLevelService.deleteNursingLevelByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有已启用的护理等级
|
||||
*/
|
||||
@ApiOperation("查询所有已启用的护理等级")
|
||||
@Log(title = "护理等级", businessType = BusinessType.DELETE)
|
||||
@GetMapping("/all")
|
||||
public R<List<NursingLevel>> getByEnableLevel() {
|
||||
return R.ok(nursingLevelService.selectByEnable());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import com.zzyl.nursing.dto.NursingPlanDto;
|
||||
import com.zzyl.nursing.vo.NursingPlanVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.nursing.domain.NursingPlan;
|
||||
import com.zzyl.nursing.service.INursingPlanService;
|
||||
import com.zzyl.common.utils.poi.ExcelUtil;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 护理计划Controller
|
||||
*
|
||||
* @author alexis
|
||||
* @date 2024-12-30
|
||||
*/
|
||||
@Api(tags = "护理计划管理")
|
||||
@RestController
|
||||
@RequestMapping("/nursing/plan")
|
||||
public class NursingPlanController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private INursingPlanService nursingPlanService;
|
||||
|
||||
/**
|
||||
* 查询护理计划列表
|
||||
*/
|
||||
@ApiOperation("查询护理计划列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:plan:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<List<NursingPlan>> list(@ApiParam("护理计划查询条件") NursingPlan nursingPlan)
|
||||
{
|
||||
startPage();
|
||||
List<NursingPlan> list = nursingPlanService.selectNursingPlanList(nursingPlan);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出护理计划列表
|
||||
*/
|
||||
@ApiOperation("导出护理计划列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:plan:export')")
|
||||
@Log(title = "护理计划", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(@ApiParam(value = "护理计划查询条件") HttpServletResponse response, NursingPlan nursingPlan)
|
||||
{
|
||||
List<NursingPlan> list = nursingPlanService.selectNursingPlanList(nursingPlan);
|
||||
ExcelUtil<NursingPlan> util = new ExcelUtil<NursingPlan>(NursingPlan.class);
|
||||
util.exportExcel(response, list, "护理计划数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取护理计划详细信息
|
||||
*/
|
||||
@ApiOperation("获取护理计划详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:plan:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R<NursingPlanVo> getInfo(@ApiParam("护理计划ID") @PathVariable("id") Long id)
|
||||
{
|
||||
return R.ok(nursingPlanService.selectNursingPlanById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增护理计划
|
||||
*/
|
||||
@ApiOperation("新增护理计划")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:plan:add')")
|
||||
@Log(title = "护理计划", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@ApiParam("护理计划信息") @RequestBody NursingPlanDto nursingPlanDto)
|
||||
{
|
||||
return toAjax(nursingPlanService.insertNursingPlan(nursingPlanDto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改护理计划
|
||||
*/
|
||||
@ApiOperation("修改护理计划")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:plan:edit')")
|
||||
@Log(title = "护理计划", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@ApiParam("护理计划信息") @RequestBody NursingPlanDto nursingPlanDto)
|
||||
{
|
||||
return toAjax(nursingPlanService.updateNursingPlan(nursingPlanDto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除护理计划
|
||||
*/
|
||||
@ApiOperation("删除护理计划")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:plan:remove')")
|
||||
@Log(title = "护理计划", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@ApiParam("护理计划ID数组") @PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(nursingPlanService.deleteNursingPlanByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有护理计划
|
||||
*/
|
||||
@GetMapping("/all")
|
||||
@ApiOperation(value = "获取所有护理计划")
|
||||
public R<List<NursingPlan>> listAll()
|
||||
{
|
||||
return R.ok(nursingPlanService.getAllNursingPlans());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import com.zzyl.nursing.vo.NursingProjectVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.nursing.domain.NursingProject;
|
||||
import com.zzyl.nursing.service.INursingProjectService;
|
||||
import com.zzyl.common.utils.poi.ExcelUtil;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 护理项目Controller
|
||||
*
|
||||
* @author alexis
|
||||
* @date 2024-12-30
|
||||
*/
|
||||
@Api(tags = "护理项目管理")
|
||||
@RestController
|
||||
@RequestMapping("/nursing/project")
|
||||
public class NursingProjectController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private INursingProjectService nursingProjectService;
|
||||
|
||||
/**
|
||||
* 查询护理项目列表
|
||||
*/
|
||||
@ApiOperation("查询护理项目列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:project:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<List<NursingProject>> list(@ApiParam("护理项目查询条件") NursingProject nursingProject)
|
||||
{
|
||||
startPage();
|
||||
List<NursingProject> list = nursingProjectService.selectNursingProjectList(nursingProject);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出护理项目列表
|
||||
*/
|
||||
@ApiOperation("导出护理项目列表")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:project:export')")
|
||||
@Log(title = "护理项目", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(@ApiParam(value = "护理项目查询条件") HttpServletResponse response, NursingProject nursingProject)
|
||||
{
|
||||
List<NursingProject> list = nursingProjectService.selectNursingProjectList(nursingProject);
|
||||
ExcelUtil<NursingProject> util = new ExcelUtil<NursingProject>(NursingProject.class);
|
||||
util.exportExcel(response, list, "护理项目数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取护理项目详细信息
|
||||
*/
|
||||
@ApiOperation("获取护理项目详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:project:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R<NursingProject> getInfo(@ApiParam("护理项目ID") @PathVariable("id") Long id)
|
||||
{
|
||||
return R.ok(nursingProjectService.selectNursingProjectById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增护理项目
|
||||
*/
|
||||
@ApiOperation("新增护理项目")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:project:add')")
|
||||
@Log(title = "护理项目", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@ApiParam("护理项目信息") @RequestBody NursingProject nursingProject)
|
||||
{
|
||||
return toAjax(nursingProjectService.insertNursingProject(nursingProject));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改护理项目
|
||||
*/
|
||||
@ApiOperation("修改护理项目")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:project:edit')")
|
||||
@Log(title = "护理项目", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@ApiParam("护理项目信息") @RequestBody NursingProject nursingProject)
|
||||
{
|
||||
return toAjax(nursingProjectService.updateNursingProject(nursingProject));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除护理项目
|
||||
*/
|
||||
@ApiOperation("删除护理项目")
|
||||
@PreAuthorize("@ss.hasPermi('nursing:project:remove')")
|
||||
@Log(title = "护理项目", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@ApiParam("护理项目ID数组") @PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(nursingProjectService.deleteNursingProjectByIds(ids));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<NursingProjectVo>> getAllProjects() {
|
||||
return R.ok(nursingProjectService.getAllProjects());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.common.utils.poi.ExcelUtil;
|
||||
import com.zzyl.nursing.domain.NursingTask;
|
||||
import com.zzyl.nursing.dto.NursingTaskCancelDto;
|
||||
import com.zzyl.nursing.dto.NursingTaskDoDto;
|
||||
import com.zzyl.nursing.dto.NursingTaskDto;
|
||||
import com.zzyl.nursing.dto.NursingTaskUpdateDto;
|
||||
import com.zzyl.nursing.service.INursingTaskService;
|
||||
import com.zzyl.nursing.vo.NursingTaskVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 护理任务Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-09-27
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/nursing/nursingTask")
|
||||
@Api(tags = "护理任务的接口")
|
||||
public class NursingTaskController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
// @Qualifier("nursingTaskServiceImpl")
|
||||
private INursingTaskService nursingTaskService;
|
||||
|
||||
/**
|
||||
* 查询护理任务列表
|
||||
*/
|
||||
@ApiOperation("查询护理任务列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<NursingTaskVo> list(NursingTaskDto nursingTaskDto)
|
||||
{
|
||||
return nursingTaskService.list(nursingTaskDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出护理任务列表
|
||||
*/
|
||||
@ApiOperation("导出护理任务列表")
|
||||
@Log(title = "护理任务", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, NursingTask nursingTask)
|
||||
{
|
||||
List<NursingTask> list = nursingTaskService.selectNursingTaskList(nursingTask);
|
||||
ExcelUtil<NursingTask> util = new ExcelUtil<NursingTask>(NursingTask.class);
|
||||
util.exportExcel(response, list, "护理任务数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取护理任务详细信息
|
||||
*/
|
||||
@ApiOperation("获取护理任务详细信息")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R<NursingTaskVo> getInfo(@ApiParam(value = "护理任务ID", required = true)
|
||||
@PathVariable("id") Long id)
|
||||
{
|
||||
return R.ok(nursingTaskService.selectNursingTaskById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增护理任务
|
||||
*/
|
||||
@ApiOperation("新增护理任务")
|
||||
@Log(title = "护理任务", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@ApiParam(value = "护理任务实体")
|
||||
@RequestBody NursingTask nursingTask)
|
||||
{
|
||||
return toAjax(nursingTaskService.insertNursingTask(nursingTask));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改护理任务
|
||||
*/
|
||||
@ApiOperation("修改护理任务")
|
||||
@Log(title = "护理任务", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@ApiParam(value = "护理任务实体")
|
||||
@RequestBody NursingTask nursingTask)
|
||||
{
|
||||
return toAjax(nursingTaskService.updateNursingTask(nursingTask));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除护理任务
|
||||
*/
|
||||
@ApiOperation("删除护理任务")
|
||||
@Log(title = "护理任务", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(nursingTaskService.deleteNursingTaskByIds(ids));
|
||||
}
|
||||
|
||||
@ApiOperation("取消任务")
|
||||
@PutMapping("/cancel")
|
||||
public AjaxResult cancel(@ApiParam("取消原因") @RequestBody NursingTaskCancelDto nursingTaskCancelDto) {
|
||||
nursingTaskService.cancel(nursingTaskCancelDto);
|
||||
return success();
|
||||
}
|
||||
|
||||
@ApiOperation("执行任务")
|
||||
@PutMapping("/do")
|
||||
public AjaxResult doTask(@ApiParam("执行任务dto") @RequestBody NursingTaskDoDto nursingTaskDoDto) {
|
||||
nursingTaskService.doTask(nursingTaskDoDto);
|
||||
return success();
|
||||
}
|
||||
|
||||
@ApiOperation("任务改期")
|
||||
@PutMapping("/updateTime")
|
||||
public AjaxResult updateTime(@ApiParam("执行任务dto") @RequestBody NursingTaskUpdateDto nursingTaskUpdateDto) {
|
||||
nursingTaskService.updateTime(nursingTaskUpdateDto);
|
||||
return success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.nursing.domain.Room;
|
||||
import com.zzyl.nursing.service.IRoomService;
|
||||
import com.zzyl.nursing.vo.RoomVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 房间Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/elder/room")
|
||||
@Api(tags = "房间相关接口")
|
||||
public class RoomController extends BaseController {
|
||||
@Autowired
|
||||
private IRoomService roomService;
|
||||
|
||||
@GetMapping("/getRoomsWithNurByFloorId/{floorId}")
|
||||
@ApiOperation("获取所有房间(负责老人)")
|
||||
public R<List<RoomVo>> getRoomsWithNurByFloorId(@PathVariable Long floorId) {
|
||||
List<RoomVo> list = roomService.getRoomsWithNurByFloorId(floorId);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@GetMapping("/getRoomsByFloorId/{floorId}")
|
||||
@ApiOperation("获取所有房间(入住配置)")
|
||||
public R<List<RoomVo>> getRoomsByFloorId(@ApiParam(value = "楼层ID", required = true) @PathVariable Long floorId) {
|
||||
List<RoomVo> list = roomService.getRoomsByFloorId(floorId);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询房间列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('elder:room:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询房间列表")
|
||||
public TableDataInfo list(@ApiParam(value = "房间信息", required = true) Room room) {
|
||||
startPage();
|
||||
List<Room> list = roomService.selectRoomList(room);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取房间详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('elder:room:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取房间详细信息")
|
||||
public R<Room> getInfo(@ApiParam(value = "房间ID", required = true) @PathVariable("id") Long id) {
|
||||
return R.ok(roomService.selectRoomById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增房间
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('elder:room:add')")
|
||||
@Log(title = "房间", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增房间")
|
||||
public AjaxResult add(@ApiParam(value = "房间信息", required = true) @RequestBody Room room) {
|
||||
return toAjax(roomService.insertRoom(room));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改房间
|
||||
*/
|
||||
@ApiOperation("修改房间")
|
||||
@PreAuthorize("@ss.hasPermi('elder:room:edit')")
|
||||
@Log(title = "房间", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@ApiParam(value = "房间信息", required = true) @RequestBody Room room) {
|
||||
return toAjax(roomService.updateRoom(room));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除房间
|
||||
*/
|
||||
@ApiOperation("删除房间")
|
||||
@PreAuthorize("@ss.hasPermi('elder:room:remove')")
|
||||
@Log(title = "房间", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@ApiParam(value = "房间ID数组", required = true) @PathVariable Long[] ids) {
|
||||
return toAjax(roomService.deleteRoomByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据房间id查询 房间 数据
|
||||
*/
|
||||
@GetMapping(value = "/one/{id}")
|
||||
@ApiOperation("根据房间id查询房间数据")
|
||||
public R<RoomVo> getRoomPriceByRoomId(@ApiParam(value = "房间ID", required = true) @PathVariable("id") Long id) {
|
||||
return R.ok(roomService.getRoomPriceByRoomId(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取房间中的智能设备及数据
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
@GetMapping(value = "/getRoomsWithDeviceByFloorId/{floorId}")
|
||||
@ApiOperation("根据房间id查询房间数据")
|
||||
public R<List<RoomVo>> getRoomsWithDeviceByFloorId(@ApiParam(value = "房间ID", required = true) @PathVariable("floorId") Long floorId) {
|
||||
return R.ok(roomService.getRoomsWithDeviceByFloorId(floorId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.zzyl.nursing.controller;
|
||||
|
||||
import com.zzyl.common.annotation.Log;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
import com.zzyl.common.enums.BusinessType;
|
||||
import com.zzyl.common.utils.poi.ExcelUtil;
|
||||
import com.zzyl.nursing.domain.RoomType;
|
||||
import com.zzyl.nursing.service.IRoomTypeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 房型Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/elder/roomType")
|
||||
@Api(tags = "房型相关接口")
|
||||
public class RoomTypeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRoomTypeService roomTypeService;
|
||||
|
||||
/**
|
||||
* 查询房型列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询房型列表")
|
||||
public TableDataInfo list(RoomType roomType)
|
||||
{
|
||||
startPage();
|
||||
List<RoomType> list = roomTypeService.selectRoomTypeList(roomType);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询房型列表
|
||||
*/
|
||||
@GetMapping("/listAll")
|
||||
@ApiOperation("查询所有房型列表")
|
||||
public AjaxResult list()
|
||||
{
|
||||
List<RoomType> list = roomTypeService.list();
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出房型列表
|
||||
*/
|
||||
@Log(title = "房型", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RoomType roomType)
|
||||
{
|
||||
List<RoomType> list = roomTypeService.selectRoomTypeList(roomType);
|
||||
ExcelUtil<RoomType> util = new ExcelUtil<RoomType>(RoomType.class);
|
||||
util.exportExcel(response, list, "房型数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取房型详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取房型详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(roomTypeService.selectRoomTypeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增房型
|
||||
*/
|
||||
@Log(title = "房型", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增房型")
|
||||
public AjaxResult add(@RequestBody RoomType roomType)
|
||||
{
|
||||
return toAjax(roomTypeService.insertRoomType(roomType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改房型
|
||||
*/
|
||||
@ApiOperation("修改房型")
|
||||
@Log(title = "房型", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RoomType roomType)
|
||||
{
|
||||
return toAjax(roomTypeService.updateRoomType(roomType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除房型
|
||||
*/
|
||||
@ApiOperation("删除房型")
|
||||
@Log(title = "房型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(roomTypeService.deleteRoomTypeByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.zzyl.nursing.controller.member;
|
||||
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import com.zzyl.nursing.dto.ElderDto;
|
||||
import com.zzyl.nursing.dto.QueryDevicePropertyDto;
|
||||
import com.zzyl.nursing.dto.UserLoginRequestDto;
|
||||
import com.zzyl.nursing.vo.DevicePropertyVo;
|
||||
import com.zzyl.nursing.vo.FamilyMemberElderVo;
|
||||
import com.zzyl.nursing.vo.LoginVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.nursing.service.IFamilyMemberService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 老人家属Controller
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-03
|
||||
*/
|
||||
@Api(tags = "老人家属管理")
|
||||
@RestController
|
||||
@RequestMapping("/member/user")
|
||||
@RequiredArgsConstructor
|
||||
public class FamilyMemberController extends BaseController {
|
||||
|
||||
private final IFamilyMemberService familyMemberService;
|
||||
|
||||
/**
|
||||
* 小程序登录
|
||||
*
|
||||
* @return:
|
||||
* @param: userLoginRequestDto 用户登录请求参数
|
||||
*/
|
||||
@PostMapping("/login")
|
||||
@ApiOperation("小程序登录")
|
||||
public R<LoginVo> login(@RequestBody UserLoginRequestDto userLoginRequestDto) {
|
||||
LoginVo loginVo = familyMemberService.login(userLoginRequestDto);
|
||||
return R.ok(loginVo);
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("绑定老人家属")
|
||||
public AjaxResult addMember(@RequestBody ElderDto elderDto) {
|
||||
familyMemberService.addMember(elderDto);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("/my")
|
||||
@ApiOperation("查询当前登录用户的老人家属信息")
|
||||
public AjaxResult getMyElder() {
|
||||
List<ElderDto> elderDtoList = familyMemberService.getMyElder();
|
||||
return AjaxResult.success(elderDtoList);
|
||||
}
|
||||
|
||||
@GetMapping("/list-by-page")
|
||||
@ApiOperation("分页查询当前登录用户的老人家属信息")
|
||||
private AjaxResult listByPage(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize) {
|
||||
List<FamilyMemberElderVo> familyMemberElderVoList = familyMemberService.listByPage(pageNum, pageSize);
|
||||
return AjaxResult.success(familyMemberElderVoList);
|
||||
}
|
||||
|
||||
@PostMapping("/QueryDevicePropertyStatus")
|
||||
@ApiOperation("查询设备属性状态")
|
||||
private AjaxResult queryDevicePropertyStatus(@RequestBody QueryDevicePropertyDto queryDevicePropertyDto) {
|
||||
DevicePropertyVo devicePropertyVo = familyMemberService.queryDevicePropertyStatus(queryDevicePropertyDto);
|
||||
return AjaxResult.success(devicePropertyVo);
|
||||
}
|
||||
|
||||
@GetMapping("/queryDeviceDataListByDay")
|
||||
@ApiOperation("按天统计查询指标数据")
|
||||
private AjaxResult queryDeviceDataListByDay(String functionId, String iotId, Long startTime, Long endTime) {
|
||||
List<Map<String,Object>> familyMemberElderVoList = familyMemberService.queryDeviceDataListByDay(functionId, iotId, startTime, endTime);
|
||||
return AjaxResult.success(familyMemberElderVoList);
|
||||
}
|
||||
|
||||
@GetMapping("/queryDeviceDataListByWeek")
|
||||
@ApiOperation("按周统计查询指标数据")
|
||||
private AjaxResult queryDeviceDataListByWeek(String functionId, String iotId, Long startTime, Long endTime) {
|
||||
List<Map<String,Object>> familyMemberElderVoList = familyMemberService.queryDeviceDataListByWeek(functionId, iotId, startTime, endTime);
|
||||
return AjaxResult.success(familyMemberElderVoList);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.zzyl.nursing.controller.member;
|
||||
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
import com.zzyl.nursing.domain.NursingProject;
|
||||
import com.zzyl.nursing.service.INursingProjectService;
|
||||
import io.swagger.annotations.Api;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务项目控制层
|
||||
*
|
||||
* @author Zhy
|
||||
* @version 1.0
|
||||
* @date 2025-03-05 15:48
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/member/orders/project")
|
||||
@Slf4j
|
||||
@Api(tags = "服务项目控制层")
|
||||
@RequiredArgsConstructor
|
||||
public class MemberOrderProjectController extends BaseController {
|
||||
|
||||
private final INursingProjectService nursingProjectService;
|
||||
|
||||
@ApiOperation("分页查询护理项目列表")
|
||||
@GetMapping("/page")
|
||||
public TableDataInfo<List<NursingProject>> selectPageProject(@ApiParam("护理项目查询条件") NursingProject nursingProject) {
|
||||
// 开始分页
|
||||
startPage();
|
||||
|
||||
List<NursingProject> list = nursingProjectService.selectNursingProjectList(nursingProject);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation("根据编号查询护理项目信息")
|
||||
@GetMapping("/{id}")
|
||||
public R<NursingProject> selectPageProjectById(@ApiParam("护理项目id") @PathVariable("id") Long id) {
|
||||
return R.ok(nursingProjectService.selectNursingProjectById(id));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.zzyl.nursing.controller.member;
|
||||
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.R;
|
||||
import com.zzyl.common.core.page.TableDataInfo;
|
||||
import com.zzyl.common.utils.UserThreadLocal;
|
||||
import com.zzyl.nursing.domain.MemberReservation;
|
||||
import com.zzyl.nursing.service.IMemberReservationService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 参观预约控制层
|
||||
*
|
||||
* @author Zhy
|
||||
* @version 1.0
|
||||
* @date 2025-03-05 14:26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/member/reservation")
|
||||
@Api(tags = "预约信息相关接口")
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class MemberReservationController extends BaseController {
|
||||
|
||||
private final IMemberReservationService memberReservationService;
|
||||
|
||||
/**
|
||||
* 查询当天取消预约数量
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
@GetMapping("/cancelled-count")
|
||||
@ApiOperation("查询取消预约数量")
|
||||
public R<Integer> getCancelledReservationCount() {
|
||||
log.info("查询取消预约数量");
|
||||
Integer count = memberReservationService.selectReservationCount();
|
||||
return R.ok(count);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询每个时间段剩余预约次数
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
// @GetMapping("/countByTime")
|
||||
// @ApiOperation("查询每个时间段剩余预约次数")
|
||||
// public R<Integer> selectReservationCountByTime(@ApiParam("预约时间") String time) {
|
||||
// Integer count = memberReservationService.selectReservationCountByTime();
|
||||
// return R.ok(count);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 新增预约
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
@PostMapping
|
||||
@ApiOperation("新增预约")
|
||||
public R<MemberReservation> insertReservation(
|
||||
@ApiParam("预约信息") @RequestBody MemberReservation memberReservation
|
||||
) {
|
||||
log.info("新增预约,memberReservation={}", memberReservation);
|
||||
memberReservationService.insertReservation(memberReservation);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询预约
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("分页查询预约")
|
||||
public R<Object> selectPageReservation(
|
||||
@ApiParam("预约信息") MemberReservation memberReservation
|
||||
) {
|
||||
startPage();
|
||||
List<MemberReservation> list = memberReservationService.selectReservationList(memberReservation);
|
||||
return R.ok(getDataTable(list));
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消预约
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
@PutMapping("/{id}/cancel")
|
||||
@ApiOperation("取消预约")
|
||||
public R<Object> cancelReservation(@ApiParam("预约id") @PathVariable("id") Long id) {
|
||||
log.info("取消预约,id={}", id);
|
||||
memberReservationService.updateReservationById(id);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.zzyl.nursing.controller.member;
|
||||
|
||||
import com.zzyl.common.core.controller.BaseController;
|
||||
import com.zzyl.common.core.domain.AjaxResult;
|
||||
import com.zzyl.nursing.domain.RoomType;
|
||||
import com.zzyl.nursing.service.IRoomTypeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 客户房型管理
|
||||
*
|
||||
* @author Zhy
|
||||
* @version 1.0
|
||||
* @date 2025-03-03 15:15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/member/roomTypes")
|
||||
@Api(tags = "客户房型管理")
|
||||
@RequiredArgsConstructor
|
||||
public class MemberRoomTypeController extends BaseController {
|
||||
|
||||
private final IRoomTypeService roomTypeService;
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("根据状态查询房型")
|
||||
public AjaxResult findRoomTypeListByStatus(Integer status) {
|
||||
|
||||
List<RoomType> roomTypeVoList = roomTypeService.findRoomTypeListByStatus(status);
|
||||
return success(roomTypeVoList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 报警数据对象 alert_data
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("报警数据实体")
|
||||
public class AlertData extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 主键
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
// 物联网设备id
|
||||
@Excel(name = "物联网设备id")
|
||||
@ApiModelProperty("物联网设备id")
|
||||
private String iotId;
|
||||
|
||||
// 设备名称
|
||||
@Excel(name = "设备名称")
|
||||
@ApiModelProperty("设备名称")
|
||||
private String deviceName;
|
||||
|
||||
// 所属产品key
|
||||
@Excel(name = "所属产品key")
|
||||
@ApiModelProperty("所属产品key")
|
||||
private String productKey;
|
||||
|
||||
// 产品名称
|
||||
@Excel(name = "产品名称")
|
||||
@ApiModelProperty("产品名称")
|
||||
private String productName;
|
||||
|
||||
// 功能标识符
|
||||
@Excel(name = "功能标识符")
|
||||
@ApiModelProperty("功能标识符")
|
||||
private String functionId;
|
||||
|
||||
// 接入位置
|
||||
@Excel(name = "接入位置")
|
||||
@ApiModelProperty("接入位置")
|
||||
private String accessLocation;
|
||||
|
||||
// 位置类型 0:随身设备 1:固定设备
|
||||
@Excel(name = "位置类型 0:随身设备 1:固定设备")
|
||||
@ApiModelProperty("位置类型 0:随身设备 1:固定设备")
|
||||
private Integer locationType;
|
||||
|
||||
// 物理位置类型 0楼层 1房间 2床位
|
||||
@Excel(name = "物理位置类型 0楼层 1房间 2床位")
|
||||
@ApiModelProperty("物理位置类型 0楼层 1房间 2床位")
|
||||
private Integer physicalLocationType;
|
||||
|
||||
// 位置备注
|
||||
@Excel(name = "位置备注")
|
||||
@ApiModelProperty("位置备注")
|
||||
private String deviceDescription;
|
||||
|
||||
// 数据值
|
||||
@Excel(name = "数据值")
|
||||
@ApiModelProperty("数据值")
|
||||
private String dataValue;
|
||||
|
||||
// 报警规则id
|
||||
@Excel(name = "报警规则id")
|
||||
@ApiModelProperty("报警规则id")
|
||||
private Long alertRuleId;
|
||||
|
||||
// 报警原因,格式:功能名称+运算符+阈值+持续周期+聚合周期
|
||||
@Excel(name = "报警原因,格式:功能名称+运算符+阈值+持续周期+聚合周期")
|
||||
@ApiModelProperty("报警原因,格式:功能名称+运算符+阈值+持续周期+聚合周期")
|
||||
private String alertReason;
|
||||
|
||||
// 处理结果
|
||||
@Excel(name = "处理结果")
|
||||
@ApiModelProperty("处理结果")
|
||||
private String processingResult;
|
||||
|
||||
// 处理人id
|
||||
@Excel(name = "处理人id")
|
||||
@ApiModelProperty("处理人id")
|
||||
private Long processorId;
|
||||
|
||||
// 处理人名称
|
||||
@Excel(name = "处理人名称")
|
||||
@ApiModelProperty("处理人名称")
|
||||
private String processorName;
|
||||
|
||||
// 处理时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "处理时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("处理时间")
|
||||
private LocalDateTime processingTime;
|
||||
|
||||
// 报警数据类型,0:老人异常数据,1:设备异常数据
|
||||
@Excel(name = "报警数据类型,0:老人异常数据,1:设备异常数据")
|
||||
@ApiModelProperty("报警数据类型,0:老人异常数据,1:设备异常数据")
|
||||
private Integer type;
|
||||
|
||||
// 状态,0:待处理,1:已处理
|
||||
@Excel(name = "状态,0:待处理,1:已处理")
|
||||
@ApiModelProperty("状态,0:待处理,1:已处理")
|
||||
private Integer status;
|
||||
|
||||
// 接收人id
|
||||
@Excel(name = "接收人id")
|
||||
@ApiModelProperty("接收人id")
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 报警规则对象 alert_rule
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("报警规则实体")
|
||||
public class AlertRule extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 主键ID
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
// 所属产品的key
|
||||
@Excel(name = "所属产品的key")
|
||||
@ApiModelProperty("所属产品的key")
|
||||
private String productKey;
|
||||
|
||||
// 产品名称
|
||||
@Excel(name = "产品名称")
|
||||
@ApiModelProperty("产品名称")
|
||||
private String productName;
|
||||
|
||||
// 模块的key
|
||||
@Excel(name = "模块的key")
|
||||
@ApiModelProperty("模块的key")
|
||||
private String moduleId;
|
||||
|
||||
// 模块名称
|
||||
@Excel(name = "模块名称")
|
||||
@ApiModelProperty("模块名称")
|
||||
private String moduleName;
|
||||
|
||||
// 功能名称
|
||||
@Excel(name = "功能名称")
|
||||
@ApiModelProperty("功能名称")
|
||||
private String functionName;
|
||||
|
||||
// 功能标识
|
||||
@Excel(name = "功能标识")
|
||||
@ApiModelProperty("功能标识")
|
||||
private String functionId;
|
||||
|
||||
// 物联网设备id
|
||||
@Excel(name = "物联网设备id")
|
||||
@ApiModelProperty("物联网设备id")
|
||||
private String iotId;
|
||||
|
||||
// 设备名称
|
||||
@Excel(name = "设备名称")
|
||||
@ApiModelProperty("设备名称")
|
||||
private String deviceName;
|
||||
|
||||
// 报警数据类型,0:老人异常数据,1:设备异常数据
|
||||
@Excel(name = "报警数据类型,0:老人异常数据,1:设备异常数据")
|
||||
@ApiModelProperty("报警数据类型,0:老人异常数据,1:设备异常数据")
|
||||
private Integer alertDataType;
|
||||
|
||||
// 告警规则名称
|
||||
@Excel(name = "告警规则名称")
|
||||
@ApiModelProperty("告警规则名称")
|
||||
private String alertRuleName;
|
||||
|
||||
// 运算符
|
||||
@Excel(name = "运算符")
|
||||
@ApiModelProperty("运算符")
|
||||
private String operator;
|
||||
|
||||
// 阈值
|
||||
@Excel(name = "阈值")
|
||||
@ApiModelProperty("阈值")
|
||||
private Double value;
|
||||
|
||||
// 持续周期
|
||||
@Excel(name = "持续周期")
|
||||
@ApiModelProperty("持续周期")
|
||||
private Integer duration;
|
||||
|
||||
// 报警生效时段
|
||||
@Excel(name = "报警生效时段")
|
||||
@ApiModelProperty("报警生效时段")
|
||||
private String alertEffectivePeriod;
|
||||
|
||||
// 报警沉默周期
|
||||
@Excel(name = "报警沉默周期")
|
||||
@ApiModelProperty("报警沉默周期")
|
||||
private Integer alertSilentPeriod;
|
||||
|
||||
// 0 禁用 1启用
|
||||
@Excel(name = "0 禁用 1启用")
|
||||
@ApiModelProperty("0 禁用 1启用")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 床位对象 bed
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-26
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("床位实体对象")
|
||||
public class Bed extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 床位ID */
|
||||
@ApiModelProperty(value = "床位ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 床位编号 */
|
||||
@Excel(name = "床位编号")
|
||||
@ApiModelProperty(value = "床位编号")
|
||||
private String bedNumber;
|
||||
|
||||
/** 床位状态: 未入住0, 已入住1 入住申请中2 */
|
||||
@Excel(name = "床位状态: 未入住0, 已入住1 入住申请中2")
|
||||
@ApiModelProperty(value = "床位状态: 未入住0, 已入住1 入住申请中2")
|
||||
private Integer bedStatus;
|
||||
|
||||
/** 床位号 */
|
||||
@Excel(name = "床位号")
|
||||
@ApiModelProperty(value = "床位号")
|
||||
private Long sort;
|
||||
|
||||
/** 房间ID */
|
||||
@Excel(name = "房间ID")
|
||||
@ApiModelProperty(value = "房间ID")
|
||||
private Long roomId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 入住表对象 check_in
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("入住表实体")
|
||||
public class CheckIn extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 主键ID
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
// 老人姓名
|
||||
@Excel(name = "老人姓名")
|
||||
@ApiModelProperty("老人姓名")
|
||||
private String elderName;
|
||||
|
||||
// 老人ID
|
||||
@Excel(name = "老人ID")
|
||||
@ApiModelProperty("老人ID")
|
||||
private Long elderId;
|
||||
|
||||
// 身份证号
|
||||
@Excel(name = "身份证号")
|
||||
@ApiModelProperty("身份证号")
|
||||
private String idCardNo;
|
||||
|
||||
// 入住开始时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "入住开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("入住开始时间")
|
||||
private LocalDateTime startDate;
|
||||
|
||||
// 入住结束时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "入住结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("入住结束时间")
|
||||
private LocalDateTime endDate;
|
||||
|
||||
// 护理等级名称
|
||||
@Excel(name = "护理等级名称")
|
||||
@ApiModelProperty("护理等级名称")
|
||||
private String nursingLevelName;
|
||||
|
||||
// 入住床位
|
||||
@Excel(name = "入住床位")
|
||||
@ApiModelProperty("入住床位")
|
||||
private String bedNumber;
|
||||
|
||||
// 状态 (0: 已入住, 1: 已退住)
|
||||
@Excel(name = "状态 (0: 已入住, 1: 已退住)")
|
||||
@ApiModelProperty("状态 (0: 已入住, 1: 已退住)")
|
||||
private Integer status;
|
||||
|
||||
// 排序编号
|
||||
@Excel(name = "排序编号")
|
||||
@ApiModelProperty("排序编号")
|
||||
private Integer sortOrder;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 入住配置表对象 check_in_config
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("入住配置表实体")
|
||||
public class CheckInConfig extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 主键ID
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
// 入住表ID
|
||||
@Excel(name = "入住表ID")
|
||||
@ApiModelProperty("入住表ID")
|
||||
private Long checkInId;
|
||||
|
||||
// 护理等级ID
|
||||
@Excel(name = "护理等级ID")
|
||||
@ApiModelProperty("护理等级ID")
|
||||
private Long nursingLevelId;
|
||||
|
||||
// 护理等级名称
|
||||
@Excel(name = "护理等级名称")
|
||||
@ApiModelProperty("护理等级名称")
|
||||
private String nursingLevelName;
|
||||
|
||||
// 费用开始时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "费用开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("费用开始时间")
|
||||
private LocalDateTime feeStartDate;
|
||||
|
||||
// 费用结束时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "费用结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("费用结束时间")
|
||||
private LocalDateTime feeEndDate;
|
||||
|
||||
// 押金(元)
|
||||
@Excel(name = "押金", readConverterExp = "元=")
|
||||
@ApiModelProperty("押金(元)")
|
||||
private BigDecimal deposit;
|
||||
|
||||
// 护理费用(元/月)
|
||||
@Excel(name = "护理费用", readConverterExp = "元=/月")
|
||||
@ApiModelProperty("护理费用(元/月)")
|
||||
private BigDecimal nursingFee;
|
||||
|
||||
// 床位费用(元/月)
|
||||
@Excel(name = "床位费用", readConverterExp = "元=/月")
|
||||
@ApiModelProperty("床位费用(元/月)")
|
||||
private BigDecimal bedFee;
|
||||
|
||||
// 医保支付(元/月)
|
||||
@Excel(name = "医保支付", readConverterExp = "元=/月")
|
||||
@ApiModelProperty("医保支付(元/月)")
|
||||
private BigDecimal insurancePayment;
|
||||
|
||||
// 政府补贴(元/月)
|
||||
@Excel(name = "政府补贴", readConverterExp = "元=/月")
|
||||
@ApiModelProperty("政府补贴(元/月)")
|
||||
private BigDecimal governmentSubsidy;
|
||||
|
||||
// 其他费用(元/月)
|
||||
@Excel(name = "其他费用", readConverterExp = "元=/月")
|
||||
@ApiModelProperty("其他费用(元/月)")
|
||||
private BigDecimal otherFees;
|
||||
|
||||
// 排序编号
|
||||
@Excel(name = "排序编号")
|
||||
@ApiModelProperty("排序编号")
|
||||
private Integer sortOrder;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 合同表对象 contract
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("合同表实体")
|
||||
public class Contract extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 主键ID
|
||||
@ApiModelProperty("主键ID")
|
||||
private Integer id;
|
||||
|
||||
// 老人ID
|
||||
@Excel(name = "老人ID")
|
||||
@ApiModelProperty("老人ID")
|
||||
private Integer elderId;
|
||||
|
||||
// 合同名称
|
||||
@Excel(name = "合同名称")
|
||||
@ApiModelProperty("合同名称")
|
||||
private String contractName;
|
||||
|
||||
// 合同编号
|
||||
@Excel(name = "合同编号")
|
||||
@ApiModelProperty("合同编号")
|
||||
private String contractNumber;
|
||||
|
||||
// 协议地址(文件路径或URL)
|
||||
@Excel(name = "协议地址", readConverterExp = "文=件路径或URL")
|
||||
@ApiModelProperty("协议地址(文件路径或URL)")
|
||||
private String agreementPath;
|
||||
|
||||
// 丙方手机号
|
||||
@Excel(name = "丙方手机号")
|
||||
@ApiModelProperty("丙方手机号")
|
||||
private String thirdPartyPhone;
|
||||
|
||||
// 丙方姓名
|
||||
@Excel(name = "丙方姓名")
|
||||
@ApiModelProperty("丙方姓名")
|
||||
private String thirdPartyName;
|
||||
|
||||
// 老人姓名
|
||||
@Excel(name = "老人姓名")
|
||||
@ApiModelProperty("老人姓名")
|
||||
private String elderName;
|
||||
|
||||
// 开始时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("开始时间")
|
||||
private LocalDateTime startDate;
|
||||
|
||||
// 结束时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("结束时间")
|
||||
private LocalDateTime endDate;
|
||||
|
||||
// 状态 (0: 未生效, 1: 已生效, 2: 已过期, 3: 已失效)
|
||||
@Excel(name = "状态 (0: 未生效, 1: 已生效, 2: 已过期, 3: 已失效)")
|
||||
@ApiModelProperty("状态 (0: 未生效, 1: 已生效, 2: 已过期, 3: 已失效)")
|
||||
private Integer status;
|
||||
|
||||
// 签约日期
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "签约日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("签约日期")
|
||||
private LocalDateTime signDate;
|
||||
|
||||
// 解除提交人
|
||||
@Excel(name = "解除提交人")
|
||||
@ApiModelProperty("解除提交人")
|
||||
private String terminationSubmitter;
|
||||
|
||||
// 解除日期
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "解除日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("解除日期")
|
||||
private LocalDateTime terminationDate;
|
||||
|
||||
// 解除协议地址(文件路径或URL)
|
||||
@Excel(name = "解除协议地址", readConverterExp = "文=件路径或URL")
|
||||
@ApiModelProperty("解除协议地址(文件路径或URL)")
|
||||
private String terminationAgreementPath;
|
||||
|
||||
// 排序编号
|
||||
@Excel(name = "排序编号")
|
||||
@ApiModelProperty("排序编号")
|
||||
private Integer sortOrder;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 设备对象 device
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-06
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("设备实体")
|
||||
public class Device extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 主键ID
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
// 物联网设备ID
|
||||
@Excel(name = "物联网设备ID")
|
||||
@ApiModelProperty("物联网设备ID")
|
||||
private String iotId;
|
||||
|
||||
// 设备秘钥
|
||||
@Excel(name = "设备秘钥")
|
||||
@ApiModelProperty("设备秘钥")
|
||||
private String secret;
|
||||
|
||||
// 绑定位置
|
||||
@Excel(name = "绑定位置")
|
||||
@ApiModelProperty("绑定位置")
|
||||
private String bindingLocation;
|
||||
|
||||
// 位置类型 0:随身设备 1:固定设备
|
||||
@Excel(name = "位置类型 0:随身设备 1:固定设备")
|
||||
@ApiModelProperty("位置类型 0:随身设备 1:固定设备")
|
||||
private Integer locationType;
|
||||
|
||||
// 物理位置类型
|
||||
@Excel(name = "物理位置类型")
|
||||
@ApiModelProperty("物理位置类型")
|
||||
private Integer physicalLocationType;
|
||||
|
||||
// 设备名称
|
||||
@Excel(name = "设备名称")
|
||||
@ApiModelProperty("设备名称")
|
||||
private String deviceName;
|
||||
|
||||
// 产品key
|
||||
@Excel(name = "产品key")
|
||||
@ApiModelProperty("产品key")
|
||||
private String productKey;
|
||||
|
||||
// 产品名称
|
||||
@Excel(name = "产品名称")
|
||||
@ApiModelProperty("产品名称")
|
||||
private String productName;
|
||||
|
||||
// 位置备注
|
||||
@Excel(name = "位置备注")
|
||||
@ApiModelProperty("位置备注")
|
||||
private String deviceDescription;
|
||||
|
||||
// 产品是否包含门禁
|
||||
@Excel(name = "产品是否包含门禁")
|
||||
@ApiModelProperty("产品是否包含门禁")
|
||||
private Integer haveEntranceGuard;
|
||||
|
||||
// 节点id
|
||||
@Excel(name = "节点id")
|
||||
@ApiModelProperty("节点id")
|
||||
private String nodeId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 设备数据对象 device_data
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-08
|
||||
*/
|
||||
@Data
|
||||
@Getter
|
||||
@Builder
|
||||
@ToString
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel("设备数据实体")
|
||||
public class DeviceData extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 告警规则ID,自增主键
|
||||
@ApiModelProperty("告警规则ID,自增主键")
|
||||
private Long id;
|
||||
|
||||
// 设备名称
|
||||
@Excel(name = "设备名称")
|
||||
@ApiModelProperty("设备名称")
|
||||
private String deviceName;
|
||||
|
||||
// 设备ID
|
||||
@Excel(name = "设备ID")
|
||||
@ApiModelProperty("设备ID")
|
||||
private String iotId;
|
||||
|
||||
// 所属产品的key
|
||||
@Excel(name = "所属产品的key")
|
||||
@ApiModelProperty("所属产品的key")
|
||||
private String productKey;
|
||||
|
||||
// 产品名称
|
||||
@Excel(name = "产品名称")
|
||||
@ApiModelProperty("产品名称")
|
||||
private String productName;
|
||||
|
||||
// 功能名称
|
||||
@Excel(name = "功能名称")
|
||||
@ApiModelProperty("功能名称")
|
||||
private String functionId;
|
||||
|
||||
// 接入位置
|
||||
@Excel(name = "接入位置")
|
||||
@ApiModelProperty("接入位置")
|
||||
private String accessLocation;
|
||||
|
||||
// 位置类型 0:随身设备 1:固定设备
|
||||
@Excel(name = "位置类型 0:随身设备 1:固定设备")
|
||||
@ApiModelProperty("位置类型 0:随身设备 1:固定设备")
|
||||
private Integer locationType;
|
||||
|
||||
// 物理位置类型 0楼层 1房间 2床位
|
||||
@Excel(name = "物理位置类型 0楼层 1房间 2床位")
|
||||
@ApiModelProperty("物理位置类型 0楼层 1房间 2床位")
|
||||
private Integer physicalLocationType;
|
||||
|
||||
// 位置备注
|
||||
@Excel(name = "位置备注")
|
||||
@ApiModelProperty("位置备注")
|
||||
private String deviceDescription;
|
||||
|
||||
// 数据值
|
||||
@Excel(name = "数据值")
|
||||
@ApiModelProperty("数据值")
|
||||
private String dataValue;
|
||||
|
||||
// 数据上报时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "数据上报时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("数据上报时间")
|
||||
private LocalDateTime alarmTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Chihiro
|
||||
* @date 2025-03-14 12:00
|
||||
* @version v1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DevicePropertyList implements Serializable {
|
||||
private List<PropertyStatusInfo> propertyStatusInfo;
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 老人对象 elder
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("老人实体")
|
||||
public class Elder extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// id
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
// 名称
|
||||
@Excel(name = "名称")
|
||||
@ApiModelProperty("名称")
|
||||
private String name;
|
||||
|
||||
// 图片
|
||||
@Excel(name = "图片")
|
||||
@ApiModelProperty("图片")
|
||||
private String image;
|
||||
|
||||
// 身份证号
|
||||
@Excel(name = "身份证号")
|
||||
@ApiModelProperty("身份证号")
|
||||
private String idCardNo;
|
||||
|
||||
// 性别(0:女 1:男)
|
||||
@Excel(name = "性别", readConverterExp = "0=:女,1=:男")
|
||||
@ApiModelProperty("性别(0:女 1:男)")
|
||||
private Integer sex;
|
||||
|
||||
// 状态(0:禁用,1:启用 2:请假 3:退住中 4入住中 5已退住)
|
||||
@Excel(name = "状态", readConverterExp = "0=:禁用,1:启用,2=:请假,3=:退住中,4=入住中,5=已退住")
|
||||
@ApiModelProperty("状态(0:禁用,1:启用 2:请假 3:退住中 4入住中 5已退住)")
|
||||
private Integer status;
|
||||
|
||||
// 手机号
|
||||
@Excel(name = "手机号")
|
||||
@ApiModelProperty("手机号")
|
||||
private String phone;
|
||||
|
||||
// 出生日期
|
||||
@Excel(name = "出生日期")
|
||||
@ApiModelProperty("出生日期")
|
||||
private String birthday;
|
||||
|
||||
// 家庭住址
|
||||
@Excel(name = "家庭住址")
|
||||
@ApiModelProperty("家庭住址")
|
||||
private String address;
|
||||
|
||||
// 身份证国徽面
|
||||
@Excel(name = "身份证国徽面")
|
||||
@ApiModelProperty("身份证国徽面")
|
||||
private String idCardNationalEmblemImg;
|
||||
|
||||
// 身份证人像面
|
||||
@Excel(name = "身份证人像面")
|
||||
@ApiModelProperty("身份证人像面")
|
||||
private String idCardPortraitImg;
|
||||
|
||||
// 床位编号
|
||||
@Excel(name = "床位编号")
|
||||
@ApiModelProperty("床位编号")
|
||||
private String bedNumber;
|
||||
|
||||
// 床位id
|
||||
@Excel(name = "床位id")
|
||||
@ApiModelProperty("床位id")
|
||||
private Long bedId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 老人家属对象 family_member
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-03
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("老人家属实体")
|
||||
public class FamilyMember extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 主键
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
// 手机号
|
||||
@Excel(name = "手机号")
|
||||
@ApiModelProperty("手机号")
|
||||
private String phone;
|
||||
|
||||
// 名称
|
||||
@Excel(name = "名称")
|
||||
@ApiModelProperty("名称")
|
||||
private String name;
|
||||
|
||||
// 头像
|
||||
@Excel(name = "头像")
|
||||
@ApiModelProperty("头像")
|
||||
private String avatar;
|
||||
|
||||
// OpenID
|
||||
@Excel(name = "OpenID")
|
||||
@ApiModelProperty("OpenID")
|
||||
private String openId;
|
||||
|
||||
// 性别(0:男,1:女)
|
||||
@Excel(name = "性别(0:男,1:女)")
|
||||
@ApiModelProperty("性别(0:男,1:女)")
|
||||
private Integer gender;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Chihiro
|
||||
* @date 2025-03-14 09:44
|
||||
* @version v1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class FamilyMemberElder implements Serializable {
|
||||
private Long id;
|
||||
private Long familyMemberId;
|
||||
private Long elderId;
|
||||
private String elderName;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 楼层对象 floor
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-26
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("楼层实体")
|
||||
public class Floor extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
/** 编号 */
|
||||
@Excel(name = "编号")
|
||||
@ApiModelProperty(value = "编号")
|
||||
private Long code;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 健康评估对象 health_assessment
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-02-28
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("健康评估实体")
|
||||
public class HealthAssessment extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 主键
|
||||
@ApiModelProperty("主键")
|
||||
@TableId(type = IdType.AUTO, value = "id")
|
||||
private Long id;
|
||||
|
||||
// 老人姓名
|
||||
@Excel(name = "老人姓名")
|
||||
@ApiModelProperty("老人姓名")
|
||||
private String elderName;
|
||||
|
||||
// 身份证号
|
||||
@Excel(name = "身份证号")
|
||||
@ApiModelProperty("身份证号")
|
||||
private String idCard;
|
||||
|
||||
// 出生日期
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("出生日期")
|
||||
private LocalDateTime birthDate;
|
||||
|
||||
// 年龄
|
||||
@Excel(name = "年龄")
|
||||
@ApiModelProperty("年龄")
|
||||
private Integer age;
|
||||
|
||||
// 性别(0:男,1:女)
|
||||
@Excel(name = "性别(0:男,1:女)")
|
||||
@ApiModelProperty("性别(0:男,1:女)")
|
||||
private Integer gender;
|
||||
|
||||
// 健康评分
|
||||
@Excel(name = "健康评分")
|
||||
@ApiModelProperty("健康评分")
|
||||
private String healthScore;
|
||||
|
||||
// 危险等级(健康, 提示, 风险, 危险, 严重危险)
|
||||
@Excel(name = "危险等级(健康, 提示, 风险, 危险, 严重危险)")
|
||||
@ApiModelProperty("危险等级(健康, 提示, 风险, 危险, 严重危险)")
|
||||
private String riskLevel;
|
||||
|
||||
// 是否建议入住(0:建议,1:不建议)
|
||||
@Excel(name = "是否建议入住(0:建议,1:不建议)")
|
||||
@ApiModelProperty("是否建议入住(0:建议,1:不建议)")
|
||||
private Integer suggestionForAdmission;
|
||||
|
||||
// 推荐护理等级
|
||||
@Excel(name = "推荐护理等级")
|
||||
@ApiModelProperty("推荐护理等级")
|
||||
private String nursingLevelName;
|
||||
|
||||
// 入住情况(0:已入住,1:未入住)
|
||||
@Excel(name = "入住情况(0:已入住,1:未入住)")
|
||||
@ApiModelProperty("入住情况(0:已入住,1:未入住)")
|
||||
private Integer admissionStatus;
|
||||
|
||||
// 总检日期
|
||||
@Excel(name = "总检日期")
|
||||
@ApiModelProperty("总检日期")
|
||||
private String totalCheckDate;
|
||||
|
||||
// 体检机构
|
||||
@Excel(name = "体检机构")
|
||||
@ApiModelProperty("体检机构")
|
||||
private String physicalExamInstitution;
|
||||
|
||||
// 体检报告URL链接
|
||||
@Excel(name = "体检报告URL链接")
|
||||
@ApiModelProperty("体检报告URL链接")
|
||||
private String physicalReportUrl;
|
||||
|
||||
// 评估时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "评估时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("评估时间")
|
||||
private LocalDateTime assessmentTime;
|
||||
|
||||
// 报告总结
|
||||
@Excel(name = "报告总结")
|
||||
@ApiModelProperty("报告总结")
|
||||
private String reportSummary;
|
||||
|
||||
// 疾病风险
|
||||
@Excel(name = "疾病风险")
|
||||
@ApiModelProperty("疾病风险")
|
||||
private String diseaseRisk;
|
||||
|
||||
// 异常分析
|
||||
@Excel(name = "异常分析")
|
||||
@ApiModelProperty("异常分析")
|
||||
private String abnormalAnalysis;
|
||||
|
||||
// 健康系统分值
|
||||
@Excel(name = "健康系统分值")
|
||||
@ApiModelProperty("健康系统分值")
|
||||
private String systemScore;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 预约信息对象 reservation
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-05
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("预约信息实体")
|
||||
@TableName("reservation")
|
||||
public class MemberReservation extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 主键ID
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
// 预约人姓名
|
||||
@Excel(name = "预约人姓名")
|
||||
@ApiModelProperty("预约人姓名")
|
||||
private String name;
|
||||
|
||||
// 预约人手机号
|
||||
@Excel(name = "预约人手机号")
|
||||
@ApiModelProperty("预约人手机号")
|
||||
private String mobile;
|
||||
|
||||
// 预约时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预约时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("预约时间")
|
||||
private LocalDateTime time;
|
||||
|
||||
// 探访人
|
||||
@Excel(name = "探访人")
|
||||
@ApiModelProperty("探访人")
|
||||
private String visitor;
|
||||
|
||||
// 预约类型,0:参观预约,1:探访预约
|
||||
@Excel(name = "预约类型,0:参观预约,1:探访预约")
|
||||
@ApiModelProperty("预约类型,0:参观预约,1:探访预约")
|
||||
private Integer type;
|
||||
|
||||
// 预约状态,0:待报道,1:已完成,2:取消,3:过期
|
||||
@Excel(name = "预约状态,0:待报道,1:已完成,2:取消,3:过期")
|
||||
@ApiModelProperty("预约状态,0:待报道,1:已完成,2:取消,3:过期")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 护理员老人关联对象 nursing_elder
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
@Data
|
||||
public class NursingElder extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 护理员id */
|
||||
@Excel(name = "护理员id")
|
||||
private Long nursingId;
|
||||
|
||||
/** 老人id */
|
||||
@Excel(name = "老人id")
|
||||
private Long elderId;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 护理等级对象 nursing_level
|
||||
*
|
||||
* @author alexis
|
||||
* @date 2024-12-30
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("护理等级实体")
|
||||
public class NursingLevel extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 主键ID
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
// 等级名称
|
||||
@Excel(name = "等级名称")
|
||||
@ApiModelProperty("等级名称")
|
||||
private String name;
|
||||
|
||||
// 护理计划ID
|
||||
@Excel(name = "护理计划ID")
|
||||
@ApiModelProperty("护理计划ID")
|
||||
private Long lplanId;
|
||||
|
||||
// 护理费用
|
||||
@Excel(name = "护理费用")
|
||||
@ApiModelProperty("护理费用")
|
||||
private BigDecimal fee;
|
||||
|
||||
// 状态(0:禁用,1:启用)
|
||||
@Excel(name = "状态", readConverterExp = "0=:禁用,1:启用")
|
||||
@ApiModelProperty("状态(0:禁用,1:启用)")
|
||||
private Integer status;
|
||||
|
||||
// 等级说明
|
||||
@Excel(name = "等级说明")
|
||||
@ApiModelProperty("等级说明")
|
||||
private String description;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 护理计划对象 nursing_plan
|
||||
*
|
||||
* @author alexis
|
||||
* @date 2024-12-30
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("护理计划实体")
|
||||
public class NursingPlan extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 编号
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
// 排序号
|
||||
@Excel(name = "排序号")
|
||||
@ApiModelProperty("排序号")
|
||||
private Integer sortNo;
|
||||
|
||||
// 名称
|
||||
@Excel(name = "名称")
|
||||
@ApiModelProperty("名称")
|
||||
private String planName;
|
||||
|
||||
// 状态 0禁用 1启用
|
||||
@Excel(name = "状态 0禁用 1启用")
|
||||
@ApiModelProperty("状态 0禁用 1启用")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 护理项目对象 nursing_project
|
||||
*
|
||||
* @author alexis
|
||||
* @date 2024-12-30
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("护理项目实体")
|
||||
public class NursingProject extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 编号
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
// 名称
|
||||
@Excel(name = "名称")
|
||||
@ApiModelProperty("名称")
|
||||
private String name;
|
||||
|
||||
// 排序号
|
||||
@Excel(name = "排序号")
|
||||
@ApiModelProperty("排序号")
|
||||
private Integer orderNo;
|
||||
|
||||
// 单位
|
||||
@Excel(name = "单位")
|
||||
@ApiModelProperty("单位")
|
||||
private String unit;
|
||||
|
||||
// 价格
|
||||
@Excel(name = "价格")
|
||||
@ApiModelProperty("价格")
|
||||
private BigDecimal price;
|
||||
|
||||
// 图片
|
||||
@Excel(name = "图片")
|
||||
@ApiModelProperty("图片")
|
||||
private String image;
|
||||
|
||||
// 护理要求
|
||||
@Excel(name = "护理要求")
|
||||
@ApiModelProperty("护理要求")
|
||||
private String nursingRequirement;
|
||||
|
||||
// 状态(0:禁用,1:启用)
|
||||
@Excel(name = "状态", readConverterExp = "0=:禁用,1:启用")
|
||||
@ApiModelProperty("状态(0:禁用,1:启用)")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 护理计划和项目关联对象 nursing_project_plan
|
||||
*
|
||||
* @author alexis
|
||||
* @date 2024-12-31
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("护理计划和项目关联实体")
|
||||
public class NursingProjectPlan extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 主键id
|
||||
@ApiModelProperty("主键id")
|
||||
private Long id;
|
||||
|
||||
// 计划id
|
||||
@Excel(name = "计划id")
|
||||
@ApiModelProperty("计划id")
|
||||
private Long planId;
|
||||
|
||||
// 项目id
|
||||
@Excel(name = "项目id")
|
||||
@ApiModelProperty("项目id")
|
||||
private Long projectId;
|
||||
|
||||
// 计划执行时间
|
||||
@Excel(name = "计划执行时间")
|
||||
@ApiModelProperty("计划执行时间")
|
||||
private String executeTime;
|
||||
|
||||
// 执行周期 0 天 1 周 2月
|
||||
@Excel(name = "执行周期 0 天 1 周 2月")
|
||||
@ApiModelProperty("执行周期 0 天 1 周 2月")
|
||||
private Integer executeCycle;
|
||||
|
||||
// 执行频次
|
||||
@Excel(name = "执行频次")
|
||||
@ApiModelProperty("执行频次")
|
||||
private Integer executeFrequency;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 护理任务对象 nursing_task
|
||||
*
|
||||
* @author zzyl
|
||||
* @date 2025-03-14
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("护理任务实体")
|
||||
public class NursingTask extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// id
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
// 护理员id
|
||||
@Excel(name = "护理员id")
|
||||
@ApiModelProperty("护理员id")
|
||||
private String nursingId;
|
||||
|
||||
// 项目id
|
||||
@Excel(name = "项目id")
|
||||
@ApiModelProperty("项目id")
|
||||
private Integer projectId;
|
||||
|
||||
// 护理项目名称
|
||||
@Excel(name = "护理项目名称")
|
||||
@ApiModelProperty("护理项目名称")
|
||||
private String projectName;
|
||||
|
||||
// 老人id
|
||||
@Excel(name = "老人id")
|
||||
@ApiModelProperty("老人id")
|
||||
private Long elderId;
|
||||
|
||||
// 老人姓名
|
||||
@Excel(name = "老人姓名")
|
||||
@ApiModelProperty("老人姓名")
|
||||
private String elderName;
|
||||
|
||||
// 床位编号
|
||||
@Excel(name = "床位编号")
|
||||
@ApiModelProperty("床位编号")
|
||||
private String bedNumber;
|
||||
|
||||
// 预计服务时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计服务时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("预计服务时间")
|
||||
private LocalDateTime estimatedServerTime;
|
||||
|
||||
// 实际服务时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "实际服务时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("实际服务时间")
|
||||
private LocalDateTime realServerTime;
|
||||
|
||||
// 执行记录
|
||||
@Excel(name = "执行记录")
|
||||
@ApiModelProperty("执行记录")
|
||||
private String mark;
|
||||
|
||||
// 取消原因
|
||||
@Excel(name = "取消原因")
|
||||
@ApiModelProperty("取消原因")
|
||||
private String cancelReason;
|
||||
|
||||
// 状态 1待执行 2已执行 3已关闭
|
||||
@Excel(name = "状态 1待执行 2已执行 3已关闭 ")
|
||||
@ApiModelProperty("状态 1待执行 2已执行 3已关闭 ")
|
||||
private Integer status;
|
||||
|
||||
// 执行图片
|
||||
@Excel(name = "执行图片")
|
||||
@ApiModelProperty("执行图片")
|
||||
private String taskImage;
|
||||
|
||||
// 任务类型 1护理计划外 2护理计划内
|
||||
@Excel(name = "任务类型 1护理计划外 2护理计划内")
|
||||
@ApiModelProperty("任务类型 1护理计划外 2护理计划内")
|
||||
private String taskType;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Chihiro
|
||||
* @date 2025-03-14 12:06
|
||||
* @version v1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PropertyStatusInfo implements Serializable {
|
||||
private String dataType;
|
||||
private String identifier;
|
||||
private String name;
|
||||
private Long time;
|
||||
private String unit;
|
||||
private double value;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 房间对象 room
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-26
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("房间实体对象")
|
||||
public class Room extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 房间编号 */
|
||||
@ApiModelProperty(value = "房间编号")
|
||||
@Excel(name = "房间编号")
|
||||
private String code;
|
||||
|
||||
/** 排序号 */
|
||||
@ApiModelProperty(value = "排序号")
|
||||
@Excel(name = "排序号")
|
||||
private Long sort;
|
||||
|
||||
/** 房间类型名称 */
|
||||
@ApiModelProperty(value = "房间类型名称")
|
||||
@Excel(name = "房间类型名称")
|
||||
private String typeName;
|
||||
|
||||
/** 楼层id */
|
||||
@ApiModelProperty(value = "楼层id")
|
||||
@Excel(name = "楼层id")
|
||||
private Long floorId;
|
||||
|
||||
/** 是否删除 */
|
||||
@ApiModelProperty(value = "是否删除")
|
||||
@Excel(name = "是否删除")
|
||||
private Integer isDeleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.zzyl.nursing.domain;
|
||||
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 房型对象 room_type
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-26
|
||||
*/
|
||||
@Data
|
||||
public class RoomType extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 房型名称 */
|
||||
@Excel(name = "房型名称")
|
||||
private String name;
|
||||
|
||||
/** 床位数量 */
|
||||
@Excel(name = "床位数量")
|
||||
private Long bedCount;
|
||||
|
||||
/** 床位费用 */
|
||||
@Excel(name = "床位费用")
|
||||
private BigDecimal price;
|
||||
|
||||
/** 介绍 */
|
||||
@Excel(name = "介绍")
|
||||
private String introduction;
|
||||
|
||||
/** 照片 */
|
||||
@Excel(name = "照片")
|
||||
private String photo;
|
||||
|
||||
/** 状态,0:禁用,1:启用 */
|
||||
@Excel(name = "状态,0:禁用,1:启用")
|
||||
private Long status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 分页查询警告数据dto
|
||||
*
|
||||
* @author Zhy
|
||||
* @version 1.0
|
||||
* @date 2025-03-12 17:35
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "分页查询警告数据dto")
|
||||
public class AlertDataPageQueryDto {
|
||||
|
||||
@ApiModelProperty(value = "页码")
|
||||
private Integer pageNum;
|
||||
|
||||
@ApiModelProperty(value = "每页条数")
|
||||
private Integer pageSize;
|
||||
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
@ApiModelProperty(value = "开始报警时间")
|
||||
private Date startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束报警时间")
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 申请入住请求DTO
|
||||
*
|
||||
* @Author: Zhy
|
||||
* @Date: 2025-02-25
|
||||
**/
|
||||
@ApiModel(description = "申请入住请求模型")
|
||||
@Data
|
||||
public class CheckInApplyDto {
|
||||
|
||||
/**
|
||||
* 老人信息
|
||||
*/
|
||||
@ApiModelProperty(value = "老人信息")
|
||||
private CheckInElderDto checkInElderDto;
|
||||
|
||||
/**
|
||||
* 家属信息
|
||||
*/
|
||||
@ApiModelProperty(value = "家属信息")
|
||||
private List<ElderFamilyDto> elderFamilyDtoList;
|
||||
|
||||
/**
|
||||
* 入住配置
|
||||
*/
|
||||
@ApiModelProperty(value = "入住配置")
|
||||
private CheckInConfigDto checkInConfigDto;
|
||||
|
||||
/**
|
||||
* 签约办理
|
||||
*/
|
||||
@ApiModelProperty(value = "签约办理")
|
||||
private CheckInContractDto checkInContractDto;
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 入住配置信息
|
||||
*
|
||||
* @Author: Zhy
|
||||
* @Date: 2025-02-25
|
||||
*/
|
||||
@ApiModel(description = "入住配置信息")
|
||||
@Data
|
||||
public class CheckInConfigDto {
|
||||
|
||||
@ApiModelProperty(value = "入住开始时间,格式:yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startDate;
|
||||
|
||||
@ApiModelProperty(value = "入住结束时间,格式:yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endDate;
|
||||
|
||||
@ApiModelProperty(value = "费用开始时间,格式:yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime feeStartDate;
|
||||
|
||||
@ApiModelProperty(value = "费用结束时间,格式:yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime feeEndDate;
|
||||
|
||||
@ApiModelProperty(value = "护理等级ID")
|
||||
private Long nursingLevelId;
|
||||
|
||||
@ApiModelProperty(value = "护理等级名称")
|
||||
private String nursingLevelName;
|
||||
|
||||
@ApiModelProperty(value = "床位Id")
|
||||
private Long bedId;
|
||||
|
||||
@ApiModelProperty(value = "押金金额")
|
||||
private BigDecimal deposit;
|
||||
|
||||
@ApiModelProperty(value = "护理费用")
|
||||
private BigDecimal nursingFee;
|
||||
|
||||
@ApiModelProperty(value = "床位费用")
|
||||
private BigDecimal bedFee;
|
||||
|
||||
@ApiModelProperty(value = "其他费用")
|
||||
private BigDecimal otherFees;
|
||||
|
||||
@ApiModelProperty(value = "医保支付")
|
||||
private BigDecimal insurancePayment;
|
||||
|
||||
@ApiModelProperty(value = "政府补贴")
|
||||
private BigDecimal governmentSubsidy;
|
||||
|
||||
@ApiModelProperty("房间ID")
|
||||
private Long roomId;
|
||||
|
||||
@ApiModelProperty(value = "楼层id")
|
||||
private Long floorId;
|
||||
|
||||
@ApiModelProperty(value = "楼层名称")
|
||||
private String floorName;
|
||||
|
||||
@ApiModelProperty(value = "房间编号")
|
||||
private String code;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 合同信息
|
||||
*
|
||||
* @Author: Zhy
|
||||
* @Date: 2025-02-25
|
||||
*/
|
||||
@ApiModel(description = "合同信息")
|
||||
@Data
|
||||
public class CheckInContractDto {
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@ApiModelProperty(value = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 签约时间
|
||||
*/
|
||||
@ApiModelProperty(value = "签约时间,格式:yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime signDate;
|
||||
|
||||
/**
|
||||
* 丙方名称
|
||||
*/
|
||||
@ApiModelProperty(value = "丙方名称")
|
||||
private String thirdPartyName;
|
||||
|
||||
/**
|
||||
* 丙方手机号
|
||||
*/
|
||||
@ApiModelProperty(value = "丙方手机号")
|
||||
private String thirdPartyPhone;
|
||||
|
||||
/**
|
||||
* 合同pdf文件地址
|
||||
*/
|
||||
@ApiModelProperty(value = "合同pdf文件地址")
|
||||
private String agreementPath;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 老人入住请求模型
|
||||
*
|
||||
* @Author: Zhy
|
||||
* @Date: 2025-02-25
|
||||
**/
|
||||
@ApiModel(description = "老人入住请求模型")
|
||||
@Data
|
||||
public class CheckInElderDto {
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String idCardNo;
|
||||
|
||||
/**
|
||||
* 出生日期,格式:yyyy-MM-dd
|
||||
*/
|
||||
@ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd")
|
||||
private String birthday;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
@ApiModelProperty(value = "年龄")
|
||||
private Integer age;
|
||||
|
||||
/**
|
||||
* 性别,0:男,1:女,2:未知
|
||||
*/
|
||||
@ApiModelProperty(value = "性别,0:男,1:女,2:未知")
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@ApiModelProperty(value = "手机号")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 家庭住址
|
||||
*/
|
||||
@ApiModelProperty(value = "家庭住址")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 一寸照片
|
||||
*/
|
||||
@ApiModelProperty(value = "一寸照片")
|
||||
private String image;
|
||||
|
||||
/**
|
||||
* 身份证国徽面
|
||||
*/
|
||||
@ApiModelProperty(value = "身份证国徽面")
|
||||
private String idCardNationalEmblemImg;
|
||||
|
||||
/**
|
||||
* 身份证人像面
|
||||
*/
|
||||
@ApiModelProperty(value = "身份证人像面")
|
||||
private String idCardPortraitImg;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 设备指定属性的数据分页查询
|
||||
*
|
||||
* @author Zhy
|
||||
* @version 1.0
|
||||
* @date 2025-03-08 16:26
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("设备指定属性的数据分页查询")
|
||||
public class DeviceDataPageReqDto {
|
||||
|
||||
@ApiModelProperty(value = "设备名称", required = false)
|
||||
private String deviceName;
|
||||
|
||||
@ApiModelProperty(value = "功能ID", required = false)
|
||||
private String functionId;
|
||||
|
||||
@ApiModelProperty(value = "开始时间", required = false)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间", required = false)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@ApiModelProperty(value = "页码", required = true, example = "1")
|
||||
private Integer pageNum;
|
||||
|
||||
@ApiModelProperty(value = "页面大小", required = true, example = "10")
|
||||
private Integer pageSize;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 设备注册参数
|
||||
*
|
||||
* @author Zhy
|
||||
* @version 1.0
|
||||
* @date 2025-03-06 11:16
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "设备注册参数")
|
||||
public class DeviceDto {
|
||||
|
||||
private Long id;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 设备标识码,通常使用IMEI、MAC地址或Serial No作为node_id
|
||||
*/
|
||||
@ApiModelProperty(value = "设备标识码", required = true)
|
||||
private String nodeId;
|
||||
|
||||
@ApiModelProperty(value = "设备id")
|
||||
public String iotId;
|
||||
|
||||
@ApiModelProperty(value = "产品的id")
|
||||
public String productKey;
|
||||
|
||||
@ApiModelProperty(value = "产品名称")
|
||||
private String productName;
|
||||
|
||||
@ApiModelProperty(value = "位置名称回显字段")
|
||||
private String deviceDescription;
|
||||
|
||||
@ApiModelProperty(value = "位置类型 0 老人 1位置")
|
||||
Integer locationType;
|
||||
|
||||
@ApiModelProperty(value = "绑定位置")
|
||||
Long bindingLocation;
|
||||
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
String deviceName;
|
||||
|
||||
@ApiModelProperty(value = "物理位置类型 0楼层 1房间 2床位")
|
||||
Integer physicalLocationType;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import com.zzyl.common.core.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Chihiro
|
||||
* @date 2025-03-14 09:46
|
||||
* @version v1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ElderDto extends BaseEntity implements Serializable {
|
||||
private Long id;
|
||||
private String idCard;
|
||||
private String name;
|
||||
private String remark;
|
||||
private Long familyMemberId;
|
||||
private Long elderId;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 老人家属信息
|
||||
*
|
||||
* @Author: Zhy
|
||||
* @Date: 2025-02-25
|
||||
**/
|
||||
@ApiModel(description = "老人家属信息")
|
||||
@Data
|
||||
public class ElderFamilyDto {
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
|
||||
/**
|
||||
* 联系方式
|
||||
*/
|
||||
@ApiModelProperty(value = "联系方式")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 亲属关系
|
||||
*/
|
||||
@ApiModelProperty(value = "亲属关系")
|
||||
private String kinship;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 分页查询老人信息
|
||||
*
|
||||
* @author Zhy
|
||||
* @version 1.0
|
||||
* @date 2025-03-06 10:53
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "分页查询老人信息")
|
||||
public class ElderPageQuery {
|
||||
|
||||
/** 状态 0-禁用 1-启用 */
|
||||
@ApiModelProperty(value = "状态 0-禁用 1-启用")
|
||||
private Integer status;
|
||||
|
||||
/** 页码 */
|
||||
@ApiModelProperty(value = "页码")
|
||||
private Integer pageNum;
|
||||
|
||||
/** 每页条数 */
|
||||
@ApiModelProperty(value = "每页条数")
|
||||
private Integer pageSize;
|
||||
|
||||
/** 姓名 */
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
/** 身份证号 */
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String idCardNo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 处理设备报警数据DTO
|
||||
*
|
||||
* @author Zhy
|
||||
* @version 1.0
|
||||
* @date 2025-03-12 18:02
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "处理设备报警数据DTO")
|
||||
public class HandleAlertDataDto {
|
||||
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "处理结果")
|
||||
private String processingResult;
|
||||
|
||||
@ApiModelProperty(value = "处理时间")
|
||||
private LocalDateTime processingTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 健康评估
|
||||
*
|
||||
* @Author: Zhy
|
||||
* @Date: 2025-02-28 16:39
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("健康评估")
|
||||
public class HealthAssessmentDto {
|
||||
|
||||
/**
|
||||
* 老人姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "老人姓名", required = true)
|
||||
private String elderName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@ApiModelProperty(value = "身份证号", required = true)
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 体检机构
|
||||
*/
|
||||
@ApiModelProperty(value = "体检机构", required = true)
|
||||
private String physicalExamInstitution;
|
||||
|
||||
/**
|
||||
* 体检报告URL链接
|
||||
*/
|
||||
@ApiModelProperty(value = "体检报告URL链接", required = true)
|
||||
private String physicalReportUrl;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel("护理员与老人关系Dto")
|
||||
public class NursingElderDto {
|
||||
|
||||
@ApiModelProperty(value = "老人id")
|
||||
private Long elderId;
|
||||
|
||||
@ApiModelProperty(value = "护理员id列表")
|
||||
private List<Long> nursingIds;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import com.zzyl.nursing.domain.NursingProjectPlan;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class NursingPlanDto {
|
||||
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@ApiModelProperty(value = "排序号")
|
||||
private Integer sortNo;
|
||||
|
||||
/**
|
||||
* 计划名称
|
||||
*/
|
||||
@ApiModelProperty(value = "计划名称")
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 状态(0:禁用,1:启用)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态(0:禁用,1:启用)")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 护理计划关联项目列表
|
||||
*/
|
||||
List<NursingProjectPlan> projectPlans;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author shd
|
||||
* @version V1.0
|
||||
* @date 2025-03-14 15:16
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("护理任务取消原因")
|
||||
public class NursingTaskCancelDto {
|
||||
private String reason;
|
||||
private Long taskId;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author shd
|
||||
* @version V1.0
|
||||
* @date 2025-03-14 15:28
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class NursingTaskDoDto {
|
||||
private String estimatedServerTime;
|
||||
private String mark;
|
||||
private Long taskId;
|
||||
private String taskImage;
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.zzyl.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author shd
|
||||
* @version V1.0
|
||||
* @date 2025-03-14 14:31
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("护理任务Dto")
|
||||
public class NursingTaskDto {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 护理员id
|
||||
@Excel(name = "护理员id")
|
||||
@ApiModelProperty("护理员id")
|
||||
private String nurseId;
|
||||
|
||||
// 项目id
|
||||
@Excel(name = "项目id")
|
||||
@ApiModelProperty("项目id")
|
||||
private Integer projectId;
|
||||
|
||||
// 老人姓名
|
||||
@Excel(name = "老人姓名")
|
||||
@ApiModelProperty("老人姓名")
|
||||
private String elderName;
|
||||
|
||||
// 状态 1待执行 2已执行 3已关闭
|
||||
@Excel(name = "状态 1待执行 2已执行 3已关闭 ")
|
||||
@ApiModelProperty("状态 1待执行 2已执行 3已关闭 ")
|
||||
private Integer status;
|
||||
|
||||
/** 页码 */
|
||||
@ApiModelProperty(value = "页码")
|
||||
private Integer pageNum;
|
||||
|
||||
/** 每页条数 */
|
||||
@ApiModelProperty(value = "每页条数")
|
||||
private Integer pageSize;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private LocalDateTime startTime;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author shd
|
||||
* @version V1.0
|
||||
* @date 2025-03-14 15:38
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class NursingTaskUpdateDto {
|
||||
private String estimatedServerTime;
|
||||
private Long taskId;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Chihiro
|
||||
* @date 2025-03-14 11:56
|
||||
* @version v1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class QueryDevicePropertyDto implements Serializable {
|
||||
private String deviceName;
|
||||
private String productKey;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.zzyl.nursing.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* C端用户登录
|
||||
*
|
||||
* @author Zhy
|
||||
* @version 1.0
|
||||
* @date 2025-03-03 16:14
|
||||
*/
|
||||
@Data
|
||||
public class UserLoginRequestDto {
|
||||
|
||||
@ApiModelProperty("昵称")
|
||||
private String nickName;
|
||||
|
||||
@ApiModelProperty("登录临时凭证")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("手机号临时凭证")
|
||||
private String phoneCode;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.zzyl.nursing.job;
|
||||
|
||||
import com.zzyl.nursing.service.IAlertRuleService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 设备数据告警过滤定时任务
|
||||
*
|
||||
* @author Zhy
|
||||
* @version 1.0
|
||||
* @date 2025-03-11 15:56
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class AlertJob {
|
||||
|
||||
private final IAlertRuleService alertRuleService;
|
||||
|
||||
public void deviceDataAlertFilter() {
|
||||
alertRuleService.alertFilter();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,270 @@
|
||||
package com.zzyl.nursing.job;
|
||||
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.zzyl.framework.config.properties.HuaWeiIotConfigProperties;
|
||||
import com.zzyl.nursing.service.IDeviceDataService;
|
||||
import com.zzyl.nursing.vo.IotMsgNotifyData;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.qpid.jms.*;
|
||||
import org.apache.qpid.jms.message.JmsInboundMessageDispatch;
|
||||
import org.apache.qpid.jms.transports.TransportOptions;
|
||||
import org.apache.qpid.jms.transports.TransportSupport;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.jms.*;
|
||||
import java.net.InetAddress;
|
||||
import java.net.URI;
|
||||
import java.net.UnknownHostException;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author itcast
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class AmqpClient implements ApplicationRunner {
|
||||
|
||||
@Autowired
|
||||
private HuaWeiIotConfigProperties huaWeiIotConfigProperties;
|
||||
|
||||
@Autowired
|
||||
private IDeviceDataService deviceDataService;
|
||||
|
||||
// 业务处理异步线程池,线程池参数可以根据您的业务特点调整,或者您也可以用其他异步方式处理接收到的消息。
|
||||
@Autowired
|
||||
@Qualifier("threadPoolTaskExecutor")
|
||||
private ThreadPoolTaskExecutor threadPoolTaskExecutor;
|
||||
|
||||
// 控制台服务端订阅中消费组状态页客户端ID一栏将显示clientId参数。
|
||||
// 建议使用机器UUID、MAC地址、IP等唯一标识等作为clientId。便于您区分识别不同的客户端。
|
||||
private static String clientId;
|
||||
|
||||
static {
|
||||
try {
|
||||
clientId = InetAddress.getLocalHost().getHostAddress();
|
||||
} catch (UnknownHostException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
start();
|
||||
}
|
||||
|
||||
public void start() throws Exception {
|
||||
// 参数说明,请参见AMQP客户端接入说明文档。
|
||||
for (int i = 0; i < huaWeiIotConfigProperties.getConnectionCount(); i++) {
|
||||
// 创建amqp连接
|
||||
Connection connection = getConnection();
|
||||
|
||||
// 加入监听者
|
||||
((JmsConnection) connection).addConnectionListener(myJmsConnectionListener);
|
||||
// 创建会话。
|
||||
// Session.CLIENT_ACKNOWLEDGE: 收到消息后,需要手动调用message.acknowledge()。
|
||||
// Session.AUTO_ACKNOWLEDGE: SDK自动ACK(推荐)。
|
||||
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||
connection.start();
|
||||
|
||||
// 创建Receiver连接。
|
||||
MessageConsumer consumer = newConsumer(session, connection, huaWeiIotConfigProperties.getQueueName());
|
||||
consumer.setMessageListener(messageListener);
|
||||
}
|
||||
|
||||
log.info("amqp is started successfully, and will exit after server shutdown ");
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建amqp连接
|
||||
*
|
||||
* @return amqp连接
|
||||
*/
|
||||
private Connection getConnection() throws Exception {
|
||||
String connectionUrl = generateConnectUrl();
|
||||
JmsConnectionFactory cf = new JmsConnectionFactory(connectionUrl);
|
||||
// 信任服务端
|
||||
TransportOptions to = new TransportOptions();
|
||||
to.setTrustAll(true);
|
||||
cf.setSslContext(TransportSupport.createJdkSslContext(to));
|
||||
String userName = "accessKey=" + huaWeiIotConfigProperties.getAccessKey();
|
||||
cf.setExtension(JmsConnectionExtensions.USERNAME_OVERRIDE.toString(), (connection, uri) -> {
|
||||
// IoTDA的userName组成格式如下:“accessKey=${accessKey}|timestamp=${timestamp}”
|
||||
String newUserName = userName;
|
||||
if (connection instanceof JmsConnection) {
|
||||
newUserName = ((JmsConnection) connection).getUsername();
|
||||
}
|
||||
return newUserName + "|timestamp=" + System.currentTimeMillis();
|
||||
});
|
||||
|
||||
// 创建连接。
|
||||
return cf.createConnection(userName, huaWeiIotConfigProperties.getAccessCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成amqp连接地址
|
||||
*
|
||||
* @return amqp连接地址
|
||||
*/
|
||||
public String generateConnectUrl() {
|
||||
String uri = MessageFormat.format("{0}://{1}:{2}",
|
||||
(huaWeiIotConfigProperties.isUseSsl() ? "amqps" : "amqp"),
|
||||
huaWeiIotConfigProperties.getHost(),
|
||||
String.valueOf(huaWeiIotConfigProperties.getPort())
|
||||
);
|
||||
Map<String, String> uriOptions = new HashMap<>();
|
||||
uriOptions.put("amqp.vhost", huaWeiIotConfigProperties.getVhost());
|
||||
uriOptions.put("amqp.idleTimeout", String.valueOf(huaWeiIotConfigProperties.getIdleTimeout()));
|
||||
uriOptions.put("amqp.saslMechanisms", huaWeiIotConfigProperties.getSaslMechanisms());
|
||||
|
||||
Map<String, String> jmsOptions = new HashMap<>();
|
||||
jmsOptions.put("jms.prefetchPolicy.queuePrefetch", String.valueOf(huaWeiIotConfigProperties.getQueuePrefetch()));
|
||||
if (CharSequenceUtil.isNotBlank(clientId)) {
|
||||
jmsOptions.put("jms.clientID", clientId);
|
||||
} else {
|
||||
jmsOptions.put("jms.clientID", UUID.randomUUID().toString());
|
||||
}
|
||||
jmsOptions.put("failover.reconnectDelay", String.valueOf(huaWeiIotConfigProperties.getReconnectDelay()));
|
||||
jmsOptions.put("failover.maxReconnectDelay", String.valueOf(huaWeiIotConfigProperties.getMaxReconnectDelay()));
|
||||
if (huaWeiIotConfigProperties.getMaxReconnectAttempts() > 0) {
|
||||
jmsOptions.put("failover.maxReconnectAttempts",
|
||||
String.valueOf(huaWeiIotConfigProperties.getMaxReconnectAttempts())
|
||||
);
|
||||
}
|
||||
if (huaWeiIotConfigProperties.getExtendedOptions() != null) {
|
||||
for (Map.Entry<String, String> option : huaWeiIotConfigProperties.getExtendedOptions().entrySet()) {
|
||||
if (option.getKey().startsWith("amqp.") || option.getKey().startsWith("transport.")) {
|
||||
uriOptions.put(option.getKey(), option.getValue());
|
||||
} else {
|
||||
jmsOptions.put(option.getKey(), option.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
return uriOptions.entrySet().stream().map(option -> MessageFormat.format("{0}={1}",
|
||||
option.getKey(),
|
||||
option.getValue()
|
||||
)).collect(Collectors.joining("&", "failover:(" + uri + "?", ")")) +
|
||||
jmsOptions.entrySet()
|
||||
.stream()
|
||||
.map(option -> MessageFormat.format("{0}={1}", option.getKey(), option.getValue()))
|
||||
.collect(Collectors.joining("&", "?", ""));
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建消费者
|
||||
*
|
||||
* @param session session
|
||||
* @param connection amqp连接
|
||||
* @param queueName 队列名称
|
||||
* @return 消费者
|
||||
*/
|
||||
public MessageConsumer newConsumer(Session session, Connection connection, String queueName) throws Exception {
|
||||
if (!(connection instanceof JmsConnection) || ((JmsConnection) connection).isClosed()) {
|
||||
throw new Exception("create consumer failed,the connection is disconnected.");
|
||||
}
|
||||
|
||||
return session.createConsumer(new JmsQueue(queueName));
|
||||
}
|
||||
|
||||
private final MessageListener messageListener = message -> {
|
||||
try {
|
||||
// 异步处理收到的消息,确保onMessage函数里没有耗时逻辑
|
||||
threadPoolTaskExecutor.submit(() -> processMessage(message));
|
||||
} catch (Exception e) {
|
||||
log.error("submit task occurs exception ", e);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 在这里处理您收到消息后的具体业务逻辑。
|
||||
*/
|
||||
private void processMessage(Message message) {
|
||||
String contentStr;
|
||||
try {
|
||||
contentStr = message.getBody(String.class);
|
||||
String topic = message.getStringProperty("topic");
|
||||
String messageId = message.getStringProperty("messageId");
|
||||
log.warn("receive message,\n topic = {},\n messageId = {},\n content = {}", topic, messageId, contentStr);
|
||||
|
||||
// 从消息内容中解析出业务数据
|
||||
JSONObject jsonObject = JSONUtil.parseObj(contentStr);
|
||||
JSONObject notifyDataJson = jsonObject.getJSONObject("notify_data");
|
||||
if (ObjUtil.isEmpty(notifyDataJson)) {
|
||||
return;
|
||||
}
|
||||
// 类型转换
|
||||
IotMsgNotifyData notifyData = JSONUtil.toBean(notifyDataJson, IotMsgNotifyData.class);
|
||||
if (ObjUtil.isEmpty(notifyData) ||
|
||||
ObjUtil.isEmpty(notifyData.getHeader()) ||
|
||||
ObjUtil.isEmpty(notifyData.getBody())) {
|
||||
return;
|
||||
}
|
||||
// 存入数据库
|
||||
deviceDataService.batchInsertDeviceData(notifyData);
|
||||
} catch (JMSException e) {
|
||||
throw new RuntimeException("服务器错误");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private final JmsConnectionListener myJmsConnectionListener = new JmsConnectionListener() {
|
||||
/**
|
||||
* 连接成功建立。
|
||||
*/
|
||||
@Override
|
||||
public void onConnectionEstablished(URI remoteURI) {
|
||||
log.info("onConnectionEstablished, remoteUri:{}", remoteURI);
|
||||
}
|
||||
|
||||
/**
|
||||
* 尝试过最大重试次数之后,最终连接失败。
|
||||
*/
|
||||
@Override
|
||||
public void onConnectionFailure(Throwable error) {
|
||||
log.error("onConnectionFailure, {}", error.getMessage());
|
||||
}
|
||||
|
||||
/**
|
||||
* 连接中断。
|
||||
*/
|
||||
@Override
|
||||
public void onConnectionInterrupted(URI remoteURI) {
|
||||
log.info("onConnectionInterrupted, remoteUri:{}", remoteURI);
|
||||
}
|
||||
|
||||
/**
|
||||
* 连接中断后又自动重连上。
|
||||
*/
|
||||
@Override
|
||||
public void onConnectionRestored(URI remoteURI) {
|
||||
log.info("onConnectionRestored, remoteUri:{}", remoteURI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInboundMessage(JmsInboundMessageDispatch envelope) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSessionClosed(Session session, Throwable cause) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConsumerClosed(MessageConsumer consumer, Throwable cause) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProducerClosed(MessageProducer producer, Throwable cause) {
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.zzyl.nursing.job;
|
||||
|
||||
import com.zzyl.nursing.service.IContractService;
|
||||
import com.zzyl.nursing.service.IMemberReservationService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 创建定时任务,更新合同状态
|
||||
*
|
||||
* @Author: Zhy
|
||||
* @Date: 2025-02-27 19:16
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Component("contractJob")
|
||||
@RequiredArgsConstructor
|
||||
public class ContractJob {
|
||||
|
||||
private final IContractService contractService;
|
||||
private final IMemberReservationService memberReservationService;
|
||||
|
||||
public void updateContractStatus() {
|
||||
contractService.updateContractStatus();
|
||||
}
|
||||
|
||||
public void updateReservationStatus() {
|
||||
memberReservationService.updateReservationStatus();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.zzyl.nursing.job;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.zzyl.nursing.domain.Elder;
|
||||
import com.zzyl.nursing.service.IElderService;
|
||||
import com.zzyl.nursing.service.INursingTaskService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class CreateNursingTaskJob {
|
||||
|
||||
@Autowired
|
||||
private IElderService elderService;
|
||||
|
||||
@Autowired
|
||||
private INursingTaskService nursingTaskService;
|
||||
|
||||
public void createNursingTaskJob() {
|
||||
//查询所有老人
|
||||
List<Elder> elderList = elderService.list(Wrappers.<Elder>lambdaQuery().eq(Elder::getStatus, 1));
|
||||
elderList.forEach(elder -> nursingTaskService.createMonthTask(elder) );
|
||||
log.info("创建月任务成功");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.zzyl.nursing.job;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*
|
||||
* @Author: Zhy
|
||||
* @Date: 2025-02-27 17:17
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Component("myJob")
|
||||
@Slf4j
|
||||
public class MyJob {
|
||||
|
||||
public void executeTask(){
|
||||
log.info("MyJob executeTask");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zzyl.nursing.dto.AlertDataPageQueryDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zzyl.nursing.domain.AlertData;
|
||||
|
||||
/**
|
||||
* 报警数据Mapper接口
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
@Mapper
|
||||
public interface AlertDataMapper extends BaseMapper<AlertData> {
|
||||
|
||||
/**
|
||||
* 查询报警数据
|
||||
*
|
||||
* @param id 报警数据主键
|
||||
* @return 报警数据
|
||||
*/
|
||||
public AlertData selectAlertDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询报警数据列表
|
||||
*
|
||||
* @param alertData 报警数据
|
||||
* @return 报警数据集合
|
||||
*/
|
||||
public List<AlertData> selectAlertDataList(AlertData alertData);
|
||||
|
||||
/**
|
||||
* 新增报警数据
|
||||
*
|
||||
* @param alertData 报警数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAlertData(AlertData alertData);
|
||||
|
||||
/**
|
||||
* 修改报警数据
|
||||
*
|
||||
* @param alertData 报警数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAlertData(AlertData alertData);
|
||||
|
||||
/**
|
||||
* 删除报警数据
|
||||
*
|
||||
* @param id 报警数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAlertDataById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除报警数据
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAlertDataByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询报警数据列表
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
List<AlertData> pageQueryAlertData(AlertDataPageQueryDto alertDataPageQueryDto);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.List;
|
||||
import com.zzyl.nursing.domain.AlertRule;
|
||||
|
||||
/**
|
||||
* 报警规则Mapper接口
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
@Mapper
|
||||
public interface AlertRuleMapper extends BaseMapper<AlertRule>
|
||||
{
|
||||
/**
|
||||
* 查询报警规则
|
||||
*
|
||||
* @param id 报警规则主键
|
||||
* @return 报警规则
|
||||
*/
|
||||
public AlertRule selectAlertRuleById(Long id);
|
||||
|
||||
/**
|
||||
* 查询报警规则列表
|
||||
*
|
||||
* @param alertRule 报警规则
|
||||
* @return 报警规则集合
|
||||
*/
|
||||
public List<AlertRule> selectAlertRuleList(AlertRule alertRule);
|
||||
|
||||
/**
|
||||
* 新增报警规则
|
||||
*
|
||||
* @param alertRule 报警规则
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAlertRule(AlertRule alertRule);
|
||||
|
||||
/**
|
||||
* 修改报警规则
|
||||
*
|
||||
* @param alertRule 报警规则
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAlertRule(AlertRule alertRule);
|
||||
|
||||
/**
|
||||
* 删除报警规则
|
||||
*
|
||||
* @param id 报警规则主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAlertRuleById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除报警规则
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAlertRuleByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zzyl.nursing.domain.Bed;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 床位Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-26
|
||||
*/
|
||||
@Mapper
|
||||
public interface BedMapper extends BaseMapper<Bed>
|
||||
{
|
||||
/**
|
||||
* 查询床位
|
||||
*
|
||||
* @param id 床位主键
|
||||
* @return 床位
|
||||
*/
|
||||
public Bed selectBedById(Long id);
|
||||
|
||||
/**
|
||||
* 查询床位列表
|
||||
*
|
||||
* @param bed 床位
|
||||
* @return 床位集合
|
||||
*/
|
||||
public List<Bed> selectBedList(Bed bed);
|
||||
|
||||
/**
|
||||
* 新增床位
|
||||
*
|
||||
* @param bed 床位
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBed(Bed bed);
|
||||
|
||||
/**
|
||||
* 修改床位
|
||||
*
|
||||
* @param bed 床位
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBed(Bed bed);
|
||||
|
||||
/**
|
||||
* 删除床位
|
||||
*
|
||||
* @param id 床位主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBedById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除床位
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBedByIds(Long[] ids);
|
||||
|
||||
String getRoomTypeNameByBedId(Long bedId);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.List;
|
||||
import com.zzyl.nursing.domain.CheckInConfig;
|
||||
|
||||
/**
|
||||
* 入住配置表Mapper接口
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Mapper
|
||||
public interface CheckInConfigMapper extends BaseMapper<CheckInConfig>
|
||||
{
|
||||
/**
|
||||
* 查询入住配置表
|
||||
*
|
||||
* @param id 入住配置表主键
|
||||
* @return 入住配置表
|
||||
*/
|
||||
public CheckInConfig selectCheckInConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询入住配置表列表
|
||||
*
|
||||
* @param checkInConfig 入住配置表
|
||||
* @return 入住配置表集合
|
||||
*/
|
||||
public List<CheckInConfig> selectCheckInConfigList(CheckInConfig checkInConfig);
|
||||
|
||||
/**
|
||||
* 新增入住配置表
|
||||
*
|
||||
* @param checkInConfig 入住配置表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCheckInConfig(CheckInConfig checkInConfig);
|
||||
|
||||
/**
|
||||
* 修改入住配置表
|
||||
*
|
||||
* @param checkInConfig 入住配置表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCheckInConfig(CheckInConfig checkInConfig);
|
||||
|
||||
/**
|
||||
* 删除入住配置表
|
||||
*
|
||||
* @param id 入住配置表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCheckInConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除入住配置表
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCheckInConfigByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zzyl.nursing.vo.CheckInConfigVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.List;
|
||||
import com.zzyl.nursing.domain.CheckIn;
|
||||
|
||||
/**
|
||||
* 入住表Mapper接口
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Mapper
|
||||
public interface CheckInMapper extends BaseMapper<CheckIn>
|
||||
{
|
||||
/**
|
||||
* 查询入住表
|
||||
*
|
||||
* @param id 入住表主键
|
||||
* @return 入住表
|
||||
*/
|
||||
public CheckIn selectCheckInById(Long id);
|
||||
|
||||
/**
|
||||
* 查询入住表列表
|
||||
*
|
||||
* @param checkIn 入住表
|
||||
* @return 入住表集合
|
||||
*/
|
||||
public List<CheckIn> selectCheckInList(CheckIn checkIn);
|
||||
|
||||
/**
|
||||
* 新增入住表
|
||||
*
|
||||
* @param checkIn 入住表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCheckIn(CheckIn checkIn);
|
||||
|
||||
/**
|
||||
* 修改入住表
|
||||
*
|
||||
* @param checkIn 入住表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCheckIn(CheckIn checkIn);
|
||||
|
||||
/**
|
||||
* 删除入住表
|
||||
*
|
||||
* @param id 入住表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCheckInById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除入住表
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCheckInByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询入住配置信息
|
||||
*
|
||||
* @return:
|
||||
* @param: id 入住ID
|
||||
*/
|
||||
CheckInConfigVo selectCheckInInfoById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.List;
|
||||
import com.zzyl.nursing.domain.Contract;
|
||||
|
||||
/**
|
||||
* 合同表Mapper接口
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Mapper
|
||||
public interface ContractMapper extends BaseMapper<Contract>
|
||||
{
|
||||
/**
|
||||
* 查询合同表
|
||||
*
|
||||
* @param id 合同表主键
|
||||
* @return 合同表
|
||||
*/
|
||||
public Contract selectContractById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询合同表列表
|
||||
*
|
||||
* @param contract 合同表
|
||||
* @return 合同表集合
|
||||
*/
|
||||
public List<Contract> selectContractList(Contract contract);
|
||||
|
||||
/**
|
||||
* 新增合同表
|
||||
*
|
||||
* @param contract 合同表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertContract(Contract contract);
|
||||
|
||||
/**
|
||||
* 修改合同表
|
||||
*
|
||||
* @param contract 合同表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateContract(Contract contract);
|
||||
|
||||
/**
|
||||
* 删除合同表
|
||||
*
|
||||
* @param id 合同表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteContractById(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除合同表
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteContractByIds(Integer[] ids);
|
||||
|
||||
/**
|
||||
* 根据入住ID查询合同信息
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
Contract selectContractByElderId(Long id);
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.MapKey;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.zzyl.nursing.domain.DeviceData;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 设备数据Mapper接口
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-08
|
||||
*/
|
||||
@Mapper
|
||||
public interface DeviceDataMapper extends BaseMapper<DeviceData>
|
||||
{
|
||||
/**
|
||||
* 查询设备数据
|
||||
*
|
||||
* @param id 设备数据主键
|
||||
* @return 设备数据
|
||||
*/
|
||||
public DeviceData selectDeviceDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询设备数据列表
|
||||
*
|
||||
* @param deviceData 设备数据
|
||||
* @return 设备数据集合
|
||||
*/
|
||||
public List<DeviceData> selectDeviceDataList(DeviceData deviceData);
|
||||
|
||||
/**
|
||||
* 新增设备数据
|
||||
*
|
||||
* @param deviceData 设备数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeviceData(DeviceData deviceData);
|
||||
|
||||
/**
|
||||
* 修改设备数据
|
||||
*
|
||||
* @param deviceData 设备数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceData(DeviceData deviceData);
|
||||
|
||||
/**
|
||||
* 删除设备数据
|
||||
*
|
||||
* @param id 设备数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceDataById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除设备数据
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceDataByIds(Long[] ids);
|
||||
|
||||
@MapKey("data_value")
|
||||
List<Map<String, Object>> queryDeviceDataListByDay(@Param("functionId") String functionId, @Param("iotId") String iotId, @Param("startTime") LocalDateTime startTimeDate, @Param("endTime") LocalDateTime endTimeDate);
|
||||
|
||||
@MapKey("data_value")
|
||||
List<Map<String, Object>> queryDeviceDataListByWeek(@Param("functionId") String functionId, @Param("iotId") String iotId, @Param("startTime") LocalDateTime startTimeDate, @Param("endTime") LocalDateTime endTimeDate);
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.List;
|
||||
import com.zzyl.nursing.domain.Device;
|
||||
|
||||
/**
|
||||
* 设备Mapper接口
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-06
|
||||
*/
|
||||
@Mapper
|
||||
public interface DeviceMapper extends BaseMapper<Device>
|
||||
{
|
||||
/**
|
||||
* 查询设备
|
||||
*
|
||||
* @param id 设备主键
|
||||
* @return 设备
|
||||
*/
|
||||
Device selectDeviceById(Long id);
|
||||
|
||||
/**
|
||||
* 查询设备列表
|
||||
*
|
||||
* @param device 设备
|
||||
* @return 设备集合
|
||||
*/
|
||||
List<Device> selectDeviceList(Device device);
|
||||
|
||||
/**
|
||||
* 新增设备
|
||||
*
|
||||
* @param device 设备
|
||||
* @return 结果
|
||||
*/
|
||||
int insertDevice(Device device);
|
||||
|
||||
/**
|
||||
* 修改设备
|
||||
*
|
||||
* @param device 设备
|
||||
* @return 结果
|
||||
*/
|
||||
int updateDevice(Device device);
|
||||
|
||||
/**
|
||||
* 删除设备
|
||||
*
|
||||
* @param id 设备主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteDeviceById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除设备
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteDeviceByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 通过设备 id 查询护理人
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
List<Long> selectNursingIdsByIotIdWithElder(String iotId);
|
||||
|
||||
/**
|
||||
* 通过设备 id 查询护理人
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
List<Long> selectNursingIdsByIotIdWithBed(String iotId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zzyl.nursing.vo.CheckInElderVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.List;
|
||||
import com.zzyl.nursing.domain.Elder;
|
||||
|
||||
/**
|
||||
* 老人Mapper接口
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Mapper
|
||||
public interface ElderMapper extends BaseMapper<Elder>
|
||||
{
|
||||
/**
|
||||
* 查询老人
|
||||
*
|
||||
* @param id 老人主键
|
||||
* @return 老人
|
||||
*/
|
||||
public Elder selectElderById(Long id);
|
||||
|
||||
/**
|
||||
* 查询老人列表
|
||||
*
|
||||
* @param elder 老人
|
||||
* @return 老人集合
|
||||
*/
|
||||
public List<Elder> selectElderList(Elder elder);
|
||||
|
||||
/**
|
||||
* 新增老人
|
||||
*
|
||||
* @param elder 老人
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertElder(Elder elder);
|
||||
|
||||
/**
|
||||
* 修改老人
|
||||
*
|
||||
* @param elder 老人
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateElder(Elder elder);
|
||||
|
||||
/**
|
||||
* 删除老人
|
||||
*
|
||||
* @param id 老人主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteElderById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除老人
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteElderByIds(Long[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 根据入住ID查询老人数据
|
||||
*
|
||||
* @return:
|
||||
* @param: id 入住ID
|
||||
*/
|
||||
CheckInElderVo selectByCheckId(Long id);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zzyl.nursing.domain.FamilyMember;
|
||||
import com.zzyl.nursing.dto.ElderDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 老人家属Mapper接口
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-03
|
||||
*/
|
||||
@Mapper
|
||||
public interface FamilyMemberElderMapper {
|
||||
|
||||
void insert(ElderDto elderDto);
|
||||
|
||||
List<ElderDto> getMyElder(Long id);
|
||||
|
||||
List<ElderDto> getMyElderPage(@Param("userId") Long userId, @Param("startNum") Integer startNum, @Param("pageSize") Integer pageSize);
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.List;
|
||||
import com.zzyl.nursing.domain.FamilyMember;
|
||||
|
||||
/**
|
||||
* 老人家属Mapper接口
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-03
|
||||
*/
|
||||
@Mapper
|
||||
public interface FamilyMemberMapper extends BaseMapper<FamilyMember>
|
||||
{
|
||||
/**
|
||||
* 查询老人家属
|
||||
* @param id 老人家属主键
|
||||
* @return 老人家属
|
||||
*/
|
||||
public FamilyMember selectFamilyMemberById(Long id);
|
||||
|
||||
/**
|
||||
* 查询老人家属列表
|
||||
* @param familyMember 老人家属
|
||||
* @return 老人家属集合
|
||||
*/
|
||||
public List<FamilyMember> selectFamilyMemberList(FamilyMember familyMember);
|
||||
|
||||
/**
|
||||
* 新增老人家属
|
||||
* @param familyMember 老人家属
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertFamilyMember(FamilyMember familyMember);
|
||||
|
||||
/**
|
||||
* 修改老人家属
|
||||
* @param familyMember 老人家属
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateFamilyMember(FamilyMember familyMember);
|
||||
|
||||
/**
|
||||
* 删除老人家属
|
||||
* @param id 老人家属主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFamilyMemberById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除老人家属
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFamilyMemberByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zzyl.nursing.domain.Floor;
|
||||
import com.zzyl.nursing.vo.FloorVo;
|
||||
import com.zzyl.nursing.vo.TreeVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 楼层Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-26
|
||||
*/
|
||||
@Mapper
|
||||
public interface FloorMapper extends BaseMapper<Floor>
|
||||
{
|
||||
/**
|
||||
* 查询楼层
|
||||
*
|
||||
* @param id 楼层主键
|
||||
* @return 楼层
|
||||
*/
|
||||
public Floor selectFloorById(Long id);
|
||||
|
||||
/**
|
||||
* 查询楼层列表
|
||||
*
|
||||
* @param floor 楼层
|
||||
* @return 楼层集合
|
||||
*/
|
||||
public List<Floor> selectFloorList(Floor floor);
|
||||
|
||||
/**
|
||||
* 新增楼层
|
||||
*
|
||||
* @param floor 楼层
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertFloor(Floor floor);
|
||||
|
||||
/**
|
||||
* 修改楼层
|
||||
*
|
||||
* @param floor 楼层
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateFloor(Floor floor);
|
||||
|
||||
/**
|
||||
* 删除楼层
|
||||
*
|
||||
* @param id 楼层主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFloorById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除楼层
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFloorByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询所有楼层(负责老人)
|
||||
* @return 结果
|
||||
*/
|
||||
List<Floor> selectAllByNur();
|
||||
|
||||
/**
|
||||
* 获取所有楼层所有房间中的空床位
|
||||
*
|
||||
* @return:
|
||||
* @param: status 床位状态
|
||||
*/
|
||||
List<TreeVo> selectRoomAndBedByBedStatus(Integer status);
|
||||
|
||||
/**
|
||||
* 获取所有装有智能设备的楼层
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
List<FloorVo> getAllFloorsWithDevice();
|
||||
|
||||
/**
|
||||
* 获取所有楼层所有房间
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
List<TreeVo> selectRoomAndBed();
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.List;
|
||||
import com.zzyl.nursing.domain.HealthAssessment;
|
||||
|
||||
/**
|
||||
* 健康评估Mapper接口
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-02-28
|
||||
*/
|
||||
@Mapper
|
||||
public interface HealthAssessmentMapper extends BaseMapper<HealthAssessment>
|
||||
{
|
||||
/**
|
||||
* 查询健康评估
|
||||
*
|
||||
* @param id 健康评估主键
|
||||
* @return 健康评估
|
||||
*/
|
||||
public HealthAssessment selectHealthAssessmentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询健康评估列表
|
||||
*
|
||||
* @param healthAssessment 健康评估
|
||||
* @return 健康评估集合
|
||||
*/
|
||||
public List<HealthAssessment> selectHealthAssessmentList(HealthAssessment healthAssessment);
|
||||
|
||||
/**
|
||||
* 新增健康评估
|
||||
*
|
||||
* @param healthAssessment 健康评估
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHealthAssessment(HealthAssessment healthAssessment);
|
||||
|
||||
/**
|
||||
* 修改健康评估
|
||||
*
|
||||
* @param healthAssessment 健康评估
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHealthAssessment(HealthAssessment healthAssessment);
|
||||
|
||||
/**
|
||||
* 删除健康评估
|
||||
*
|
||||
* @param id 健康评估主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthAssessmentById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除健康评估
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthAssessmentByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import com.zzyl.nursing.domain.MemberReservation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 预约信息Mapper接口
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-05
|
||||
*/
|
||||
@Mapper
|
||||
public interface MemberReservationMapper extends BaseMapper<MemberReservation> {
|
||||
/**
|
||||
* 查询预约信息
|
||||
*
|
||||
* @param id 预约信息主键
|
||||
* @return 预约信息
|
||||
*/
|
||||
public MemberReservation selectReservationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询预约信息列表
|
||||
*
|
||||
* @param reservation 预约信息
|
||||
* @return 预约信息集合
|
||||
*/
|
||||
public List<MemberReservation> selectReservationList(MemberReservation reservation);
|
||||
|
||||
/**
|
||||
* 新增预约信息
|
||||
*
|
||||
* @param reservation 预约信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertReservation(MemberReservation reservation);
|
||||
|
||||
/**
|
||||
* 修改预约信息
|
||||
*
|
||||
* @param reservation 预约信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateReservation(MemberReservation reservation);
|
||||
|
||||
/**
|
||||
* 删除预约信息
|
||||
*
|
||||
* @param id 预约信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteReservationById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除预约信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteReservationByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询当天取消预约数量
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
List<MemberReservation> selectReservationCount(@Param("userId") Long userId, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
|
||||
|
||||
/**
|
||||
* 取消预约
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
void updateStatus(Long id, int i);
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zzyl.common.core.domain.entity.SysUser;
|
||||
import com.zzyl.nursing.domain.NursingElder;
|
||||
import com.zzyl.nursing.vo.NursingNameVo;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 护理员老人关联Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
@Mapper
|
||||
public interface NursingElderMapper extends BaseMapper<NursingElder>
|
||||
{
|
||||
|
||||
@Select("select tu.user_id as userId, tu.nick_name from nursing_elder ne, sys_user tu where ne.elder_id = #{elderId} and tu.user_id = ne.nursing_id and tu.status = 0")
|
||||
List<SysUser> selectUserByElderId(Long elderId);
|
||||
|
||||
@Select("")
|
||||
List<NursingNameVo> selectNickNameByElderId(@Param("set") Set<Long> elderIds);
|
||||
|
||||
/**
|
||||
* 查询护理员老人关联
|
||||
*
|
||||
* @param id 护理员老人关联主键
|
||||
* @return 护理员老人关联
|
||||
*/
|
||||
@Select("")
|
||||
public NursingElder selectNursingElderById(Long id);
|
||||
|
||||
/**
|
||||
* 查询护理员老人关联列表
|
||||
*
|
||||
* @param nursingElder 护理员老人关联
|
||||
* @return 护理员老人关联集合
|
||||
*/
|
||||
@Select("")
|
||||
public List<NursingElder> selectNursingElderList(NursingElder nursingElder);
|
||||
|
||||
/**
|
||||
* 新增护理员老人关联
|
||||
*
|
||||
* @param nursingElder 护理员老人关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Insert("")
|
||||
public int insertNursingElder(NursingElder nursingElder);
|
||||
|
||||
/**
|
||||
* 修改护理员老人关联
|
||||
*
|
||||
* @param nursingElder 护理员老人关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Update("")
|
||||
public int updateNursingElder(NursingElder nursingElder);
|
||||
|
||||
/**
|
||||
* 删除护理员老人关联
|
||||
*
|
||||
* @param id 护理员老人关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Delete("")
|
||||
public int deleteNursingElderById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除护理员老人关联
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Delete("")
|
||||
public int deleteNursingElderByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zzyl.nursing.vo.NursingLevelVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.List;
|
||||
import com.zzyl.nursing.domain.NursingLevel;
|
||||
|
||||
/**
|
||||
* 护理等级Mapper接口
|
||||
*
|
||||
* @author alexis
|
||||
* @date 2024-12-30
|
||||
*/
|
||||
@Mapper
|
||||
public interface NursingLevelMapper extends BaseMapper<NursingLevel>
|
||||
{
|
||||
/**
|
||||
* 查询护理等级
|
||||
*
|
||||
* @param id 护理等级主键
|
||||
* @return 护理等级
|
||||
*/
|
||||
public NursingLevel selectNursingLevelById(Long id);
|
||||
|
||||
/**
|
||||
* 查询护理等级列表
|
||||
*
|
||||
* @param nursingLevel 护理等级
|
||||
* @return 护理等级集合
|
||||
*/
|
||||
public List<NursingLevel> selectNursingLevelList(NursingLevel nursingLevel);
|
||||
|
||||
/**
|
||||
* 新增护理等级
|
||||
*
|
||||
* @param nursingLevel 护理等级
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNursingLevel(NursingLevel nursingLevel);
|
||||
|
||||
/**
|
||||
* 修改护理等级
|
||||
*
|
||||
* @param nursingLevel 护理等级
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNursingLevel(NursingLevel nursingLevel);
|
||||
|
||||
/**
|
||||
* 删除护理等级
|
||||
*
|
||||
* @param id 护理等级主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNursingLevelById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除护理等级
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNursingLevelByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询护理等级Vo列表
|
||||
* @param nursingLevel 参数
|
||||
* @return 结果
|
||||
*/
|
||||
List<NursingLevelVo> selectNursingLevelVoList(NursingLevel nursingLevel);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.List;
|
||||
import com.zzyl.nursing.domain.NursingPlan;
|
||||
|
||||
/**
|
||||
* 护理计划Mapper接口
|
||||
*
|
||||
* @author alexis
|
||||
* @date 2024-12-30
|
||||
*/
|
||||
@Mapper
|
||||
public interface NursingPlanMapper extends BaseMapper<NursingPlan>
|
||||
{
|
||||
/**
|
||||
* 查询护理计划
|
||||
*
|
||||
* @param id 护理计划主键
|
||||
* @return 护理计划
|
||||
*/
|
||||
public NursingPlan selectNursingPlanById(Long id);
|
||||
|
||||
/**
|
||||
* 查询护理计划列表
|
||||
*
|
||||
* @param nursingPlan 护理计划
|
||||
* @return 护理计划集合
|
||||
*/
|
||||
public List<NursingPlan> selectNursingPlanList(NursingPlan nursingPlan);
|
||||
|
||||
/**
|
||||
* 新增护理计划
|
||||
*
|
||||
* @param nursingPlan 护理计划
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNursingPlan(NursingPlan nursingPlan);
|
||||
|
||||
/**
|
||||
* 修改护理计划
|
||||
*
|
||||
* @param nursingPlan 护理计划
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNursingPlan(NursingPlan nursingPlan);
|
||||
|
||||
/**
|
||||
* 删除护理计划
|
||||
*
|
||||
* @param id 护理计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNursingPlanById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除护理计划
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNursingPlanByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zzyl.nursing.vo.NursingProjectVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.List;
|
||||
import com.zzyl.nursing.domain.NursingProject;
|
||||
|
||||
/**
|
||||
* 护理项目Mapper接口
|
||||
*
|
||||
* @Author: Zhy
|
||||
* @Date: 2024-12-30
|
||||
*/
|
||||
@Mapper
|
||||
public interface NursingProjectMapper extends BaseMapper<NursingProject>
|
||||
{
|
||||
/**
|
||||
* 查询护理项目
|
||||
*
|
||||
* @param id 护理项目主键
|
||||
* @return 护理项目
|
||||
*/
|
||||
public NursingProject selectNursingProjectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询护理项目列表
|
||||
*
|
||||
* @param nursingProject 护理项目
|
||||
* @return 护理项目集合
|
||||
*/
|
||||
public List<NursingProject> selectNursingProjectList(NursingProject nursingProject);
|
||||
|
||||
/**
|
||||
* 新增护理项目
|
||||
*
|
||||
* @param nursingProject 护理项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNursingProject(NursingProject nursingProject);
|
||||
|
||||
/**
|
||||
* 修改护理项目
|
||||
*
|
||||
* @param nursingProject 护理项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNursingProject(NursingProject nursingProject);
|
||||
|
||||
/**
|
||||
* 删除护理项目
|
||||
*
|
||||
* @param id 护理项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNursingProjectById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除护理项目
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNursingProjectByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 获取护理项目列表
|
||||
* @return 护理项目vo列表
|
||||
*/
|
||||
List<NursingProjectVo> getAllProjects();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zzyl.nursing.vo.NursingProjectPlanVo;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.List;
|
||||
import com.zzyl.nursing.domain.NursingProjectPlan;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* 护理计划和项目关联Mapper接口
|
||||
*
|
||||
* @author alexis
|
||||
* @date 2024-12-31
|
||||
*/
|
||||
@Mapper
|
||||
public interface NursingProjectPlanMapper extends BaseMapper<NursingProjectPlan>
|
||||
{
|
||||
/**
|
||||
* 查询护理计划和项目关联
|
||||
*
|
||||
* @param id 护理计划和项目关联主键
|
||||
* @return 护理计划和项目关联
|
||||
*/
|
||||
public NursingProjectPlan selectNursingProjectPlanById(Long id);
|
||||
|
||||
/**
|
||||
* 查询护理计划和项目关联列表
|
||||
*
|
||||
* @param nursingProjectPlan 护理计划和项目关联
|
||||
* @return 护理计划和项目关联集合
|
||||
*/
|
||||
public List<NursingProjectPlan> selectNursingProjectPlanList(NursingProjectPlan nursingProjectPlan);
|
||||
|
||||
/**
|
||||
* 新增护理计划和项目关联
|
||||
*
|
||||
* @param nursingProjectPlan 护理计划和项目关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNursingProjectPlan(NursingProjectPlan nursingProjectPlan);
|
||||
|
||||
/**
|
||||
* 修改护理计划和项目关联
|
||||
*
|
||||
* @param nursingProjectPlan 护理计划和项目关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNursingProjectPlan(NursingProjectPlan nursingProjectPlan);
|
||||
|
||||
/**
|
||||
* 删除护理计划和项目关联
|
||||
*
|
||||
* @param id 护理计划和项目关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNursingProjectPlanById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除护理计划和项目关联
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNursingProjectPlanByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量保存护理计划关联的护理项目
|
||||
* @param projectPlans 护理计划关联的护理项目集合
|
||||
* @param planId 护理计划id
|
||||
* @return
|
||||
*/
|
||||
int insertBatch(@Param("projectPlans") List<NursingProjectPlan> projectPlans, @Param("planId") Long planId);
|
||||
|
||||
|
||||
/**
|
||||
* 根据护理计划id查询关联的护理项目列表
|
||||
* @param planId
|
||||
* @return
|
||||
*/
|
||||
@Select("select id, plan_id, project_id, execute_time, execute_cycle, execute_frequency, create_time, update_time, create_by, update_by, remark from nursing_project_plan where plan_id = #{planId}")
|
||||
List<NursingProjectPlanVo> getProjectListByPlanId(@Param("planId") Long planId);
|
||||
|
||||
/**
|
||||
* 根据护理计划id删除关联的护理项目
|
||||
* @param planId 护理计划id
|
||||
*/
|
||||
@Delete("delete from nursing_project_plan where plan_id = #{planId}")
|
||||
void deleteByPlanId(@Param("planId") Long planId);
|
||||
|
||||
/**
|
||||
* 根据护理计划id集合批量删除关联的护理项目
|
||||
* @param ids 护理计划id集合
|
||||
*/
|
||||
void batchDeleteByPlanIds(@Param("ids") List<Long> ids);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.List;
|
||||
import com.zzyl.nursing.domain.NursingTask;
|
||||
|
||||
/**
|
||||
* 护理任务Mapper接口
|
||||
*
|
||||
* @author alexis
|
||||
* @date 2024-11-17
|
||||
*/
|
||||
@Mapper
|
||||
public interface NursingTaskMapper extends BaseMapper<NursingTask>
|
||||
{
|
||||
/**
|
||||
* 查询护理任务
|
||||
*
|
||||
* @param id 护理任务主键
|
||||
* @return 护理任务
|
||||
*/
|
||||
public NursingTask selectNursingTaskById(Long id);
|
||||
|
||||
/**
|
||||
* 查询护理任务列表
|
||||
*
|
||||
* @param nursingTask 护理任务
|
||||
* @return 护理任务集合
|
||||
*/
|
||||
public List<NursingTask> selectNursingTaskList(NursingTask nursingTask);
|
||||
|
||||
/**
|
||||
* 新增护理任务
|
||||
*
|
||||
* @param nursingTask 护理任务
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNursingTask(NursingTask nursingTask);
|
||||
|
||||
/**
|
||||
* 修改护理任务
|
||||
*
|
||||
* @param nursingTask 护理任务
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNursingTask(NursingTask nursingTask);
|
||||
|
||||
/**
|
||||
* 删除护理任务
|
||||
*
|
||||
* @param id 护理任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNursingTaskById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除护理任务
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNursingTaskByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zzyl.nursing.domain.Room;
|
||||
import com.zzyl.nursing.vo.RoomVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 房间Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-26
|
||||
*/
|
||||
@Mapper
|
||||
public interface RoomMapper extends BaseMapper<Room>
|
||||
{
|
||||
/**
|
||||
* 查询房间
|
||||
*
|
||||
* @param id 房间主键
|
||||
* @return 房间
|
||||
*/
|
||||
public Room selectRoomById(Long id);
|
||||
|
||||
/**
|
||||
* 查询房间列表
|
||||
*
|
||||
* @param room 房间
|
||||
* @return 房间集合
|
||||
*/
|
||||
public List<Room> selectRoomList(Room room);
|
||||
|
||||
/**
|
||||
* 新增房间
|
||||
*
|
||||
* @param room 房间
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRoom(Room room);
|
||||
|
||||
/**
|
||||
* 修改房间
|
||||
*
|
||||
* @param room 房间
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRoom(Room room);
|
||||
|
||||
/**
|
||||
* 删除房间
|
||||
*
|
||||
* @param id 房间主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRoomById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除房间
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRoomByIds(Long[] ids);
|
||||
|
||||
List<RoomVo> selectByFloorId(Long floorId);
|
||||
|
||||
List<RoomVo> selectByFloorIdWithNur(Long floorId);
|
||||
|
||||
/**
|
||||
* 根据房间id查询 房间 数据
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
RoomVo selectRoomPriceByRoomId(Long id);
|
||||
|
||||
/**
|
||||
* 获取房间中的智能设备及数据
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
List<RoomVo> getRoomsWithDeviceByFloorId(Long floorId);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.zzyl.nursing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zzyl.nursing.domain.RoomType;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 房型Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-26
|
||||
*/
|
||||
@Mapper
|
||||
public interface RoomTypeMapper extends BaseMapper<RoomType>
|
||||
{
|
||||
/**
|
||||
* 查询房型
|
||||
*
|
||||
* @param id 房型主键
|
||||
* @return 房型
|
||||
*/
|
||||
public RoomType selectRoomTypeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询房型列表
|
||||
*
|
||||
* @param roomType 房型
|
||||
* @return 房型集合
|
||||
*/
|
||||
public List<RoomType> selectRoomTypeList(RoomType roomType);
|
||||
|
||||
/**
|
||||
* 新增房型
|
||||
*
|
||||
* @param roomType 房型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRoomType(RoomType roomType);
|
||||
|
||||
/**
|
||||
* 修改房型
|
||||
*
|
||||
* @param roomType 房型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRoomType(RoomType roomType);
|
||||
|
||||
/**
|
||||
* 删除房型
|
||||
*
|
||||
* @param id 房型主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRoomTypeById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除房型
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRoomTypeByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.zzyl.nursing.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zzyl.nursing.domain.AlertData;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zzyl.nursing.dto.AlertDataPageQueryDto;
|
||||
import com.zzyl.nursing.dto.HandleAlertDataDto;
|
||||
|
||||
/**
|
||||
* 报警数据Service接口
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
public interface IAlertDataService extends IService<AlertData>
|
||||
{
|
||||
/**
|
||||
* 查询报警数据
|
||||
*
|
||||
* @param id 报警数据主键
|
||||
* @return 报警数据
|
||||
*/
|
||||
public AlertData selectAlertDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询报警数据列表
|
||||
*
|
||||
* @param alertData 报警数据
|
||||
* @return 报警数据集合
|
||||
*/
|
||||
public List<AlertData> selectAlertDataList(AlertData alertData);
|
||||
|
||||
/**
|
||||
* 新增报警数据
|
||||
*
|
||||
* @param alertData 报警数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAlertData(AlertData alertData);
|
||||
|
||||
/**
|
||||
* 修改报警数据
|
||||
*
|
||||
* @param alertData 报警数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAlertData(AlertData alertData);
|
||||
|
||||
/**
|
||||
* 批量删除报警数据
|
||||
*
|
||||
* @param ids 需要删除的报警数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAlertDataByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除报警数据信息
|
||||
*
|
||||
* @param id 报警数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAlertDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询报警数据列表
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
List<AlertData> pageQueryAlertData(AlertDataPageQueryDto alertDataPageQueryDto);
|
||||
|
||||
/**
|
||||
* 处理设备报警数据
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
void handleAlertData(HandleAlertDataDto handleAlertDataDto);
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.zzyl.nursing.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zzyl.nursing.domain.AlertRule;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 报警规则Service接口
|
||||
*
|
||||
* @author Zhy
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
public interface IAlertRuleService extends IService<AlertRule> {
|
||||
/**
|
||||
* 查询报警规则
|
||||
*
|
||||
* @param id 报警规则主键
|
||||
* @return 报警规则
|
||||
*/
|
||||
public AlertRule selectAlertRuleById(Long id);
|
||||
|
||||
/**
|
||||
* 查询报警规则列表
|
||||
*
|
||||
* @param alertRule 报警规则
|
||||
* @return 报警规则集合
|
||||
*/
|
||||
public List<AlertRule> selectAlertRuleList(AlertRule alertRule);
|
||||
|
||||
/**
|
||||
* 新增报警规则
|
||||
*
|
||||
* @param alertRule 报警规则
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAlertRule(AlertRule alertRule);
|
||||
|
||||
/**
|
||||
* 修改报警规则
|
||||
*
|
||||
* @param alertRule 报警规则
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAlertRule(AlertRule alertRule);
|
||||
|
||||
/**
|
||||
* 批量删除报警规则
|
||||
*
|
||||
* @param ids 需要删除的报警规则主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAlertRuleByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除报警规则信息
|
||||
*
|
||||
* @param id 报警规则主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAlertRuleById(Long id);
|
||||
|
||||
/**
|
||||
* 新增报警规则
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
void createAlertRule(AlertRule alertRule);
|
||||
|
||||
/**
|
||||
* 设备数据异常告警
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
void alertFilter();
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.zzyl.nursing.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zzyl.nursing.domain.Bed;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 床位Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-26
|
||||
*/
|
||||
public interface IBedService extends IService<Bed>
|
||||
{
|
||||
/**
|
||||
* 查询床位
|
||||
*
|
||||
* @param id 床位主键
|
||||
* @return 床位
|
||||
*/
|
||||
public Bed selectBedById(Long id);
|
||||
|
||||
/**
|
||||
* 查询床位列表
|
||||
*
|
||||
* @param bed 床位
|
||||
* @return 床位集合
|
||||
*/
|
||||
public List<Bed> selectBedList(Bed bed);
|
||||
|
||||
/**
|
||||
* 新增床位
|
||||
*
|
||||
* @param bed 床位
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBed(Bed bed);
|
||||
|
||||
/**
|
||||
* 修改床位
|
||||
*
|
||||
* @param bed 床位
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBed(Bed bed);
|
||||
|
||||
/**
|
||||
* 批量删除床位
|
||||
*
|
||||
* @param ids 需要删除的床位主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBedByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除床位信息
|
||||
*
|
||||
* @param id 床位主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBedById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.zzyl.nursing.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zzyl.nursing.domain.CheckInConfig;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 入住配置表Service接口
|
||||
*
|
||||
* @Author: Zhy
|
||||
* @Date: 2025-02-25
|
||||
*/
|
||||
public interface ICheckInConfigService extends IService<CheckInConfig>
|
||||
{
|
||||
/**
|
||||
* 查询入住配置表
|
||||
*
|
||||
* @param id 入住配置表主键
|
||||
* @return 入住配置表
|
||||
*/
|
||||
public CheckInConfig selectCheckInConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询入住配置表列表
|
||||
*
|
||||
* @param checkInConfig 入住配置表
|
||||
* @return 入住配置表集合
|
||||
*/
|
||||
public List<CheckInConfig> selectCheckInConfigList(CheckInConfig checkInConfig);
|
||||
|
||||
/**
|
||||
* 新增入住配置表
|
||||
*
|
||||
* @param checkInConfig 入住配置表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCheckInConfig(CheckInConfig checkInConfig);
|
||||
|
||||
/**
|
||||
* 修改入住配置表
|
||||
*
|
||||
* @param checkInConfig 入住配置表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCheckInConfig(CheckInConfig checkInConfig);
|
||||
|
||||
/**
|
||||
* 批量删除入住配置表
|
||||
*
|
||||
* @param ids 需要删除的入住配置表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCheckInConfigByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除入住配置表信息
|
||||
*
|
||||
* @param id 入住配置表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCheckInConfigById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.zzyl.nursing.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zzyl.nursing.domain.CheckIn;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zzyl.nursing.dto.CheckInApplyDto;
|
||||
import com.zzyl.nursing.vo.CheckInDetailVo;
|
||||
|
||||
/**
|
||||
* 入住表Service接口
|
||||
*
|
||||
* @Author: Zhy
|
||||
* @Date: 2025-02-25
|
||||
*/
|
||||
public interface ICheckInService extends IService<CheckIn> {
|
||||
/**
|
||||
* 查询入住表
|
||||
*
|
||||
* @param id 入住表主键
|
||||
* @return 入住表
|
||||
*/
|
||||
public CheckIn selectCheckInById(Long id);
|
||||
|
||||
/**
|
||||
* 查询入住表列表
|
||||
*
|
||||
* @param checkIn 入住表
|
||||
* @return 入住表集合
|
||||
*/
|
||||
public List<CheckIn> selectCheckInList(CheckIn checkIn);
|
||||
|
||||
/**
|
||||
* 新增入住表
|
||||
*
|
||||
* @param checkIn 入住表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCheckIn(CheckIn checkIn);
|
||||
|
||||
/**
|
||||
* 修改入住表
|
||||
*
|
||||
* @param checkIn 入住表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCheckIn(CheckIn checkIn);
|
||||
|
||||
/**
|
||||
* 批量删除入住表
|
||||
*
|
||||
* @param ids 需要删除的入住表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCheckInByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除入住表信息
|
||||
*
|
||||
* @param id 入住表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCheckInById(Long id);
|
||||
|
||||
/**
|
||||
* 申请入住
|
||||
*
|
||||
* @return:
|
||||
* @param:
|
||||
*/
|
||||
void apply(CheckInApplyDto checkInApplyDto);
|
||||
|
||||
/**
|
||||
* 入住详情
|
||||
*
|
||||
* @return:
|
||||
* @param: id 入住id
|
||||
*/
|
||||
CheckInDetailVo getCheckInInfo(Long id);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user