diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/service/impl/HealthPersonInfoServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/service/impl/HealthPersonInfoServiceImpl.java
index cc25e21..e4e4538 100644
--- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/service/impl/HealthPersonInfoServiceImpl.java
+++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/service/impl/HealthPersonInfoServiceImpl.java
@@ -37,7 +37,9 @@ public class HealthPersonInfoServiceImpl implements IHealthPersonInfoService {
@Override
public HealthPersonInfo selectHealthPersonInfoById(Long id) {
HealthPersonInfo vo=healthPersonInfoMapper.selectHealthPersonInfoById(id);
- vo.setMobile(SM4EncryptUtils.sm4Decrypt(vo.getMobile()==null?"":vo.getMobile()));
+ if(vo!=null){
+ vo.setMobile(SM4EncryptUtils.sm4Decrypt(vo.getMobile()==null?"":vo.getMobile()));
+ }
return vo;
}
diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/health/HealthPersonInfoMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/health/HealthPersonInfoMapper.xml
index b1d8485..e7fd05b 100644
--- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/health/HealthPersonInfoMapper.xml
+++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/health/HealthPersonInfoMapper.xml
@@ -25,6 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
@@ -135,7 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
c.heart_rate,
c.blood_oxygen,
c.uric_acid,
- c.blood_pressure,
+ c.blood_pressure,sd.dept_name,
GROUP_CONCAT(d.chronic_name ORDER BY d.chronic_id desc) AS chronic_names,
GROUP_CONCAT(d.chronic_id ORDER BY d.chronic_id desc) AS chronic_ids
from sys_user a
@@ -143,6 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join health_person_body_record c on a.user_id = c.user_id and c.if_latest = 1
left join health_person_info_chronic d on a.user_id = d.user_id
left join health_chronic hc on d.chronic_id=hc.chronic_id
+ left join sys_dept sd on a.dept_id = sd.dept_id
where a.user_id = #{userId} and hc.chronic_id is not null
group by a.user_id,
a.user_name,
@@ -177,7 +179,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
c.heart_rate,
c.blood_oxygen,
c.uric_acid,
- c.blood_pressure
+ c.blood_pressure,sd.dept_id
diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/health/HealthPersonMedicalReportMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/health/HealthPersonMedicalReportMapper.xml
index d82c62c..3b2a956 100644
--- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/health/HealthPersonMedicalReportMapper.xml
+++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/health/HealthPersonMedicalReportMapper.xml
@@ -29,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and medical_mechanism = #{medicalMechanism} and medical_template_id = #{medicalTemplateId}
+ order by create_time desc