Compare commits

...

10 Commits

Author SHA1 Message Date
纪寒
6fd5c8e564 环境修改 2024-01-11 10:56:30 +08:00
纪寒
9b3508ce39 Merge remote-tracking branch 'origin/jihan_0920_护理服务、商城、积分兑换、在线问诊功能分支' into jh_20231124_河口项目功能分支
# Conflicts:
#	xinelu-framework/src/main/java/com/xinelu/framework/config/SecurityConfig.java
2024-01-11 10:52:42 +08:00
zhangheng
8cdf6de90d 护理服务修改距离 2024-01-09 13:42:42 +08:00
zhangheng
3464ebfd6a 护理服务修改距离 2024-01-09 13:36:03 +08:00
zhangheng
5ccd42db13 护理服务修改距离 2024-01-09 11:33:56 +08:00
haown
4e8ebe49d2 update===>增加专病复诊记录接口。 2024-01-04 09:56:17 +08:00
haown
c210e36a84 update===>:获取体征检测数据。 2024-01-02 16:56:36 +08:00
纪寒
dfb289f8ad 环境修改 2023-12-28 15:36:36 +08:00
haown
e3085e9b78 update===>:增加获取体征检测列表接口。 2023-12-28 13:30:56 +08:00
HaoWang
2336a38c15 小程序:一体化照护方案/照护记录 2023-12-19 14:36:13 +08:00
31 changed files with 823 additions and 38 deletions

View File

@ -3,19 +3,21 @@ package com.xinelu.web.controller.applet;
import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.xinelu.common.core.domain.R; import com.xinelu.common.core.domain.R;
import com.xinelu.common.enums.FollowupType;
import com.xinelu.common.utils.http.HttpService; import com.xinelu.common.utils.http.HttpService;
import com.xinelu.common.utils.spring.SpringUtils; import com.xinelu.common.utils.spring.SpringUtils;
import com.xinelu.familydoctor.applet.pojo.dto.MedicalRecord; import com.xinelu.familydoctor.applet.pojo.dto.MedicalRecord;
import com.xinelu.familydoctor.applet.pojo.vo.*; import com.xinelu.familydoctor.applet.pojo.vo.FollowUpRecordDetailVo;
import com.xinelu.familydoctor.applet.pojo.vo.MedicalDetailVo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/** /**
* @Author mengkuiliang * @Author mengkuiliang
@ -82,7 +84,7 @@ public class FollowupController {
} }
@ApiOperation("获取公卫体检记录") @ApiOperation("获取公卫体检记录时间轴")
@GetMapping("fetch/record/{identity}") @GetMapping("fetch/record/{identity}")
public R<List<MedicalRecord>> fetchMedicalRecord(@PathVariable String identity, @RequestHeader("region") String region) { public R<List<MedicalRecord>> fetchMedicalRecord(@PathVariable String identity, @RequestHeader("region") String region) {
if (identity == null || identity.isEmpty()) { if (identity == null || identity.isEmpty()) {

View File

@ -0,0 +1,65 @@
package com.xinelu.web.controller.applet;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.xinelu.applet.vo.specialdisease.PerformanceLastRecordVo;
import com.xinelu.common.constant.HttpStatus;
import com.xinelu.common.core.domain.R;
import com.xinelu.common.core.domain.SelectVo;
import com.xinelu.common.utils.http.HttpService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
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;
/**
* @description: 专病复诊记录控制器
* @author: haown
* @create: 2024-01-03 16:22
**/
@Api(tags = "专病复诊记录控制器")
@RestController
@RequestMapping("/applet/performance")
public class SdPerformanceController {
@Resource
private HttpService httpService;
@Value("${sd.url}")
private String sdUrl;
@GetMapping("/timelineList/{identity}")
@ApiOperation(value = "查询复诊记录时间轴")
public R<List<SelectVo>> timelineList(@PathVariable("identity") String identity) {
String result = (String) httpService.get(sdUrl + "/business/applet/performance/timelineList/" + identity, null, String.class);
JSONObject jsonObject = JSONObject.parseObject(result);
if (HttpStatus.SUCCESS == jsonObject.getInteger("code")) {
if (jsonObject.get("data") == null) {
return R.fail("暂无相关数据");
}
return R.ok(JSON.parseArray(jsonObject.getString("data"), SelectVo.class));
} else {
return R.fail(jsonObject.get("msg").toString());
}
}
@GetMapping("/getDetail/{perRecordId}")
@ApiOperation("获取履约详情")
public R<PerformanceLastRecordVo> getDetail(@PathVariable String perRecordId) {
String result = (String) httpService.get(sdUrl + "/business/applet/performance/getDetail/" + perRecordId, null, String.class);
JSONObject jsonObject = JSONObject.parseObject(result);
if (HttpStatus.SUCCESS == jsonObject.getInteger("code")) {
if (jsonObject.get("data") == null) {
return R.fail("暂无相关数据");
}
return R.ok(JSON.toJavaObject(jsonObject.getJSONObject("data"), PerformanceLastRecordVo.class));
} else {
return R.fail(jsonObject.get("msg").toString());
}
}
}

