Browse Source

修改后台报告

master
ccsens_zhengzhichuan 1 day ago
parent
commit
afb7d9a8dd
  1. 62
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/persist/dao/StatisticsDao.java
  2. 30
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/StatisticsService.java
  3. 70
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/impl/StatisticsServiceImpl.java
  4. 141
      ruisi_java/ruisi-system/src/main/resources/mapper/dao/StatisticsDao.xml
  5. 14
      ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/controller/RmsController.java
  6. 349
      ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/controller/StatisticsController.java
  7. 308
      ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/controller/TjfxController.java
  8. 2
      ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/persist/dao/RmsDao.java
  9. 23
      ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/service/impl/RmsServiceImpl.java
  10. 94
      ruisi_java/ruisi-web-admin/src/main/resources/mapper/dao/RmsDao.xml

62
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/persist/dao/StatisticsDao.java

@ -16,78 +16,104 @@ public interface StatisticsDao {
/**
* 综合数据
*
* @param dto
* @return
*/
HomeDpVo.Zhsjgl nntotal(@Param("dto") StatisticsDto.Query dto);
HomeDpVo.Zhsjgl nntotal(@Param("dto") StatisticsDto.Query dto,
@Param("deptIdLIst") List<Long> deptIdLIst);
Integer getPatientNum(@Param("dto") StatisticsDto.Query dto,
@Param("sex") Byte sex);
@Param("sex") Byte sex,
@Param("deptIdLIst") List<Long> deptIdLIst);
/**
* BMI
*
* @param dto
* @return
*/
HomeDpVo.Bmi nnbmihjxy(@Param("dto") StatisticsDto.Query dto);
HomeDpVo.Bmi nnbmihjxy(@Param("dto") StatisticsDto.Query dto,
@Param("deptIdLIst") List<Long> deptIdLIst);
/**
* 最新评估情况
*
* @param dto
* @return
*/
List<HomeDpVo.Pgqk> nnlast(@Param("dto") StatisticsDto.Query dto);
List<HomeDpVo.Pgqk> nnlast(@Param("dto") StatisticsDto.Query dto,
@Param("deptIdLIst") List<Long> deptIdLIst);
/**
* 年龄分布
*
* @param dto
* @return
*/
HomeDpVo.Nlfb nnage(@Param("dto") StatisticsDto.Query dto);
HomeDpVo.Nlfb nnage(@Param("dto") StatisticsDto.Query dto,
@Param("deptIdLIst") List<Long> deptIdLIst);
/**
* T值分析
*
* @param dto
* @return
*/
HomeDpVo.Tz nntgb(@Param("dto") StatisticsDto.Query dto);
HomeDpVo.Tz nntgb(@Param("dto") StatisticsDto.Query dto,
@Param("deptIdLIst") List<Long> deptIdLIst);
HomeDpVo.Ypzb nnYpzb(@Param("dto") StatisticsDto.Query dto);
HomeDpVo.Ypzb nnYpzb(@Param("dto") StatisticsDto.Query dto,
@Param("deptIdLIst") List<Long> deptIdLIst);
/**
* 疾病排行
*
* @param dto
* @return
*/
List<HomeDpVo.Jbph> nnicd(@Param("dto") StatisticsDto.Query dto);
List<HomeDpVo.Jbph> nnicd(@Param("dto") StatisticsDto.Query dto,
@Param("deptIdLIst") List<Long> deptIdLIst);
/**
* 地图
*
* @param dto
* @return
*/
List<HomeDpVo.Dt> nnmap(@Param("dto") StatisticsDto.Query dto);
List<HomeDpVo.Dt> nnmap(@Param("dto") StatisticsDto.Query dto,
@Param("deptIdLIst") List<Long> deptIdLIst);
/**
* 评估结果
*
* @param dto
* @return
*/
List<HomeDpVo.Pgjg> nnscale(@Param("dto") StatisticsDto.Query dto);
List<HomeDpVo.Pgjg> nnscale(@Param("dto") StatisticsDto.Query dto,
@Param("deptIdLIst") List<Long> deptIdLIst);
List<HomeDpVo.QualificationStatistics> qualificationStatistics(@Param("dto") StatisticsDto.Query dto);
List<HomeDpVo.QualificationStatistics> qualificationStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("deptIdLIst") List<Long> deptIdLIst);
HomeDpVo.JzStatistics JzStatistics(@Param("param") StatisticsDto.Query dto);
HomeDpVo.JzStatistics JzStatistics(@Param("param") StatisticsDto.Query dto,
@Param("deptIdLIst") List<Long> deptIdLIst);
HomeDpVo.JzStatistics JzStatisticsNum(@Param("dto") StatisticsDto.Query dto);
HomeDpVo.JzStatistics JzStatisticsNum(@Param("dto") StatisticsDto.Query dto,
@Param("deptIdLIst") List<Long> deptIdLIst);
List<HomeDpVo.ScaleStatistics> scaleStatistics(@Param("dto") StatisticsDto.Query dto);
List<HomeDpVo.ScaleStatistics> scaleStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("deptIdLIst") List<Long> deptIdLIst);
List<HomeDpVo.VersionStatistics> versionStatistics(@Param("dto") StatisticsDto.Query dto);
List<HomeDpVo.VersionStatistics> versionStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("deptIdLIst") List<Long> deptIdLIst);
List<HomeDpVo.UserStatistics> userStatistics(@Param("dto") StatisticsDto.Query dto);
List<HomeDpVo.UserStatistics> userStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("deptIdLIst") List<Long> deptIdLIst);
HomeDpVo.SexStatistics sexStatistics(@Param("dto") StatisticsDto.Query dto);
HomeDpVo.SexStatistics sexStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("deptIdLIst") List<Long> deptIdLIst);
HomeDpVo.XyYjStatistics xyYjStatistics(@Param("dto") StatisticsDto.Query dto);
HomeDpVo.XyYjStatistics xyYjStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("deptIdLIst") List<Long> deptIdLIst);
}

30
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/StatisticsService.java

