You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

367 lines
23 KiB

<?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="com.da.dangan.mapper.DaCzrkdjMapper">
<resultMap type="DaCzrkdj" id="DaCzrkdjResult">
<result property="id" column="id" />
<result property="ywType" column="yw_type" />
<result property="muId" column="mu_id" />
<result property="muPath" column="mu_path" />
<result property="relation" column="relation" />
<result property="name" column="name" />
<result property="otherName" column="other_name" />
<result property="sex" column="sex" />
<result property="birthday" column="birthday" />
<result property="address" column="address" />
<result property="yj" column="yj" />
<result property="nation" column="nation" />
<result property="zjxy" column="zjxy" />
<result property="whcd" column="whcd" />
<result property="hyzk" column="hyzk" />
<result property="zyjfwcs" column="zyjfwcs" />
<result property="bxsqtzz" column="bxsqtzz" />
<result property="gmzdhhmqfjgjrq" column="gmzdhhmqfjgjrq" />
<result property="hsyhdqlbxshsdjhk" column="hsyhdqlbxshsdjhk" />
<result property="hsybxshcqlhsdjhk" column="hsybxshcqlhsdjhk" />
<result property="zxhkrq" column="zxhkrq" />
<result property="zxhkyy" column="zxhkyy" />
<result property="hkdjsxbgjznrsjjblrz1" column="hkdjsxbgjznrsjjblrz1" />
<result property="hkdjsxbgjznrsjjblrz2" column="hkdjsxbgjznrsjjblrz2" />
<result property="jiguan" column="jiguan" />
<result property="xzz" column="xzz" />
<result property="hzName" column="hz_name" />
<result property="hb" column="hb" />
<result property="djrq" column="djrq" />
<result property="byzk" column="byzk" />
<result property="height" column="height" />
<result property="blood" column="blood" />
<result property="zy" column="zy" />
<result property="slReason" column="sl_reason" />
<result property="sljmsfzqm" column="sljmsfzqm" />
<result property="qfyj" column="qfyj" />
<result property="yxrq" column="yxrq" />
<result property="cardId" column="card_id" />
<result property="picIds" column="pic_ids" />
<result property="pictures" column="pictures" />
<result property="allPicIds" column="all_pic_ids" />
<result property="allPics" column="all_pics" />
<result property="errorCorrect" column="error_correct" />
<result property="auditStatus" column="audit_status" />
<result property="auditName" column="audit_name" />
<result property="auditResult" column="audit_result" />
<result property="auditReason" column="audit_reason" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectDaCzrkdjVo">
select id, yw_type, mu_id, mu_path, relation, name, other_name, sex, birthday, address, yj, nation, zjxy, whcd, hyzk, zyjfwcs, bxsqtzz, gmzdhhmqfjgjrq, hsyhdqlbxshsdjhk, hsybxshcqlhsdjhk, zxhkrq, zxhkyy, hkdjsxbgjznrsjjblrz1, hkdjsxbgjznrsjjblrz2, jiguan, xzz, hz_name, hb, djrq, byzk, height, blood, zy, sl_reason, sljmsfzqm, qfyj, yxrq, card_id, pic_ids, pictures, all_pic_ids, all_pics, error_correct, audit_status, audit_name, audit_result, audit_reason, remark, create_by, create_time, update_by, update_time from da_czrkdj
</sql>
<select id="selectDaCzrkdjList" parameterType="DaCzrkdj" resultMap="DaCzrkdjResult">
select distinct c.* from da_czrkdj c
left join da_user_catalog uc on c.mu_id = uc.mu_id
<where>
<if test="userId != null "> and uc.user_id = #{userId}</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>
<if test="muId != null "> and c.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
<if test="relation != null and relation != ''"> and relation = #{relation}</if>
<if test="name != null and name != ''">
and ( name like concat('%', #{name}, '%')
or hz_name like concat('%', #{name}, '%')
or other_name like concat('%', #{name}, '%')
)
</if>
<if test="otherName != null and otherName != ''"> and other_name like concat('%', #{otherName}, '%')</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="birthday != null "> and birthday = #{birthday}</if>
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="yj != null and yj != ''"> and yj = #{yj}</if>
<if test="nation != null and nation != ''"> and nation = #{nation}</if>
<if test="zjxy != null and zjxy != ''"> and zjxy = #{zjxy}</if>
<if test="whcd != null and whcd != ''"> and whcd = #{whcd}</if>
<if test="hyzk != null and hyzk != ''"> and hyzk = #{hyzk}</if>
<if test="zyjfwcs != null and zyjfwcs != ''"> and zyjfwcs = #{zyjfwcs}</if>
<if test="bxsqtzz != null and bxsqtzz != ''"> and bxsqtzz = #{bxsqtzz}</if>
<if test="gmzdhhmqfjgjrq != null and gmzdhhmqfjgjrq != ''"> and gmzdhhmqfjgjrq = #{gmzdhhmqfjgjrq}</if>
<if test="hsyhdqlbxshsdjhk != null and hsyhdqlbxshsdjhk != ''"> and hsyhdqlbxshsdjhk = #{hsyhdqlbxshsdjhk}</if>
<if test="hsybxshcqlhsdjhk != null and hsybxshcqlhsdjhk != ''"> and hsybxshcqlhsdjhk = #{hsybxshcqlhsdjhk}</if>
<if test="zxhkrq != null and zxhkrq != ''"> and zxhkrq = #{zxhkrq}</if>
<if test="zxhkyy != null and zxhkyy != ''"> and zxhkyy = #{zxhkyy}</if>
<if test="hkdjsxbgjznrsjjblrz1 != null and hkdjsxbgjznrsjjblrz1 != ''"> and hkdjsxbgjznrsjjblrz1 = #{hkdjsxbgjznrsjjblrz1}</if>
<if test="hkdjsxbgjznrsjjblrz2 != null and hkdjsxbgjznrsjjblrz2 != ''"> and hkdjsxbgjznrsjjblrz2 = #{hkdjsxbgjznrsjjblrz2}</if>
<if test="jiguan != null and jiguan != ''"> and jiguan = #{jiguan}</if>
<if test="xzz != null and xzz != ''"> and xzz = #{xzz}</if>
<if test="hzName != null and hzName != ''"> and hz_name like concat('%', #{hzName}, '%')</if>
<if test="hb != null and hb != ''"> and hb = #{hb}</if>
<if test="djrq != null and djrq != ''"> and djrq = #{djrq}</if>
<if test="byzk != null and byzk != ''"> and byzk = #{byzk}</if>
<if test="height != null and height != ''"> and height = #{height}</if>
<if test="blood != null and blood != ''"> and blood = #{blood}</if>
<if test="zy != null and zy != ''"> and zy = #{zy}</if>
<if test="slReason != null and slReason != ''"> and sl_reason = #{slReason}</if>
<if test="sljmsfzqm != null and sljmsfzqm != ''"> and sljmsfzqm = #{sljmsfzqm}</if>
<if test="qfyj != null and qfyj != ''"> and qfyj = #{qfyj}</if>
<if test="yxrq != null and yxrq != ''"> and yxrq = #{yxrq}</if>
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
<if test="picIds != null and picIds != ''"> and pic_ids = #{picIds}</if>
<if test="pictures != null and pictures != ''"> and pictures = #{pictures}</if>
<if test="allPicIds != null and allPicIds != ''"> and all_pic_ids = #{allPicIds}</if>
<if test="allPics != null and allPics != ''"> and all_pics = #{allPics}</if>
<if test="errorCorrect != null and errorCorrect != ''"> and error_correct = #{errorCorrect}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
<if test="auditName != null and auditName != ''"> and audit_name like concat('%', #{auditName}, '%')</if>
<if test="auditResult != null and auditResult != ''"> and audit_result = #{auditResult}</if>
<if test="auditReason != null and auditReason != ''"> and audit_reason = #{auditReason}</if>
</where>
order by id desc
</select>
<select id="selectDaCzrkdjList1" parameterType="DaCzrkdj" resultMap="DaCzrkdjResult">
select distinct c.* from da_czrkdj c
left join da_user_catalog uc on c.mu_id = uc.mu_id
<where>
<if test="userId != null "> and uc.user_id = #{userId}</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>
<if test="muId != null "> and c.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
<if test="name != null and name != ''">
and ( name like concat('%', #{name}, '%')
or hz_name like concat('%', #{name}, '%')
or other_name like concat('%', #{name}, '%')
)
</if>
<if test="otherName != null and otherName != ''"> and other_name like concat('%', #{otherName}, '%')</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="birthday != null "> and birthday = #{birthday}</if>
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="yj != null and yj != ''"> and yj = #{yj}</if>
<if test="nation != null and nation != ''"> and nation = #{nation}</if>
<if test="zjxy != null and zjxy != ''"> and zjxy = #{zjxy}</if>
<if test="whcd != null and whcd != ''"> and whcd = #{whcd}</if>
<if test="hyzk != null and hyzk != ''"> and hyzk = #{hyzk}</if>
<if test="zyjfwcs != null and zyjfwcs != ''"> and zyjfwcs = #{zyjfwcs}</if>
<if test="bxsqtzz != null and bxsqtzz != ''"> and bxsqtzz = #{bxsqtzz}</if>
<if test="gmzdhhmqfjgjrq != null and gmzdhhmqfjgjrq != ''"> and gmzdhhmqfjgjrq = #{gmzdhhmqfjgjrq}</if>
<if test="hsyhdqlbxshsdjhk != null and hsyhdqlbxshsdjhk != ''"> and hsyhdqlbxshsdjhk = #{hsyhdqlbxshsdjhk}</if>
<if test="hsybxshcqlhsdjhk != null and hsybxshcqlhsdjhk != ''"> and hsybxshcqlhsdjhk = #{hsybxshcqlhsdjhk}</if>
<if test="zxhkrq != null and zxhkrq != ''"> and zxhkrq = #{zxhkrq}</if>
<if test="zxhkyy != null and zxhkyy != ''"> and zxhkyy = #{zxhkyy}</if>
<if test="hkdjsxbgjznrsjjblrz1 != null and hkdjsxbgjznrsjjblrz1 != ''"> and hkdjsxbgjznrsjjblrz1 = #{hkdjsxbgjznrsjjblrz1}</if>
<if test="hkdjsxbgjznrsjjblrz2 != null and hkdjsxbgjznrsjjblrz2 != ''"> and hkdjsxbgjznrsjjblrz2 = #{hkdjsxbgjznrsjjblrz2}</if>
<if test="jiguan != null and jiguan != ''"> and jiguan = #{jiguan}</if>
<if test="xzz != null and xzz != ''"> and xzz = #{xzz}</if>
<if test="hzName != null and hzName != ''"> and hz_name like concat('%', #{hzName}, '%')</if>
<if test="hb != null and hb != ''"> and hb = #{hb}</if>
<if test="djrq != null and djrq != ''"> and djrq = #{djrq}</if>
<if test="byzk != null and byzk != ''"> and byzk = #{byzk}</if>
<if test="height != null and height != ''"> and height = #{height}</if>
<if test="blood != null and blood != ''"> and blood = #{blood}</if>
<if test="zy != null and zy != ''"> and zy = #{zy}</if>
<if test="slReason != null and slReason != ''"> and sl_reason = #{slReason}</if>
<if test="sljmsfzqm != null and sljmsfzqm != ''"> and sljmsfzqm = #{sljmsfzqm}</if>
<if test="qfyj != null and qfyj != ''"> and qfyj = #{qfyj}</if>
<if test="yxrq != null and yxrq != ''"> and yxrq = #{yxrq}</if>
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
<if test="picIds != null and picIds != ''"> and pic_ids = #{picIds}</if>
<if test="pictures != null and pictures != ''"> and pictures = #{pictures}</if>
<if test="allPicIds != null and allPicIds != ''"> and all_pic_ids = #{allPicIds}</if>
<if test="allPics != null and allPics != ''"> and all_pics = #{allPics}</if>
<if test="errorCorrect != null and errorCorrect != ''"> and error_correct = #{errorCorrect}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
<if test="auditName != null and auditName != ''"> and audit_name like concat('%', #{auditName}, '%')</if>
<if test="auditResult != null and auditResult != ''"> and audit_result = #{auditResult}</if>
<if test="auditReason != null and auditReason != ''"> and audit_reason = #{auditReason}</if>
</where>
order by id desc
</select>
<select id="selectDaCzrkdjById" parameterType="Long" resultMap="DaCzrkdjResult">
<include refid="selectDaCzrkdjVo"/>
where id = #{id}
</select>
<insert id="insertDaCzrkdj" parameterType="DaCzrkdj" useGeneratedKeys="true" keyProperty="id">
insert into da_czrkdj
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ywType != null">yw_type,</if>
<if test="muId != null">mu_id,</if>
<if test="muPath != null">mu_path,</if>
<if test="relation != null">relation,</if>
<if test="name != null">name,</if>
<if test="otherName != null">other_name,</if>
<if test="sex != null">sex,</if>
<if test="birthday != null">birthday,</if>
<if test="address != null">address,</if>
<if test="yj != null">yj,</if>
<if test="nation != null">nation,</if>
<if test="zjxy != null">zjxy,</if>
<if test="whcd != null">whcd,</if>
<if test="hyzk != null">hyzk,</if>
<if test="zyjfwcs != null">zyjfwcs,</if>
<if test="bxsqtzz != null">bxsqtzz,</if>
<if test="gmzdhhmqfjgjrq != null">gmzdhhmqfjgjrq,</if>
<if test="hsyhdqlbxshsdjhk != null">hsyhdqlbxshsdjhk,</if>
<if test="hsybxshcqlhsdjhk != null">hsybxshcqlhsdjhk,</if>
<if test="zxhkrq != null">zxhkrq,</if>
<if test="zxhkyy != null">zxhkyy,</if>
<if test="hkdjsxbgjznrsjjblrz1 != null">hkdjsxbgjznrsjjblrz1,</if>
<if test="hkdjsxbgjznrsjjblrz2 != null">hkdjsxbgjznrsjjblrz2,</if>
<if test="jiguan != null">jiguan,</if>
<if test="xzz != null">xzz,</if>
<if test="hzName != null">hz_name,</if>
<if test="hb != null">hb,</if>
<if test="djrq != null">djrq,</if>
<if test="byzk != null">byzk,</if>
<if test="height != null">height,</if>
<if test="blood != null">blood,</if>
<if test="zy != null">zy,</if>
<if test="slReason != null">sl_reason,</if>
<if test="sljmsfzqm != null">sljmsfzqm,</if>
<if test="qfyj != null">qfyj,</if>
<if test="yxrq != null">yxrq,</if>
<if test="cardId != null">card_id,</if>
<if test="picIds != null">pic_ids,</if>
<if test="pictures != null">pictures,</if>
<if test="allPicIds != null">all_pic_ids,</if>
<if test="allPics != null">all_pics,</if>
<if test="errorCorrect != null">error_correct,</if>
<if test="auditStatus != null">audit_status,</if>
<if test="auditName != null">audit_name,</if>
<if test="auditResult != null">audit_result,</if>
<if test="auditReason != null">audit_reason,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ywType != null">#{ywType},</if>
<if test="muId != null">#{muId},</if>
<if test="muPath != null">#{muPath},</if>
<if test="relation != null">#{relation},</if>
<if test="name != null">#{name},</if>
<if test="otherName != null">#{otherName},</if>
<if test="sex != null">#{sex},</if>
<if test="birthday != null">#{birthday},</if>
<if test="address != null">#{address},</if>
<if test="yj != null">#{yj},</if>
<if test="nation != null">#{nation},</if>
<if test="zjxy != null">#{zjxy},</if>
<if test="whcd != null">#{whcd},</if>
<if test="hyzk != null">#{hyzk},</if>
<if test="zyjfwcs != null">#{zyjfwcs},</if>
<if test="bxsqtzz != null">#{bxsqtzz},</if>
<if test="gmzdhhmqfjgjrq != null">#{gmzdhhmqfjgjrq},</if>
<if test="hsyhdqlbxshsdjhk != null">#{hsyhdqlbxshsdjhk},</if>
<if test="hsybxshcqlhsdjhk != null">#{hsybxshcqlhsdjhk},</if>
<if test="zxhkrq != null">#{zxhkrq},</if>
<if test="zxhkyy != null">#{zxhkyy},</if>
<if test="hkdjsxbgjznrsjjblrz1 != null">#{hkdjsxbgjznrsjjblrz1},</if>
<if test="hkdjsxbgjznrsjjblrz2 != null">#{hkdjsxbgjznrsjjblrz2},</if>
<if test="jiguan != null">#{jiguan},</if>
<if test="xzz != null">#{xzz},</if>
<if test="hzName != null">#{hzName},</if>
<if test="hb != null">#{hb},</if>
<if test="djrq != null">#{djrq},</if>
<if test="byzk != null">#{byzk},</if>
<if test="height != null">#{height},</if>
<if test="blood != null">#{blood},</if>
<if test="zy != null">#{zy},</if>
<if test="slReason != null">#{slReason},</if>
<if test="sljmsfzqm != null">#{sljmsfzqm},</if>
<if test="qfyj != null">#{qfyj},</if>
<if test="yxrq != null">#{yxrq},</if>
<if test="cardId != null">#{cardId},</if>
<if test="picIds != null">#{picIds},</if>
<if test="pictures != null">#{pictures},</if>
<if test="allPicIds != null">#{allPicIds},</if>
<if test="allPics != null">#{allPics},</if>
<if test="errorCorrect != null">#{errorCorrect},</if>
<if test="auditStatus != null">#{auditStatus},</if>
<if test="auditName != null">#{auditName},</if>
<if test="auditResult != null">#{auditResult},</if>
<if test="auditReason != null">#{auditReason},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateDaCzrkdj" parameterType="DaCzrkdj">
update da_czrkdj
<trim prefix="SET" suffixOverrides=",">
<if test="ywType != null">yw_type = #{ywType},</if>
<if test="muId != null">mu_id = #{muId},</if>
<if test="muPath != null">mu_path = #{muPath},</if>
<if test="relation != null">relation = #{relation},</if>
<if test="name != null">name = #{name},</if>
<if test="otherName != null">other_name = #{otherName},</if>
<if test="sex != null">sex = #{sex},</if>
<if test="birthday != null">birthday = #{birthday},</if>
<if test="address != null">address = #{address},</if>
<if test="yj != null">yj = #{yj},</if>
<if test="nation != null">nation = #{nation},</if>
<if test="zjxy != null">zjxy = #{zjxy},</if>
<if test="whcd != null">whcd = #{whcd},</if>
<if test="hyzk != null">hyzk = #{hyzk},</if>
<if test="zyjfwcs != null">zyjfwcs = #{zyjfwcs},</if>
<if test="bxsqtzz != null">bxsqtzz = #{bxsqtzz},</if>
<if test="gmzdhhmqfjgjrq != null">gmzdhhmqfjgjrq = #{gmzdhhmqfjgjrq},</if>
<if test="hsyhdqlbxshsdjhk != null">hsyhdqlbxshsdjhk = #{hsyhdqlbxshsdjhk},</if>
<if test="hsybxshcqlhsdjhk != null">hsybxshcqlhsdjhk = #{hsybxshcqlhsdjhk},</if>
<if test="zxhkrq != null">zxhkrq = #{zxhkrq},</if>
<if test="zxhkyy != null">zxhkyy = #{zxhkyy},</if>
<if test="hkdjsxbgjznrsjjblrz1 != null">hkdjsxbgjznrsjjblrz1 = #{hkdjsxbgjznrsjjblrz1},</if>
<if test="hkdjsxbgjznrsjjblrz2 != null">hkdjsxbgjznrsjjblrz2 = #{hkdjsxbgjznrsjjblrz2},</if>
<if test="jiguan != null">jiguan = #{jiguan},</if>
<if test="xzz != null">xzz = #{xzz},</if>
<if test="hzName != null">hz_name = #{hzName},</if>
<if test="hb != null">hb = #{hb},</if>
<if test="djrq != null">djrq = #{djrq},</if>
<if test="byzk != null">byzk = #{byzk},</if>
<if test="height != null">height = #{height},</if>
<if test="blood != null">blood = #{blood},</if>
<if test="zy != null">zy = #{zy},</if>
<if test="slReason != null">sl_reason = #{slReason},</if>
<if test="sljmsfzqm != null">sljmsfzqm = #{sljmsfzqm},</if>
<if test="qfyj != null">qfyj = #{qfyj},</if>
<if test="yxrq != null">yxrq = #{yxrq},</if>
<if test="cardId != null">card_id = #{cardId},</if>
<if test="picIds != null">pic_ids = #{picIds},</if>
<if test="pictures != null">pictures = #{pictures},</if>
<if test="allPicIds != null">all_pic_ids = #{allPicIds},</if>
<if test="allPics != null">all_pics = #{allPics},</if>
<if test="errorCorrect != null">error_correct = #{errorCorrect},</if>
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
<if test="auditName != null">audit_name = #{auditName},</if>
<if test="auditResult != null">audit_result = #{auditResult},</if>
<if test="auditReason != null">audit_reason = #{auditReason},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDaCzrkdjById" parameterType="Long">
delete from da_czrkdj where id = #{id}
</delete>
<delete id="deleteDaCzrkdjByIds" parameterType="String">
delete from da_czrkdj where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>