View File

@ -2,18 +2,31 @@ package com.xinelu.web.controller.familydoctor;
import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.domain.R; import com.xinelu.common.core.domain.R;
import com.xinelu.familydoctor.entity.*; import com.xinelu.common.core.domain.SelectVo;
import com.xinelu.common.core.domain.TimelineVo;
import com.xinelu.familydoctor.dto.PhysicalSignDto;
import com.xinelu.familydoctor.entity.DeviceBfRecord;
import com.xinelu.familydoctor.entity.DeviceBgRecord;
import com.xinelu.familydoctor.entity.DeviceBmiRecord;
import com.xinelu.familydoctor.entity.DeviceBoRecord;
import com.xinelu.familydoctor.entity.DeviceBpRecord;
import com.xinelu.familydoctor.entity.DeviceHrRecord;
import com.xinelu.familydoctor.entity.DeviceTempRecord;
import com.xinelu.familydoctor.service.PhysicalSignService; import com.xinelu.familydoctor.service.PhysicalSignService;
import com.xinelu.familydoctor.vo.PhysicalLastRecordVO; import com.xinelu.familydoctor.vo.PhysicalLastRecordVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/** /**
* @author gaoyu * @author gaoyu
@ -92,4 +105,28 @@ public class PhysicalSignController extends BaseController {
public R<List<PhysicalLastRecordVO>> lastRecord(@PathVariable String identity) { public R<List<PhysicalLastRecordVO>> lastRecord(@PathVariable String identity) {
return R.ok(physicalSignService.getLastRecord(identity)); return R.ok(physicalSignService.getLastRecord(identity));
} }
@GetMapping("/timelineList")
@ApiOperation(value = "获取体征检测记录时间轴", response = TimelineVo.class, notes = "获取体征检测记录时间轴", httpMethod = "GET")
@ApiImplicitParams({@ApiImplicitParam(name = "identity", value = "身份证号", required = true),
@ApiImplicitParam(name = "label", value = "查询标识1血糖2血压3血脂4bmi5血氧6心率7体温", required = true)})
public R<List<SelectVo>> TimelineList(String identity, String label) {
return R.ok(physicalSignService.getTimelineList(identity, label));
}
@ApiOperation("根据体征主键获取体征对象")
@GetMapping("getById")
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "体征检测主键", required = true),
@ApiImplicitParam(name = "label", value = "查询标识1血糖2血压3血脂4bmi5血氧6心率7体温", required = true)})
public R<?> getById(Integer id, String label) {
Map<String, Object> map = physicalSignService.getById(id, label);
return R.ok(map);
}
@GetMapping("/getList")
@ApiOperation(value = "分页查询体征检测记录列表", response = TimelineVo.class, notes = "分页查询体征检测记录列表", httpMethod = "GET")
public R<?> getList(PhysicalSignDto physicalSignDto) {
Map<String, Object> map = physicalSignService.getList(physicalSignDto);
return R.ok(map);
}
} }

View File

@ -6,7 +6,7 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
url: jdbc:mysql://182.92.166.109:8000/xinelu-database?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://192.168.16.64:3306/xinelu-database?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: root
password: 1qaz!@#$ password: 1qaz!@#$
# 从库数据源 # 从库数据源

View File

@ -6,7 +6,7 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
url: jdbc:mysql://101.200.89.70:8000/xinelu-database?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://192.168.16.64:3306/xinelu-applet?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: root
password: 1qaz!@#$ password: 1qaz!@#$
# 从库数据源 # 从库数据源
@ -44,7 +44,7 @@ spring:
url-pattern: /druid/* url-pattern: /druid/*
# 控制台管理用户名和密码 # 控制台管理用户名和密码
login-username: admin login-username: admin
login-password: 123456 login-password: admin123456
filter: filter:
stat: stat:
enabled: true enabled: true

View File

@ -99,8 +99,8 @@ xinelu:
# 开发环境配置 # 开发环境配置
server: server:
# 服务器的HTTP端口默认为8088 # 服务器的HTTP端口默认为8098
port: 8080 port: 8098
servlet: servlet:
# 应用的访问路径 # 应用的访问路径
context-path: / context-path: /
@ -118,6 +118,7 @@ server:
# 日志配置 # 日志配置
logging: logging:
level: level:
# 生产环境为info开发为debug
com.xinelu: debug com.xinelu: debug
org.springframework: warn org.springframework: warn
@ -148,7 +149,7 @@ spring:
# 端口默认为6379 # 端口默认为6379
port: 6379 port: 6379
# 数据库索引 # 数据库索引
database: 0 database: 11
# 密码 # 密码
password: xinelu@6990 password: xinelu@6990
# 连接超时时间 # 连接超时时间
@ -257,13 +258,21 @@ xss:
# 匹配链接 # 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/* urlPatterns: /system/*,/monitor/*,/tool/*
# 家医配置 # 家医配置德州正式地址http://10.2.130.163:8003/fd/mp东营正式地址http://218.58.213.15:8009/fd/mp
fd: fd:
dz: http://8.131.93.145:54007/fd/mp dz: http://8.131.93.145:54007/fd/mp
dy: http://8.131.93.145:54008/fd/mp dy: http://8.131.93.145:54008/fd/mp
# 签约附近的机构多少公里内 <=0时不限制 # 签约附近的机构多少公里内 <=0时不限制
distance: 0 distance: 0
# 三高后端服务地址东营三高正式地址http://218.58.213.15:8002
th:
url: http://127.0.0.1:8080
# 专病后端服务地址,德州正式外网地址https://fdmp.xinelu.cn/dzsd
sd:
url: http://20.1.1.97:8080
# 腾讯云音视频 # 腾讯云音视频
trtc: trtc:
sdkappid: 1600006944 sdkappid: 1600006944
@ -309,6 +318,7 @@ xyl-we-chat-config:
xyl-mch-serial-no: 7C6A18FC8E1F0445901B1BE1C4DD1ACE284C3D79 xyl-mch-serial-no: 7C6A18FC8E1F0445901B1BE1C4DD1ACE284C3D79
xyl-private-key-path: xinyilu_apiclient_key.pem xyl-private-key-path: xinyilu_apiclient_key.pem
xyl-payment-key: Xyl699003981qazVFR4xsw23edcASDFG xyl-payment-key: Xyl699003981qazVFR4xsw23edcASDFG
# 正式回调域名https://hekou-nurse-api.xinyilu.cn
xyl-wechat-notify-url: https://1608.xinelu.cn xyl-wechat-notify-url: https://1608.xinelu.cn
# 微信支付接口地址包含小程序和App支付接口地址 # 微信支付接口地址包含小程序和App支付接口地址

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<configuration> <configuration>
<!-- 日志存放路径 --> <!-- 日志存放路径线上日志路径E:\\xinelu-file\\logs -->
<property name="log.path" value="/home/xinelu/logs"/> <property name="log.path" value="D:\\xinelu-file\\logs"/>
<!-- 日志输出格式 --> <!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/> <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>

View File

@ -0,0 +1,26 @@
package com.xinelu.familydoctor.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @description: 体征检测查询传输对象
* @author: haown
* @create: 2024-01-02 16:05
**/
@ApiModel("体征检测查询传输对象")
@Data
public class PhysicalSignDto {
@ApiModelProperty("身份证号")
private String identity;
@ApiModelProperty("查询标识1血糖2血压3血脂4bmi5血氧6心率7体温")
private String label;
@ApiModelProperty("页码")
private Integer pageNum;
@ApiModelProperty("每页显示记录数")
private Integer pageSize;
}

