Переглянути джерело

Merge branch '陈航-政务查询-详情' of sckj/mz-cloud into master

sckj 2 роки тому
батько
коміт
72538e7199

+ 12 - 0
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/domain/ZwywLrChxxx.java

@@ -72,4 +72,16 @@ public class ZwywLrChxxx extends BaseEntity
     @DictV(type = "CZ035",message = "{是否有效}")
     private String isYx;
 
+    @TableField(exist = false)
+    @ApiModelProperty(value = "老人姓名")
+    private String lrXm;
+
+    @TableField(exist = false)
+    @ApiModelProperty(value = "老人性别")
+    private String lrXb;
+
+    @TableField(exist = false)
+    @ApiModelProperty(value = "老人证件号码")
+    private String lrZjhm;
+
 }

+ 8 - 1
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/mapper/ZwywLrChxxxMapper.java

@@ -2,14 +2,21 @@ package com.ruoyi.business.mapper;
 
 import java.util.List;
 import com.ruoyi.business.domain.ZwywLrChxxx;
+import com.ruoyi.common.datascope.handler.DataColumn;
+import com.ruoyi.common.datascope.handler.DataPermission;
 import com.ruoyi.common.datascope.utils.BaseMapperPlus;
 
 /**
  * 长护险信息Mapper接口
- * 
+ *
  * @author CH
  * @date 2022-04-29
  */
+@DataPermission({
+        @DataColumn(key = "deptName", value = "create_unit" ,alias = "a")
+})
 public interface ZwywLrChxxxMapper extends BaseMapperPlus<ZwywLrChxxx> {
 
+    public List<ZwywLrChxxx> selectZwywChxxxList(ZwywLrChxxx zwywLrChxxx);
+
 }

+ 2 - 1
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/service/impl/ZwywLrChxxxServiceImpl.java

@@ -49,7 +49,8 @@ public class ZwywLrChxxxServiceImpl implements IZwywLrChxxxService
     @Override
     public List<ZwywLrChxxx> selectZwywLrChxxxList(ZwywLrChxxx zwywLrChxxx)
     {
-        return zwywLrChxxxMapper.selectList(new LambdaQueryWrapper<>(zwywLrChxxx));
+//        return zwywLrChxxxMapper.selectList(new LambdaQueryWrapper<>(zwywLrChxxx));
+        return zwywLrChxxxMapper.selectZwywChxxxList(zwywLrChxxx);
     }
 
     /**

+ 1 - 1
ruoyi-modules/mz-business/src/main/resources/mapper/business/YljgLrypMapper.xml

@@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectYljgLrypById" parameterType="String" resultMap="YljgLrypResult">
         <include refid="selectYljgLrypVo"/>
-        where id = #{id}
+        where a.id = #{id}
     </select>
 
 </mapper>

+ 18 - 0
ruoyi-modules/mz-business/src/main/resources/mapper/business/ZwywLrChxxxMapper.xml

@@ -22,6 +22,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateUnit"    column="update_unit"    />
         <result property="updateUnitName"    column="update_unit_name"    />
         <result property="state"    column="state"    />
+        <result property="lrXm"    column="lr_xm"    />
+        <result property="lrXb"    column="lr_xb"    />
+        <result property="lrZjhm"    column="lr_zjhm"    />
     </resultMap>
 
+    <select id="selectZwywChxxxList" parameterType="ZwywLrChxxx" resultMap="ZwywLrChxxxResult">
+        SELECT b.lr_xm , b.lr_xb, b.lr_zjhm,  a.*
+        FROM zwyw_lr_chxxx a
+        LEFT JOIN zwyw_lr_jbxx b ON b.id = a.lr_id
+        <where>
+            <if test="lrId != null  and lrId != ''"> and a.lr_id = #{lrId}</if>
+            <if test="lrZjhm != null  and lrZjhm != ''"> and b.lr_zjhm like concat('%', #{lrZjhm}, '%')</if>
+            <if test="lrXm != null  and lrXm != ''"> and b.lr_xm like concat('%', #{lrXm}, '%')</if>
+            <if test="params.beginQyrq != null and params.beginQyrq != '' and params.endQyrq != null and params.endQyrq != ''"> and a.qyrq between #{params.beginQyrq} and #{params.endQyrq}</if>
+            <if test="params.beginQyrq != null and params.beginQyrq != '' and (params.endQyrq == null or params.endQyrq == '')"> and a.qyrq &gt;= #{params.beginQyrq}</if>
+            <if test="(params.beginQyrq == null or params.beginQyrq == '') and params.endQyrq != null and params.endQyrq != ''"> and a.qyrq &lt;= #{params.endQyrq}</if>
+        </where>
+    </select>
+
+
 </mapper>