提交 9b44aaca authored 作者: 杨凯's avatar 杨凯

feat:家庭医生初始化

上级 6f02c712
...@@ -184,28 +184,20 @@ public class PatientSignServiceImpl implements PatientSignService { ...@@ -184,28 +184,20 @@ public class PatientSignServiceImpl implements PatientSignService {
public BaseResponse<PageUtil<ImInfoListResVo>> queryImInfoList(ImInfoListDocReqDTO param) { public BaseResponse<PageUtil<ImInfoListResVo>> queryImInfoList(ImInfoListDocReqDTO param) {
param.setPageNum((param.getPageNum() - 1) * param.getPageSize()); param.setPageNum((param.getPageNum() - 1) * param.getPageSize());
List<ImInfoListResVo> records = patientSignMapper.queryImInfoList(param); List<ImInfoListResVo> records = patientSignMapper.queryImInfoList(param);
//根据患者id分组
Map<String, List<ImInfoListResVo>> collect =
records.stream().collect(Collectors.groupingBy(ImInfoListResVo::getPatientId));
List<ImInfoListResVo> resVo = new ArrayList<>(); List<ImInfoListResVo> resVo = new ArrayList<>();
for (String key : collect.keySet()) { for (ImInfoListResVo imInfoListResVo : records) {
List<ImInfoListResVo> zkFbImInfoListResVos = collect.get(key); Integer age = IDCardUtil.getAge(imInfoListResVo.getCredNo());
List<String> admIds = zkFbImInfoListResVos.stream().map(ImInfoListResVo::getAdmId).collect(Collectors.toList()); Integer gender = IDCardUtil.getGenderForInteger(imInfoListResVo.getCredNo());
ImInfoListResVo record = zkFbImInfoListResVos.get(0);
Integer age = IDCardUtil.getAge(record.getCredNo()); imInfoListResVo.setAge(age);
Integer gender = IDCardUtil.getGenderForInteger(record.getCredNo()); imInfoListResVo.setGender(gender);
record.setAge(age); String statusDesc = StatusEnum.getDesc(imInfoListResVo.getStatus());
record.setGender(gender); imInfoListResVo.setStatusDesc(statusDesc);
String statusDesc = StatusEnum.getDesc(record.getStatus()); imInfoListResVo.setStatus(imInfoListResVo.getStatus());
record.setStatusDesc(statusDesc); resVo.add(imInfoListResVo);
record.setStatus(record.getStatus());
record.setAdmIds(admIds);
resVo.add(record);
} }
resVo = resVo.stream().sorted(Comparator.comparing(ImInfoListResVo::getUpdateTime)).collect(Collectors.toList()); resVo = resVo.stream().sorted(Comparator.comparing(ImInfoListResVo::getUpdateTime)).collect(Collectors.toList());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论