@ -14,32 +14,32 @@ import java.util.List;
*/
public interface StatisticsService {
HomeDpVo.Zhsjgl nntotal(StatisticsDto.Query dto);
HomeDpVo.Zhsjgl nntotal(StatisticsDto.Query dto, List<Long> deptIdLIst);
HomeDpVo.Bmi nnbmihjxy(StatisticsDto.Query dto);
List<HomeDpVo.Pgqk> nnlast(StatisticsDto.Query dto);
HomeDpVo.Nlfb nnage(StatisticsDto.Query dto);
HomeDpVo.Tz nntgb(StatisticsDto.Query dto);
List<HomeDpVo.Jbph> nnicd(StatisticsDto.Query dto);
List<HomeDpVo.Dt> nnmap(StatisticsDto.Query dto);
List<HomeDpVo.Pgjg> nnscale(StatisticsDto.Query dto);
HomeDpVo.Bmi nnbmihjxy(StatisticsDto.Query dto, List<Long> deptIdLIst);
List<HomeDpVo.Pgqk> nnlast(StatisticsDto.Query dto, List<Long> deptIdLIst);
HomeDpVo.Nlfb nnage(StatisticsDto.Query dto, List<Long> deptIdLIst);
HomeDpVo.Tz nntgb(StatisticsDto.Query dto, List<Long> deptIdLIst);
List<HomeDpVo.Jbph> nnicd(StatisticsDto.Query dto, List<Long> deptIdLIst);
List<HomeDpVo.Dt> nnmap(StatisticsDto.Query dto, List<Long> deptIdLIst);
List<HomeDpVo.Pgjg> nnscale(StatisticsDto.Query dto, List<Long> deptIdLIst);
/**
* 学历统计
* @param dto
* @return
*/
List<HomeDpVo.QualificationStatistics> qualificationStatistics(StatisticsDto.Query dto);
List<HomeDpVo.QualificationStatistics> qualificationStatistics(StatisticsDto.Query dto, List<Long> deptIdLIst);
HomeDpVo.JzStatistics jzStatistics(StatisticsDto.Query dto);
HomeDpVo.JzStatistics jzStatistics(StatisticsDto.Query dto, List<Long> deptIdLIst);
List<HomeDpVo.ScaleStatistics> scaleStatistics(StatisticsDto.Query dto);
List<HomeDpVo.ScaleStatistics> scaleStatistics(StatisticsDto.Query dto, List<Long> deptIdLIst);
List<HomeDpVo.VersionStatistics> versionStatistics(StatisticsDto.Query dto);
List<HomeDpVo.VersionStatistics> versionStatistics(StatisticsDto.Query dto, List<Long> deptIdLIst);
List<HomeDpVo.UserStatistics> userStatistics(StatisticsDto.Query dto);
List<HomeDpVo.UserStatistics> userStatistics(StatisticsDto.Query dto, List<Long> deptIdLIst);
HomeDpVo.SexStatistics sexStatistics(StatisticsDto.Query dto);
HomeDpVo.SexStatistics sexStatistics(StatisticsDto.Query dto, List<Long> deptIdLIst);
HomeDpVo.XyYjStatistics xyYjStatistics(StatisticsDto.Query dto);
HomeDpVo.XyYjStatistics xyYjStatistics(StatisticsDto.Query dto, List<Long> deptIdLIst);
}

70
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/impl/StatisticsServiceImpl.java

