Selaa lähdekoodia

医生端患者列表查询条件增加

wangzl 5 kuukautta sitten
vanhempi
commit
20f862ed96

+ 10 - 0
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/dto/WxDoctorPatientInfoDTO.java

@@ -3,6 +3,7 @@ package cn.tr.module.smart.app.controller.dto;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import lombok.Value;
 
 import java.util.Date;
 import java.util.List;
@@ -21,4 +22,13 @@ public class WxDoctorPatientInfoDTO {
 
     @ApiModelProperty(value = "检索条件", position = 2)
     private String queryCondition;
+
+    @ApiModelProperty(value = "年龄区间", position = 3)
+    private List<Integer> ageRange;
+
+    @ApiModelProperty(value = "性别", position = 4)
+    private String gender;
+
+    @ApiModelProperty(value = "科室ID" ,position = 5)
+    private String deptId;
 }

+ 12 - 0
tr-modules/tr-module-smartFollowUp/src/main/resources/mapper/smart/BizPatientMapper.xml

@@ -40,6 +40,18 @@
                 bp.patient_code LIKE concat('%',#{query.queryCondition,jdbcType=VARCHAR},'%')
                 or bp.name like concat('%',#{query.queryCondition,jdbcType=VARCHAR},'%')
             </if>
+            <if test="query.ageRange != null and query.ageRange.size() > 0">
+                AND bcr.patient_age &gt;= #{query.ageRange[0]}
+            </if>
+            <if test="query.ageRange != null and query.ageRange.size() > 1">
+                AND bcr.patient_age &lt;= #{query.ageRange[1]}
+            </if>
+            <if test="query.gender != null and query.gender != ''">
+                AND bcr.patient_gender = #{query.gender,jdbcType=VARCHAR}
+            </if>
+            <if test="query.deptId != null and query.deptId != ''">
+                AND bcr.dept_id = #{query.deptId,jdbcType=VARCHAR}
+            </if>
         </where>
     </select>
     <select id="selectPatientByConditionList" resultType="cn.tr.module.smart.common.dto.BizPatientDTO">