소스 검색

Merge branch '陈航-留守老人-高级查询-XML修改' of sckj/mz-cloud into master

953954216 2 년 전
부모
커밋
e333f8541b

+ 6 - 0
ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/domain/ZwywLrJbxx.java

@@ -18,6 +18,7 @@ import org.hibernate.validator.constraints.Range;
 import javax.validation.constraints.Digits;
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.Size;
+import java.util.List;
 
 /**
  * 老人基本信息对象 zwyw_lr_jbxx
@@ -316,6 +317,11 @@ public class ZwywLrJbxx extends BaseEntity
     @DictV(type = "XZ015", isMuti = true, message = "{健康状况}")
     private String lrJkzk;
 
+
+    @ApiModelProperty(value = "健康状况查询条件")
+    @TableField(exist = false)
+    private List<String> lrJkzkCx;
+
     /** 残疾类型 */
 //    @Excel(name = "残疾类型")
     @ApiModelProperty(value = "残疾类型")

+ 7 - 5
ruoyi-modules/mz-business-lrgl/src/main/resources/mapper/business/ZwywLrJbxxMapper.xml

@@ -127,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="lrStpgdj != null  and lrStpgdj != ''"> and lr_stpgdj = #{lrStpgdj}</if>
             <if test="lrJkzk != null  and lrJkzk != ''"> and FIND_IN_SET(#{lrJkzk},lr_jkzk)</if>
             <if test="lrCjlx != null  and lrCjlx != ''"> and lr_cjlx = #{lrCjlx}</if>
-            <if test="lrJjzk != null  and lrJjzk != ''"> and lr_jjzk = #{lrJjzk}</if>
+            <if test="lrJjzk != null  and lrJjzk != ''"> and lr_jjzk like concat('%', #{lrJjzk}, '%')</if>
             <if test="lzzt != null  and lzzt != ''"> and lzzt = #{lzzt}</if>
             <if test="ryzt != null  and ryzt != ''"> and ryzt = #{ryzt}</if>
             <if test="cjzh != null  and cjzh != ''"> and cjzh = #{cjzh}</if>
@@ -235,10 +235,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                     #{lrYblb}
                 </foreach>
             </if>
-            <if test="lrJkzk != null  and lrJkzk != ''">
-                AND lr_jkzk in
-                <foreach item="lrJkzk" index="index" collection="lrJkzk.split(',')" open="(" separator="," close=")">
-                    #{lrJkzk}
+            <if test="lrJkzkCx != null  and lrJkzkCx != ''">
+                AND
+                <foreach item="item" index="index" collection="lrJkzkCx" open="(" close=")" separator="or">
+                    (
+                    lr_jkzk LIKE CONCAT('%',#{item},'%')
+                    )
                 </foreach>
             </if>
             <if test="lrCjlx != null  and lrCjlx != ''">