xdd пре 5 дана
родитељ
комит
1ea893a061

+ 3 - 1
fs-admin/src/main/java/com/fs/medical/ReportIndicatorResultController.java

@@ -143,7 +143,9 @@ public class ReportIndicatorResultController extends BaseController {
             }
         } catch (Exception e) {
             logger.error("批量新增检查结果失败", e);
-            return R.error("批量新增失败");
+            return R.error("批量新增失败"
+
+            );
         }
     }
 

+ 9 - 37
fs-service/src/main/java/com/fs/medical/mapper/ReportIndicatorResultMapper.java

@@ -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}")

+ 6 - 1
fs-service/src/main/java/com/fs/medical/param/ReportIndicatorResultQueryDto.java

@@ -47,4 +47,9 @@ public class ReportIndicatorResultQueryDto implements Serializable {
 
     @ApiModelProperty(value = "排序字段")
     private String orderBy;
-}
+
+    /**
+     * 指标分类ID
+     */
+    private Long indicatorCateId;
+}