View File

@ -1,5 +1,6 @@
package com.xinelu.familydoctor.mapper; package com.xinelu.familydoctor.mapper;
import com.xinelu.common.core.domain.TimelineVo;
import com.xinelu.familydoctor.entity.DeviceBfRecord; import com.xinelu.familydoctor.entity.DeviceBfRecord;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -27,4 +28,8 @@ public interface DeviceBfRecordMapper {
int update(DeviceBfRecord record); int update(DeviceBfRecord record);
List<TimelineVo> selectTimeLineList(@Param("identity") String identity);
DeviceBfRecord selectById(Integer id);
} }

View File

@ -1,11 +1,11 @@
package com.xinelu.familydoctor.mapper; package com.xinelu.familydoctor.mapper;
import com.xinelu.common.core.domain.TimelineVo;
import com.xinelu.familydoctor.entity.DeviceBgRecord; import com.xinelu.familydoctor.entity.DeviceBgRecord;
import com.xinelu.familydoctor.vo.BgCalcVO; import com.xinelu.familydoctor.vo.BgCalcVO;
import com.xinelu.familydoctor.vo.PhysicalLastRecordVO; import com.xinelu.familydoctor.vo.PhysicalLastRecordVO;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param;
/** /**
* @author gaoyu * @author gaoyu
@ -39,5 +39,11 @@ public interface DeviceBgRecordMapper {
int update(DeviceBgRecord record); int update(DeviceBgRecord record);
List<PhysicalLastRecordVO> getLastRecord(String identity); List<PhysicalLastRecordVO> getLastRecord(String identity);
List<TimelineVo> selectTimeLineList(@Param("identity") String identity);
DeviceBgRecord selectById(Integer id);
List<DeviceBgRecord> getBgList(@Param("identity") String identity);
} }

View File

@ -1,5 +1,6 @@
package com.xinelu.familydoctor.mapper; package com.xinelu.familydoctor.mapper;
import com.xinelu.common.core.domain.TimelineVo;
import com.xinelu.familydoctor.entity.DeviceBmiRecord; import com.xinelu.familydoctor.entity.DeviceBmiRecord;
import com.xinelu.familydoctor.vo.BmiCalcVO; import com.xinelu.familydoctor.vo.BmiCalcVO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -38,4 +39,8 @@ public interface DeviceBmiRecordMapper {
int update(DeviceBmiRecord record); int update(DeviceBmiRecord record);
List<TimelineVo> selectTimeLineList(@Param("identity") String identity);
DeviceBmiRecord selectById(Integer id);
} }

View File

@ -1,12 +1,10 @@
package com.xinelu.familydoctor.mapper; package com.xinelu.familydoctor.mapper;
import com.xinelu.familydoctor.entity.DeviceBmiRecord; import com.xinelu.common.core.domain.TimelineVo;
import com.xinelu.familydoctor.entity.DeviceBoRecord; import com.xinelu.familydoctor.entity.DeviceBoRecord;
import com.xinelu.familydoctor.vo.BmiCalcVO;
import com.xinelu.familydoctor.vo.BoCalcVO; import com.xinelu.familydoctor.vo.BoCalcVO;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param;
/** /**
* @author gaoyu * @author gaoyu
@ -40,4 +38,8 @@ public interface DeviceBoRecordMapper {
int update(DeviceBoRecord record); int update(DeviceBoRecord record);
List<TimelineVo> selectTimeLineList(@Param("identity") String identity);
DeviceBoRecord selectById(Integer id);
} }

View File

@ -1,10 +1,10 @@
package com.xinelu.familydoctor.mapper; package com.xinelu.familydoctor.mapper;
import com.xinelu.common.core.domain.TimelineVo;
import com.xinelu.familydoctor.entity.DeviceBpRecord; import com.xinelu.familydoctor.entity.DeviceBpRecord;
import com.xinelu.familydoctor.vo.BpCalcVO; import com.xinelu.familydoctor.vo.BpCalcVO;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param;
/** /**
* @author gaoyu * @author gaoyu
@ -38,4 +38,9 @@ public interface DeviceBpRecordMapper {
int update(DeviceBpRecord record); int update(DeviceBpRecord record);
List<TimelineVo> selectTimeLineList(@Param("identity") String identity);
DeviceBpRecord selectById(Integer id);
List<DeviceBpRecord> getBpList(@Param("identity") String identity);
} }

View File

@ -1,5 +1,6 @@
package com.xinelu.familydoctor.mapper; package com.xinelu.familydoctor.mapper;
import com.xinelu.common.core.domain.TimelineVo;
import com.xinelu.familydoctor.entity.DeviceHrRecord; import com.xinelu.familydoctor.entity.DeviceHrRecord;
import com.xinelu.familydoctor.vo.HrCalcVO; import com.xinelu.familydoctor.vo.HrCalcVO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -38,4 +39,8 @@ public interface DeviceHrRecordMapper {
int update(DeviceHrRecord record); int update(DeviceHrRecord record);
List<TimelineVo> selectTimeLineList(@Param("identity") String identity);
DeviceHrRecord selectById(Integer id);
} }

View File

@ -1,12 +1,10 @@
package com.xinelu.familydoctor.mapper; package com.xinelu.familydoctor.mapper;
import com.xinelu.familydoctor.entity.DeviceBoRecord; import com.xinelu.common.core.domain.TimelineVo;
import com.xinelu.familydoctor.entity.DeviceTempRecord; import com.xinelu.familydoctor.entity.DeviceTempRecord;
import com.xinelu.familydoctor.vo.BoCalcVO;
import com.xinelu.familydoctor.vo.TempCalcVO; import com.xinelu.familydoctor.vo.TempCalcVO;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param;
/** /**
* @author gaoyu * @author gaoyu
@ -40,4 +38,8 @@ public interface DeviceTempRecordMapper {
int update(DeviceTempRecord record); int update(DeviceTempRecord record);
List<TimelineVo> selectTimeLineList(@Param("identity") String identity);
DeviceTempRecord selectById(Integer id);
} }

View File

@ -1,5 +1,7 @@
package com.xinelu.familydoctor.service; package com.xinelu.familydoctor.service;
import com.xinelu.common.core.domain.SelectVo;
import com.xinelu.familydoctor.dto.PhysicalSignDto;
import com.xinelu.familydoctor.entity.*; import com.xinelu.familydoctor.entity.*;
import com.xinelu.familydoctor.vo.PhysicalLastRecordVO; import com.xinelu.familydoctor.vo.PhysicalLastRecordVO;
@ -33,4 +35,10 @@ public interface PhysicalSignService {
* @date 2023-10-20 14:56 * @date 2023-10-20 14:56
*/ */
List<PhysicalLastRecordVO> getLastRecord(String identity); List<PhysicalLastRecordVO> getLastRecord(String identity);
List<SelectVo> getTimelineList(String identity, String label);
Map<String, Object> getById(Integer id, String label);
Map<String, Object> getList(PhysicalSignDto physicalSignDto);
} }

