Преглед на файлове

feat: 防止重复关联报告指标

xdd преди 1 седмица
родител
ревизия
e6f9ef778d
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      fs-service/src/main/java/com/fs/medical/mapper/ReportIndicatorResultMapper.java

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

@@ -41,7 +41,7 @@ public interface ReportIndicatorResultMapper {
     /**
      * 新增检查结果
      */
-    @Insert("INSERT INTO fs_report_indicator_result(report_id, indicator_id, test_value, test_result, is_abnormal, abnormal_type, remarks,indicator_cate_id) " +
+    @Insert("INSERT IGNORE INTO fs_report_indicator_result(report_id, indicator_id, test_value, test_result, is_abnormal, abnormal_type, remarks,indicator_cate_id) " +
             "VALUES(#{reportId}, #{indicatorId}, #{testValue}, #{testResult}, #{isAbnormal}, #{abnormalType}, #{remarks},#{indicatorCateId})")
     @Options(useGeneratedKeys = true, keyProperty = "resultId")
     int insert(ReportIndicatorResult result);