Browse Source

feat: 新增指标类型字段

xdd 1 week ago
parent
commit
759a5d6972

+ 6 - 0
fs-service/src/main/java/com/fs/medical/domain/MedicalIndicator.java

@@ -32,6 +32,11 @@ public class MedicalIndicator {
      */
     private String indicatorCategory;
 
+    /**
+     * 0数值 1二元
+     */
+    private Integer type;
+
     /**
      * 单位ID
      */
@@ -76,4 +81,5 @@ public class MedicalIndicator {
      * 更新时间
      */
     private Date updateTime;
+
 }

+ 6 - 2
fs-service/src/main/java/com/fs/medical/mapper/MedicalIndicatorMapper.java

@@ -33,9 +33,9 @@ public interface MedicalIndicatorMapper {
      * 新增指标
      */
     @Insert("INSERT INTO fs_medical_indicator(indicator_name, indicator_category, unit_id, reference_min, " +
-            "reference_max, reference_text, description, sort_order, status) " +
+            "reference_max, reference_text, description, sort_order, status,type) " +
             "VALUES(#{indicatorName}, #{indicatorCategory}, #{unitId}, #{referenceMin}, " +
-            "#{referenceMax}, #{referenceText}, #{description}, #{sortOrder}, #{status})")
+            "#{referenceMax}, #{referenceText}, #{description}, #{sortOrder}, #{status},#{type})")
     @Options(useGeneratedKeys = true, keyProperty = "indicatorId")
     int insert(MedicalIndicator indicator);
 
@@ -53,6 +53,7 @@ public interface MedicalIndicatorMapper {
             "<if test='description != null'>description = #{description}, </if>" +
             "<if test='sortOrder != null'>sort_order = #{sortOrder}, </if>" +
             "<if test='status != null'>status = #{status}, </if>" +
+            "<if test='type != null'>type = #{type}, </if>" +
             "update_time = NOW() " +
             "WHERE indicator_id = #{indicatorId}" +
             "</script>")
@@ -91,6 +92,9 @@ public interface MedicalIndicatorMapper {
             "<if test='description != null and description != &quot;&quot;'>" +
             "AND description LIKE CONCAT('%', #{description}, '%') " +
             "</if>" +
+            "<if test='type != null and type != &quot;&quot;'>" +
+            "AND type LIKE CONCAT('%', #{type}, '%') " +
+            "</if>" +
             "<if test='status != null'>" +
             "AND status = #{status} " +
             "</if>" +

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

@@ -47,4 +47,9 @@ public class MedicalIndicatorQueryDto implements Serializable {
 
     @ApiModelProperty(value = "排序字段")
     private String orderBy;
-}
+
+    /**
+     * 0数值 1二元
+     */
+    private Integer type;
+}