|
@@ -73,43 +73,15 @@ public interface ReportIndicatorResultMapper {
|
|
|
/**
|
|
|
* 分页查询报告指标检查结果列表
|
|
|
*/
|
|
|
- @Select("<script>" +
|
|
|
- "SELECT * FROM fs_report_indicator_result " +
|
|
|
- "WHERE 1=1 " +
|
|
|
- "<if test='reportId != null'>" +
|
|
|
- "AND report_id = #{reportId} " +
|
|
|
- "</if>" +
|
|
|
- "<if test='indicatorId != null'>" +
|
|
|
- "AND indicator_id = #{indicatorId} " +
|
|
|
- "</if>" +
|
|
|
- "<if test='testValueMin != null'>" +
|
|
|
- "AND test_value <![CDATA[>=]]> #{testValueMin} " +
|
|
|
- "</if>" +
|
|
|
- "<if test='testValueMax != null'>" +
|
|
|
- "AND test_value <![CDATA[<=]]> #{testValueMax} " +
|
|
|
- "</if>" +
|
|
|
- "<if test='testResult != null and testResult != \"\"'>" +
|
|
|
- "AND test_result LIKE CONCAT('%', #{testResult}, '%') " +
|
|
|
- "</if>" +
|
|
|
- "<if test='isAbnormal != null'>" +
|
|
|
- "AND is_abnormal = #{isAbnormal} " +
|
|
|
- "</if>" +
|
|
|
- "<if test='abnormalType != null and abnormalType != \"\"'>" +
|
|
|
- "AND abnormal_type LIKE CONCAT('%', #{abnormalType}, '%') " +
|
|
|
- "</if>" +
|
|
|
- "<if test='remarks != null and remarks != \"\"'>" +
|
|
|
- "AND remarks LIKE CONCAT('%', #{remarks}, '%') " +
|
|
|
- "</if>" +
|
|
|
- "ORDER BY " +
|
|
|
- "<choose>" +
|
|
|
- "<when test='orderBy != null and orderBy != \"\"'>" +
|
|
|
- "${orderBy}" +
|
|
|
- "</when>" +
|
|
|
- "<otherwise>" +
|
|
|
- "create_time DESC" +
|
|
|
- "</otherwise>" +
|
|
|
- "</choose>" +
|
|
|
- "</script>")
|
|
|
+ @Select("SELECT rir.result_id,\\n\" +\n" +
|
|
|
+ " \"rir.report_id,\\n\" +\n" +
|
|
|
+ " \"rir.indicator_id,\\n\" +\n" +
|
|
|
+ " \"mi.indicator_name,\\n\" +\n" +
|
|
|
+ " \"concat(mi.reference_min,' ~ ',mi.reference_max) as ref_range,\\n\" +\n" +
|
|
|
+ " \"rir.test_value,rir.test_result,rir.is_abnormal,rir.remarks,rir.create_time,rir.update_time\\n\" +\n" +
|
|
|
+ " \"FROM fs_report_indicator_result rir\\n\" +\n" +
|
|
|
+ " \"left join fs_medical_indicator mi\\n\" +\n" +
|
|
|
+ " \"on rir.indicator_id=mi.indicator_id and rir.report_id=#{reportId}")
|
|
|
List<ReportIndicatorResult> selectPageList(ReportIndicatorResultQueryDto queryDto);
|
|
|
|
|
|
@Select("select distinct indicator_cate_id as cate_id from fs_report_indicator_result where report_id=#{reportId}")
|