家属端注册到添加长者流程
This commit is contained in:
parent
640ddde62a
commit
dba76852ec
|
|
@ -2,6 +2,10 @@ package com.nu.modules.baseinfo.api;
|
|||
|
||||
import com.nu.entity.NuBaseInfoEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface INuBaseInfoApi {
|
||||
NuBaseInfoEntity queryInfoByNuId(String orgCode, String nuId);
|
||||
|
||||
List<NuBaseInfoEntity> queryByOpenId(String openId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.nubaseelder.api;
|
||||
|
||||
import com.nu.dto.NuBaseElderMQDto;
|
||||
import com.nu.entity.NuBaseElderEntity;
|
||||
import com.nu.entity.NuBaseInfoEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface INuBaseElderApi {
|
||||
|
||||
List<NuBaseElderEntity> queryByOpenId(String openId);
|
||||
|
||||
void bindnu(NuBaseInfoEntity nuBaseInfoEntity);
|
||||
}
|
||||
|
|
@ -16,68 +16,106 @@ import java.io.Serializable;
|
|||
/**
|
||||
* @Description: 护理单元
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-11
|
||||
* @Date: 2025-04-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_base_info")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_base_info对象", description="护理单元")
|
||||
@ApiModel(value = "nu_base_info对象", description = "护理单元")
|
||||
public class NuBaseInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**ID*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "ID")
|
||||
private java.lang.String id;
|
||||
/**护理单元名称*/
|
||||
@Excel(name = "护理单元名称", width = 15)
|
||||
/**
|
||||
* openId
|
||||
*/
|
||||
@Excel(name = "openId", width = 15)
|
||||
@ApiModelProperty(value = "openId")
|
||||
private java.lang.String openId;
|
||||
/**
|
||||
* 长者id nu_biz_elder_info.id
|
||||
*/
|
||||
@Excel(name = "长者id", width = 15)
|
||||
@ApiModelProperty(value = "长者id")
|
||||
private java.lang.String elderId;
|
||||
/**
|
||||
* 护理单元名称
|
||||
*/
|
||||
@Excel(name = "护理单元名称", width = 15)
|
||||
@ApiModelProperty(value = "护理单元名称")
|
||||
private java.lang.String nuName;
|
||||
/**护理单元编码*/
|
||||
/**
|
||||
* 护理单元编码
|
||||
*/
|
||||
@Excel(name = "护理单元编码", width = 15)
|
||||
@ApiModelProperty(value = "护理单元编码")
|
||||
private java.lang.String nuId;
|
||||
/**区域标签ID*/
|
||||
@Excel(name = "区域标签ID", width = 15, dicCode = "nu_type")
|
||||
@Dict(dicCode = "nu_type")
|
||||
/**
|
||||
* 区域标签ID
|
||||
*/
|
||||
@Excel(name = "区域标签ID", width = 15, dicCode = "nu_type")
|
||||
@Dict(dicCode = "nu_type")
|
||||
@ApiModelProperty(value = "区域标签ID")
|
||||
private java.lang.String areaFlag;
|
||||
/**使用状态 0未使用 1占用 2入住 3退住 4留床*/
|
||||
@Excel(name = "使用状态 0未使用 1占用 2入住 3退住 4留床", width = 15, dicCode = "nu_status")
|
||||
@Dict(dicCode = "nu_status")
|
||||
/**
|
||||
* 使用状态 0未使用 1占用 2入住 3退住 4留床
|
||||
*/
|
||||
@Excel(name = "使用状态 0未使用 1占用 2入住 3退住 4留床", width = 15, dicCode = "nu_status")
|
||||
@Dict(dicCode = "nu_status")
|
||||
@ApiModelProperty(value = "使用状态 0未使用 1占用 2入住 3退住 4留床")
|
||||
private java.lang.String status;
|
||||
/**客户*/
|
||||
@Excel(name = "客户", width = 15)
|
||||
/**
|
||||
* 客户
|
||||
*/
|
||||
@Excel(name = "客户", width = 15)
|
||||
@ApiModelProperty(value = "客户")
|
||||
private java.lang.String customerId;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
@Excel(name = "是否删除 0未删除 1删除", width = 15)
|
||||
/**
|
||||
* 是否删除 0未删除 1删除
|
||||
*/
|
||||
@Excel(name = "是否删除 0未删除 1删除", width = 15)
|
||||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
||||
@TableLogic
|
||||
private java.lang.String delFlag;
|
||||
/**创建人*/
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**更新人*/
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
/**
|
||||
* 更新日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**所属部门*/
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
/**是否已同步0已同步 1未同步*/
|
||||
/**
|
||||
* 是否已同步0已同步 1未同步
|
||||
*/
|
||||
@ApiModelProperty(value = "是否已同步0已同步 1未同步")
|
||||
private java.lang.String izSync;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.nu.modules.baseinfo.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
|
@ -13,6 +14,8 @@ import org.springframework.beans.BeanUtils;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元
|
||||
* @Author: jeecg-boot
|
||||
|
|
@ -51,4 +54,12 @@ public class NuBaseInfoServiceImpl extends ServiceImpl<NuBaseInfoMapper, NuBaseI
|
|||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NuBaseInfoEntity> queryByOpenId(String openId) {
|
||||
QueryWrapper<NuBaseInfo> qw = new QueryWrapper<>();
|
||||
qw.eq("open_id",openId);
|
||||
List<NuBaseInfo> list = baseMapper.selectList(qw);
|
||||
return BeanUtil.copyToList(list,NuBaseInfoEntity.class);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,180 @@
|
|||
package com.nu.modules.nubaseelder.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nu.modules.nubaseelder.entity.NuBaseElder;
|
||||
import com.nu.modules.nubaseelder.service.INuBaseElderService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元-家属+长者关联表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="护理单元-家属+长者关联表")
|
||||
@RestController
|
||||
@RequestMapping("/admin/nuBaseElder")
|
||||
@Slf4j
|
||||
public class NuBaseElderController extends JeecgController<NuBaseElder, INuBaseElderService> {
|
||||
@Autowired
|
||||
private INuBaseElderService nuBaseElderService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuBaseElder
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "护理单元-家属+长者关联表-分页列表查询")
|
||||
@ApiOperation(value="护理单元-家属+长者关联表-分页列表查询", notes="护理单元-家属+长者关联表-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<NuBaseElder>> queryPageList(NuBaseElder nuBaseElder,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<NuBaseElder> queryWrapper = QueryGenerator.initQueryWrapper(nuBaseElder, req.getParameterMap());
|
||||
Page<NuBaseElder> page = new Page<NuBaseElder>(pageNo, pageSize);
|
||||
IPage<NuBaseElder> pageList = nuBaseElderService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param nuBaseElder
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "护理单元-家属+长者关联表-添加")
|
||||
@ApiOperation(value="护理单元-家属+长者关联表-添加", notes="护理单元-家属+长者关联表-添加")
|
||||
@RequiresPermissions("nubaseelder:nu_base_elder:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody NuBaseElder nuBaseElder) {
|
||||
nuBaseElderService.save(nuBaseElder);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param nuBaseElder
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "护理单元-家属+长者关联表-编辑")
|
||||
@ApiOperation(value="护理单元-家属+长者关联表-编辑", notes="护理单元-家属+长者关联表-编辑")
|
||||
@RequiresPermissions("nubaseelder:nu_base_elder:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody NuBaseElder nuBaseElder) {
|
||||
nuBaseElderService.updateById(nuBaseElder);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "护理单元-家属+长者关联表-通过id删除")
|
||||
@ApiOperation(value="护理单元-家属+长者关联表-通过id删除", notes="护理单元-家属+长者关联表-通过id删除")
|
||||
@RequiresPermissions("nubaseelder:nu_base_elder:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
nuBaseElderService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "护理单元-家属+长者关联表-批量删除")
|
||||
@ApiOperation(value="护理单元-家属+长者关联表-批量删除", notes="护理单元-家属+长者关联表-批量删除")
|
||||
@RequiresPermissions("nubaseelder:nu_base_elder:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.nuBaseElderService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "护理单元-家属+长者关联表-通过id查询")
|
||||
@ApiOperation(value="护理单元-家属+长者关联表-通过id查询", notes="护理单元-家属+长者关联表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<NuBaseElder> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
NuBaseElder nuBaseElder = nuBaseElderService.getById(id);
|
||||
if(nuBaseElder==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuBaseElder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param nuBaseElder
|
||||
*/
|
||||
@RequiresPermissions("nubaseelder:nu_base_elder:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, NuBaseElder nuBaseElder) {
|
||||
return super.exportXls(request, nuBaseElder, NuBaseElder.class, "护理单元-家属+长者关联表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("nubaseelder:nu_base_elder:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, NuBaseElder.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.nu.modules.nubaseelder.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元-家属+长者关联表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_base_elder")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_base_elder对象", description="护理单元-家属+长者关联表")
|
||||
public class NuBaseElder implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**编码 机构编码-序号*/
|
||||
@Excel(name = "编码 机构编码-序号", width = 15)
|
||||
@ApiModelProperty(value = "编码 机构编码-序号")
|
||||
private java.lang.String nuId;
|
||||
/**open_id*/
|
||||
@Excel(name = "open_id", width = 15)
|
||||
@ApiModelProperty(value = "open_id")
|
||||
private java.lang.String openId;
|
||||
/**长者id nu_biz_elder_info.id*/
|
||||
@Excel(name = "长者id nu_biz_elder_info.id", width = 15)
|
||||
@ApiModelProperty(value = "长者id nu_biz_elder_info.id")
|
||||
private java.lang.String elderId;
|
||||
/**机构编码*/
|
||||
@Excel(name = "机构编码", width = 15)
|
||||
@ApiModelProperty(value = "机构编码")
|
||||
private java.lang.String orgCode;
|
||||
/**使用状态 0未使用 1占用 2入住 3退住 4留床*/
|
||||
@Excel(name = "使用状态 0未使用 1占用 2入住 3退住 4留床", width = 15)
|
||||
@ApiModelProperty(value = "使用状态 0未使用 1占用 2入住 3退住 4留床")
|
||||
private java.lang.String status;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.nu.modules.nubaseelder.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.nubaseelder.entity.NuBaseElder;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元-家属+长者关联表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface NuBaseElderMapper extends BaseMapper<NuBaseElder> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.nubaseelder.mapper.NuBaseElderMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.nu.modules.nubaseelder.service;
|
||||
|
||||
import com.nu.dto.EmployeesStatusMQDto;
|
||||
import com.nu.dto.NuBaseElderMQDto;
|
||||
import com.nu.entity.NuBaseElderEntity;
|
||||
import com.nu.entity.NuBaseInfoEntity;
|
||||
import com.nu.modules.nubaseelder.entity.NuBaseElder;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元-家属+长者关联表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface INuBaseElderService extends IService<NuBaseElder> {
|
||||
|
||||
void bindnu(NuBaseInfoEntity dto);
|
||||
|
||||
void addelder(NuBaseElderMQDto dto);
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package com.nu.modules.nubaseelder.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.nu.dto.EmployeesStatusMQDto;
|
||||
import com.nu.dto.NuBaseElderMQDto;
|
||||
import com.nu.entity.NuBaseElderEntity;
|
||||
import com.nu.entity.NuBaseInfoEntity;
|
||||
import com.nu.modules.nubaseelder.api.INuBaseElderApi;
|
||||
import com.nu.modules.nubaseelder.entity.NuBaseElder;
|
||||
import com.nu.modules.nubaseelder.mapper.NuBaseElderMapper;
|
||||
import com.nu.modules.nubaseelder.service.INuBaseElderService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元-家属+长者关联表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class NuBaseElderServiceImpl extends ServiceImpl<NuBaseElderMapper, NuBaseElder> implements INuBaseElderService, INuBaseElderApi {
|
||||
|
||||
|
||||
/**
|
||||
* 20250918 充值缴费还没有老人信息
|
||||
*
|
||||
* @param dto
|
||||
*/
|
||||
@Override
|
||||
public void bindnu(NuBaseInfoEntity dto) {
|
||||
NuBaseElder nuBaseElder = new NuBaseElder();
|
||||
|
||||
QueryWrapper<NuBaseElder> qw = new QueryWrapper<>();
|
||||
qw.eq("nu_id", dto.getNuId());
|
||||
NuBaseElder data = baseMapper.selectOne(qw);
|
||||
//如果已经存过护理单元则修改家属、长者、护理单元状态
|
||||
if (data != null) {
|
||||
nuBaseElder.setOpenId(dto.getOpenId());
|
||||
nuBaseElder.setElderId(dto.getElderId());
|
||||
nuBaseElder.setStatus("2");
|
||||
baseMapper.update(nuBaseElder, qw);
|
||||
} else {
|
||||
//如果没有记录过护理单元,就新增
|
||||
nuBaseElder.setNuId(dto.getNuId());
|
||||
nuBaseElder.setOpenId(dto.getOpenId());
|
||||
nuBaseElder.setElderId(dto.getElderId());
|
||||
nuBaseElder.setOrgCode(dto.getOrgCode());
|
||||
nuBaseElder.setStatus(dto.getStatus());
|
||||
baseMapper.insert(nuBaseElder);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void addelder(NuBaseElderMQDto dto) {
|
||||
UpdateWrapper<NuBaseElder> uw = new UpdateWrapper<>();
|
||||
uw.eq("nu_id", dto.getNuId());
|
||||
NuBaseElder nuBaseElder = new NuBaseElder();
|
||||
nuBaseElder.setElderId(dto.getElderId());
|
||||
nuBaseElder.setStatus(dto.getStatus());
|
||||
baseMapper.update(nuBaseElder, uw);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NuBaseElderEntity> queryByOpenId(String openId) {
|
||||
QueryWrapper<NuBaseElder> qw = new QueryWrapper<>();
|
||||
qw.eq("open_id", openId);
|
||||
List<NuBaseElder> list = baseMapper.selectList(qw);
|
||||
return BeanUtil.copyToList(list, NuBaseElderEntity.class);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.nu.mq.nubaseelder.exceptionhandler;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.amqp.AmqpRejectAndDontRequeueException;
|
||||
import org.springframework.amqp.core.Message;
|
||||
import org.springframework.amqp.rabbit.listener.api.RabbitListenerErrorHandler;
|
||||
import org.springframework.amqp.rabbit.support.ListenerExecutionFailedException;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
@Component("nuBaseElderMQErrorHandler")
|
||||
public class NuBaseElderMQExceptionHandler implements RabbitListenerErrorHandler {
|
||||
|
||||
@Override
|
||||
public Object handleError(Message message, org.springframework.messaging.Message<?> message1, ListenerExecutionFailedException e) {
|
||||
log.error("MQ消息处理失败 | 消息体: {} | 异常原因: {}", new String(message.getBody()), e.getCause().getMessage());
|
||||
|
||||
// 根据异常类型选择处理策略
|
||||
// if (isRetryable(e)) {
|
||||
// // 可重试异常:抛出异常触发重试
|
||||
// throw e;
|
||||
// } else {
|
||||
// 不可恢复异常:拒绝消息且不重新入队
|
||||
throw new AmqpRejectAndDontRequeueException("消息处理失败且禁止重试", e);
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package com.nu.mq.nubaseelder.listener;
|
||||
|
||||
import com.nu.dto.EmployeesStatusMQDto;
|
||||
import com.nu.dto.NuBaseElderMQDto;
|
||||
import com.nu.entity.NuBaseInfoEntity;
|
||||
import com.nu.modules.nubaseelder.service.INuBaseElderService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.amqp.core.ExchangeTypes;
|
||||
import org.springframework.amqp.rabbit.annotation.Exchange;
|
||||
import org.springframework.amqp.rabbit.annotation.Queue;
|
||||
import org.springframework.amqp.rabbit.annotation.QueueBinding;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class NuBaseElderMQListener {
|
||||
|
||||
@Autowired
|
||||
private INuBaseElderService nuBaseElderService;
|
||||
|
||||
/**
|
||||
* 充值缴费后绑定护理单元被通知
|
||||
* 新增/修改 nu_base_elder nuid-openid绑定关系及status
|
||||
*
|
||||
* @param dto
|
||||
*/
|
||||
@RabbitListener(bindings = @QueueBinding(value = @Queue(name = "hldy.nubaseelder.bindnu", durable = "true"),
|
||||
exchange = @Exchange(name = "hldy.nubaseelder", type = ExchangeTypes.DIRECT),
|
||||
key = "hldy.nubaseelder.bindnu"), errorHandler = "nuBaseElderMQErrorHandler")
|
||||
public void bindnu(NuBaseElderMQDto dto) {
|
||||
NuBaseInfoEntity dto_ = new NuBaseInfoEntity();
|
||||
BeanUtils.copyProperties(dto,dto_);
|
||||
nuBaseElderService.bindnu(dto_);
|
||||
}
|
||||
|
||||
/**
|
||||
* 家属绑定老人
|
||||
* 修改 nuid的elderId字段
|
||||
*
|
||||
* @param dto
|
||||
*/
|
||||
@RabbitListener(bindings = @QueueBinding(value = @Queue(name = "hldy.nubaseelder.addelder", durable = "true"),
|
||||
exchange = @Exchange(name = "hldy.nubaseelder", type = ExchangeTypes.DIRECT),
|
||||
key = "hldy.nubaseelder.addelder"), errorHandler = "nuBaseElderMQErrorHandler")
|
||||
public void addelder(NuBaseElderMQDto dto) {
|
||||
nuBaseElderService.addelder(dto);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -38,5 +38,11 @@
|
|||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-iot-local-api</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -2,10 +2,8 @@ package com.nu.modules.elder.elderTag.api;
|
|||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
||||
import com.nu.modules.directive.api.DirectiveApi;
|
||||
import com.nu.modules.directive.entity.DirectiveExportApiEntity;
|
||||
import com.nu.modules.elder.api.ElderTagApi;
|
||||
import com.nu.modules.elder.entity.ElderTagExportApiEntity;
|
||||
import com.nu.entity.ElderTagExportEntity;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
|
@ -29,7 +27,7 @@ public class ElderTagExportApi {
|
|||
public Result<JSONObject> queryCompareElderTag(@RequestParam("orgCode") String orgCode) {
|
||||
//切换至业务数据源
|
||||
DynamicDataSourceContextHolder.push(orgCode);
|
||||
List<ElderTagExportApiEntity> list;
|
||||
List<ElderTagExportEntity> list;
|
||||
try {
|
||||
list = elderTagApi.queryAllData();
|
||||
} finally {
|
||||
|
|
|
|||
|
|
@ -1,20 +1,35 @@
|
|||
package com.nu.modules.wechat.elder.api;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nu.dto.ElderInfoMQDto;
|
||||
import com.nu.entity.ElderInfoEntity;
|
||||
import com.nu.entity.NuBaseElderEntity;
|
||||
import com.nu.entity.NuBaseInfoEntity;
|
||||
import com.nu.entity.NuBizAdvisoryInfoEntity;
|
||||
import com.nu.modules.advisoryinfo.api.IAdvisoryInfoApi;
|
||||
import com.nu.modules.baseinfo.api.INuBaseInfoApi;
|
||||
import com.nu.modules.elder.api.IElderInfoApi;
|
||||
import com.nu.modules.nubaseelder.api.INuBaseElderApi;
|
||||
import com.nu.modules.orgapplyinfo.api.IOrgApplyInfoApi;
|
||||
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
|
||||
import com.nu.utils.RabbitMQUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Api(tags = "长者信息")
|
||||
@RestController
|
||||
|
|
@ -27,6 +42,14 @@ public class ElderApi {
|
|||
private IOrgApplyInfoApi orgApplyInfoApi;
|
||||
@Autowired
|
||||
private INuBaseInfoApi nuBaseInfoApi;
|
||||
@Autowired
|
||||
private IElderInfoApi elderInfoApi;
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
@Autowired
|
||||
private INuBaseElderApi nuBaseElderApi;
|
||||
@Autowired
|
||||
private RabbitMQUtil rabbitMQUtil;
|
||||
|
||||
/**
|
||||
* 添加咨询信息
|
||||
|
|
@ -106,8 +129,8 @@ public class ElderApi {
|
|||
*/
|
||||
@GetMapping(value = "/getOrgInfo")
|
||||
public Result<OrgAllInfoApiEntity> getModifyInfo(
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "8") Integer pageSize,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1", required = false) Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "8", required = false) Integer pageSize,
|
||||
@RequestParam(value = "nuId") String nuId) {
|
||||
if (nuId.length() < 10) {
|
||||
return Result.ok(null);
|
||||
|
|
@ -128,16 +151,103 @@ public class ElderApi {
|
|||
result.setNuStatus(baseInfo.getStatus());//使用状态 0未使用 1占用 2入住 3退住 4留床
|
||||
if ("0".equals(baseInfo.getStatus()) || "3".equals(baseInfo.getStatus())) {
|
||||
result.setNuCanUse("0");//可以绑定
|
||||
}else{
|
||||
} else {
|
||||
result.setNuCanUse("1");//不可绑定
|
||||
result.setMsg("护理单元使用中");//不可用提示语
|
||||
}
|
||||
|
||||
if(!baseInfo.isWechatPayEnabled()){
|
||||
if (!baseInfo.isWechatPayEnabled()) {
|
||||
result.setNuCanUse("1");//微信支付关闭导致 不可绑定
|
||||
result.setMsg("护理单元维护中");//不可用提示语
|
||||
}
|
||||
result.setNuName(baseInfo.getNuName());
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询长者信息
|
||||
*
|
||||
* @param openId 用户openId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/queryElders")
|
||||
public Result<List<ElderInfoEntity>> queryElders(@RequestParam("openId") String openId) {
|
||||
|
||||
//护理单元信息
|
||||
List<NuBaseElderEntity> nuElderList = nuBaseElderApi.queryByOpenId(openId);
|
||||
if (nuElderList == null || nuElderList.size() == 0) {
|
||||
return Result.ok(List.of());
|
||||
}
|
||||
//查询出机构编码 - 机构名称对应关系
|
||||
List<JSONObject> jsonObjects = sysBaseAPI.queryOpeDept();
|
||||
Map<String, String> codeNameMap = new HashMap<>();
|
||||
if (jsonObjects != null && !jsonObjects.isEmpty()) {
|
||||
for (JSONObject obj : jsonObjects) {
|
||||
String code = obj.getString("code");
|
||||
String name = obj.getString("name");
|
||||
if (code != null && name != null) {
|
||||
codeNameMap.put(code, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//key:orgCode value:nuid逗号拼接的字符串
|
||||
Map<String, String> orgCodeToNuIdMap = nuElderList.stream()
|
||||
.filter(entity -> entity.getOrgCode() != null && entity.getNuId() != null)
|
||||
.collect(Collectors.groupingBy(
|
||||
NuBaseElderEntity::getOrgCode,
|
||||
Collectors.mapping(NuBaseElderEntity::getNuId, Collectors.joining(","))
|
||||
));
|
||||
|
||||
List<ElderInfoEntity> result = Lists.newArrayList();
|
||||
for (Map.Entry<String, String> entry : orgCodeToNuIdMap.entrySet()) {
|
||||
String orgCode = entry.getKey();
|
||||
//切换数据源整理好数据放到返回结果中
|
||||
DynamicDataSourceContextHolder.push(orgCode);
|
||||
List<ElderInfoEntity> list = elderInfoApi.queryElders(openId);
|
||||
result.addAll(list);
|
||||
DynamicDataSourceContextHolder.clear();
|
||||
}
|
||||
result.stream().forEach(d -> {
|
||||
String orgCode = d.getSysOrgCode();
|
||||
d.setOrgCode(orgCode);
|
||||
d.setDepartName(codeNameMap.get(orgCode));
|
||||
});
|
||||
return Result.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增长者信息
|
||||
*
|
||||
* @param elderInfoEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addElder")
|
||||
public Result<?> save(@RequestBody ElderInfoEntity elderInfoEntity) {
|
||||
String id = elderInfoEntity.getSysOrgCode() + IdUtil.simpleUUID();
|
||||
elderInfoEntity.setOrgCode(elderInfoEntity.getSysOrgCode());
|
||||
elderInfoEntity.setCurrentState("1");//状态:入住
|
||||
ElderInfoMQDto mqdto = new ElderInfoMQDto();
|
||||
BeanUtils.copyProperties(elderInfoEntity, mqdto);
|
||||
mqdto.setId(id);
|
||||
rabbitMQUtil.sendToExchange("hldy.elder", elderInfoEntity.getOrgCode() + ".elder.addelder", mqdto);
|
||||
return Result.ok(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新长者信息
|
||||
*
|
||||
* @param elderInfoEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/updateElderInfo")
|
||||
public Result<?> updateElderInfo(@RequestBody ElderInfoEntity elderInfoEntity) {
|
||||
elderInfoEntity.setOrgCode(elderInfoEntity.getSysOrgCode());
|
||||
ElderInfoMQDto mqdto = new ElderInfoMQDto();
|
||||
BeanUtils.copyProperties(elderInfoEntity, mqdto);
|
||||
rabbitMQUtil.sendToExchange("hldy.elder", elderInfoEntity.getOrgCode() + ".elder.updateelder", mqdto);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,169 @@
|
|||
package com.nu.modules.wechat.nubaseinfo.api;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nu.dto.NuBaseInfoMQDto;
|
||||
import com.nu.entity.ElderInfoEntity;
|
||||
import com.nu.entity.HumidDeviceEntity;
|
||||
import com.nu.entity.NuBaseElderEntity;
|
||||
import com.nu.entity.NuBaseInfoEntity;
|
||||
import com.nu.modules.baseinfo.api.INuBaseInfoApi;
|
||||
import com.nu.modules.elder.api.IElderInfoApi;
|
||||
import com.nu.modules.humiddevice.api.IHumidDeviceApi;
|
||||
import com.nu.modules.nubaseelder.api.INuBaseElderApi;
|
||||
import com.nu.utils.RabbitMQUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 护理单元信息
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/nuBaseInfo")
|
||||
@Slf4j
|
||||
public class NuBaseInfoApi {
|
||||
|
||||
@Autowired
|
||||
private INuBaseElderApi nuBaseElderApi;
|
||||
@Autowired
|
||||
private INuBaseInfoApi nuBaseInfoApi;
|
||||
@Autowired
|
||||
private IHumidDeviceApi humidAlarmApi;
|
||||
@Autowired
|
||||
private IElderInfoApi elderInfoApi;
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
@Autowired
|
||||
private RabbitMQUtil rabbitMQUtil;
|
||||
|
||||
/**
|
||||
* 绑定护理单元
|
||||
*
|
||||
* @param nuBaseInfoEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/bindNu")
|
||||
public Result<?> save(@RequestBody NuBaseInfoEntity nuBaseInfoEntity) {
|
||||
nuBaseInfoEntity.setOrgCode(nuBaseInfoEntity.getSysOrgCode());
|
||||
nuBaseElderApi.bindnu(nuBaseInfoEntity);
|
||||
NuBaseInfoMQDto mqdto = new NuBaseInfoMQDto();
|
||||
BeanUtils.copyProperties(nuBaseInfoEntity, mqdto);
|
||||
rabbitMQUtil.sendToExchange("hldy.nubaseinfo", nuBaseInfoEntity.getOrgCode() + ".nubaseinfo.bindelder", mqdto);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户下对应的护理单元及老人信息
|
||||
*
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/elderHomeList")
|
||||
public Result<List<NuBaseInfoEntity>> elderHomeList(@RequestParam("openId") String openId) {
|
||||
//护理单元信息
|
||||
List<NuBaseElderEntity> nuElderList = nuBaseElderApi.queryByOpenId(openId);
|
||||
if (nuElderList == null || nuElderList.size() == 0) {
|
||||
return Result.ok(List.of());
|
||||
}
|
||||
|
||||
//查询出机构编码 - 机构名称对应关系
|
||||
List<JSONObject> jsonObjects = sysBaseAPI.queryOpeDept();
|
||||
Map<String, String> codeNameMap = new HashMap<>();
|
||||
if (jsonObjects != null && !jsonObjects.isEmpty()) {
|
||||
for (JSONObject obj : jsonObjects) {
|
||||
String code = obj.getString("code");
|
||||
String name = obj.getString("name");
|
||||
if (code != null && name != null) {
|
||||
codeNameMap.put(code, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//key:orgCode value:nuid逗号拼接的字符串
|
||||
Map<String, String> orgCodeToNuIdMap = nuElderList.stream()
|
||||
.filter(entity -> entity.getOrgCode() != null && entity.getNuId() != null)
|
||||
.collect(Collectors.groupingBy(
|
||||
NuBaseElderEntity::getOrgCode,
|
||||
Collectors.mapping(NuBaseElderEntity::getNuId, Collectors.joining(","))
|
||||
));
|
||||
|
||||
List<NuBaseInfoEntity> result = Lists.newArrayList();
|
||||
for (Map.Entry<String, String> entry : orgCodeToNuIdMap.entrySet()) {
|
||||
String orgCode = entry.getKey();
|
||||
// String nuIds = entry.getValue();
|
||||
|
||||
//切换数据源整理好数据放到返回结果中
|
||||
DynamicDataSourceContextHolder.push(orgCode);
|
||||
List<NuBaseInfoEntity> baseList = nuBaseInfoApi.queryByOpenId(openId);
|
||||
if (baseList == null || baseList.size() == 0) {
|
||||
continue;
|
||||
}
|
||||
Map<String, Integer> nuIndex = Maps.newHashMap();//护理单元所在索引位置
|
||||
Map<String, Integer> elderIndex = Maps.newHashMap();//长者所在索引位置
|
||||
String nuIds = "";//护理单元ids
|
||||
String elderIds = "";//长者ids
|
||||
|
||||
for (int i = 0; i < baseList.size(); i++) {
|
||||
String nuId = baseList.get(i).getNuId();//护理单元nuID
|
||||
String elderId = baseList.get(i).getElderId();//长者id
|
||||
nuIds += "," + nuId;
|
||||
nuIndex.put(nuId, i);
|
||||
if (StringUtils.isNotBlank(elderId)) {
|
||||
elderIds += "," + elderId;
|
||||
elderIndex.put(elderId, i);
|
||||
}
|
||||
}
|
||||
//老人信息
|
||||
if (StringUtils.isNotBlank(elderIds)) {
|
||||
List<ElderInfoEntity> elderList = elderInfoApi.queryByElderIds(elderIds.substring(1).split(","));
|
||||
if (elderList != null && elderList.size() > 0) {
|
||||
elderList.stream().forEach(el -> {
|
||||
Integer index = elderIndex.get(el.getId());
|
||||
if (index != null) {
|
||||
baseList.get(index).setElderInfo(el);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//温湿度
|
||||
if (StringUtils.isNotBlank(nuIds)) {
|
||||
List<HumidDeviceEntity> huList = humidAlarmApi.queryByNuIds(nuIds.substring(1));
|
||||
if (huList != null && huList.size() > 0) {
|
||||
huList.stream().forEach(h -> {
|
||||
Integer index = nuIndex.get(h.getNuId());
|
||||
if (index != null) {
|
||||
List<HumidDeviceEntity> humidDeviceList = baseList.get(index).getHumidDeviceList();
|
||||
if (humidDeviceList == null) {
|
||||
humidDeviceList = Lists.newArrayList();
|
||||
}
|
||||
humidDeviceList.add(h);
|
||||
baseList.get(index).setHumidDeviceList(humidDeviceList);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
DynamicDataSourceContextHolder.clear();
|
||||
result.addAll(baseList);
|
||||
}
|
||||
|
||||
result.stream().forEach(d -> {
|
||||
String sysOrgCode = d.getSysOrgCode();
|
||||
d.setOrgCode(sysOrgCode);
|
||||
d.setDepartName(codeNameMap.get(sysOrgCode));
|
||||
});
|
||||
|
||||
return Result.ok(result);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,214 @@
|
|||
package com.nu.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 客户信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class ElderInfoMQDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 护理单元
|
||||
*/
|
||||
private String nuId;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private String sex;
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private String age;
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
private String idCard;
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy年MM月dd日")
|
||||
@DateTimeFormat(pattern = "yyyy年MM月dd日")
|
||||
private Date dateOfBirth;
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
private String national;
|
||||
/**
|
||||
* 住址
|
||||
*/
|
||||
private String houseAddress;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatarPath;
|
||||
/**
|
||||
* 医保类型
|
||||
*/
|
||||
private String medicalType;
|
||||
/**
|
||||
* 报销类型
|
||||
*/
|
||||
private String reimbType;
|
||||
/**
|
||||
* 医保卡号
|
||||
*/
|
||||
private String medicalCard;
|
||||
/**
|
||||
* 文化程度
|
||||
*/
|
||||
private String educationLevel;
|
||||
/**
|
||||
* 婚姻状况
|
||||
*/
|
||||
private String maritalStatus;
|
||||
/**
|
||||
* 宗教信仰
|
||||
*/
|
||||
private String religiousBeliefs;
|
||||
/**
|
||||
* 身份证正面
|
||||
*/
|
||||
private String idCardPositive;
|
||||
/**
|
||||
* 身份证反面
|
||||
*/
|
||||
private String idCardNegative;
|
||||
/**
|
||||
* 户口本本人页
|
||||
*/
|
||||
private String accountBookHimself;
|
||||
/**
|
||||
* 医保卡正面
|
||||
*/
|
||||
private String frontMedical;
|
||||
/**
|
||||
* 医保卡反面
|
||||
*/
|
||||
private String negaticeMedical;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 当前状态 0咨询 1入住 2留床 3退住
|
||||
*/
|
||||
private String currentState;
|
||||
/**
|
||||
* 监护人openId
|
||||
*/
|
||||
private String guardianOpenId;
|
||||
/**
|
||||
* 监护人姓名
|
||||
*/
|
||||
private String guardianName;
|
||||
/**
|
||||
* 监护人与老人关系
|
||||
*/
|
||||
private String relationship;
|
||||
/**
|
||||
* 监护人身份证号
|
||||
*/
|
||||
private String guardianIdCard;
|
||||
/**
|
||||
* 监护人联系电话
|
||||
*/
|
||||
private String guardianPhone;
|
||||
/**
|
||||
* 监护人出生日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy年MM月dd日")
|
||||
@DateTimeFormat(pattern = "yyyy年MM月dd日")
|
||||
private Date guardianDateOfBirth;
|
||||
/**
|
||||
* 监护人家庭住址
|
||||
*/
|
||||
private String guardianHomeAddress;
|
||||
/**
|
||||
* 监护人工作单位
|
||||
*/
|
||||
private String guardianWorkUnit;
|
||||
/**
|
||||
* 家庭住址
|
||||
*/
|
||||
private String homeAddress;
|
||||
/**
|
||||
* 是否删除 0未删除 1删除
|
||||
*/
|
||||
private String delFlag;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新日期
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
private String sysOrgCode;
|
||||
|
||||
/**
|
||||
* 签发机关
|
||||
*/
|
||||
private String issuingAuthority;
|
||||
/**
|
||||
* 有效开始日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy.MM.dd")
|
||||
@DateTimeFormat(pattern = "yyyy.MM.dd")
|
||||
private Date startTime;
|
||||
/**
|
||||
* 有效结束日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy.MM.dd")
|
||||
@DateTimeFormat(pattern = "yyyy.MM.dd")
|
||||
private Date endTime;
|
||||
/**
|
||||
* 发卡日期
|
||||
*/
|
||||
private Date cardIssuing;
|
||||
/**
|
||||
* 血型
|
||||
*/
|
||||
private String bloodType;
|
||||
/**
|
||||
* 兵役状况
|
||||
*/
|
||||
private String militaryType;
|
||||
|
||||
/**
|
||||
* 机构编码
|
||||
*/
|
||||
private String orgCode;
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String departName;
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.nu.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元-家属+长者关联表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class NuBaseElderMQDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**编码 机构编码-序号*/
|
||||
private String nuId;
|
||||
/**open_id*/
|
||||
private String openId;
|
||||
/**长者id nu_biz_elder_info.id*/
|
||||
private String elderId;
|
||||
/**机构编码*/
|
||||
private String orgCode;
|
||||
/**使用状态 0未使用 1占用 2入住 3退住 4留床*/
|
||||
private String status;
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.nu.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class NuBaseInfoMQDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String orgCode;
|
||||
private String asyncId;
|
||||
/**
|
||||
* openId
|
||||
*/
|
||||
private String openId;
|
||||
/**
|
||||
* 长者id nu_biz_elder_info.id
|
||||
*/
|
||||
private String elderId;
|
||||
/**
|
||||
* 护理单元编码
|
||||
*/
|
||||
private String nuId;
|
||||
}
|
||||
|
|
@ -0,0 +1,214 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 客户信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class ElderInfoEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 护理单元
|
||||
*/
|
||||
private String nuId;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private String sex;
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private String age;
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
private String idCard;
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy年MM月dd日")
|
||||
@DateTimeFormat(pattern = "yyyy年MM月dd日")
|
||||
private java.util.Date dateOfBirth;
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
private String national;
|
||||
/**
|
||||
* 住址
|
||||
*/
|
||||
private java.lang.String houseAddress;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatarPath;
|
||||
/**
|
||||
* 医保类型
|
||||
*/
|
||||
private String medicalType;
|
||||
/**
|
||||
* 报销类型
|
||||
*/
|
||||
private String reimbType;
|
||||
/**
|
||||
* 医保卡号
|
||||
*/
|
||||
private String medicalCard;
|
||||
/**
|
||||
* 文化程度
|
||||
*/
|
||||
private String educationLevel;
|
||||
/**
|
||||
* 婚姻状况
|
||||
*/
|
||||
private String maritalStatus;
|
||||
/**
|
||||
* 宗教信仰
|
||||
*/
|
||||
private String religiousBeliefs;
|
||||
/**
|
||||
* 身份证正面
|
||||
*/
|
||||
private String idCardPositive;
|
||||
/**
|
||||
* 身份证反面
|
||||
*/
|
||||
private String idCardNegative;
|
||||
/**
|
||||
* 户口本本人页
|
||||
*/
|
||||
private String accountBookHimself;
|
||||
/**
|
||||
* 医保卡正面
|
||||
*/
|
||||
private String frontMedical;
|
||||
/**
|
||||
* 医保卡反面
|
||||
*/
|
||||
private String negaticeMedical;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 当前状态 0咨询 1入住 2留床 3退住
|
||||
*/
|
||||
private String currentState;
|
||||
/**
|
||||
* 监护人openId
|
||||
*/
|
||||
private String guardianOpenId;
|
||||
/**
|
||||
* 监护人姓名
|
||||
*/
|
||||
private String guardianName;
|
||||
/**
|
||||
* 监护人与老人关系
|
||||
*/
|
||||
private String relationship;
|
||||
/**
|
||||
* 监护人身份证号
|
||||
*/
|
||||
private String guardianIdCard;
|
||||
/**
|
||||
* 监护人联系电话
|
||||
*/
|
||||
private String guardianPhone;
|
||||
/**
|
||||
* 监护人出生日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy年MM月dd日")
|
||||
@DateTimeFormat(pattern = "yyyy年MM月dd日")
|
||||
private java.util.Date guardianDateOfBirth;
|
||||
/**
|
||||
* 监护人家庭住址
|
||||
*/
|
||||
private String guardianHomeAddress;
|
||||
/**
|
||||
* 监护人工作单位
|
||||
*/
|
||||
private String guardianWorkUnit;
|
||||
/**
|
||||
* 家庭住址
|
||||
*/
|
||||
private String homeAddress;
|
||||
/**
|
||||
* 是否删除 0未删除 1删除
|
||||
*/
|
||||
private String delFlag;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
private java.util.Date createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新日期
|
||||
*/
|
||||
private java.util.Date updateTime;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
private String sysOrgCode;
|
||||
|
||||
/**
|
||||
* 签发机关
|
||||
*/
|
||||
private String issuingAuthority;
|
||||
/**
|
||||
* 有效开始日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy.MM.dd")
|
||||
@DateTimeFormat(pattern = "yyyy.MM.dd")
|
||||
private Date startTime;
|
||||
/**
|
||||
* 有效结束日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy.MM.dd")
|
||||
@DateTimeFormat(pattern = "yyyy.MM.dd")
|
||||
private Date endTime;
|
||||
/**
|
||||
* 发卡日期
|
||||
*/
|
||||
private java.util.Date cardIssuing;
|
||||
/**
|
||||
* 血型
|
||||
*/
|
||||
private String bloodType;
|
||||
/**
|
||||
* 兵役状况
|
||||
*/
|
||||
private String militaryType;
|
||||
|
||||
/**
|
||||
* 机构编码
|
||||
*/
|
||||
private String orgCode;
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String departName;
|
||||
}
|
||||
|
|
@ -1,15 +1,6 @@
|
|||
package com.nu.modules.elder.entity;
|
||||
package com.nu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -22,7 +13,7 @@ import java.util.Date;
|
|||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class ElderTagExportApiEntity implements Serializable {
|
||||
public class ElderTagExportEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>Class:易维联-温湿度计Entity
|
||||
* <p>功能描述:功能描述
|
||||
*/
|
||||
@Data
|
||||
public class HumidDeviceEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id;
|
||||
private String sn;
|
||||
private String deviceName;
|
||||
private String deviceTypes;//一共16位,第几位为1代表设备有该功能. 1位温度 2位湿度 15位电量
|
||||
private String reportingInterval; //实时数据上报时间间隔 单位分钟
|
||||
private String recordInterval; //记录时间间隔 单位分钟
|
||||
private String historyReportTime; //历史数据上报时刻 00:00
|
||||
private String historyInterval; //历史数据上报间隔 单位小时
|
||||
private String temperatureHigh ; //温度预警范围-上限值
|
||||
private String temperatureLow; //温度预警范围-下限值
|
||||
private String temperatureBuffer; //温度缓冲值
|
||||
private String humidityHigh; //湿度预警范围-上限值
|
||||
private String humidityLow; //湿度预警范围-下限值
|
||||
private String humidityBuffer; //湿度缓冲值
|
||||
private String timeCode; //设备所在时区 01北京时间 02纽约时间
|
||||
private String izOutages; //断电报警 0开启 1关闭
|
||||
private String izLowBattery; //低电报警 0开启 1关闭
|
||||
private String izOnline; //上下线通知 0开启 1关闭
|
||||
private String temperature; //温度
|
||||
private String humidity; //湿度
|
||||
private String status; //在线状态,0在线 1离线
|
||||
private String reportingTime; //最新上报时间
|
||||
private String electricity; //电量 0~4
|
||||
|
||||
private String optType; //操作类型
|
||||
private String optTime; //操作时间
|
||||
private String optBy; //操作人
|
||||
|
||||
private Integer alarmCn; //告警数量
|
||||
|
||||
private String nuId;//护理单元ID
|
||||
private String nuName;//护理单元
|
||||
private String departId;//机构ID
|
||||
private String departName;//机构名称
|
||||
private String departServerUrl;//机构服务地址
|
||||
private String oldServerUrl;//原机构服务地址
|
||||
private String syncType;//是否同步 0 未同步 1已同步
|
||||
private String oldDepartId;//原机构id
|
||||
private String oldDepartName;//原机构名称
|
||||
/**维修状态*/
|
||||
private String maintainStatus;
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元-家属+长者关联表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class NuBaseElderEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**编码 机构编码-序号*/
|
||||
private String nuId;
|
||||
/**open_id*/
|
||||
private String openId;
|
||||
/**长者id nu_biz_elder_info.id*/
|
||||
private String elderId;
|
||||
/**机构编码*/
|
||||
private String orgCode;
|
||||
/**使用状态 0未使用 1占用 2入住 3退住 4留床*/
|
||||
private String status;
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ package com.nu.entity;
|
|||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元
|
||||
|
|
@ -18,6 +19,15 @@ public class NuBaseInfoEntity implements Serializable {
|
|||
* ID
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* openId
|
||||
*/
|
||||
private java.lang.String openId;
|
||||
/**
|
||||
* 长者id nu_biz_elder_info.id
|
||||
*/
|
||||
private java.lang.String elderId;
|
||||
|
||||
/**
|
||||
* 护理单元名称
|
||||
*/
|
||||
|
|
@ -58,6 +68,14 @@ public class NuBaseInfoEntity implements Serializable {
|
|||
* 更新日期
|
||||
*/
|
||||
private java.util.Date updateTime;
|
||||
/**
|
||||
* 机构编码
|
||||
*/
|
||||
private String orgCode;
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String departName;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
|
|
@ -75,6 +93,11 @@ public class NuBaseInfoEntity implements Serializable {
|
|||
private int streamType;
|
||||
private String deviceIndex;
|
||||
|
||||
private boolean wechatPayEnabled;//微信支付功能是否已开启
|
||||
private boolean wechatPayEnabled;//微信支付功能是否已开启//温湿度信息 正常一个nuid对应一条数据
|
||||
//温湿度信息等
|
||||
private List<HumidDeviceEntity> humidDeviceList;
|
||||
//长者信息
|
||||
private ElderInfoEntity elderInfo;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
package com.nu.modules.elder.api;
|
||||
|
||||
import com.nu.modules.elder.entity.ElderTagExportApiEntity;
|
||||
import com.nu.entity.ElderTagExportEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ElderTagApi {
|
||||
List<ElderTagExportApiEntity> queryAllData();
|
||||
List<ElderTagExportEntity> queryAllData();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
package com.nu.modules.elder.api;
|
||||
|
||||
import com.nu.entity.ElderInfoEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IElderInfoApi {
|
||||
|
||||
List<ElderInfoEntity> queryByElderIds(String[] split);
|
||||
|
||||
List<ElderInfoEntity> queryElders(String openId);
|
||||
}
|
||||
|
|
@ -0,0 +1,296 @@
|
|||
package com.nu.modules.elderinfo.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 客户信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_elder_info")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "nu_biz_elder_info对象", description = "客户信息")
|
||||
public class ElderInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**
|
||||
* 护理单元
|
||||
*/
|
||||
@Excel(name = "护理单元", width = 15)
|
||||
@ApiModelProperty(value = "护理单元")
|
||||
@Dict(dicCode = "nu_id", dicText = "nu_name", dictTable = "nu_base_info")
|
||||
private java.lang.String nuId;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@Excel(name = "姓名", width = 15)
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private java.lang.String name;
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
@Excel(name = "性别", width = 15)
|
||||
@ApiModelProperty(value = "性别")
|
||||
@Dict(dicCode = "sex")
|
||||
private java.lang.String sex;
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
@Excel(name = "年龄", width = 15)
|
||||
@ApiModelProperty(value = "年龄")
|
||||
private java.lang.String age;
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
@Excel(name = "身份证号码", width = 15)
|
||||
@ApiModelProperty(value = "身份证号码")
|
||||
private java.lang.String idCard;
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
@Excel(name = "出生日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "出生日期")
|
||||
private java.util.Date dateOfBirth;
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
@Excel(name = "民族", width = 15)
|
||||
@ApiModelProperty(value = "民族")
|
||||
private java.lang.String national;
|
||||
/**
|
||||
* 住址
|
||||
*/
|
||||
@Excel(name = "住址", width = 15)
|
||||
@ApiModelProperty(value = "住址")
|
||||
private java.lang.String houseAddress;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@Excel(name = "头像", width = 15)
|
||||
@ApiModelProperty(value = "头像")
|
||||
private java.lang.String avatarPath;
|
||||
/**
|
||||
* 医保类型
|
||||
*/
|
||||
@Excel(name = "医保类型", width = 15, dicCode = "medical_insurance_type")
|
||||
@Dict(dicCode = "medical_insurance_type")
|
||||
@ApiModelProperty(value = "医保类型")
|
||||
private java.lang.String medicalType;
|
||||
/**
|
||||
* 报销类型
|
||||
*/
|
||||
@Dict(dicCode = "reimb_type")
|
||||
private java.lang.String reimbType;
|
||||
/**
|
||||
* 医保卡号
|
||||
*/
|
||||
@Excel(name = "医保卡号", width = 15)
|
||||
@ApiModelProperty(value = "医保卡号")
|
||||
private java.lang.String medicalCard;
|
||||
/**
|
||||
* 文化程度
|
||||
*/
|
||||
@Excel(name = "文化程度", width = 15)
|
||||
@ApiModelProperty(value = "文化程度")
|
||||
private java.lang.String educationLevel;
|
||||
/**
|
||||
* 婚姻状况
|
||||
*/
|
||||
@Excel(name = "婚姻状况", width = 15)
|
||||
@ApiModelProperty(value = "婚姻状况")
|
||||
private java.lang.String maritalStatus;
|
||||
/**
|
||||
* 宗教信仰
|
||||
*/
|
||||
@Excel(name = "宗教信仰", width = 15)
|
||||
@ApiModelProperty(value = "宗教信仰")
|
||||
private java.lang.String religiousBeliefs;
|
||||
/**
|
||||
* 身份证正面
|
||||
*/
|
||||
@Excel(name = "身份证正面", width = 15)
|
||||
@ApiModelProperty(value = "身份证正面")
|
||||
private java.lang.String idCardPositive;
|
||||
/**
|
||||
* 身份证反面
|
||||
*/
|
||||
@Excel(name = "身份证反面", width = 15)
|
||||
@ApiModelProperty(value = "身份证反面")
|
||||
private java.lang.String idCardNegative;
|
||||
/**
|
||||
* 户口本本人页
|
||||
*/
|
||||
@Excel(name = "户口本本人页", width = 15)
|
||||
@ApiModelProperty(value = "户口本本人页")
|
||||
private java.lang.String accountBookHimself;
|
||||
/**
|
||||
* 医保卡正面
|
||||
*/
|
||||
@Excel(name = "医保卡正面", width = 15)
|
||||
@ApiModelProperty(value = "医保卡正面")
|
||||
private java.lang.String frontMedical;
|
||||
/**
|
||||
* 医保卡反面
|
||||
*/
|
||||
@Excel(name = "医保卡反面", width = 15)
|
||||
@ApiModelProperty(value = "医保卡反面")
|
||||
private java.lang.String negaticeMedical;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private java.lang.String content;
|
||||
/**
|
||||
* 当前状态 0咨询 1入住 2留床 3退住
|
||||
*/
|
||||
@Excel(name = "当前状态 0咨询 1入住 2留床 3退住", width = 15)
|
||||
@ApiModelProperty(value = "当前状态 0咨询 1入住 2留床 3退住")
|
||||
@Dict(dicCode = "current_state")
|
||||
private java.lang.String currentState;
|
||||
/**
|
||||
* 监护人openId
|
||||
*/
|
||||
@ApiModelProperty(value = "监护人openId")
|
||||
private java.lang.String guardianOpenId;
|
||||
/**
|
||||
* 监护人姓名
|
||||
*/
|
||||
@Excel(name = "监护人姓名", width = 15)
|
||||
@ApiModelProperty(value = "监护人姓名")
|
||||
private java.lang.String guardianName;
|
||||
/**
|
||||
* 监护人与老人关系
|
||||
*/
|
||||
@Excel(name = "监护人与老人关系", width = 15)
|
||||
@ApiModelProperty(value = "监护人与老人关系")
|
||||
private java.lang.String relationship;
|
||||
/**
|
||||
* 监护人身份证号
|
||||
*/
|
||||
@Excel(name = "监护人身份证号", width = 15)
|
||||
@ApiModelProperty(value = "监护人身份证号")
|
||||
private java.lang.String guardianIdCard;
|
||||
/**
|
||||
* 监护人联系电话
|
||||
*/
|
||||
@Excel(name = "监护人联系电话", width = 15)
|
||||
@ApiModelProperty(value = "监护人联系电话")
|
||||
private java.lang.String guardianPhone;
|
||||
/**
|
||||
* 监护人出生日期
|
||||
*/
|
||||
@Excel(name = "监护人出生日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "出生日期")
|
||||
private java.util.Date guardianDateOfBirth;
|
||||
/**
|
||||
* 监护人家庭住址
|
||||
*/
|
||||
@Excel(name = "监护人家庭住址", width = 15)
|
||||
@ApiModelProperty(value = "监护人家庭住址")
|
||||
private java.lang.String guardianHomeAddress;
|
||||
/**
|
||||
* 监护人工作单位
|
||||
*/
|
||||
@Excel(name = "监护人工作单位", width = 15)
|
||||
@ApiModelProperty(value = "监护人工作单位")
|
||||
private java.lang.String guardianWorkUnit;
|
||||
/**
|
||||
* 家庭住址
|
||||
*/
|
||||
@Excel(name = "家庭住址", width = 15)
|
||||
@ApiModelProperty(value = "家庭住址")
|
||||
private java.lang.String homeAddress;
|
||||
/**
|
||||
* 是否删除 0未删除 1删除
|
||||
*/
|
||||
@Excel(name = "是否删除 0未删除 1删除", width = 15)
|
||||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
||||
@TableLogic
|
||||
private java.lang.String delFlag;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
/**
|
||||
* 更新日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**
|
||||
* 签发机关
|
||||
*/
|
||||
private java.lang.String issuingAuthority;
|
||||
/**
|
||||
* 有效开始日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private java.util.Date startTime;
|
||||
/**
|
||||
* 有效结束日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private java.util.Date endTime;
|
||||
/**
|
||||
* 发卡日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private java.util.Date cardIssuing;
|
||||
/**
|
||||
* 血型
|
||||
*/
|
||||
private java.lang.String bloodType;
|
||||
/**
|
||||
* 兵役状况
|
||||
*/
|
||||
private java.lang.String militaryType;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.elderinfo.mapper;
|
||||
|
||||
import com.nu.modules.elderinfo.entity.ElderInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 长者信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ElderInfoMapper extends BaseMapper<ElderInfo> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.elderinfo.mapper.ElderInfoMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.elderinfo.service;
|
||||
|
||||
import com.nu.modules.elderinfo.entity.ElderInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 长者信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IElderInfoService extends IService<ElderInfo> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
package com.nu.modules.elderinfo.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.entity.ElderInfoEntity;
|
||||
import com.nu.modules.baseinfo.api.INuBaseInfoApi;
|
||||
import com.nu.modules.elder.api.IElderInfoApi;
|
||||
import com.nu.modules.elderinfo.entity.ElderInfo;
|
||||
import com.nu.modules.elderinfo.mapper.ElderInfoMapper;
|
||||
import com.nu.modules.elderinfo.service.IElderInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 长者信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ElderInfoServiceImpl extends ServiceImpl<ElderInfoMapper, ElderInfo> implements IElderInfoService, IElderInfoApi {
|
||||
@Autowired
|
||||
private INuBaseInfoApi nuBaseInfoApi;
|
||||
|
||||
@Override
|
||||
public List<ElderInfoEntity> queryByElderIds(String[] ids) {
|
||||
QueryWrapper<ElderInfo> qw = new QueryWrapper<>();
|
||||
qw.in("id", ids);
|
||||
return BeanUtil.copyToList(baseMapper.selectList(qw),ElderInfoEntity.class);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ElderInfoEntity> queryElders(String openId) {
|
||||
QueryWrapper<ElderInfo> qw = new QueryWrapper<>();
|
||||
qw.eq("guardian_open_id",openId);
|
||||
List<ElderInfo> elderInfos = baseMapper.selectList(qw);
|
||||
return BeanUtil.copyToList(elderInfos,ElderInfoEntity.class);
|
||||
}
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@ import com.nu.modules.async.entity.AsyncStatus;
|
|||
import com.nu.modules.async.service.IAsyncMainService;
|
||||
import com.nu.modules.async.service.IAsyncStatusService;
|
||||
import com.nu.modules.elder.api.ElderTagApi;
|
||||
import com.nu.modules.elder.entity.ElderTagExportApiEntity;
|
||||
import com.nu.entity.ElderTagExportEntity;
|
||||
import com.nu.modules.eldertag.entity.ElderTag;
|
||||
import com.nu.modules.eldertag.mapper.ElderTagMapper;
|
||||
import com.nu.modules.eldertag.service.IElderTagService;
|
||||
|
|
@ -106,9 +106,9 @@ public class ElderTagServiceImpl extends ServiceImpl<ElderTagMapper, ElderTag> i
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<ElderTagExportApiEntity> queryAllData() {
|
||||
public List<ElderTagExportEntity> queryAllData() {
|
||||
List<ElderTag> list = baseMapper.selectList(null);
|
||||
List<ElderTagExportApiEntity> result = BeanUtil.copyToList(list, ElderTagExportApiEntity.class);
|
||||
List<ElderTagExportEntity> result = BeanUtil.copyToList(list, ElderTagExportEntity.class);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-iot-api</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>nu-iot-local-api</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nursing-unit-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.nu.modules.humiddevice.api;
|
||||
|
||||
import com.nu.entity.HumidDeviceEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IHumidDeviceApi {
|
||||
List<HumidDeviceEntity> queryByNuIds(String nuids);
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nursing-unit-iot</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>nu-iot-api</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>nu-iot-local-api</module>
|
||||
</modules>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nursing-unit-base-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nursing-unit-iot</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>nu-iot-biz</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-iot-local-api</artifactId>
|
||||
<version>${nursingunit.version}</version>
|
||||
</dependency>
|
||||
<!-- COMMON 通用工具模块 -->
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nursing-unit-common</artifactId>
|
||||
<version>${nursingunit.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>hibernate-re</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework</groupId>
|
||||
<artifactId>weixin4j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tplink.ignite.libs</groupId>
|
||||
<artifactId>tums-auth</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-system-local-api</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-admin-local-api</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-nu-local-api</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
package com.nu.modules.yiweilian.humid.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>Class:易维联-温湿度计Entity
|
||||
* <p>功能描述:功能描述
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_iot_yiweilian_humid_device")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_iot_yiweilian_humid_device对象", description="易维联-温湿设备")
|
||||
public class HumidDevice implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Integer id;
|
||||
@Excel(name = "设备SN号", width = 15)
|
||||
@ApiModelProperty(value = "设备SN号")
|
||||
private String sn;
|
||||
@Excel(name = "设备名称", width = 15)
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
private String deviceName;
|
||||
@Excel(name = "设备类型", width = 15)
|
||||
@ApiModelProperty(value = "设备类型")
|
||||
private String deviceTypes;//一共16位,第几位为1代表设备有该功能. 1位温度 2位湿度 15位电量
|
||||
@Excel(name = "上报间隔", width = 15)
|
||||
@ApiModelProperty(value = "上报间隔")
|
||||
private String reportingInterval; //实时数据上报时间间隔 单位分钟
|
||||
@Excel(name = "记录间隔", width = 15)
|
||||
@ApiModelProperty(value = "记录间隔")
|
||||
private String recordInterval; //记录时间间隔 单位分钟
|
||||
@Excel(name = "历史数据上报时刻", width = 15)
|
||||
@ApiModelProperty(value = "历史数据上报时刻")
|
||||
private String historyReportTime; //历史数据上报时刻 00:00
|
||||
@Excel(name = "历史数据上报间隔", width = 15)
|
||||
@ApiModelProperty(value = "历史数据上报间隔")
|
||||
private String historyInterval; //历史数据上报间隔 单位小时
|
||||
@Excel(name = "温度预警范围 上限值", width = 15)
|
||||
@ApiModelProperty(value = "温度预警范围 上限值")
|
||||
private String temperatureHigh ; //温度预警范围-上限值
|
||||
@Excel(name = "温度预警范围 下限值", width = 15)
|
||||
@ApiModelProperty(value = "温度预警范围 下限值")
|
||||
private String temperatureLow; //温度预警范围-下限值
|
||||
@Excel(name = "温度缓冲值", width = 15)
|
||||
@ApiModelProperty(value = "温度缓冲值")
|
||||
private String temperatureBuffer; //温度缓冲值
|
||||
@Excel(name = "湿度预警范围 上限值", width = 15)
|
||||
@ApiModelProperty(value = "湿度预警范围 上限值")
|
||||
private String humidityHigh; //湿度预警范围-上限值
|
||||
@Excel(name = "湿度预警范围 下限值", width = 15)
|
||||
@ApiModelProperty(value = "湿度预警范围 下限值")
|
||||
private String humidityLow; //湿度预警范围-下限值
|
||||
@Excel(name = "湿度缓冲值", width = 15)
|
||||
@ApiModelProperty(value = "湿度缓冲值")
|
||||
private String humidityBuffer; //湿度缓冲值
|
||||
@Excel(name = "设备所在时区", width = 15)
|
||||
@ApiModelProperty(value = "设备所在时区")
|
||||
private String timeCode; //设备所在时区 01北京时间 02纽约时间
|
||||
@Excel(name = "断电报警", width = 15)
|
||||
@ApiModelProperty(value = "断电报警")
|
||||
private String izOutages; //断电报警 0开启 1关闭
|
||||
@Excel(name = "低电报警", width = 15)
|
||||
@ApiModelProperty(value = "低电报警")
|
||||
private String izLowBattery; //低电报警 0开启 1关闭
|
||||
@Excel(name = "上下线通知", width = 15)
|
||||
@ApiModelProperty(value = "上下线通知")
|
||||
private String izOnline; //上下线通知 0开启 1关闭
|
||||
@Excel(name = "温度", width = 15)
|
||||
@ApiModelProperty(value = "温度")
|
||||
private String temperature; //温度
|
||||
@Excel(name = "湿度", width = 15)
|
||||
@ApiModelProperty(value = "湿度")
|
||||
private String humidity; //湿度
|
||||
@Excel(name = "在线状态", width = 15)
|
||||
@ApiModelProperty(value = "在线状态")
|
||||
private String status; //在线状态,0在线 1离线
|
||||
@Excel(name = "最新上报时间", width = 15)
|
||||
@ApiModelProperty(value = "最新上报时间")
|
||||
private String reportingTime; //最新上报时间
|
||||
@Excel(name = "电量", width = 15)
|
||||
@ApiModelProperty(value = "电量")
|
||||
private String electricity; //电量 0~4
|
||||
|
||||
@TableField(exist = false)
|
||||
private String optType; //操作类型
|
||||
@TableField(exist = false)
|
||||
private String optTime; //操作时间
|
||||
@TableField(exist = false)
|
||||
private String optBy; //操作人
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer alarmCn; //告警数量
|
||||
|
||||
@Dict(dicCode = "nu_id", dicText = "nu_name", dictTable = "nu_base_info")
|
||||
private String nuId;//护理单元ID
|
||||
private String nuName;//护理单元
|
||||
private String departId;//机构ID
|
||||
private String departName;//机构名称
|
||||
private String departServerUrl;//机构服务地址
|
||||
private String oldServerUrl;//原机构服务地址
|
||||
private String syncType;//是否同步 0 未同步 1已同步
|
||||
private String oldDepartId;//原机构id
|
||||
private String oldDepartName;//原机构名称
|
||||
/**维修状态*/
|
||||
private String maintainStatus;
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.nu.modules.yiweilian.humid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.yiweilian.humid.entity.HumidDevice;
|
||||
|
||||
public interface HumidDeviceMapper extends BaseMapper<HumidDevice> {
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.yiweilian.humid.mapper.HumidDeviceMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.nu.modules.yiweilian.humid.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.yiweilian.humid.entity.HumidDevice;
|
||||
|
||||
public interface IHumidDeviceService extends IService<HumidDevice> {
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.nu.modules.yiweilian.humid.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.entity.HumidDeviceEntity;
|
||||
import com.nu.modules.humiddevice.api.IHumidDeviceApi;
|
||||
import com.nu.modules.yiweilian.humid.entity.HumidDevice;
|
||||
import com.nu.modules.yiweilian.humid.mapper.HumidDeviceMapper;
|
||||
import com.nu.modules.yiweilian.humid.service.IHumidDeviceService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class HumidDeviceServiceImpl extends ServiceImpl<HumidDeviceMapper, HumidDevice> implements IHumidDeviceService, IHumidDeviceApi {
|
||||
|
||||
|
||||
@Override
|
||||
public List<HumidDeviceEntity> queryByNuIds(String nuids) {
|
||||
QueryWrapper<HumidDevice> qw = new QueryWrapper<>();
|
||||
qw.in("nu_id",nuids.split(","));
|
||||
qw.orderByDesc("reporting_time");
|
||||
List<HumidDevice> list = baseMapper.selectList(qw);
|
||||
return BeanUtil.copyToList(list,HumidDeviceEntity.class);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nursing-unit-parent</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>nursing-unit-iot</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>nu-iot-api</module>
|
||||
<module>nu-iot-biz</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
|
|
@ -36,6 +36,12 @@
|
|||
<artifactId>nu-invoicing-biz</artifactId>
|
||||
<version>${nursingunit.version}</version>
|
||||
</dependency>
|
||||
<!-- IOT 摄像头 模块 -->
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-iot-biz</artifactId>
|
||||
<version>${nursingunit.version}</version>
|
||||
</dependency>
|
||||
<!-- nu 基础模块 -->
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
|
|
|
|||
Loading…
Reference in New Issue