View File

@ -1,9 +1,17 @@
package com.xinelu.familydoctor.service.impl; package com.xinelu.familydoctor.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xinelu.common.core.domain.SelectVo;
import com.xinelu.common.core.domain.TimelineVo;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.familydoctor.dto.PhysicalSignDto;
import com.xinelu.familydoctor.entity.*; import com.xinelu.familydoctor.entity.*;
import com.xinelu.familydoctor.mapper.*; import com.xinelu.familydoctor.mapper.*;
import com.xinelu.familydoctor.service.PhysicalSignService; import com.xinelu.familydoctor.service.PhysicalSignService;
import com.xinelu.familydoctor.vo.*; import com.xinelu.familydoctor.vo.*;
import java.util.ArrayList;
import java.util.stream.Collectors;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -104,7 +112,110 @@ public class PhysicalSignServiceImpl implements PhysicalSignService {
return deviceBgRecordMapper.getLastRecord(identity); return deviceBgRecordMapper.getLastRecord(identity);
} }
private Map<String, Object> bgRecord(String identity, String type) { @Override public List<SelectVo> getTimelineList(String identity, String label) {
List<TimelineVo> timelineVos = new ArrayList<>();
switch (label) {
case "1":
timelineVos = deviceBgRecordMapper.selectTimeLineList(identity);
break;
case "2":
timelineVos = deviceBpRecordMapper.selectTimeLineList(identity);
break;
case "3":
timelineVos = deviceBfRecordMapper.selectTimeLineList(identity);
break;
case "4":
timelineVos = deviceBmiRecordMapper.selectTimeLineList(identity);
break;
case "5":
timelineVos = deviceBoRecordMapper.selectTimeLineList(identity);
break;
case "6":
timelineVos = deviceHrRecordMapper.selectTimeLineList(identity);
break;
case "7":
timelineVos = deviceTempRecordMapper.selectTimeLineList(identity);
break;
default:
break;
}
// 按照年份进行分组
Map<String, List<TimelineVo>> groupByTime = timelineVos.stream().collect(Collectors.groupingBy(item-> DateUtils.formatDate(item.getCreateTime(), "yyyy")));
List<SelectVo> timeList = new ArrayList<>();
for (String time : groupByTime.keySet()) {
List<TimelineVo> timelineVoList = groupByTime.get(time);
List<SelectVo> children = timelineVoList.stream().map(child -> {
SelectVo result = new SelectVo();
result.setLabel(DateUtils.formatDate(child.getCreateTime(), "yyyy-MM-dd"));
result.setValue(child.getId());
return result;
}).collect(Collectors.toList());
timeList.add(SelectVo.builder()
.label(time)
.value(time)
.children(children).build());
}
return timeList;
}
@Override public Map<String, Object> getById(Integer id, String label) {
Map<String, Object> map = new HashMap<>();
switch (label) {
case "1":
DeviceBgRecord bg = deviceBgRecordMapper.selectById(id);
map.put("record", bg);
break;
case "2":
DeviceBpRecord bp = deviceBpRecordMapper.selectById(id);
map.put("record", bp);
break;
case "3":
DeviceBfRecord bf = deviceBfRecordMapper.selectById(id);
map.put("record", bf);
break;
case "4":
DeviceBmiRecord bmi = deviceBmiRecordMapper.selectById(id);
map.put("record", bmi);
break;
case "5":
DeviceBoRecord bo = deviceBoRecordMapper.selectById(id);
map.put("record", bo);
break;
case "6":
DeviceHrRecord hr = deviceHrRecordMapper.selectById(id);
map.put("record", hr);
break;
case "7":
DeviceTempRecord temp = deviceTempRecordMapper.selectById(id);
map.put("record", temp);
break;
default:
break;
}
return map;
}
@Override public Map<String, Object> getList(PhysicalSignDto physicalSignDto) {
Map<String, Object> map = new HashMap<>();
PageHelper.startPage(physicalSignDto.getPageNum(), physicalSignDto.getPageSize());
switch (physicalSignDto.getLabel()) {
case "1":
List<DeviceBgRecord> bgList = deviceBgRecordMapper.getBgList(physicalSignDto.getIdentity());
map.put("list", new PageInfo<>(bgList));
break;
case "2":
List<DeviceBpRecord> bpList = deviceBpRecordMapper.getBpList(physicalSignDto.getIdentity());
map.put("list", new PageInfo<>(bpList));
break;
default:
break;
}
return map;
}
private Map<String, Object> bgRecord(String identity, String type) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
List<DeviceBgRecord> list = deviceBgRecordMapper.getBgRecord(identity, type); List<DeviceBgRecord> list = deviceBgRecordMapper.getBgRecord(identity, type);
BgCalcVO calc = deviceBgRecordMapper.getBgCalc(identity, type); BgCalcVO calc = deviceBgRecordMapper.getBgCalc(identity, type);

View File

@ -82,4 +82,17 @@
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="selectTimeLineList" parameterType="java.lang.String" resultType="com.xinelu.common.core.domain.TimelineVo">
select
id, date_format(measure_time,'%Y-%m-%d') as createTime
from device_bf_record
where identity = #{identity}
order by measure_time desc
</select>
<select id="selectById" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from device_bf_record
where id = #{id,jdbcType=BIGINT}
</select>
</mapper> </mapper>

View File

@ -128,4 +128,22 @@
(select '7' AS "type", measure_time "date", null "bucket", temp "val" from device_temp_record (select '7' AS "type", measure_time "date", null "bucket", temp "val" from device_temp_record
where identity = #{identity} and measure_time &gt;= date_add(now(), interval -30 day) order by id desc limit 1) where identity = #{identity} and measure_time &gt;= date_add(now(), interval -30 day) order by id desc limit 1)
</select> </select>
<select id="selectTimeLineList" parameterType="java.lang.String" resultType="com.xinelu.common.core.domain.TimelineVo">
select
id, date_format(measure_time,'%Y-%m-%d') as createTime
from device_bg_record
where identity = #{identity}
order by measure_time desc
</select>
<select id="selectById" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from device_bg_record
where id = #{id,jdbcType=BIGINT}
</select>
<select id="getBgList" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from device_bg_record
where identity = #{identity}
order by measure_time desc
</select>
</mapper> </mapper>

View File

@ -105,4 +105,17 @@
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="selectTimeLineList" parameterType="java.lang.String" resultType="com.xinelu.common.core.domain.TimelineVo">
select
id, date_format(measure_time,'%Y-%m-%d') as createTime
from device_bmi_record
where identity = #{identity}
order by measure_time desc
</select>
<select id="selectById" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from device_bmi_record
where id = #{id,jdbcType=BIGINT}
</select>
</mapper> </mapper>

View File

@ -100,4 +100,17 @@
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="selectTimeLineList" parameterType="java.lang.String" resultType="com.xinelu.common.core.domain.TimelineVo">
select
id, date_format(measure_time,'%Y-%m-%d') as createTime
from device_bo_record
where identity = #{identity}
order by measure_time desc
</select>
<select id="selectById" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from device_bo_record
where id = #{id,jdbcType=BIGINT}
</select>
</mapper> </mapper>

View File

@ -310,4 +310,26 @@
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="selectTimeLineList" parameterType="java.lang.String" resultType="com.xinelu.common.core.domain.TimelineVo">
select
id, date_format(measure_time,'%Y-%m-%d') as createTime
from device_bp_record
where identity = #{identity}
order by measure_time desc
</select>
<select id="selectById" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from device_bp_record
where id = #{id,jdbcType=BIGINT}
</select>
<select id="getBpList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from device_bp_record
where identity = #{identity}
order by measure_time desc
</select>
</mapper> </mapper>

View File

@ -100,4 +100,17 @@
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="selectTimeLineList" parameterType="java.lang.String" resultType="com.xinelu.common.core.domain.TimelineVo">
select
id, date_format(measure_time,'%Y-%m-%d') as createTime
from device_hr_record
where identity = #{identity}
order by measure_time desc
</select>
<select id="selectById" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from device_hr_record
where id = #{id,jdbcType=BIGINT}
</select>
</mapper> </mapper>

View File

@ -96,4 +96,17 @@
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="selectTimeLineList" parameterType="java.lang.String" resultType="com.xinelu.common.core.domain.TimelineVo">
select
id, date_format(measure_time,'%Y-%m-%d') as createTime
from device_temp_record
where identity = #{identity}
order by measure_time desc
</select>
<select id="selectById" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from device_temp_record
where id = #{id,jdbcType=BIGINT}
</select>
</mapper> </mapper>

View File

@ -115,7 +115,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/login", "/register", "/captchaImage").anonymous() .antMatchers("/login", "/register", "/captchaImage").anonymous()
// 静态资源可匿名访问 // 静态资源可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**", "/nurseApplet/**", "/nurseApp/**", "/specialDisease/getUserInfo", "/monitor/payTask/handCloseOrder", "/newApp/login/**", "/system/hospitalPerson/**", "/evaluate/**", "/webSocket/**", "/nurseApplet/nursingOrder/getConsultationOrder").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**", "/nurseApplet/**", "/nurseApp/**", "/specialDisease/getUserInfo", "/monitor/payTask/handCloseOrder", "/newApp/login/**", "/system/hospitalPerson/**", "/evaluate/**", "/webSocket/**", "/nurseApplet/nursingOrder/getConsultationOrder", "/fd/ps/getList/**", "/nurseApp/orderEvaluate/insertGoodsEvaluate").permitAll()
.antMatchers(antMatchers.split(",")).permitAll() .antMatchers(antMatchers.split(",")).permitAll()
// 除上面外的所有请求全部需要鉴权认证 // 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated() .anyRequest().authenticated()

View File

@ -20,7 +20,7 @@ import javax.annotation.Resource;
@Api(tags = "一体化照护方案控制器") @Api(tags = "一体化照护方案控制器")
@RestController @RestController
@RequestMapping("/chronic/careplan") @RequestMapping("/nurseApp/chronic/careplan")
public class SchemaController { public class SchemaController {
@Resource @Resource
private HttpService httpService; private HttpService httpService;

View File

@ -81,7 +81,7 @@ public class NearbyNursingStationServiceImpl implements INearbyNursingStationSer
stationClassifyMap = nearbyNursingStationMapper.getStationClassifyInfoList(stationIdIdList).stream().filter(item -> Objects.nonNull(item.getNurseStationId())).collect(Collectors.groupingBy(StationClassifyInfoVO::getNurseStationId)); stationClassifyMap = nearbyNursingStationMapper.getStationClassifyInfoList(stationIdIdList).stream().filter(item -> Objects.nonNull(item.getNurseStationId())).collect(Collectors.groupingBy(StationClassifyInfoVO::getNurseStationId));
} }
for (NursingStationAndClassifyVO nearbyNursingStationVO : nearbyNursingStationList) { for (NursingStationAndClassifyVO nearbyNursingStationVO : nearbyNursingStationList) {
if (StringUtils.isBlank(nearbyNursingStationVO.getLatitude()) || StringUtils.isBlank(nearbyNursingStationVO.getLongitude())) { if (StringUtils.isBlank(nearbyNursingStationVO.getLatitude()) || StringUtils.isBlank(nearbyNursingStationVO.getLongitude()) || StringUtils.isBlank(dto.getHomeLongitude()) || StringUtils.isBlank(dto.getHomeLatitude())) {
nearbyNursingStationVO.setDistance(null); nearbyNursingStationVO.setDistance(null);
} else { } else {
String latitude = nearbyNursingStationVO.getLatitude(); String latitude = nearbyNursingStationVO.getLatitude();
@ -177,7 +177,7 @@ public class NearbyNursingStationServiceImpl implements INearbyNursingStationSer
List<NurseClassifyInfo> nurseClassifyInfoList = nearbyNursingStationMapper.selectNurseClassifyByClassifyType(NurseClassifyInfoEnum.NURSE_ITEM.getInfo()); List<NurseClassifyInfo> nurseClassifyInfoList = nearbyNursingStationMapper.selectNurseClassifyByClassifyType(NurseClassifyInfoEnum.NURSE_ITEM.getInfo());
nearbyNursingStationVO.setNurseClassifyInfoList(nurseClassifyInfoList); nearbyNursingStationVO.setNurseClassifyInfoList(nurseClassifyInfoList);
//计算经纬度 //计算经纬度
if (StringUtils.isBlank(nearbyNursingStationVO.getLatitude()) || StringUtils.isBlank(nearbyNursingStationVO.getLongitude())) { if (StringUtils.isBlank(nearbyNursingStationVO.getLatitude()) || StringUtils.isBlank(nearbyNursingStationVO.getLongitude()) || StringUtils.isBlank(homeLongitude) || StringUtils.isBlank(homeLatitude)) {
nearbyNursingStationVO.setDistance(null); nearbyNursingStationVO.setDistance(null);
} else { } else {
String latitude = nearbyNursingStationVO.getLatitude(); String latitude = nearbyNursingStationVO.getLatitude();

View File

@ -0,0 +1,63 @@
package com.xinelu.applet.vo.specialdisease;
import java.io.Serializable;
import lombok.Data;
/**
* 履约项目信息表
* @TableName th_performance_form
*/
@Data
public class PerformanceForm implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 业务主键
*/
private String perFormId;
/**
* 业务主键
*/
private String perRecordId;
/**
* 服务项目编号
*/
private String projectId;
/**
* 服务项目名称
*/
private String projectName;
/**
* 问题描述
*/
private String descripe;
/**
* 处置详情
*/
private String content;
/**
* 附件1
*/
private String attachments1;
/**
* 附件2
*/
private String attachments2;
/**
* 附件3
*/
private String attachments3;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,67 @@
package com.xinelu.applet.vo.specialdisease;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import lombok.Data;
/**
* @description: 获取最后一次随访记录详情视图类
* @author: haown
* @create: 2022-11-10 09:54
**/
@Data
@ApiModel("获取最后一次随访记录详情视图类")
public class PerformanceLastRecordVo {
@ApiModelProperty(value = "身高")
private BigDecimal height;
@ApiModelProperty(value = "体重")
private BigDecimal weight;
@ApiModelProperty(value = "BMI")
private BigDecimal bmi;
@ApiModelProperty(value = "腰围")
private Integer waistline;
@ApiModelProperty(value = "收缩压单位mmHg")
private Integer sbp;
@ApiModelProperty(value = "舒张压单位mmHg")
private Integer dbp;
@ApiModelProperty(value = "心率(单位:次/分)")
private Integer hr;
@ApiModelProperty(value = "空腹血糖单位mmol/L")
private BigDecimal fbg;
@ApiModelProperty(value = "餐后两小时血糖单位mmol/L")
private BigDecimal pbg;
@ApiModelProperty(value = "履约时间")
@JsonFormat(pattern ="yyyy-MM-dd", timezone = "GMT+8")
private Date performanceDate;
@ApiModelProperty(value = "控制是否满意")
private String satisfied;
@ApiModelProperty(value = "履约项目集合")
private List<PerformanceForm> formList = new ArrayList<>();
@ApiModelProperty(value = "目前用药集合")
private List<PerformanceMedication> drugList = new ArrayList<>();
@ApiModelProperty(value = "调整用药集合")
private List<PerformanceMedication> adjustDrugList = new ArrayList<>();
@ApiModelProperty(value = "处方集合")
private List<PrescriptionRecordDetail> prescriptionList = new ArrayList<>();
}

View File

@ -0,0 +1,53 @@
package com.xinelu.applet.vo.specialdisease;
import java.io.Serializable;
import lombok.Data;
/**
* 履约用药信息表
* @TableName th_performance_medication
*/
@Data
public class PerformanceMedication implements Serializable {
/**
* 自增主键
*/
private Long id;
/**
* 居民身份证号
*/
private String identity;
/**
* 履约记录编码
*/
private String perRecordId;
/**
* 药物类别 0目前用药 1调整用药
*/
private String medicineCategory;
/**
* 药物名称
*/
private String medicineName;
/**
* 用法
*/
private String freq;
/**
* 用量
*/
private String dose;
/**
* 单位
*/
private String unit;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,208 @@
package com.xinelu.applet.vo.specialdisease;
import java.io.Serializable;
/**
*
* @TableName sd_prescription_record_detail
*/
public class PrescriptionRecordDetail implements Serializable {
/**
*
*/
private Integer id;
/**
* 处方记录业务主键
*/
private String prescriptionRecordId;
/**
* 模版业务主键
*/
private String templateId;
/**
* 模版名称
*/
private String templateName;
/**
* 处方类型(0健康教育处方1运动处方2营养处方 3 用药调整处方)
*/
private String templateType;
/**
* 内容
*/
private String content;
/**
* 适用疾病
*/
private String targetGroups;
/** 履约记录编号 */
private String perRecordId;
private static final long serialVersionUID = 1L;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
public String getPerRecordId() {
return perRecordId;
}
public void setPerRecordId(String perRecordId) {
this.perRecordId = perRecordId;
}
/**
* 处方记录业务主键
*/
public String getPrescriptionRecordId() {
return prescriptionRecordId;
}
/**
* 处方记录业务主键
*/
public void setPrescriptionRecordId(String prescriptionRecordId) {
this.prescriptionRecordId = prescriptionRecordId;
}
/**
* 模版业务主键
*/
public String getTemplateId() {
return templateId;
}
/**
* 模版业务主键
*/
public void setTemplateId(String templateId) {
this.templateId = templateId;
}
/**
* 模版名称
*/
public String getTemplateName() {
return templateName;
}
/**
* 模版名称
*/
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
/**
* 处方类型(0健康教育处方1运动处方2营养处方 3 用药调整处方)
*/
public String getTemplateType() {
return templateType;
}
/**
* 处方类型(0健康教育处方1运动处方2营养处方 3 用药调整处方)
*/
public void setTemplateType(String templateType) {
this.templateType = templateType;
}
/**
* 内容
*/
public String getContent() {
return content;
}
/**
* 内容
*/
public void setContent(String content) {
this.content = content;
}
/**
* 适用疾病
*/
public String getTargetGroups() {
return targetGroups;
}
/**
* 适用疾病
*/
public void setTargetGroups(String targetGroups) {
this.targetGroups = targetGroups;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
PrescriptionRecordDetail other = (PrescriptionRecordDetail) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getPrescriptionRecordId() == null ? other.getPrescriptionRecordId() == null : this.getPrescriptionRecordId().equals(other.getPrescriptionRecordId()))
&& (this.getTemplateId() == null ? other.getTemplateId() == null : this.getTemplateId().equals(other.getTemplateId()))
&& (this.getTemplateName() == null ? other.getTemplateName() == null : this.getTemplateName().equals(other.getTemplateName()))
&& (this.getTemplateType() == null ? other.getTemplateType() == null : this.getTemplateType().equals(other.getTemplateType()))
&& (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
&& (this.getTargetGroups() == null ? other.getTargetGroups() == null : this.getTargetGroups().equals(other.getTargetGroups()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getPrescriptionRecordId() == null) ? 0 : getPrescriptionRecordId().hashCode());
result = prime * result + ((getTemplateId() == null) ? 0 : getTemplateId().hashCode());
result = prime * result + ((getTemplateName() == null) ? 0 : getTemplateName().hashCode());
result = prime * result + ((getTemplateType() == null) ? 0 : getTemplateType().hashCode());
result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
result = prime * result + ((getTargetGroups() == null) ? 0 : getTargetGroups().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", prescriptionRecordId=").append(prescriptionRecordId);
sb.append(", templateId=").append(templateId);
sb.append(", templateName=").append(templateName);
sb.append(", templateType=").append(templateType);
sb.append(", content=").append(content);
sb.append(", targetGroups=").append(targetGroups);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}