<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.rhzf.ryCzrk.mapper.RyCzrkMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="ryCzrkResultMap" type="org.springblade.modules.rhzf.ryCzrk.entity.RyCzrkEntity">
        <result column="id" property="id"/>
        <result column="fw_id" property="fwId"/>
        <result column="ry_xm" property="ryXm"/>
        <result column="ry_sfzh" property="rySfzh"/>
        <result column="ry_hzgx" property="ryHzgx"/>
        <result column="ry_hyzk" property="ryHyzk"/>
        <result column="ry_whcd" property="ryWhcd"/>
        <result column="ry_zzmm" property="ryZzmm"/>
        <result column="ry_byzk" property="ryByzk"/>
        <result column="ry_dh" property="ryDh"/>
        <result column="ry_ts_lb" property="ryTsLb"/>
        <result column="ry_ts_jtqk" property="ryTsJtqk"/>
        <result column="dw_mc" property="dwMc"/>
        <result column="dw_lb" property="dwLb"/>
        <result column="dw_dz" property="dwDz"/>
        <result column="dw_xz" property="dwXz"/>
        <result column="create_user" property="createUser"/>
        <result column="create_dept" property="createDept"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="status" property="status"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>


    <select id="selectRyCzrkPage" resultMap="ryCzrkResultMap">
        select * from rhzf_ry_czrk where is_deleted = 0
    </select>


    <select id="exportRyCzrk" resultType="org.springblade.modules.rhzf.ryCzrk.excel.RyCzrkExcel">
        SELECT * FROM rhzf_ry_czrk ${ew.customSqlSegment}
    </select>

    <update id="updateRy">
        update jdrh.rhzf_ry_czrk set
        ry_xm = #{ryXm},
        ry_xb = #{ryXb},
        ry_ts_lb = #{ryTsLb},
        ry_sfzh = #{rySfzh},
        ry_mz = #{ryMz},
        ry_hzgx = #{ryHzgx},
        ry_csrq = #{ryCsrq},
        ry_dh = #{ryDh},
        vx = #{vx},
        hjdz = #{hjdz},
        ry_hyzk = #{ryHyzk},
        ry_whcd = #{ryWhcd},
        ry_zzmm = #{ryZzmm},
        zjxy = #{zjxy},
        ry_byzk = #{ryByzk},
        dw_mc = #{dwMc},
        dw_xz = #{dwXz},
        ry_hyzk_dm = #{ryHyzkDm},
        ry_whcd_dm = #{ryWhcdDm},
        ry_zzmm_dm = #{ryZzmmDm},
        ry_byzk_dm = #{ryByzkDm},
        zjxy_dm = #{zjxyDm},
        ry_mz_dm = #{ryMzDm},
        update_user = #{updateUser},
        update_time = now(),
        bz = #{bz}
        where id = #{id}
    </update>

    <update id="czrkZx" parameterType="org.springblade.modules.rhzf.ryCzrk.entity.RyCzrkEntity">
        UPDATE jdrh.rhzf_ry_czrk
        <set>
            is_deleted = 1,
            update_time = now(),
            zxyy = #{zxyy},
            zxrq = #{zxrq},
            bcyy = #{bcyy},
            bcrq = #{bcrq},
            qwdzssxq = #{qwdzssxq},
            qwdzxz = #{qwdzxz},
        </set>
        WHERE id = #{id}
    </update>
</mapper>