@ -26,112 +26,112 @@ public class StatisticsServiceImpl implements StatisticsService {
private StatisticsDao statisticsDao;
@Override
public HomeDpVo.Zhsjgl nntotal(StatisticsDto.Query dto) {
public HomeDpVo.Zhsjgl nntotal(StatisticsDto.Query dto, List<Long> deptIdLIst) {
if (dto.getTimeType() != null) {
List<Date> dateByType = getDateByType(dto.getTimeType(), dto.getBeginTime());
dto.setBeginTime(dateByType.get(0));
dto.setEndTime(dateByType.get(1));
}
HomeDpVo.Zhsjgl nntotal = statisticsDao.nntotal(dto);
HomeDpVo.Zhsjgl nntotal = statisticsDao.nntotal(dto, deptIdLIst);
if (nntotal == null) {
nntotal = new HomeDpVo.Zhsjgl();
}
nntotal.setPtotal(statisticsDao.getPatientNum(dto, null));
nntotal.setMtotal(statisticsDao.getPatientNum(dto, (byte) 0));
nntotal.setFtotal(statisticsDao.getPatientNum(dto, (byte) 1));
nntotal.setPtotal(statisticsDao.getPatientNum(dto, null, deptIdLIst));
nntotal.setMtotal(statisticsDao.getPatientNum(dto, (byte) 0, deptIdLIst));
nntotal.setFtotal(statisticsDao.getPatientNum(dto, (byte) 1, deptIdLIst));
return nntotal;
}
@Override
public HomeDpVo.Bmi nnbmihjxy(StatisticsDto.Query dto) {
public HomeDpVo.Bmi nnbmihjxy(StatisticsDto.Query dto, List<Long> deptIdLIst) {
if (dto.getTimeType() != null) {
List<Date> dateByType = getDateByType(dto.getTimeType(), dto.getBeginTime());
dto.setBeginTime(dateByType.get(0));
dto.setEndTime(dateByType.get(1));
}
return statisticsDao.nnbmihjxy(dto);
return statisticsDao.nnbmihjxy(dto, deptIdLIst);
}
@Override
public List<HomeDpVo.Pgqk> nnlast(StatisticsDto.Query dto) {
public List<HomeDpVo.Pgqk> nnlast(StatisticsDto.Query dto, List<Long> deptIdLIst) {
if (dto.getTimeType() != null) {
List<Date> dateByType = getDateByType(dto.getTimeType(), dto.getBeginTime());
dto.setBeginTime(dateByType.get(0));
dto.setEndTime(dateByType.get(1));
}
return statisticsDao.nnlast(dto);
return statisticsDao.nnlast(dto, deptIdLIst);
}
@Override
public HomeDpVo.Nlfb nnage(StatisticsDto.Query dto) {
public HomeDpVo.Nlfb nnage(StatisticsDto.Query dto, List<Long> deptIdLIst) {
if (dto.getTimeType() != null) {
List<Date> dateByType = getDateByType(dto.getTimeType(), dto.getBeginTime());
dto.setBeginTime(dateByType.get(0));
dto.setEndTime(dateByType.get(1));
}
return statisticsDao.nnage(dto);
return statisticsDao.nnage(dto, deptIdLIst);
}
@Override
public HomeDpVo.Tz nntgb(StatisticsDto.Query dto) {
public HomeDpVo.Tz nntgb(StatisticsDto.Query dto, List<Long> deptIdLIst) {
if (dto.getTimeType() != null) {
List<Date> dateByType = getDateByType(dto.getTimeType(), dto.getBeginTime());
dto.setBeginTime(dateByType.get(0));
dto.setEndTime(dateByType.get(1));
}
return statisticsDao.nntgb(dto);
return statisticsDao.nntgb(dto, deptIdLIst);
}
@Override
public List<HomeDpVo.Jbph> nnicd(StatisticsDto.Query dto) {
public List<HomeDpVo.Jbph> nnicd(StatisticsDto.Query dto, List<Long> deptIdLIst) {
if (dto.getTimeType() != null) {
List<Date> dateByType = getDateByType(dto.getTimeType(), dto.getBeginTime());
dto.setBeginTime(dateByType.get(0));
dto.setEndTime(dateByType.get(1));
}
return statisticsDao.nnicd(dto);
return statisticsDao.nnicd(dto, deptIdLIst);
}
@Override
public List<HomeDpVo.Dt> nnmap(StatisticsDto.Query dto) {
public List<HomeDpVo.Dt> nnmap(StatisticsDto.Query dto, List<Long> deptIdLIst) {
if (dto.getTimeType() != null) {
List<Date> dateByType = getDateByType(dto.getTimeType(), dto.getBeginTime());
dto.setBeginTime(dateByType.get(0));
dto.setEndTime(dateByType.get(1));
}
return statisticsDao.nnmap(dto);
return statisticsDao.nnmap(dto, deptIdLIst);
}
@Override
public List<HomeDpVo.Pgjg> nnscale(StatisticsDto.Query dto) {
public List<HomeDpVo.Pgjg> nnscale(StatisticsDto.Query dto, List<Long> deptIdLIst) {
if (dto.getTimeType() != null) {
List<Date> dateByType = getDateByType(dto.getTimeType(), dto.getBeginTime());
dto.setBeginTime(dateByType.get(0));
dto.setEndTime(dateByType.get(1));
}
return statisticsDao.nnscale(dto);
return statisticsDao.nnscale(dto, deptIdLIst);
}
@Override
public List<HomeDpVo.QualificationStatistics> qualificationStatistics(StatisticsDto.Query dto) {
public List<HomeDpVo.QualificationStatistics> qualificationStatistics(StatisticsDto.Query dto, List<Long> deptIdLIst) {
if (dto.getTimeType() != null) {
List<Date> dateByType = getDateByType(dto.getTimeType(), dto.getBeginTime());
dto.setBeginTime(dateByType.get(0));
dto.setEndTime(dateByType.get(1));
}
return statisticsDao.qualificationStatistics(dto);
return statisticsDao.qualificationStatistics(dto, deptIdLIst);
}
@Override
public HomeDpVo.JzStatistics jzStatistics(StatisticsDto.Query dto) {
public HomeDpVo.JzStatistics jzStatistics(StatisticsDto.Query dto, List<Long> deptIdLIst) {
if (dto.getTimeType() != null) {
List<Date> dateByType = getDateByType(dto.getTimeType(), dto.getBeginTime());
dto.setBeginTime(dateByType.get(0));
dto.setEndTime(dateByType.get(1));
}
// HomeDpVo.JzStatistics jzStatistics = statisticsDao.JzStatisticsNum(dto);
// HomeDpVo.JzStatistics jzStatistics = statisticsDao.JzStatisticsNum(dto, deptIdLIst);
// if (jzStatistics!= null) {
HomeDpVo.JzStatistics jzStatistics = statisticsDao.JzStatistics(dto);
HomeDpVo.JzStatistics jzStatistics = statisticsDao.JzStatistics(dto, deptIdLIst);
// jzStatistics.setZyNum(jzStatistics1.getZyNum());
// jzStatistics.setMzNum(jzStatistics1.getMzNum());
// }
@ -139,37 +139,37 @@ public class StatisticsServiceImpl implements StatisticsService {
}
@Override
public List<HomeDpVo.ScaleStatistics> scaleStatistics(StatisticsDto.Query dto) {
public List<HomeDpVo.ScaleStatistics> scaleStatistics(StatisticsDto.Query dto, List<Long> deptIdLIst) {
if (dto.getTimeType() != null) {
List<Date> dateByType = getDateByType(dto.getTimeType(), dto.getBeginTime());
dto.setBeginTime(dateByType.get(0));
dto.setEndTime(dateByType.get(1));
}
return statisticsDao.scaleStatistics(dto);
return statisticsDao.scaleStatistics(dto, deptIdLIst);
}
@Override
public List<HomeDpVo.VersionStatistics> versionStatistics(StatisticsDto.Query dto) {
public List<HomeDpVo.VersionStatistics> versionStatistics(StatisticsDto.Query dto, List<Long> deptIdLIst) {
if (dto.getTimeType() != null) {
List<Date> dateByType = getDateByType(dto.getTimeType(), dto.getBeginTime());
dto.setBeginTime(dateByType.get(0));
dto.setEndTime(dateByType.get(1));
}
return statisticsDao.versionStatistics(dto);
return statisticsDao.versionStatistics(dto, deptIdLIst);
}
@Override
public List<HomeDpVo.UserStatistics> userStatistics(StatisticsDto.Query dto) {
public List<HomeDpVo.UserStatistics> userStatistics(StatisticsDto.Query dto, List<Long> deptIdLIst) {
if (dto.getTimeType() != null) {
List<Date> dateByType = getDateByType(dto.getTimeType(), dto.getBeginTime());
dto.setBeginTime(dateByType.get(0));
dto.setEndTime(dateByType.get(1));
}
return statisticsDao.userStatistics(dto);
return statisticsDao.userStatistics(dto, deptIdLIst);
}
@Override
public HomeDpVo.SexStatistics sexStatistics(StatisticsDto.Query dto) {
public HomeDpVo.SexStatistics sexStatistics(StatisticsDto.Query dto, List<Long> deptIdLIst) {
if (dto.getTimeType() != null) {
List<Date> dateByType = getDateByType(dto.getTimeType(), dto.getBeginTime());
dto.setBeginTime(dateByType.get(0));
@ -177,15 +177,15 @@ public class StatisticsServiceImpl implements StatisticsService {
}
HomeDpVo.SexStatistics sexStatistics = new HomeDpVo.SexStatistics();
sexStatistics.setBoy(statisticsDao.getPatientNum(dto, (byte) 0));
sexStatistics.setGirl(statisticsDao.getPatientNum(dto, (byte) 1));
sexStatistics.setBoy(statisticsDao.getPatientNum(dto, (byte) 0, deptIdLIst));
sexStatistics.setGirl(statisticsDao.getPatientNum(dto, (byte) 1, deptIdLIst));
return sexStatistics;
}
@Override
public HomeDpVo.XyYjStatistics xyYjStatistics(StatisticsDto.Query dto) {
return statisticsDao.xyYjStatistics(dto);
public HomeDpVo.XyYjStatistics xyYjStatistics(StatisticsDto.Query dto, List<Long> deptIdLIst) {
return statisticsDao.xyYjStatistics(dto, deptIdLIst);
}
/**

141
ruisi_java/ruisi-system/src/main/resources/mapper/dao/StatisticsDao.xml

@ -14,15 +14,18 @@
ems_evaluation e
LEFT JOIN ums_user u ON e.create_by = u.user_name
where e.del_flag = 0 and e.complete_status != 0
<if test="dto.deptId != null">
AND u.dept_id = #{dto.deptId}
</if>
<if test="dto.beginTime != null">
AND e.create_time >= #{dto.beginTime}
</if>
<if test="dto.endTime != null">
AND e.create_time &lt;= #{dto.endTime}
</if>
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND u.dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
</select>
<select id="getPatientNum" resultType="java.lang.Integer">
@ -30,9 +33,13 @@
COUNT(DISTINCT p.id) AS total
FROM
pms_patient p
LEFT JOIN ums_user u ON p.create_by = u.user_name
where p.del_flag = 0
<if test="dto.deptId != null">
AND p.hospital_id = #{dto.deptId}
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND u.dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
<if test="dto.beginTime != null">
AND p.create_time >= #{dto.beginTime}
@ -57,8 +64,11 @@
left JOIN pms_patient_body pb ON p.id = pb.patient_id
LEFT JOIN ums_user u ON p.create_by = u.user_name
where p.del_flag = 0
<if test="dto.deptId != null">
AND u.dept_id = #{dto.deptId}
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND u.dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
<if test="dto.beginTime != null">
AND p.create_time >= #{dto.beginTime}
@ -81,8 +91,11 @@
LEFT JOIN ums_user u ON e.create_by = u.user_name
where e.del_flag = 0
and e.patient_id != 0
<if test="dto.deptId != null">
AND u.dept_id = #{dto.deptId}
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND u.dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
<if test="dto.beginTime != null">
AND e.create_time >= #{dto.beginTime}
@ -101,8 +114,11 @@
pms_patient p
LEFT JOIN ums_user u ON p.create_by = u.user_name
where p.del_flag = 0
<if test="dto.deptId != null">
AND u.dept_id = #{dto.deptId}
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND u.dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
<if test="dto.beginTime != null">
AND p.create_time >= #{dto.beginTime}
@ -122,8 +138,11 @@
LEFT JOIN ums_user u ON b.create_by = u.user_name
WHERE
drug_name IS NOT NULL and del_flag = 0
<if test="dto.deptId != null">
AND u.dept_id = #{dto.deptId}
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND u.dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
<if test="dto.beginTime != null">
AND b.create_time >= #{dto.beginTime}
@ -145,12 +164,16 @@
FROM
pms_patient_diagnosis b
LEFT JOIN pms_patient p ON b.patient_id = p.id
left JOIN ums_user u ON b.create_by = u.user_name
WHERE
b.diagnosis_name IS NOT NULL
and diagnosis_name != ''
and b.del_flag = 0
<if test="dto.deptId != null">
AND p.hospital_id = #{dto.deptId}
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND u.dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
<if test="dto.beginTime != null">
AND b.create_time >= #{dto.beginTime}
@ -175,10 +198,14 @@
SELECT
TIMESTAMPDIFF(YEAR, birthday, CURDATE()) -
(DATE_FORMAT(CURDATE(), '%m%d') &lt; DATE_FORMAT(birthday, '%m%d')) AS age
FROM pms_patient
WHERE del_flag = 0
<if test="dto.deptId != null">
AND hospital_id = #{dto.deptId}
FROM pms_patient p
LEFT JOIN ums_user u ON p.create_by = u.user_name
WHERE p.del_flag = 0
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND u.dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
<if test="dto.beginTime != null">
AND create_time >= #{dto.beginTime}
@ -196,8 +223,11 @@
from ums_dept
where del_flag = 0
and parent_id = 0
<if test="dto.deptId != null">
AND dept_id = #{dto.deptId}
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
<if test="dto.beginTime != null">
AND create_time >= #{dto.beginTime}
@ -235,8 +265,11 @@
"PSQI",
"CAM"
)
<if test="dto.deptId != null">
AND p.hospital_id = #{dto.deptId}
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND u.dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
<if test="dto.beginTime != null">
AND r.create_time >= #{dto.beginTime}
@ -253,10 +286,14 @@
COUNT( p.id ) AS num
FROM
pms_patient p
LEFT JOIN ums_user u ON p.create_by = u.user_name
where
p.del_flag = 0
<if test="dto.deptId != null">
AND p.hospital_id = #{dto.deptId}
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND u.dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
<if test="dto.beginTime != null">
AND p.create_time >= #{dto.beginTime}
@ -286,14 +323,18 @@
pms_patient_body b
left join pms_patient p on b.patient_id = p.id
left join ems_evaluation e on e.visit_no = b.outpatient_no
left join ums_user u on b.create_by = u.user_name
<where>
b.del_flag = 0 and p.del_flag = 0
<if test="param.beginTime != null and param.endTime != null">
and b.diagnosis_date between #{param.beginTime} and #{param.endTime}
</if>
<if test="param.deptId != null">
and p.hospital_id = #{param.deptId}
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND u.dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
</where>
@ -336,9 +377,12 @@
WHERE e.del_flag = 0
AND e.visit_no != '0'
AND e.visit_no IS NOT NULL
<if test="dto.deptId != null">
AND u.dept_id = #{dto.deptId}
</if>
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND u.dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
<if test="dto.beginTime != null">
AND e.create_time >= #{dto.beginTime}
</if>
@ -362,8 +406,11 @@
LEFT JOIN pms_patient p ON e.patient_id = p.id
WHERE
e.del_flag = 0
<if test="dto.deptId != null">
AND p.hospital_id = #{dto.deptId}
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND u.dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
<if test="dto.beginTime != null">
AND ees.create_time >= #{dto.beginTime}
@ -385,8 +432,11 @@
LEFT JOIN rms_report r on r.evaluation_id = ee.id
LEFT JOIN ums_user u ON ee.create_by = u.user_name AND u.del_flag = 0
WHERE hv.del_flag = 0
<if test="dto.deptId != null">
AND u.dept_id = #{dto.deptId}
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND u.dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
<if test="dto.beginTime != null">
AND ee.create_time >= #{dto.beginTime}
@ -410,8 +460,11 @@
LEFT JOIN rms_report r on r.evaluation_id = ee.id
WHERE
u.del_flag = 0
<if test="dto.deptId != null">
AND u.dept_id = #{dto.deptId}
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND u.dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
<if test="dto.beginTime != null">
AND ee.create_time >= #{dto.beginTime}
@ -432,8 +485,11 @@
LEFT JOIN ums_user u ON p.create_by = u.user_name AND u.del_flag = 0
WHERE
p.del_flag = 0
<if test="dto.deptId != null">
AND u.dept_id = #{dto.deptId}
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND u.dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
<if test="dto.beginTime != null">
AND p.create_time >= #{dto.beginTime}
@ -463,9 +519,12 @@
WHERE
p.del_flag = 0
AND pp.del_flag = 0
<if test="dto.deptId != null">
AND u.dept_id = #{dto.deptId}
</if>
<if test="deptIdLIst != null and deptIdLIst.size() >0">
AND u.dept_id IN
<foreach item="item" collection="deptIdLIst" separator="," close=")" index="index" open="(">
#{item}
</foreach>
</if>
<if test="dto.beginTime != null">
AND p.create_time >= #{dto.beginTime}
</if>

14
ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/controller/RmsController.java

@ -3,6 +3,7 @@ package com.ccsens.admin.controller;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.CharsetUtil;
import com.ccsens.admin.service.IRmsService;
import com.ccsens.common.annotation.Anonymous;
import com.ccsens.common.core.controller.BaseController;
import com.ccsens.common.core.domain.BaseDto;
import com.ccsens.common.core.domain.JsonResponse;
@ -163,8 +164,8 @@ public class RmsController extends BaseController {
}
@ApiOperation(value = "查询测评列表", notes = "管理员查询测评列表")
@PostMapping("/queryReport")
public JsonResponse<PageInfo<RmsVo.Report>> queryReport(@RequestBody @ApiParam @Valid BaseDto<RmsDto.ReportQuery> param) {
@PostMapping("/queryEvaluation")
public JsonResponse<PageInfo<RmsVo.Report>> queryEvaluation(@RequestBody @ApiParam @Valid BaseDto<RmsDto.ReportQuery> param) {
if (param.getPageNum() > 0) {
PageHelper.startPage(param.getPageNum(), param.getPageSize());
}
@ -177,4 +178,13 @@ public class RmsController extends BaseController {
rmsService.exportEvaluation(dto.getParam(), response);
}
@Anonymous
@ApiOperation(value = "查询报告单详情",notes = "根据测评ID查询报告单详情")
@PostMapping(value="/queryReport")
public JsonResponse<RmsVo.ReportDetail> queryReport(@RequestBody @ApiParam @Valid RmsDto.QueryDetail dto){
log.info("生成报告单请求参数:{}", dto);
RmsVo.ReportDetail detail = rmsService.queryReport(dto);
return JsonResponse.ok(detail);
}
}

349
ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/controller/StatisticsController.java

@ -4,9 +4,11 @@ import cn.hutool.core.util.StrUtil;
import com.ccsens.common.annotation.Anonymous;
import com.ccsens.common.constant.WebConstant;
import com.ccsens.common.core.domain.JsonResponse;
import com.ccsens.common.utils.SecurityUtils;
import com.ccsens.system.domain.dto.StatisticsDto;
import com.ccsens.system.domain.vo.HomeDpVo;
import com.ccsens.system.service.StatisticsService;
import com.ccsens.system.service.SysPowerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@ -20,6 +22,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
/**
@ -36,245 +39,367 @@ public class StatisticsController {
@Resource
private StatisticsService statisticsService;
@Resource
private SysPowerService sysPowerService;
@Anonymous
@ApiOperation("获取疾病统计信息")
@PostMapping("/nntotal")
public JsonResponse<HomeDpVo.Zhsjgl> nntotal(@RequestBody StatisticsDto.Query dto) {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
dto.setDeptId(Long.parseLong(deptId));
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
deptIdList.add(Long.parseLong(deptId));
}
}
}else {
deptIdList.add(dto.getDeptId());
}
return JsonResponse.ok(statisticsService.nntotal(dto));
return JsonResponse.ok(statisticsService.nntotal(dto, deptIdList));
}
@Anonymous
@ApiOperation("BMI")
@PostMapping("/nnbmihjxy")
public JsonResponse<HomeDpVo.Bmi> nnbmihjxy(@RequestBody StatisticsDto.Query dto) {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
dto.setDeptId(Long.parseLong(deptId));
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
deptIdList.add(Long.parseLong(deptId));
}
}
}else {
deptIdList.add(dto.getDeptId());
}
return JsonResponse.ok(statisticsService.nnbmihjxy(dto));
return JsonResponse.ok(statisticsService.nnbmihjxy(dto, deptIdList));
}
@Anonymous
@ApiOperation("评估情况")
@PostMapping("/nnlast")
public JsonResponse<List<HomeDpVo.Pgqk>> nnlast(@RequestBody StatisticsDto.Query dto) {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
dto.setDeptId(Long.parseLong(deptId));
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
deptIdList.add(Long.parseLong(deptId));
}
}
}else {
deptIdList.add(dto.getDeptId());
}
return JsonResponse.ok(statisticsService.nnlast(dto));
return JsonResponse.ok(statisticsService.nnlast(dto, deptIdList));
}
@Anonymous
@ApiOperation("年龄")
@PostMapping("/nnage")
public JsonResponse<HomeDpVo.Nlfb> nnage(@RequestBody StatisticsDto.Query dto) {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
dto.setDeptId(Long.parseLong(deptId));
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
deptIdList.add(Long.parseLong(deptId));
}
}
}else {
deptIdList.add(dto.getDeptId());
}
return JsonResponse.ok(statisticsService.nnage(dto));
return JsonResponse.ok(statisticsService.nnage(dto, deptIdList));
}
@Anonymous
@ApiOperation("T值")
@PostMapping("/nntgb")
public JsonResponse<HomeDpVo.Tz> nntgb(@RequestBody StatisticsDto.Query dto) {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
dto.setDeptId(Long.parseLong(deptId));
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
deptIdList.add(Long.parseLong(deptId));
}
}
}else {
deptIdList.add(dto.getDeptId());
}
return JsonResponse.ok(statisticsService.nntgb(dto));
return JsonResponse.ok(statisticsService.nntgb(dto, deptIdList));
}
@Anonymous
@ApiOperation("疾病排行")
@PostMapping("/nnicd")
public JsonResponse<List<HomeDpVo.Jbph>> nnicd(@RequestBody StatisticsDto.Query dto) {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
dto.setDeptId(Long.parseLong(deptId));
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
deptIdList.add(Long.parseLong(deptId));
}
}
}else {
deptIdList.add(dto.getDeptId());
}
return JsonResponse.ok(statisticsService.nnicd(dto));
return JsonResponse.ok(statisticsService.nnicd(dto, deptIdList));
}
@Anonymous
@ApiOperation("地图")
@PostMapping("/nnmap")
public JsonResponse<List<HomeDpVo.Dt>> nnmap(@RequestBody StatisticsDto.Query dto) {
public JsonResponse<List<HomeDpVo.Dt>> nnmap(@RequestBody StatisticsDto.Query dto) {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
dto.setDeptId(Long.parseLong(deptId));
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
deptIdList.add(Long.parseLong(deptId));
}
}
}else {
deptIdList.add(dto.getDeptId());
}
return JsonResponse.ok(statisticsService.nnmap(dto));
return JsonResponse.ok(statisticsService.nnmap(dto, deptIdList));
}
@Anonymous
@ApiOperation("评估结果")
@PostMapping("/nnscale")
public JsonResponse<List<HomeDpVo.Pgjg>> nnscale(@RequestBody StatisticsDto.Query dto) {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
dto.setDeptId(Long.parseLong(deptId));
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
deptIdList.add(Long.parseLong(deptId));
}
}
}else {
deptIdList.add(dto.getDeptId());
}
return JsonResponse.ok(statisticsService.nnscale(dto));
return JsonResponse.ok(statisticsService.nnscale(dto, deptIdList));
}
@Anonymous
@ApiOperation("学历统计")
@PostMapping("/qualificationStatistics")
public JsonResponse<List<HomeDpVo.QualificationStatistics>> qualificationStatistics(@RequestBody StatisticsDto.Query dto) {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
dto.setDeptId(Long.parseLong(deptId));
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
deptIdList.add(Long.parseLong(deptId));
}
}
}else {
deptIdList.add(dto.getDeptId());
}
return JsonResponse.ok(statisticsService.qualificationStatistics(dto));
return JsonResponse.ok(statisticsService.qualificationStatistics(dto, deptIdList));
}
@Anonymous
@ApiOperation("就诊数量统计")
@PostMapping("/jzStatistics")
public JsonResponse<HomeDpVo.JzStatistics> jzStatistics(@RequestBody StatisticsDto.Query dto){
public JsonResponse<HomeDpVo.JzStatistics> jzStatistics(@RequestBody StatisticsDto.Query dto) {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
dto.setDeptId(Long.parseLong(deptId));
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
deptIdList.add(Long.parseLong(deptId));
}
}
}else {
deptIdList.add(dto.getDeptId());
}
return JsonResponse.ok(statisticsService.jzStatistics(dto));
return JsonResponse.ok(statisticsService.jzStatistics(dto, deptIdList));
}
@Anonymous
@ApiOperation("测评量表统计")
@PostMapping("/scaleStatistics")
public JsonResponse<List<HomeDpVo.ScaleStatistics>> scaleStatistics(@RequestBody StatisticsDto.Query dto){
public JsonResponse<List<HomeDpVo.ScaleStatistics>> scaleStatistics(@RequestBody StatisticsDto.Query dto) {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
dto.setDeptId(Long.parseLong(deptId));
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
deptIdList.add(Long.parseLong(deptId));
}
}
}else {
deptIdList.add(dto.getDeptId());
}
return JsonResponse.ok(statisticsService.scaleStatistics(dto));
return JsonResponse.ok(statisticsService.scaleStatistics(dto, deptIdList));
}
@Anonymous
@ApiOperation("测评版本统计")
@PostMapping("/versionStatistics")
public JsonResponse<List<HomeDpVo.VersionStatistics>> versionStatistics(@RequestBody StatisticsDto.Query dto){
public JsonResponse<List<HomeDpVo.VersionStatistics>> versionStatistics(@RequestBody StatisticsDto.Query dto) {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
dto.setDeptId(Long.parseLong(deptId));
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
deptIdList.add(Long.parseLong(deptId));
}
}
}else {
deptIdList.add(dto.getDeptId());
}
return JsonResponse.ok(statisticsService.versionStatistics(dto));
return JsonResponse.ok(statisticsService.versionStatistics(dto, deptIdList));
}
@Anonymous
@ApiOperation("测评师测评统计")
@PostMapping("/userStatistics")
public JsonResponse<List<HomeDpVo.UserStatistics>> userStatistics(@RequestBody StatisticsDto.Query dto){
public JsonResponse<List<HomeDpVo.UserStatistics>> userStatistics(@RequestBody StatisticsDto.Query dto) {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
dto.setDeptId(Long.parseLong(deptId));
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
deptIdList.add(Long.parseLong(deptId));
}
}
}else {
deptIdList.add(dto.getDeptId());
}
return JsonResponse.ok(statisticsService.userStatistics(dto));
return JsonResponse.ok(statisticsService.userStatistics(dto, deptIdList));
}
@Anonymous
@ApiOperation("性别统计")
@PostMapping("/sexStatistics")
public JsonResponse<HomeDpVo.SexStatistics> sexStatistics(@RequestBody StatisticsDto.Query dto){
public JsonResponse<HomeDpVo.SexStatistics> sexStatistics(@RequestBody StatisticsDto.Query dto) {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
dto.setDeptId(Long.parseLong(deptId));
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
deptIdList.add(Long.parseLong(deptId));
}
}
}else {
deptIdList.add(dto.getDeptId());
}
return JsonResponse.ok(statisticsService.sexStatistics(dto));
return JsonResponse.ok(statisticsService.sexStatistics(dto, deptIdList));
}
@Anonymous
@ApiOperation("吸烟饮酒统计")
@PostMapping("/xyYjStatistics")
public JsonResponse<HomeDpVo.XyYjStatistics> xyYjStatistics(@RequestBody StatisticsDto.Query dto){
public JsonResponse<HomeDpVo.XyYjStatistics> xyYjStatistics(@RequestBody StatisticsDto.Query dto) {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
dto.setDeptId(Long.parseLong(deptId));
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
deptIdList.add(Long.parseLong(deptId));
}
}
}else {
deptIdList.add(dto.getDeptId());
}
return JsonResponse.ok(statisticsService.xyYjStatistics(dto));
return JsonResponse.ok(statisticsService.xyYjStatistics(dto, deptIdList));
}
}

308
ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/controller/TjfxController.java

@ -1,154 +1,154 @@
package com.ccsens.admin.controller;
import cn.hutool.core.util.StrUtil;
import com.ccsens.common.annotation.Anonymous;
import com.ccsens.common.constant.WebConstant;
import com.ccsens.common.core.domain.JsonResponse;
import com.ccsens.system.domain.dto.StatisticsDto;
import com.ccsens.system.domain.vo.HomeDpVo;
import com.ccsens.system.service.StatisticsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.HttpRequestHandler;
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;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* @Author zzc
* @Package com.ccsens.admin.controller
* @Date 2025/9/6 9:47
* @description:
*/
@Slf4j
@Api(tags = "统计分析")
@RestController
@RequestMapping("/tjfx")
public class TjfxController {
@Resource
private StatisticsService statisticsService;
@Anonymous
@ApiOperation("获取疾病统计信息")
@PostMapping("/nntotal")
public JsonResponse<HomeDpVo.Zhsjgl> nntotal(@RequestBody StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.nntotal(dto));
}
@Anonymous
@ApiOperation("BMI")
@PostMapping("/nnbmihjxy")
public JsonResponse<HomeDpVo.Bmi> nnbmihjxy(@RequestBody StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.nnbmihjxy(dto));
}
@Anonymous
@ApiOperation("评估情况")
@PostMapping("/nnlast")
public JsonResponse<List<HomeDpVo.Pgqk>> nnlast(@RequestBody StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.nnlast(dto));
}
@Anonymous
@ApiOperation("年龄")
@PostMapping("/nnage")
public JsonResponse<HomeDpVo.Nlfb> nnage(@RequestBody StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.nnage(dto));
}
@Anonymous
@ApiOperation("T值")
@PostMapping("/nntgb")
public JsonResponse<HomeDpVo.Tz> nntgb(@RequestBody StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.nntgb(dto));
}
@Anonymous
@ApiOperation("疾病排行")
@PostMapping("/nnicd")
public JsonResponse<List<HomeDpVo.Jbph>> nnicd(@RequestBody StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.nnicd(dto));
}
@Anonymous
@ApiOperation("地图")
@PostMapping("/nnmap")
public JsonResponse<List<HomeDpVo.Dt>> nnmap(@RequestBody StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.nnmap(dto));
}
@Anonymous
@ApiOperation("评估结果")
@PostMapping("/nnscale")
public JsonResponse<List<HomeDpVo.Pgjg>> nnscale(@RequestBody StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.nnscale(dto));
}
@Anonymous
@ApiOperation("学历统计")
@PostMapping("/qualificationStatistics")
public JsonResponse<List<HomeDpVo.QualificationStatistics>> qualificationStatistics(@RequestBody StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.qualificationStatistics(dto));
}
@Anonymous
@ApiOperation("就诊数量统计")
@PostMapping("/jzStatistics")
public JsonResponse<HomeDpVo.JzStatistics> jzStatistics(@RequestBody StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.jzStatistics(dto));
}
@Anonymous
@ApiOperation("测评量表统计")
@PostMapping("/scaleStatistics")
public JsonResponse<List<HomeDpVo.ScaleStatistics>> scaleStatistics(@RequestBody StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.scaleStatistics(dto));
}
@Anonymous
@ApiOperation("测评版本统计")
@PostMapping("/versionStatistics")
public JsonResponse<List<HomeDpVo.VersionStatistics>> versionStatistics(@RequestBody StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.versionStatistics(dto));
}
@Anonymous
@ApiOperation("测评师测评统计")
@PostMapping("/userStatistics")
public JsonResponse<List<HomeDpVo.UserStatistics>> userStatistics(@RequestBody StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.userStatistics(dto));
}
@Anonymous
@ApiOperation("性别统计统计")
@PostMapping("/sexStatistics")
public JsonResponse<HomeDpVo.SexStatistics> sexStatistics(@RequestBody StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.sexStatistics(dto));
}
@Anonymous
@ApiOperation("吸烟饮酒统计")
@PostMapping("/xyYjStatistics")
public JsonResponse<HomeDpVo.XyYjStatistics> xyYjStatistics(@RequestBody StatisticsDto.Query dto) {
if (dto.getDeptId() == null) {
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
dto.setDeptId(Long.parseLong(deptId));
}
}
return JsonResponse.ok(statisticsService.xyYjStatistics(dto));
}
}
//package com.ccsens.admin.controller;
//
//import cn.hutool.core.util.StrUtil;
//import com.ccsens.common.annotation.Anonymous;
//import com.ccsens.common.constant.WebConstant;
//import com.ccsens.common.core.domain.JsonResponse;
//import com.ccsens.system.domain.dto.StatisticsDto;
//import com.ccsens.system.domain.vo.HomeDpVo;
//import com.ccsens.system.service.StatisticsService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.web.HttpRequestHandler;
//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;
//import org.springframework.web.context.request.RequestContextHolder;
//import org.springframework.web.context.request.ServletRequestAttributes;
//
//import javax.annotation.Resource;
//import javax.servlet.http.HttpServletRequest;
//import java.util.List;
//
///**
// * @Author zzc
// * @Package com.ccsens.admin.controller
// * @Date 2025/9/6 9:47
// * @description:
// */
//@Slf4j
//@Api(tags = "统计分析")
//@RestController
//@RequestMapping("/tjfx")
//public class TjfxController {
//
// @Resource
// private StatisticsService statisticsService;
//
//
// @Anonymous
// @ApiOperation("获取疾病统计信息")
// @PostMapping("/nntotal")
// public JsonResponse<HomeDpVo.Zhsjgl> nntotal(@RequestBody StatisticsDto.Query dto) {
// return JsonResponse.ok(statisticsService.nntotal(dto));
// }
//
// @Anonymous
// @ApiOperation("BMI")
// @PostMapping("/nnbmihjxy")
// public JsonResponse<HomeDpVo.Bmi> nnbmihjxy(@RequestBody StatisticsDto.Query dto) {
// return JsonResponse.ok(statisticsService.nnbmihjxy(dto));
// }
//
// @Anonymous
// @ApiOperation("评估情况")
// @PostMapping("/nnlast")
// public JsonResponse<List<HomeDpVo.Pgqk>> nnlast(@RequestBody StatisticsDto.Query dto) {
// return JsonResponse.ok(statisticsService.nnlast(dto));
// }
//
// @Anonymous
// @ApiOperation("年龄")
// @PostMapping("/nnage")
// public JsonResponse<HomeDpVo.Nlfb> nnage(@RequestBody StatisticsDto.Query dto) {
// return JsonResponse.ok(statisticsService.nnage(dto));
// }
//
// @Anonymous
// @ApiOperation("T值")
// @PostMapping("/nntgb")
// public JsonResponse<HomeDpVo.Tz> nntgb(@RequestBody StatisticsDto.Query dto) {
// return JsonResponse.ok(statisticsService.nntgb(dto));
// }
//
// @Anonymous
// @ApiOperation("疾病排行")
// @PostMapping("/nnicd")
// public JsonResponse<List<HomeDpVo.Jbph>> nnicd(@RequestBody StatisticsDto.Query dto) {
// return JsonResponse.ok(statisticsService.nnicd(dto));
// }
//
// @Anonymous
// @ApiOperation("地图")
// @PostMapping("/nnmap")
// public JsonResponse<List<HomeDpVo.Dt>> nnmap(@RequestBody StatisticsDto.Query dto) {
// return JsonResponse.ok(statisticsService.nnmap(dto));
// }
//
// @Anonymous
// @ApiOperation("评估结果")
// @PostMapping("/nnscale")
// public JsonResponse<List<HomeDpVo.Pgjg>> nnscale(@RequestBody StatisticsDto.Query dto) {
// return JsonResponse.ok(statisticsService.nnscale(dto));
// }
//
// @Anonymous
// @ApiOperation("学历统计")
// @PostMapping("/qualificationStatistics")
// public JsonResponse<List<HomeDpVo.QualificationStatistics>> qualificationStatistics(@RequestBody StatisticsDto.Query dto) {
// return JsonResponse.ok(statisticsService.qualificationStatistics(dto));
// }
//
// @Anonymous
// @ApiOperation("就诊数量统计")
// @PostMapping("/jzStatistics")
// public JsonResponse<HomeDpVo.JzStatistics> jzStatistics(@RequestBody StatisticsDto.Query dto) {
// return JsonResponse.ok(statisticsService.jzStatistics(dto));
// }
//
// @Anonymous
// @ApiOperation("测评量表统计")
// @PostMapping("/scaleStatistics")
// public JsonResponse<List<HomeDpVo.ScaleStatistics>> scaleStatistics(@RequestBody StatisticsDto.Query dto) {
// return JsonResponse.ok(statisticsService.scaleStatistics(dto));
// }
//
// @Anonymous
// @ApiOperation("测评版本统计")
// @PostMapping("/versionStatistics")
// public JsonResponse<List<HomeDpVo.VersionStatistics>> versionStatistics(@RequestBody StatisticsDto.Query dto) {
// return JsonResponse.ok(statisticsService.versionStatistics(dto));
// }
//
// @Anonymous
// @ApiOperation("测评师测评统计")
// @PostMapping("/userStatistics")
// public JsonResponse<List<HomeDpVo.UserStatistics>> userStatistics(@RequestBody StatisticsDto.Query dto) {
// return JsonResponse.ok(statisticsService.userStatistics(dto));
// }
//
// @Anonymous
// @ApiOperation("性别统计统计")
// @PostMapping("/sexStatistics")
// public JsonResponse<HomeDpVo.SexStatistics> sexStatistics(@RequestBody StatisticsDto.Query dto) {
// return JsonResponse.ok(statisticsService.sexStatistics(dto));
// }
//
// @Anonymous
// @ApiOperation("吸烟饮酒统计")
// @PostMapping("/xyYjStatistics")
// public JsonResponse<HomeDpVo.XyYjStatistics> xyYjStatistics(@RequestBody StatisticsDto.Query dto) {
// if (dto.getDeptId() == null) {
// // 获取请求携带的令牌
// HttpServletRequest request = ((ServletRequestAttributes)
// RequestContextHolder.getRequestAttributes()).getRequest();
// String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
// if (StrUtil.isNotEmpty(deptId)) {
// dto.setDeptId(Long.parseLong(deptId));
// }
// }
// return JsonResponse.ok(statisticsService.xyYjStatistics(dto));
// }
//}

2
ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/persist/dao/RmsDao.java

@ -138,7 +138,7 @@ public interface RmsDao {
List<RmsVo.Report> queryReport(@Param("dto") RmsDto.ReportQuery dto,
@Param("userId") Long userId);
List<RmsVo.ReportScore> queryEmsScaleScore(@Param("evaId") Long evaId,
List<RmsVo.ReportScore> queryEmsScaleScore(@Param("evaluationId") Long evaluationId,
@Param("scaleCodeList") List<String> scaleCodeList);
List<RmsVo.ReportPDF> viewReportPdfByVisitNo(@Param("visitNo")String visitNo);

23
ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/service/impl/RmsServiceImpl.java

@ -2942,11 +2942,32 @@ public class RmsServiceImpl implements IRmsService {
}
}
//查询测评量表
List<RmsVo.ReportScore> scores = rmsDao.queryEmsScaleScore(dto.getEvaluationId(), CollectionUtil.newArrayList());
List<RmsVo.ReportScore> scores = rmsDao.queryEmsScaleScore(report.getEvaluationId(), CollectionUtil.newArrayList());
if (CollUtil.isNotEmpty(scores)) {
//组装成父子级关系
scores = buildReportScoreTree(scores, 0L);
for (RmsVo.ReportScore score : scores) {
//查询量表的总分趋势信息
List<RmsVo.ScoreTrend> scoreTrend = rmsDao.getScoreTrend(reportPatient.getPatientId(), score.getCode(), time.getMinTime(), time.getMaxTime());
//折线图上只显示近5条记录
if (CollectionUtil.isNotEmpty(scoreTrend) && scoreTrend.size() > 5) {
scoreTrend = scoreTrend.subList(scoreTrend.size() - 5, scoreTrend.size());
}
score.setScoreTrend(scoreTrend);
//给moca添加雷达图信息
if (GenConstants.Ht.Report.MOCA.equals(score.getCode())) {
List<RmsVo.EvaluationScoreDistribution> scoreDistributions = rmsDao.getScoreDistributions(reportPatient.getPatientId());
if (CollUtil.isNotEmpty(scoreDistributions)) {
//处理认知域
List<RmsVo.EvaluationScoreDistribution> distributions = disposeDistribution(scoreDistributions);
//根据日期倒序排序
distributions.sort(Comparator.comparing(RmsVo.EvaluationScoreDistribution::getDay).reversed());
score.setScoreDistributions(distributions);
}
}
}
}
detail.setPatient(reportPatient);
detail.setScores(scores);
return detail;

94
ruisi_java/ruisi-web-admin/src/main/resources/mapper/dao/RmsDao.xml

@ -1010,7 +1010,8 @@ d.dept_name as hospitalName
<select id="queryReportListCopyClient" resultType="com.ccsens.system.domain.vo.RmsVo$QueryReportHistoryPatient">
SELECT
rr.id as evaluationId,
rr.id as reportId,
ee.id as evaluationId,
pp.name,
pp.sex,
pb.outpatient_no as outpatientNo,
@ -1024,8 +1025,8 @@ d.dept_name as hospitalName
FROM
rms_report rr
Left Join pms_patient_body pb on rr.visit_no = pb.outpatient_no and pb.del_flag = 0
LEFT JOIN pms_patient pp on pb.patient_id = pp.id
left join ems_evaluation ee on rr.evaluation_id = ee.id
LEFT JOIN pms_patient pp on ee.patient_id = pp.id
LEFT JOIN hms_version hv on ee.version = hv.id
LEFT JOIN ums_user uu on ee.tester_id = uu.user_id
LEFT JOIN ems_evaluation_scale_relevance e on e.evaluation_id = ee.id and e.del_flag = 0
@ -1499,47 +1500,60 @@ d.dept_name as hospitalName
<select id="queryEmsScaleScore" resultType="com.ccsens.system.domain.vo.RmsVo$ReportScore">
WITH RECURSIVE cognitive_relevance_tree AS (
SELECT
id AS node_id,
evaluation_id,
scale_code AS scale_code,
'' AS second_level_cognitive_code,
cognitive_code AS current_cognitive_code,
score AS level_score,
total_score AS level_total_score,
parent_id,
sort,
1 AS level
FROM ems_evaluation_scale_cognitive_relevance
WHERE parent_id IS NULL
AND del_flag = 0
UNION ALL
SELECT
child.id AS node_id,
child.evaluation_id,
parent.scale_code,
child.cognitive_code AS second_level_cognitive_code,
child.cognitive_code AS current_cognitive_code,
child.score AS level_score,
child.total_score AS level_total_score,
child.parent_id,
child.sort,
2 AS level
FROM ems_evaluation_scale_cognitive_relevance child
INNER JOIN cognitive_relevance_tree parent
ON child.parent_id = parent.node_id
WHERE child.del_flag = 0
SELECT
r.id AS scale_id,
r.evaluation_id,
r.scale_code AS scale_code,
q.name as name,
q.description,
r.score AS level_score,
q.total_score AS total_score,
r.parent_id,
r.sort,
1 AS level
FROM ems_evaluation_scale_cognitive_relevance r
LEFT JOIN qms_scale q on r.scale_code = q.code
WHERE r.parent_id = 0 and r.del_flag = 0 and r.evaluation_id = #{evaluationId}
<if test="scaleCodeList != null and scaleCodeList.size()>0">
and scale_code in (
<foreach item="item" collection="scaleCodeList" index="index" open="(" separator="," close=")">
#{item}
</foreach>
)
</if>
UNION ALL
SELECT
child.id AS scale_id,
child.evaluation_id,
child.cognitive_code AS scale_code,
c.name,
c.description,
child.score AS level_score,
child.total_score AS total_score,
child.parent_id,
child.sort,
2 AS level
FROM ems_evaluation_scale_cognitive_relevance child
INNER JOIN cognitive_relevance_tree parent
ON child.parent_id = parent.scale_id
left join qms_cognitive_domain c on c.code = child.cognitive_code and c.parent_code = parent.scale_code
WHERE child.del_flag = 0
)
SELECT
rt.evaluation_id AS evaluationId,
rt.scale_code AS scaleCode,
rt.second_level_cognitive_code AS cognitiveCode,
rt.level_score AS score,
IF(rt.level_total_score = null , q.total_score, rt.level_total_score) AS totalScale,
rt.sort
rt.scale_id as scaleId,
rt.parent_id as parentId,
rt.name AS name,
rt.evaluation_id AS evaluationId,
rt.scale_code AS code,
rt.level_score AS score,
rt.sort as sort,
rt.total_score as totalScore,
r.combo_id as comboId
FROM cognitive_relevance_tree rt
LEFT JOIN qms_scale q on rt.scale_code = q.code
ORDER BY evaluation_id, level, sort
left join ems_evaluation_scale_relevance r on r.evaluation_id = rt.evaluation_id and r.scale_code = rt.scale_code
group by rt.scale_code
ORDER BY rt.evaluation_id, rt.level, rt.sort
</select>
<select id="viewReportPdfByVisitNo" resultType="com.ccsens.system.domain.vo.RmsVo$ReportPDF">

Loading…
Cancel
Save