档案检索、合集添加同音字检索

master
hansha 1 year ago
parent 970ee7c4ae
commit d0113bd2f6

@ -1,48 +1,48 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.da.dangan.mapper.DaBirthDjMapper"> <mapper namespace="com.da.dangan.mapper.DaBirthDjMapper">
<resultMap type="DaBirthDj" id="DaBirthDjResult"> <resultMap type="DaBirthDj" id="DaBirthDjResult">
<result property="id" column="id" /> <result property="id" column="id"/>
<result property="taskId" column="task_id" /> <result property="taskId" column="task_id"/>
<result property="ywType" column="yw_type" /> <result property="ywType" column="yw_type"/>
<result property="muId" column="mu_id" /> <result property="muId" column="mu_id"/>
<result property="muPath" column="mu_path" /> <result property="muPath" column="mu_path"/>
<result property="birthNum" column="birth_num" /> <result property="birthNum" column="birth_num"/>
<result property="name" column="name" /> <result property="name" column="name"/>
<result property="birthday" column="birthday" /> <result property="birthday" column="birthday"/>
<result property="sex" column="sex" /> <result property="sex" column="sex"/>
<result property="bornAddress" column="born_address" /> <result property="bornAddress" column="born_address"/>
<result property="mName" column="m_name" /> <result property="mName" column="m_name"/>
<result property="mAge" column="m_age" /> <result property="mAge" column="m_age"/>
<result property="mGj" column="m_gj" /> <result property="mGj" column="m_gj"/>
<result property="mNation" column="m_nation" /> <result property="mNation" column="m_nation"/>
<result property="mCardId" column="m_card_id" /> <result property="mCardId" column="m_card_id"/>
<result property="fName" column="f_name" /> <result property="fName" column="f_name"/>
<result property="fAge" column="f_age" /> <result property="fAge" column="f_age"/>
<result property="fGj" column="f_gj" /> <result property="fGj" column="f_gj"/>
<result property="fNation" column="f_nation" /> <result property="fNation" column="f_nation"/>
<result property="fCardId" column="f_card_id" /> <result property="fCardId" column="f_card_id"/>
<result property="homeAddress" column="home_address" /> <result property="homeAddress" column="home_address"/>
<result property="momSign" column="mom_sign" /> <result property="momSign" column="mom_sign"/>
<result property="jsrySign" column="jsry_sign" /> <result property="jsrySign" column="jsry_sign"/>
<result property="jsUnit" column="js_unit" /> <result property="jsUnit" column="js_unit"/>
<result property="djType" column="dj_type" /> <result property="djType" column="dj_type"/>
<result property="picIds" column="pic_ids" /> <result property="picIds" column="pic_ids"/>
<result property="pictures" column="pictures" /> <result property="pictures" column="pictures"/>
<result property="allPicIds" column="all_pic_ids" /> <result property="allPicIds" column="all_pic_ids"/>
<result property="allPics" column="all_pics" /> <result property="allPics" column="all_pics"/>
<result property="errorCorrect" column="error_correct" /> <result property="errorCorrect" column="error_correct"/>
<result property="auditStatus" column="audit_status" /> <result property="auditStatus" column="audit_status"/>
<result property="auditName" column="audit_name" /> <result property="auditName" column="audit_name"/>
<result property="auditResult" column="audit_result" /> <result property="auditResult" column="audit_result"/>
<result property="auditReason" column="audit_reason" /> <result property="auditReason" column="audit_reason"/>
<result property="remark" column="remark" /> <result property="remark" column="remark"/>
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by"/>
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time"/>
</resultMap> </resultMap>
<sql id="selectDaBirthDjVo"> <sql id="selectDaBirthDjVo">
@ -53,53 +53,65 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select distinct b.* from da_birth_dj b select distinct b.* from da_birth_dj b
left join da_user_catalog uc on b.mu_id = uc.mu_id left join da_user_catalog uc on b.mu_id = uc.mu_id
<where> <where>
<if test="userId != null "> and uc.user_id = #{userId}</if> <if test="userId != null ">and uc.user_id = #{userId}</if>
<if test="taskId != null "> and task_id = #{taskId}</if> <if test="taskId != null ">and task_id = #{taskId}</if>
<!-- flag=0 展示全部 =1不展示没有姓名的记录 --> <!-- flag=0 展示全部 =1不展示没有姓名的记录 -->
<if test="flag != null and flag=='1'.toString()"> and m_name !='无'</if> <if test="flag != null and flag=='1'.toString()">and m_name !='无'</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if> <if test="ywType != null and ywType != ''">and yw_type = #{ywType}</if>
<if test="muId != null "> and b.mu_id = #{muId}</if> <if test="muId != null ">and b.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if> <if test="muPath != null and muPath != ''">and mu_path = #{muPath}</if>
<if test="birthNum != null and birthNum != ''"> and birth_num like concat('%', #{birthNum}, '%') </if> <if test="birthNum != null and birthNum != ''">and birth_num like concat('%', #{birthNum}, '%')</if>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and (name like concat('%', #{name}, '%') <!--and (name like concat('%', #{name}, '%')
or m_name like concat('%', #{name}, '%') or m_name like concat('%', #{name}, '%')
or f_name like concat('%', #{name}, '%') or f_name like concat('%', #{name}, '%')
) )-->
and (
(name like concat('%', #{name}, '%')OR to_pinyin ( name ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(m_name like concat('%', #{name}, '%')OR to_pinyin ( m_name ) LIKE CONCAT( '%', to_pinyin ( #{name} ),
'%' ))
or
(f_name like concat('%', #{name}, '%')OR to_pinyin ( f_name ) LIKE CONCAT( '%', to_pinyin ( #{name} ),
'%' ))
)
</if> </if>
<if test="birthday != null "> <if test="birthday != null ">
and birthday like concat('%', #{birthday}, '%') and birthday like concat('%', #{birthday}, '%')
</if> </if>
<if test="mCardId != null and mCardId != ''"> <if test="mCardId != null and mCardId != ''">
and (m_card_id like concat('%', #{mCardId}, '%') and (m_card_id like concat('%', #{mCardId}, '%')
or f_card_id like concat('%', #{mCardId}, '%') or f_card_id like concat('%', #{mCardId}, '%')
) )
</if> </if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if> <if test="sex != null and sex != ''">and sex = #{sex}</if>
<if test="bornAddress != null and bornAddress != ''"> and born_address like concat('%', #{bornAddress}, '%') </if> <if test="bornAddress != null and bornAddress != ''">and born_address like concat('%', #{bornAddress},
<if test="mName != null and mName != ''"> and m_name like concat('%', #{mName}, '%')</if> '%')
<if test="mAge != null and mAge != ''"> and m_age = #{mAge}</if> </if>
<if test="mGj != null and mGj != ''"> and m_gj = #{mGj}</if> <if test="mName != null and mName != ''">and m_name like concat('%', #{mName}, '%')</if>
<if test="mNation != null and mNation != ''"> and m_nation = #{mNation}</if> <if test="mAge != null and mAge != ''">and m_age = #{mAge}</if>
<if test="fName != null and fName != ''"> and f_name like concat('%', #{fName}, '%')</if> <if test="mGj != null and mGj != ''">and m_gj = #{mGj}</if>
<if test="fAge != null and fAge != ''"> and f_age = #{fAge}</if> <if test="mNation != null and mNation != ''">and m_nation = #{mNation}</if>
<if test="fGj != null and fGj != ''"> and f_gj = #{fGj}</if> <if test="fName != null and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
<if test="fNation != null and fNation != ''"> and f_nation = #{fNation}</if> <if test="fAge != null and fAge != ''">and f_age = #{fAge}</if>
<if test="fCardId != null and fCardId != ''"> and f_card_id = #{fCardId}</if> <if test="fGj != null and fGj != ''">and f_gj = #{fGj}</if>
<if test="homeAddress != null and homeAddress != ''"> and home_address = #{homeAddress}</if> <if test="fNation != null and fNation != ''">and f_nation = #{fNation}</if>
<if test="momSign != null and momSign != ''"> and mom_sign = #{momSign}</if> <if test="fCardId != null and fCardId != ''">and f_card_id = #{fCardId}</if>
<if test="jsrySign != null and jsrySign != ''"> and jsry_sign = #{jsrySign}</if> <if test="homeAddress != null and homeAddress != ''">and home_address = #{homeAddress}</if>
<if test="jsUnit != null and jsUnit != ''"> and js_unit like concat('%', #{jsUnit}, '%')</if> <if test="momSign != null and momSign != ''">and mom_sign = #{momSign}</if>
<if test="djType != null and djType != ''"> and dj_type = #{djType}</if> <if test="jsrySign != null and jsrySign != ''">and jsry_sign = #{jsrySign}</if>
<if test="picIds != null and picIds != ''"> and pic_ids = #{picIds}</if> <if test="jsUnit != null and jsUnit != ''">and js_unit like concat('%', #{jsUnit}, '%')</if>
<if test="pictures != null and pictures != ''"> and pictures = #{pictures}</if> <if test="djType != null and djType != ''">and dj_type = #{djType}</if>
<if test="allPicIds != null and allPicIds != ''"> and all_pic_ids = #{allPicIds}</if> <if test="picIds != null and picIds != ''">and pic_ids = #{picIds}</if>
<if test="allPics != null and allPics != ''"> and all_pics = #{allPics}</if> <if test="pictures != null and pictures != ''">and pictures = #{pictures}</if>
<if test="errorCorrect != null and errorCorrect != ''"> and error_correct = #{errorCorrect}</if> <if test="allPicIds != null and allPicIds != ''">and all_pic_ids = #{allPicIds}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if> <if test="allPics != null and allPics != ''">and all_pics = #{allPics}</if>
<if test="auditName != null and auditName != ''"> and audit_name like concat('%', #{auditName}, '%')</if> <if test="errorCorrect != null and errorCorrect != ''">and error_correct = #{errorCorrect}</if>
<if test="auditResult != null and auditResult != ''"> and audit_result = #{auditResult}</if> <if test="auditStatus != null and auditStatus != ''">and audit_status = #{auditStatus}</if>
<if test="auditReason != null and auditReason != ''"> and audit_reason = #{auditReason}</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> </where>
order by id desc order by id desc
</select> </select>
@ -108,15 +120,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select distinct b.* from da_birth_dj b select distinct b.* from da_birth_dj b
left join da_user_catalog uc on b.mu_id = uc.mu_id left join da_user_catalog uc on b.mu_id = uc.mu_id
<where> <where>
<if test="userId != null "> and uc.user_id = #{userId}</if> <if test="userId != null ">and uc.user_id = #{userId}</if>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and (name like concat('%', #{name}, '%') <!--
or m_name like concat('%', #{name}, '%') and (name like concat('%', #{name}, '%')
or f_name like concat('%', #{name}, '%') or m_name like concat('%', #{name}, '%')
or birthday like concat('%', #{name}, '%') or f_name like concat('%', #{name}, '%')
or m_card_id like concat('%', #{name}, '%') or birthday like concat('%', #{name}, '%')
or f_card_id like concat('%', #{name}, '%') or m_card_id like concat('%', #{name}, '%')
) or f_card_id like concat('%', #{name}, '%')
)
-->
and (
(name like concat('%', #{name}, '%')OR to_pinyin ( name ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(m_name like concat('%', #{name}, '%')OR to_pinyin ( m_name ) LIKE CONCAT( '%', to_pinyin ( #{name} ),
'%' ))
or
(f_name like concat('%', #{name}, '%')OR to_pinyin ( f_name ) LIKE CONCAT( '%', to_pinyin ( #{name} ),
'%' ))
or birthday like concat('%', #{name}, '%')
or m_card_id like concat('%', #{name}, '%')
or f_card_id like concat('%', #{name}, '%')
)
</if> </if>
</where> </where>
order by id desc order by id desc
@ -168,7 +195,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskId != null">#{taskId},</if> <if test="taskId != null">#{taskId},</if>
<if test="ywType != null">#{ywType},</if> <if test="ywType != null">#{ywType},</if>
@ -208,7 +235,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
</trim> </trim>
</insert> </insert>
<update id="updateDaBirthDj" parameterType="DaBirthDj"> <update id="updateDaBirthDj" parameterType="DaBirthDj">

@ -1,69 +1,69 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.da.dangan.mapper.DaCzrkdjMapper"> <mapper namespace="com.da.dangan.mapper.DaCzrkdjMapper">
<resultMap type="DaCzrkdj" id="DaCzrkdjResult"> <resultMap type="DaCzrkdj" id="DaCzrkdjResult">
<result property="id" column="id" /> <result property="id" column="id"/>
<result property="taskId" column="task_id" /> <result property="taskId" column="task_id"/>
<result property="ywType" column="yw_type" /> <result property="ywType" column="yw_type"/>
<result property="muId" column="mu_id" /> <result property="muId" column="mu_id"/>
<result property="muPath" column="mu_path" /> <result property="muPath" column="mu_path"/>
<result property="relation" column="relation" /> <result property="relation" column="relation"/>
<result property="name" column="name" /> <result property="name" column="name"/>
<result property="otherName" column="other_name" /> <result property="otherName" column="other_name"/>
<result property="usedName" column="used_name" /> <result property="usedName" column="used_name"/>
<result property="sex" column="sex" /> <result property="sex" column="sex"/>
<result property="jhr1" column="jhr1" /> <result property="jhr1" column="jhr1"/>
<result property="jhgx1" column="jhgx1" /> <result property="jhgx1" column="jhgx1"/>
<result property="jhr2" column="jhr2" /> <result property="jhr2" column="jhr2"/>
<result property="jhgx2" column="jhgx2" /> <result property="jhgx2" column="jhgx2"/>
<result property="gmcszqfrq" column="gmcszqfrq" /> <result property="gmcszqfrq" column="gmcszqfrq"/>
<result property="birthday" column="birthday" /> <result property="birthday" column="birthday"/>
<result property="address" column="address" /> <result property="address" column="address"/>
<result property="yj" column="yj" /> <result property="yj" column="yj"/>
<result property="nation" column="nation" /> <result property="nation" column="nation"/>
<result property="zjxy" column="zjxy" /> <result property="zjxy" column="zjxy"/>
<result property="whcd" column="whcd" /> <result property="whcd" column="whcd"/>
<result property="hyzk" column="hyzk" /> <result property="hyzk" column="hyzk"/>
<result property="zyjfwcs" column="zyjfwcs" /> <result property="zyjfwcs" column="zyjfwcs"/>
<result property="bxsqtzz" column="bxsqtzz" /> <result property="bxsqtzz" column="bxsqtzz"/>
<result property="gmzdhhmqfjgjrq" column="gmzdhhmqfjgjrq" /> <result property="gmzdhhmqfjgjrq" column="gmzdhhmqfjgjrq"/>
<result property="hsyhdqlbxshsdjhk" column="hsyhdqlbxshsdjhk" /> <result property="hsyhdqlbxshsdjhk" column="hsyhdqlbxshsdjhk"/>
<result property="hsybxshcqlhsdjhk" column="hsybxshcqlhsdjhk" /> <result property="hsybxshcqlhsdjhk" column="hsybxshcqlhsdjhk"/>
<result property="hshyqwhd" column="hshyqwhd" /> <result property="hshyqwhd" column="hshyqwhd"/>
<result property="zxhkrq" column="zxhkrq" /> <result property="zxhkrq" column="zxhkrq"/>
<result property="zxhkyy" column="zxhkyy" /> <result property="zxhkyy" column="zxhkyy"/>
<result property="hkdjsxbgjznrsjjblrz1" column="hkdjsxbgjznrsjjblrz1" /> <result property="hkdjsxbgjznrsjjblrz1" column="hkdjsxbgjznrsjjblrz1"/>
<result property="hkdjsxbgjznrsjjblrz2" column="hkdjsxbgjznrsjjblrz2" /> <result property="hkdjsxbgjznrsjjblrz2" column="hkdjsxbgjznrsjjblrz2"/>
<result property="jiguan" column="jiguan" /> <result property="jiguan" column="jiguan"/>
<result property="xzz" column="xzz" /> <result property="xzz" column="xzz"/>
<result property="hzName" column="hz_name" /> <result property="hzName" column="hz_name"/>
<result property="hb" column="hb" /> <result property="hb" column="hb"/>
<result property="djrq" column="djrq" /> <result property="djrq" column="djrq"/>
<result property="byzk" column="byzk" /> <result property="byzk" column="byzk"/>
<result property="height" column="height" /> <result property="height" column="height"/>
<result property="blood" column="blood" /> <result property="blood" column="blood"/>
<result property="zy" column="zy" /> <result property="zy" column="zy"/>
<result property="slReason" column="sl_reason" /> <result property="slReason" column="sl_reason"/>
<result property="sljmsfzqm" column="sljmsfzqm" /> <result property="sljmsfzqm" column="sljmsfzqm"/>
<result property="qfyj" column="qfyj" /> <result property="qfyj" column="qfyj"/>
<result property="yxrq" column="yxrq" /> <result property="yxrq" column="yxrq"/>
<result property="cardId" column="card_id" /> <result property="cardId" column="card_id"/>
<result property="picIds" column="pic_ids" /> <result property="picIds" column="pic_ids"/>
<result property="pictures" column="pictures" /> <result property="pictures" column="pictures"/>
<result property="allPicIds" column="all_pic_ids" /> <result property="allPicIds" column="all_pic_ids"/>
<result property="allPics" column="all_pics" /> <result property="allPics" column="all_pics"/>
<result property="errorCorrect" column="error_correct" /> <result property="errorCorrect" column="error_correct"/>
<result property="auditStatus" column="audit_status" /> <result property="auditStatus" column="audit_status"/>
<result property="auditName" column="audit_name" /> <result property="auditName" column="audit_name"/>
<result property="auditResult" column="audit_result" /> <result property="auditResult" column="audit_result"/>
<result property="auditReason" column="audit_reason" /> <result property="auditReason" column="audit_reason"/>
<result property="remark" column="remark" /> <result property="remark" column="remark"/>
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by"/>
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time"/>
</resultMap> </resultMap>
<sql id="selectDaCzrkdjVo"> <sql id="selectDaCzrkdjVo">
@ -71,95 +71,141 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectDaCzrkdjList" parameterType="DaCzrkdj" resultMap="DaCzrkdjResult"> <select id="selectDaCzrkdjList" parameterType="DaCzrkdj" resultMap="DaCzrkdjResult">
select distinct c.* from da_czrkdj c select distinct c.* from da_czrkdj c
left join da_user_catalog uc on c.mu_id = uc.mu_id left join da_user_catalog uc on c.mu_id = uc.mu_id
<where> <where>
<if test="userId != null "> and uc.user_id = #{userId}</if> <if test="userId != null ">and uc.user_id = #{userId}</if>
<if test="taskId != null "> and task_id = #{taskId}</if> <if test="taskId != null ">and task_id = #{taskId}</if>
<!-- flag=0 展示全部 =1不展示没有姓名的记录 --> <!-- flag=0 展示全部 =1不展示没有姓名的记录 -->
<if test="flag != null and flag=='1'.toString()"> and name !='无'</if> <if test="flag != null and flag=='1'.toString()">and name !='无'</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if> <if test="ywType != null and ywType != ''">and yw_type = #{ywType}</if>
<if test="muId != null "> and c.mu_id = #{muId}</if> <if test="muId != null ">and c.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if> <if test="muPath != null and muPath != ''">and mu_path = #{muPath}</if>
<if test="relation != null and relation != ''"> and relation = #{relation}</if> <if test="relation != null and relation != ''">and relation = #{relation}</if>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and ( name like concat('%', #{name}, '%') <!--and ( name like concat('%', #{name}, '%')
or hz_name like concat('%', #{name}, '%') or hz_name like concat('%', #{name}, '%')
or other_name like concat('%', #{name}, '%') or other_name like concat('%', #{name}, '%')
or used_name like concat('%', #{name}, '%') or used_name like concat('%', #{name}, '%')
or jhr1 like concat('%', #{name}, '%') or jhr1 like concat('%', #{name}, '%')
or jhr2 like concat('%', #{name}, '%') or jhr2 like concat('%', #{name}, '%')
)-->
and (
(name like concat('%', #{name}, '%')OR to_pinyin ( name ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(hz_name like concat('%', #{name}, '%')OR to_pinyin ( hz_name ) LIKE CONCAT( '%', to_pinyin ( #{name} ),
'%' ))
or
(other_name like concat('%', #{name}, '%')OR to_pinyin ( other_name ) LIKE CONCAT( '%', to_pinyin (
#{name} ), '%' ))
or
(used_name like concat('%', #{name}, '%')OR to_pinyin ( used_name ) LIKE CONCAT( '%', to_pinyin (
#{name} ), '%' ))
or
(jhr1 like concat('%', #{name}, '%')OR to_pinyin ( jhr1 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(jhr2 like concat('%', #{name}, '%')OR to_pinyin ( jhr2 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
) )
</if> </if>
<if test="birthday != null and birthday != ''"> <if test="birthday != null and birthday != ''">
and birthday like concat('%', #{birthday}, '%') and birthday like concat('%', #{birthday},
</if> </if>
<if test="cardId != null and cardId != ''"> <if test="cardId != null and cardId != ''">
and card_id like concat('%', #{cardId}, '%') and card_id like concat('%', #{cardId}, '%')
</if> </if>
<if test="otherName != null and otherName != ''"> and other_name like concat('%', #{otherName}, '%')</if> <if test="otherName != null and otherName != ''">and other_name like concat('%', #{otherName}, '%')</if>
<if test="usedName != null and usedName != ''"> and used_name like concat('%', #{usedName}, '%')</if> <if test="usedName != null and usedName != ''">and used_name like concat('%', #{usedName}, '%')</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if> <if test="sex != null and sex != ''">and sex = #{sex}</if>
<if test="jhr1 != null and jhr1 != ''"> and jhr1 = #{jhr1}</if> <if test="jhr1 != null and jhr1 != ''">and jhr1 = #{jhr1}</if>
<if test="jhgx1 != null and jhgx1 != ''"> and jhgx1 = #{jhgx1}</if> <if test="jhgx1 != null and jhgx1 != ''">and jhgx1 = #{jhgx1}</if>
<if test="jhr2 != null and jhr2 != ''"> and jhr2 = #{jhr2}</if> <if test="jhr2 != null and jhr2 != ''">and jhr2 = #{jhr2}</if>
<if test="jhgx2 != null and jhgx2 != ''"> and jhgx2 = #{jhgx2}</if> <if test="jhgx2 != null and jhgx2 != ''">and jhgx2 = #{jhgx2}</if>
<if test="gmcszqfrq != null and gmcszqfrq != ''"> and gmcszqfrq = #{gmcszqfrq}</if> <if test="gmcszqfrq != null and gmcszqfrq != ''">and gmcszqfrq = #{gmcszqfrq}</if>
<if test="address != null and address != ''"> and address = #{address}</if> <if test="address != null and address != ''">and address = #{address}</if>
<if test="yj != null and yj != ''"> and yj = #{yj}</if> <if test="yj != null and yj != ''">and yj = #{yj}</if>
<if test="nation != null and nation != ''"> and nation like concat('%', #{nation}, '%') </if> <if test="nation != null and nation != ''">and nation like concat('%', #{nation}, '%')</if>
<if test="zjxy != null and zjxy != ''"> and zjxy = #{zjxy}</if> <if test="zjxy != null and zjxy != ''">and zjxy = #{zjxy}</if>
<if test="whcd != null and whcd != ''"> and whcd = #{whcd}</if> <if test="whcd != null and whcd != ''">and whcd = #{whcd}</if>
<if test="hyzk != null and hyzk != ''"> and hyzk = #{hyzk}</if> <if test="hyzk != null and hyzk != ''">and hyzk = #{hyzk}</if>
<if test="zyjfwcs != null and zyjfwcs != ''"> and zyjfwcs = #{zyjfwcs}</if> <if test="zyjfwcs != null and zyjfwcs != ''">and zyjfwcs = #{zyjfwcs}</if>
<if test="bxsqtzz != null and bxsqtzz != ''"> and bxsqtzz = #{bxsqtzz}</if> <if test="bxsqtzz != null and bxsqtzz != ''">and bxsqtzz = #{bxsqtzz}</if>
<if test="gmzdhhmqfjgjrq != null and gmzdhhmqfjgjrq != ''"> and gmzdhhmqfjgjrq = #{gmzdhhmqfjgjrq}</if> <if test="gmzdhhmqfjgjrq != null and gmzdhhmqfjgjrq != ''">and gmzdhhmqfjgjrq = #{gmzdhhmqfjgjrq}</if>
<if test="hsyhdqlbxshsdjhk != null and hsyhdqlbxshsdjhk != ''"> and hsyhdqlbxshsdjhk = #{hsyhdqlbxshsdjhk}</if> <if test="hsyhdqlbxshsdjhk != null and hsyhdqlbxshsdjhk != ''">and hsyhdqlbxshsdjhk = #{hsyhdqlbxshsdjhk}
<if test="hsybxshcqlhsdjhk != null and hsybxshcqlhsdjhk != ''"> and hsybxshcqlhsdjhk = #{hsybxshcqlhsdjhk}</if> </if>
<if test="hshyqwhd != null and hshyqwhd != ''"> and hshyqwhd = #{hshyqwhd}</if> <if test="hsybxshcqlhsdjhk != null and hsybxshcqlhsdjhk != ''">and hsybxshcqlhsdjhk = #{hsybxshcqlhsdjhk}
<if test="zxhkrq != null and zxhkrq != ''"> and zxhkrq = #{zxhkrq}</if> </if>
<if test="zxhkyy != null and zxhkyy != ''"> and zxhkyy = #{zxhkyy}</if> <if test="hshyqwhd != null and hshyqwhd != ''">and hshyqwhd = #{hshyqwhd}</if>
<if test="hkdjsxbgjznrsjjblrz1 != null and hkdjsxbgjznrsjjblrz1 != ''"> and hkdjsxbgjznrsjjblrz1 = #{hkdjsxbgjznrsjjblrz1}</if> <if test="zxhkrq != null and zxhkrq != ''">and zxhkrq = #{zxhkrq}</if>
<if test="hkdjsxbgjznrsjjblrz2 != null and hkdjsxbgjznrsjjblrz2 != ''"> and hkdjsxbgjznrsjjblrz2 = #{hkdjsxbgjznrsjjblrz2}</if> <if test="zxhkyy != null and zxhkyy != ''">and zxhkyy = #{zxhkyy}</if>
<if test="jiguan != null and jiguan != ''"> and jiguan = #{jiguan}</if> <if test="hkdjsxbgjznrsjjblrz1 != null and hkdjsxbgjznrsjjblrz1 != ''">and hkdjsxbgjznrsjjblrz1 =
<if test="xzz != null and xzz != ''"> and xzz = #{xzz}</if> #{hkdjsxbgjznrsjjblrz1}
<if test="hzName != null and hzName != ''"> and hz_name like concat('%', #{hzName}, '%')</if> </if>
<if test="hb != null and hb != ''"> and hb = #{hb}</if> <if test="hkdjsxbgjznrsjjblrz2 != null and hkdjsxbgjznrsjjblrz2 != ''">and hkdjsxbgjznrsjjblrz2 =
<if test="djrq != null and djrq != ''"> and djrq = #{djrq}</if> #{hkdjsxbgjznrsjjblrz2}
<if test="byzk != null and byzk != ''"> and byzk = #{byzk}</if> </if>
<if test="height != null and height != ''"> and height = #{height}</if> <if test="jiguan != null and jiguan != ''">and jiguan = #{jiguan}</if>
<if test="blood != null and blood != ''"> and blood = #{blood}</if> <if test="xzz != null and xzz != ''">and xzz = #{xzz}</if>
<if test="zy != null and zy != ''"> and zy = #{zy}</if> <if test="hzName != null and hzName != ''">and hz_name like concat('%', #{hzName}, '%')</if>
<if test="slReason != null and slReason != ''"> and sl_reason = #{slReason}</if> <if test="hb != null and hb != ''">and hb = #{hb}</if>
<if test="sljmsfzqm != null and sljmsfzqm != ''"> and sljmsfzqm = #{sljmsfzqm}</if> <if test="djrq != null and djrq != ''">and djrq = #{djrq}</if>
<if test="qfyj != null and qfyj != ''"> and qfyj = #{qfyj}</if> <if test="byzk != null and byzk != ''">and byzk = #{byzk}</if>
<if test="yxrq != null and yxrq != ''"> and yxrq = #{yxrq}</if> <if test="height != null and height != ''">and height = #{height}</if>
<if test="picIds != null and picIds != ''"> and pic_ids = #{picIds}</if> <if test="blood != null and blood != ''">and blood = #{blood}</if>
<if test="pictures != null and pictures != ''"> and pictures = #{pictures}</if> <if test="zy != null and zy != ''">and zy = #{zy}</if>
<if test="allPicIds != null and allPicIds != ''"> and all_pic_ids = #{allPicIds}</if> <if test="slReason != null and slReason != ''">and sl_reason = #{slReason}</if>
<if test="allPics != null and allPics != ''"> and all_pics = #{allPics}</if> <if test="sljmsfzqm != null and sljmsfzqm != ''">and sljmsfzqm = #{sljmsfzqm}</if>
<if test="errorCorrect != null and errorCorrect != ''"> and error_correct = #{errorCorrect}</if> <if test="qfyj != null and qfyj != ''">and qfyj = #{qfyj}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if> <if test="yxrq != null and yxrq != ''">and yxrq = #{yxrq}</if>
<if test="auditName != null and auditName != ''"> and audit_name like concat('%', #{auditName}, '%')</if> <if test="picIds != null and picIds != ''">and pic_ids = #{picIds}</if>
<if test="auditResult != null and auditResult != ''"> and audit_result = #{auditResult}</if> <if test="pictures != null and pictures != ''">and pictures = #{pictures}</if>
<if test="auditReason != null and auditReason != ''"> and audit_reason = #{auditReason}</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> </where>
order by id desc order by id desc
</select> </select>
<!--检索--> <!--检索-->
<select id="searchDaCzrkdjList" parameterType="DaCzrkdj" resultMap="DaCzrkdjResult"> <select id="searchDaCzrkdjList" parameterType="DaCzrkdj" resultMap="DaCzrkdjResult">
select distinct c.* from da_czrkdj c select distinct c.* from da_czrkdj c
left join da_user_catalog uc on c.mu_id = uc.mu_id left join da_user_catalog uc on c.mu_id = uc.mu_id
<where> <where>
<if test="userId != null "> and uc.user_id = #{userId}</if> <if test="userId != null ">and uc.user_id = #{userId}</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if> <if test="ywType != null and ywType != ''">and yw_type = #{ywType}</if>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and ( name like concat('%', #{name}, '%') <!--and ( name like concat('%', #{name}, '%')
or hz_name like concat('%', #{name}, '%') or hz_name like concat('%', #{name}, '%')
or other_name like concat('%', #{name}, '%') or other_name like concat('%', #{name}, '%')
or used_name like concat('%', #{name}, '%') or used_name like concat('%', #{name}, '%')
or jhr1 like concat('%', #{name}, '%') or jhr1 like concat('%', #{name}, '%')
or jhr2 like concat('%', #{name}, '%') or jhr2 like concat('%', #{name}, '%')
or birthday like concat('%', #{name}, '%')
or card_id like concat('%', #{name}, '%')
)-->
and (
(name like concat('%', #{name}, '%')OR to_pinyin ( name ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(hz_name like concat('%', #{name}, '%')OR to_pinyin ( hz_name ) LIKE CONCAT( '%', to_pinyin ( #{name} ),
'%' ))
or
(other_name like concat('%', #{name}, '%')OR to_pinyin ( other_name ) LIKE CONCAT( '%', to_pinyin (
#{name} ), '%' ))
or
(used_name like concat('%', #{name}, '%')OR to_pinyin ( used_name ) LIKE CONCAT( '%', to_pinyin (
#{name} ), '%' ))
or
(jhr1 like concat('%', #{name}, '%')OR to_pinyin ( jhr1 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(jhr2 like concat('%', #{name}, '%')OR to_pinyin ( jhr2 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or birthday like concat('%', #{name}, '%') or birthday like concat('%', #{name}, '%')
or card_id like concat('%', #{name}, '%') or card_id like concat('%', #{name}, '%')
) )

@ -1,49 +1,49 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.da.dangan.mapper.DaQyzMapper"> <mapper namespace="com.da.dangan.mapper.DaQyzMapper">
<resultMap type="DaQyz" id="DaQyzResult"> <resultMap type="DaQyz" id="DaQyzResult">
<result property="id" column="id" /> <result property="id" column="id"/>
<result property="taskId" column="task_id" /> <result property="taskId" column="task_id"/>
<result property="ywType" column="yw_type" /> <result property="ywType" column="yw_type"/>
<result property="muId" column="mu_id" /> <result property="muId" column="mu_id"/>
<result property="muPath" column="mu_path" /> <result property="muPath" column="mu_path"/>
<result property="fwUnit" column="fw_unit" /> <result property="fwUnit" column="fw_unit"/>
<result property="wjXh" column="wj_xh" /> <result property="wjXh" column="wj_xh"/>
<result property="name1" column="name1" /> <result property="name1" column="name1"/>
<result property="sex1" column="sex1" /> <result property="sex1" column="sex1"/>
<result property="cardId1" column="card_id1" /> <result property="cardId1" column="card_id1"/>
<result property="name2" column="name2" /> <result property="name2" column="name2"/>
<result property="sex2" column="sex2" /> <result property="sex2" column="sex2"/>
<result property="cardId2" column="card_id2" /> <result property="cardId2" column="card_id2"/>
<result property="name3" column="name3" /> <result property="name3" column="name3"/>
<result property="sex3" column="sex3" /> <result property="sex3" column="sex3"/>
<result property="cardId3" column="card_id3" /> <result property="cardId3" column="card_id3"/>
<result property="name4" column="name4" /> <result property="name4" column="name4"/>
<result property="sex4" column="sex4" /> <result property="sex4" column="sex4"/>
<result property="cardId4" column="card_id4" /> <result property="cardId4" column="card_id4"/>
<result property="qyReason" column="qy_reason" /> <result property="qyReason" column="qy_reason"/>
<result property="yAddress" column="y_address" /> <result property="yAddress" column="y_address"/>
<result property="qwAddress" column="qw_address" /> <result property="qwAddress" column="qw_address"/>
<result property="sDate" column="s_date" /> <result property="sDate" column="s_date"/>
<result property="eDate" column="e_date" /> <result property="eDate" column="e_date"/>
<result property="cbr" column="cbr" /> <result property="cbr" column="cbr"/>
<result property="picIds" column="pic_ids" /> <result property="picIds" column="pic_ids"/>
<result property="pictures" column="pictures" /> <result property="pictures" column="pictures"/>
<result property="allPicIds" column="all_pic_ids" /> <result property="allPicIds" column="all_pic_ids"/>
<result property="allPics" column="all_pics" /> <result property="allPics" column="all_pics"/>
<result property="errorCorrect" column="error_correct" /> <result property="errorCorrect" column="error_correct"/>
<result property="auditStatus" column="audit_status" /> <result property="auditStatus" column="audit_status"/>
<result property="auditName" column="audit_name" /> <result property="auditName" column="audit_name"/>
<result property="auditResult" column="audit_result" /> <result property="auditResult" column="audit_result"/>
<result property="auditReason" column="audit_reason" /> <result property="auditReason" column="audit_reason"/>
<result property="remark" column="remark" /> <result property="remark" column="remark"/>
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by"/>
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time"/>
</resultMap> </resultMap>
<sql id="selectDaQyzVo"> <sql id="selectDaQyzVo">
@ -51,67 +51,81 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectDaQyzList" parameterType="DaQyz" resultMap="DaQyzResult"> <select id="selectDaQyzList" parameterType="DaQyz" resultMap="DaQyzResult">
select distinct q.* from da_qyz q select distinct q.* from da_qyz q
left join da_user_catalog uc on q.mu_id = uc.mu_id left join da_user_catalog uc on q.mu_id = uc.mu_id
<where> <where>
<if test="userId != null"> and uc.user_id = #{userId}</if> <if test="userId != null">and uc.user_id = #{userId}</if>
<if test="taskId != null "> and task_id = #{taskId}</if> <if test="taskId != null ">and task_id = #{taskId}</if>
<!-- flag=0 展示全部 =1不展示没有姓名的记录 --> <!-- flag=0 展示全部 =1不展示没有姓名的记录 -->
<if test="flag != null and flag=='1'.toString()"> and name1 !='无'</if> <if test="flag != null and flag=='1'.toString()">and name1 !='无'</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if> <if test="ywType != null and ywType != ''">and yw_type = #{ywType}</if>
<if test="muId != null "> and q.mu_id = #{muId}</if> <if test="muId != null ">and q.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if> <if test="muPath != null and muPath != ''">and mu_path = #{muPath}</if>
<if test="fwUnit != null and fwUnit != ''"> and fw_unit like concat('%', #{fwUnit}, '%') </if> <if test="fwUnit != null and fwUnit != ''">and fw_unit like concat('%', #{fwUnit}, '%')</if>
<if test="wjXh != null and wjXh != ''"> and wj_xh like concat('%', #{wjXh}, '%') </if> <if test="wjXh != null and wjXh != ''">and wj_xh like concat('%', #{wjXh}, '%')</if>
<if test="name1 != null and name1 != ''"> <if test="name1 != null and name1 != ''">
and ( name1 like concat('%', #{name1}, '%') <!--and ( name1 like concat('%', #{name1}, '%')
or name2 like concat('%', #{name1}, '%') or name2 like concat('%', #{name1}, '%')
or name3 like concat('%', #{name1}, '%') or name3 like concat('%', #{name1}, '%')
or name4 like concat('%', #{name1}, '%') or name4 like concat('%', #{name1}, '%')
)-->
and (
(name1 like concat('%', #{name1}, '%')OR to_pinyin ( name1 ) LIKE CONCAT( '%', to_pinyin ( #{name1} ),
'%' ))
or
(name2 like concat('%', #{name1}, '%')OR to_pinyin ( name2 ) LIKE CONCAT( '%', to_pinyin ( #{name1} ),
'%' ))
or
(name3 like concat('%', #{name1}, '%')OR to_pinyin ( name3 ) LIKE CONCAT( '%', to_pinyin ( #{name1} ),
'%' ))
or
(name4 like concat('%', #{name1}, '%')OR to_pinyin ( name4 ) LIKE CONCAT( '%', to_pinyin ( #{name1} ),
'%' ))
) )
</if> </if>
<if test="sex1 != null and sex1 != ''"> and sex1 = #{sex1}</if> <if test="sex1 != null and sex1 != ''">and sex1 = #{sex1}</if>
<if test="cardId1 != null and cardId1 != ''"> <if test="cardId1 != null and cardId1 != ''">
and (card_id1 like concat('%', #{cardId1}, '%') and (card_id1 like concat('%', #{cardId1}, '%')
or card_id2 like concat('%', #{cardId1}, '%') or card_id2 like concat('%', #{cardId1}, '%')
or card_id3 like concat('%', #{cardId1}, '%') or card_id3 like concat('%', #{cardId1}, '%')
or card_id4 like concat('%', #{cardId1}, '%') or card_id4 like concat('%', #{cardId1}, '%')
) )
</if> </if>
<if test="name2 != null and name2 != ''"> and name2 = #{name2}</if> <if test="name2 != null and name2 != ''">and name2 = #{name2}</if>
<if test="sex2 != null and sex2 != ''"> and sex2 = #{sex2}</if> <if test="sex2 != null and sex2 != ''">and sex2 = #{sex2}</if>
<if test="cardId2 != null and cardId2 != ''"> and card_id2 = #{cardId2}</if> <if test="cardId2 != null and cardId2 != ''">and card_id2 = #{cardId2}</if>
<if test="name3 != null and name3 != ''"> and name3 = #{name3}</if> <if test="name3 != null and name3 != ''">and name3 = #{name3}</if>
<if test="sex3 != null and sex3 != ''"> and sex3 = #{sex3}</if> <if test="sex3 != null and sex3 != ''">and sex3 = #{sex3}</if>
<if test="cardId3 != null and cardId3 != ''"> and card_id3 = #{cardId3}</if> <if test="cardId3 != null and cardId3 != ''">and card_id3 = #{cardId3}</if>
<if test="name4 != null and name4 != ''"> and name4 = #{name4}</if> <if test="name4 != null and name4 != ''">and name4 = #{name4}</if>
<if test="sex4 != null and sex4 != ''"> and sex4 = #{sex4}</if> <if test="sex4 != null and sex4 != ''">and sex4 = #{sex4}</if>
<if test="cardId4 != null and cardId4 != ''"> and card_id4 = #{cardId4}</if> <if test="cardId4 != null and cardId4 != ''">and card_id4 = #{cardId4}</if>
<if test="qyReason != null and qyReason != ''"> and qy_reason = #{qyReason}</if> <if test="qyReason != null and qyReason != ''">and qy_reason = #{qyReason}</if>
<if test="yAddress != null and yAddress != ''"> and y_address = #{yAddress}</if> <if test="yAddress != null and yAddress != ''">and y_address = #{yAddress}</if>
<if test="qwAddress != null and qwAddress != ''"> and qw_address = #{qwAddress}</if> <if test="qwAddress != null and qwAddress != ''">and qw_address = #{qwAddress}</if>
<if test="sDate != null and sDate != ''"> and s_date = #{sDate}</if> <if test="sDate != null and sDate != ''">and s_date = #{sDate}</if>
<if test="eDate != null and eDate != ''"> and e_date = #{eDate}</if> <if test="eDate != null and eDate != ''">and e_date = #{eDate}</if>
<if test="cbr != null and cbr != ''"> and cbr = #{cbr}</if> <if test="cbr != null and cbr != ''">and cbr = #{cbr}</if>
<if test="picIds != null and picIds != ''"> and pic_ids = #{picIds}</if> <if test="picIds != null and picIds != ''">and pic_ids = #{picIds}</if>
<if test="pictures != null and pictures != ''"> and pictures = #{pictures}</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="allPicIds != null and allPicIds != ''">and all_pic_ids = #{allPicIds}</if>
<if test="allPics != null and allPics != ''"> and all_pics = #{allPics}</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="errorCorrect != null and errorCorrect != ''">and error_correct = #{errorCorrect}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</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="auditName != null and auditName != ''">and audit_name like concat('%', #{auditName}, '%')</if>
<if test="auditResult != null and auditResult != ''"> and audit_result = #{auditResult}</if> <if test="auditResult != null and auditResult != ''">and audit_result = #{auditResult}</if>
<if test="auditReason != null and auditReason != ''"> and audit_reason = #{auditReason}</if> <if test="auditReason != null and auditReason != ''">and audit_reason = #{auditReason}</if>
</where> </where>
order by id desc order by id desc
</select> </select>
<select id="searchDaQyzList" parameterType="DaQyz" resultMap="DaQyzResult"> <select id="searchDaQyzList" parameterType="DaQyz" resultMap="DaQyzResult">
select distinct q.* from da_qyz q select distinct q.* from da_qyz q
left join da_user_catalog uc on q.mu_id = uc.mu_id left join da_user_catalog uc on q.mu_id = uc.mu_id
<where> <where>
<if test="userId != null"> and uc.user_id = #{userId}</if> <if test="userId != null">and uc.user_id = #{userId}</if>
<if test="name1 != null and name1 != ''"> <if test="name1 != null and name1 != ''">
and ( name1 like concat('%', #{name1}, '%') <!--and ( name1 like concat('%', #{name1}, '%')
or name2 like concat('%', #{name1}, '%') or name2 like concat('%', #{name1}, '%')
or name3 like concat('%', #{name1}, '%') or name3 like concat('%', #{name1}, '%')
or name4 like concat('%', #{name1}, '%') or name4 like concat('%', #{name1}, '%')
@ -119,6 +133,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
or card_id2 like concat('%', #{name1}, '%') or card_id2 like concat('%', #{name1}, '%')
or card_id3 like concat('%', #{name1}, '%') or card_id3 like concat('%', #{name1}, '%')
or card_id4 like concat('%', #{name1}, '%') or card_id4 like concat('%', #{name1}, '%')
)-->
and (
(name1 like concat('%', #{name1}, '%')OR to_pinyin ( name1 ) LIKE CONCAT( '%', to_pinyin ( #{name1} ),
'%' ))
or
(name2 like concat('%', #{name1}, '%')OR to_pinyin ( name2 ) LIKE CONCAT( '%', to_pinyin ( #{name1} ),
'%' ))
or
(name3 like concat('%', #{name1}, '%')OR to_pinyin ( name3 ) LIKE CONCAT( '%', to_pinyin ( #{name1} ),
'%' ))
or
(name4 like concat('%', #{name1}, '%')OR to_pinyin ( name4 ) LIKE CONCAT( '%', to_pinyin ( #{name1} ),
'%' ))
or card_id1 like concat('%', #{name1}, '%')
or card_id2 like concat('%', #{name1}, '%')
or card_id3 like concat('%', #{name1}, '%')
or card_id4 like concat('%', #{name1}, '%')
) )
</if> </if>
</where> </where>
@ -171,7 +203,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskId != null">#{taskId},</if> <if test="taskId != null">#{taskId},</if>
<if test="ywType != null">#{ywType},</if> <if test="ywType != null">#{ywType},</if>
@ -211,7 +243,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
</trim> </trim>
</insert> </insert>
<update id="updateDaQyz" parameterType="DaQyz"> <update id="updateDaQyz" parameterType="DaQyz">

@ -1,45 +1,45 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.da.dangan.mapper.DaYtzmMapper"> <mapper namespace="com.da.dangan.mapper.DaYtzmMapper">
<resultMap type="DaYtzm" id="DaYtzmResult"> <resultMap type="DaYtzm" id="DaYtzmResult">
<result property="id" column="id" /> <result property="id" column="id"/>
<result property="taskId" column="task_id" /> <result property="taskId" column="task_id"/>
<result property="ywType" column="yw_type" /> <result property="ywType" column="yw_type"/>
<result property="muId" column="mu_id" /> <result property="muId" column="mu_id"/>
<result property="muPath" column="mu_path" /> <result property="muPath" column="mu_path"/>
<result property="year" column="year" /> <result property="year" column="year"/>
<result property="xh" column="xh" /> <result property="xh" column="xh"/>
<result property="wName" column="w_name" /> <result property="wName" column="w_name"/>
<result property="wUnit" column="w_unit" /> <result property="wUnit" column="w_unit"/>
<result property="wCardId" column="w_card_id" /> <result property="wCardId" column="w_card_id"/>
<result property="mName" column="m_name" /> <result property="mName" column="m_name"/>
<result property="mUnit" column="m_unit" /> <result property="mUnit" column="m_unit"/>
<result property="mCardId" column="m_card_id" /> <result property="mCardId" column="m_card_id"/>
<result property="syzh" column="syzh" /> <result property="syzh" column="syzh"/>
<result property="birthday" column="birthday" /> <result property="birthday" column="birthday"/>
<result property="hospital" column="hospital" /> <result property="hospital" column="hospital"/>
<result property="babySex" column="baby_sex" /> <result property="babySex" column="baby_sex"/>
<result property="suggest" column="suggest" /> <result property="suggest" column="suggest"/>
<result property="pcsAddress" column="pcs_address" /> <result property="pcsAddress" column="pcs_address"/>
<result property="tbDate1" column="tb_date1" /> <result property="tbDate1" column="tb_date1"/>
<result property="tbDate2" column="tb_date2" /> <result property="tbDate2" column="tb_date2"/>
<result property="picIds" column="pic_ids" /> <result property="picIds" column="pic_ids"/>
<result property="pictures" column="pictures" /> <result property="pictures" column="pictures"/>
<result property="allPicIds" column="all_pic_ids" /> <result property="allPicIds" column="all_pic_ids"/>
<result property="allPics" column="all_pics" /> <result property="allPics" column="all_pics"/>
<result property="errorCorrect" column="error_correct" /> <result property="errorCorrect" column="error_correct"/>
<result property="auditStatus" column="audit_status" /> <result property="auditStatus" column="audit_status"/>
<result property="auditName" column="audit_name" /> <result property="auditName" column="audit_name"/>
<result property="auditResult" column="audit_result" /> <result property="auditResult" column="audit_result"/>
<result property="auditReason" column="audit_reason" /> <result property="auditReason" column="audit_reason"/>
<result property="remark" column="remark" /> <result property="remark" column="remark"/>
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by"/>
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time"/>
</resultMap> </resultMap>
<sql id="selectDaYtzmVo"> <sql id="selectDaYtzmVo">
@ -47,65 +47,82 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectDaYtzmList" parameterType="DaYtzm" resultMap="DaYtzmResult"> <select id="selectDaYtzmList" parameterType="DaYtzm" resultMap="DaYtzmResult">
select distinct y.* from da_ytzm y select distinct y.* from da_ytzm y
left join da_user_catalog uc on y.mu_id = uc.mu_id left join da_user_catalog uc on y.mu_id = uc.mu_id
<where> <where>
<if test="userId != null "> and uc.user_id = #{userId}</if> <if test="userId != null ">and uc.user_id = #{userId}</if>
<if test="taskId != null "> and task_id = #{taskId}</if> <if test="taskId != null ">and task_id = #{taskId}</if>
<!-- flag=0 展示全部 =1不展示没有姓名的记录 --> <!-- flag=0 展示全部 =1不展示没有姓名的记录 -->
<if test="flag != null and flag=='1'.toString()"> and w_name !='无'</if> <if test="flag != null and flag=='1'.toString()">and w_name !='无'</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if> <if test="ywType != null and ywType != ''">and yw_type = #{ywType}</if>
<if test="muId != null "> and y.mu_id = #{muId}</if> <if test="muId != null ">and y.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if> <if test="muPath != null and muPath != ''">and mu_path = #{muPath}</if>
<if test="year != null and year != ''"> and year like concat('%', #{year}, '%') </if> <if test="year != null and year != ''">and year like concat('%', #{year}, '%')</if>
<if test="xh != null and xh != ''"> and xh like concat('%', #{xh}, '%') </if> <if test="xh != null and xh != ''">and xh like concat('%', #{xh}, '%')</if>
<if test="wName != null and wName != ''"> <if test="wName != null and wName != ''">
and ( w_name like concat('%', #{wName}, '%') <!--and ( w_name like concat('%', #{wName}, '%')
or m_name like concat('%', #{wName}, '%') or m_name like concat('%', #{wName}, '%')
)-->
and (
(w_name like concat('%', #{wName}, '%')OR to_pinyin ( w_name ) LIKE CONCAT( '%', to_pinyin ( #{wName}
), '%' ))
or
(m_name like concat('%', #{wName}, '%')OR to_pinyin ( m_name ) LIKE CONCAT( '%', to_pinyin ( #{wName} ),
'%' ))
) )
</if> </if>
<if test="birthday != null "> <if test="birthday != null ">
and birthday like concat('%', #{birthday}, '%') and birthday like concat('%', #{birthday}, '%')
</if> </if>
<if test="wCardId != null and wCardId != ''"> <if test="wCardId != null and wCardId != ''">
and (w_card_id like concat('%', #{wCardId}, '%') and (w_card_id like concat('%', #{wCardId}, '%')
or m_card_id like concat('%', #{wCardId}, '%') or m_card_id like concat('%', #{wCardId}, '%')
) )
</if> </if>
<if test="wUnit != null and wUnit != ''"> and w_unit = #{wUnit}</if> <if test="wUnit != null and wUnit != ''">and w_unit = #{wUnit}</if>
<if test="mName != null and mName != ''"> and m_name like concat('%', #{mName}, '%')</if> <if test="mName != null and mName != ''">and m_name like concat('%', #{mName}, '%')</if>
<if test="mUnit != null and mUnit != ''"> and m_unit = #{mUnit}</if> <if test="mUnit != null and mUnit != ''">and m_unit = #{mUnit}</if>
<if test="mCardId != null and mCardId != ''"> and m_card_id = #{mCardId}</if> <if test="mCardId != null and mCardId != ''">and m_card_id = #{mCardId}</if>
<if test="syzh != null and syzh != ''"> and syzh like concat('%', #{syzh}, '%')</if> <if test="syzh != null and syzh != ''">and syzh like concat('%', #{syzh}, '%')</if>
<if test="hospital != null and hospital != ''"> and hospital = #{hospital}</if> <if test="hospital != null and hospital != ''">and hospital = #{hospital}</if>
<if test="babySex != null and babySex != ''"> and baby_sex = #{babySex}</if> <if test="babySex != null and babySex != ''">and baby_sex = #{babySex}</if>
<if test="suggest != null and suggest != ''"> and suggest = #{suggest}</if> <if test="suggest != null and suggest != ''">and suggest = #{suggest}</if>
<if test="pcsAddress != null and pcsAddress != ''"> and pcs_address = #{pcsAddress}</if> <if test="pcsAddress != null and pcsAddress != ''">and pcs_address = #{pcsAddress}</if>
<if test="tbDate1 != null "> and tb_date1 = #{tbDate1}</if> <if test="tbDate1 != null ">and tb_date1 = #{tbDate1}</if>
<if test="tbDate2 != null "> and tb_date2 = #{tbDate2}</if> <if test="tbDate2 != null ">and tb_date2 = #{tbDate2}</if>
<if test="picIds != null and picIds != ''"> and pic_ids = #{picIds}</if> <if test="picIds != null and picIds != ''">and pic_ids = #{picIds}</if>
<if test="pictures != null and pictures != ''"> and pictures = #{pictures}</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="allPicIds != null and allPicIds != ''">and all_pic_ids = #{allPicIds}</if>
<if test="allPics != null and allPics != ''"> and all_pics = #{allPics}</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="errorCorrect != null and errorCorrect != ''">and error_correct = #{errorCorrect}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</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="auditName != null and auditName != ''">and audit_name like concat('%', #{auditName}, '%')</if>
<if test="auditResult != null and auditResult != ''"> and audit_result = #{auditResult}</if> <if test="auditResult != null and auditResult != ''">and audit_result = #{auditResult}</if>
<if test="auditReason != null and auditReason != ''"> and audit_reason = #{auditReason}</if> <if test="auditReason != null and auditReason != ''">and audit_reason = #{auditReason}</if>
</where> </where>
order by id desc order by id desc
</select> </select>
<select id="searchYtzmList" parameterType="DaYtzm" resultMap="DaYtzmResult"> <select id="searchYtzmList" parameterType="DaYtzm" resultMap="DaYtzmResult">
select distinct y.* from da_ytzm y select distinct y.* from da_ytzm y
left join da_user_catalog uc on y.mu_id = uc.mu_id left join da_user_catalog uc on y.mu_id = uc.mu_id
<where> <where>
<if test="userId != null "> and uc.user_id = #{userId}</if> <if test="userId != null ">and uc.user_id = #{userId}</if>
<if test="wName != null and wName != ''"> <if test="wName != null and wName != ''">
and ( w_name like concat('%', #{wName}, '%') <!--and ( w_name like concat('%', #{wName}, '%')
or m_name like concat('%', #{wName}, '%') or m_name like concat('%', #{wName}, '%')
or birthday like concat('%', #{wName}, '%') or birthday like concat('%', #{wName}, '%')
or w_card_id like concat('%', #{wName}, '%') or w_card_id like concat('%', #{wName}, '%')
or m_card_id like concat('%', #{wName}, '%') or m_card_id like concat('%', #{wName}, '%')
)-->
and (
(w_name like concat('%', #{wName}, '%')OR to_pinyin ( w_name ) LIKE CONCAT( '%', to_pinyin ( #{wName}
), '%' ))
or
(m_name like concat('%', #{wName}, '%')OR to_pinyin ( m_name ) LIKE CONCAT( '%', to_pinyin ( #{wName} ),
'%' ))
or birthday like concat('%', #{wName}, '%')
or w_card_id like concat('%', #{wName}, '%')
or m_card_id like concat('%', #{wName}, '%')
) )
</if> </if>
</where> </where>
@ -154,7 +171,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskId != null">#{taskId},</if> <if test="taskId != null">#{taskId},</if>
<if test="ywType != null">#{ywType},</if> <if test="ywType != null">#{ywType},</if>
@ -190,7 +207,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
</trim> </trim>
</insert> </insert>
<update id="updateDaYtzm" parameterType="DaYtzm"> <update id="updateDaYtzm" parameterType="DaYtzm">

@ -1,51 +1,51 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.da.dangan.mapper.DaZfnyhkcgMapper"> <mapper namespace="com.da.dangan.mapper.DaZfnyhkcgMapper">
<resultMap type="DaZfnyhkcg" id="DaZfnyhkcgResult"> <resultMap type="DaZfnyhkcg" id="DaZfnyhkcgResult">
<result property="id" column="id" /> <result property="id" column="id"/>
<result property="taskId" column="task_id" /> <result property="taskId" column="task_id"/>
<result property="ywType" column="yw_type" /> <result property="ywType" column="yw_type"/>
<result property="muId" column="mu_id" /> <result property="muId" column="mu_id"/>
<result property="muPath" column="mu_path" /> <result property="muPath" column="mu_path"/>
<result property="num" column="num" /> <result property="num" column="num"/>
<result property="name" column="name" /> <result property="name" column="name"/>
<result property="address" column="address" /> <result property="address" column="address"/>
<result property="relation1" column="relation1" /> <result property="relation1" column="relation1"/>
<result property="name1" column="name1" /> <result property="name1" column="name1"/>
<result property="sex1" column="sex1" /> <result property="sex1" column="sex1"/>
<result property="relation2" column="relation2" /> <result property="relation2" column="relation2"/>
<result property="name2" column="name2" /> <result property="name2" column="name2"/>
<result property="sex2" column="sex2" /> <result property="sex2" column="sex2"/>
<result property="relation3" column="relation3" /> <result property="relation3" column="relation3"/>
<result property="name3" column="name3" /> <result property="name3" column="name3"/>
<result property="sex3" column="sex3" /> <result property="sex3" column="sex3"/>
<result property="relation4" column="relation4" /> <result property="relation4" column="relation4"/>
<result property="name4" column="name4" /> <result property="name4" column="name4"/>
<result property="sex4" column="sex4" /> <result property="sex4" column="sex4"/>
<result property="relation5" column="relation5" /> <result property="relation5" column="relation5"/>
<result property="name5" column="name5" /> <result property="name5" column="name5"/>
<result property="sex5" column="sex5" /> <result property="sex5" column="sex5"/>
<result property="jg1" column="jg1" /> <result property="jg1" column="jg1"/>
<result property="jg2" column="jg2" /> <result property="jg2" column="jg2"/>
<result property="cbr" column="cbr" /> <result property="cbr" column="cbr"/>
<result property="cbDate" column="cb_date" /> <result property="cbDate" column="cb_date"/>
<result property="picIds" column="pic_ids" /> <result property="picIds" column="pic_ids"/>
<result property="pictures" column="pictures" /> <result property="pictures" column="pictures"/>
<result property="allPicIds" column="all_pic_ids" /> <result property="allPicIds" column="all_pic_ids"/>
<result property="allPics" column="all_pics" /> <result property="allPics" column="all_pics"/>
<result property="errorCorrect" column="error_correct" /> <result property="errorCorrect" column="error_correct"/>
<result property="auditStatus" column="audit_status" /> <result property="auditStatus" column="audit_status"/>
<result property="auditName" column="audit_name" /> <result property="auditName" column="audit_name"/>
<result property="auditResult" column="audit_result" /> <result property="auditResult" column="audit_result"/>
<result property="auditReason" column="audit_reason" /> <result property="auditReason" column="audit_reason"/>
<result property="remark" column="remark" /> <result property="remark" column="remark"/>
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by"/>
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time"/>
</resultMap> </resultMap>
<sql id="selectDaZfnyhkcgVo"> <sql id="selectDaZfnyhkcgVo">
@ -53,72 +53,110 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectDaZfnyhkcgList" parameterType="DaZfnyhkcg" resultMap="DaZfnyhkcgResult"> <select id="selectDaZfnyhkcgList" parameterType="DaZfnyhkcg" resultMap="DaZfnyhkcgResult">
select distinct z.* from da_zfnyhkcg z select distinct z.* from da_zfnyhkcg z
left join da_user_catalog uc on z.mu_id = uc.mu_id left join da_user_catalog uc on z.mu_id = uc.mu_id
<where> <where>
<if test="userId != null "> and uc.user_id = #{userId}</if> <if test="userId != null ">and uc.user_id = #{userId}</if>
<if test="taskId != null "> and task_id = #{taskId}</if> <if test="taskId != null ">and task_id = #{taskId}</if>
<!-- flag=0 展示全部 =1不展示没有姓名的记录 --> <!-- flag=0 展示全部 =1不展示没有姓名的记录 -->
<if test="flag != null and flag=='1'.toString()"> and (name !='无' or name1!='无')</if> <if test="flag != null and flag=='1'.toString()">and (name !='无' or name1!='无')</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if> <if test="ywType != null and ywType != ''">and yw_type = #{ywType}</if>
<if test="muId != null "> and z.mu_id = #{muId}</if> <if test="muId != null ">and z.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if> <if test="muPath != null and muPath != ''">and mu_path = #{muPath}</if>
<if test="num != null and num != ''"> and num like concat('%', #{num}, '%') </if> <if test="num != null and num != ''">and num like concat('%', #{num}, '%')</if>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and ( name like concat('%', #{name}, '%') <!--and ( name like concat('%', #{name}, '%')
or name1 like concat('%', #{name}, '%') or name1 like concat('%', #{name}, '%')
or name2 like concat('%', #{name}, '%') or name2 like concat('%', #{name}, '%')
or name3 like concat('%', #{name}, '%') or name3 like concat('%', #{name}, '%')
or name4 like concat('%', #{name}, '%') or name4 like concat('%', #{name}, '%')
or name5 like concat('%', #{name}, '%') or name5 like concat('%', #{name}, '%')
)-->
and (
(name like concat('%', #{name}, '%')OR to_pinyin ( name ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name1 like concat('%', #{name}, '%')OR to_pinyin ( name1 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name2 like concat('%', #{name}, '%')OR to_pinyin ( name2 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name3 like concat('%', #{name}, '%')OR to_pinyin ( name3 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name4 like concat('%', #{name}, '%')OR to_pinyin ( name4 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name5 like concat('%', #{name}, '%')OR to_pinyin ( name5 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
) )
</if> </if>
<if test="address != null and address != ''"> and address = #{address}</if> <if test="address != null and address != ''">and address = #{address}</if>
<if test="relation1 != null and relation1 != ''"> and relation1 = #{relation1}</if> <if test="relation1 != null and relation1 != ''">and relation1 = #{relation1}</if>
<if test="name1 != null and name1 != ''"> and name1 = #{name1}</if> <if test="name1 != null and name1 != ''">and name1 = #{name1}</if>
<if test="sex1 != null and sex1 != ''"> and sex1 = #{sex1}</if> <if test="sex1 != null and sex1 != ''">and sex1 = #{sex1}</if>
<if test="relation2 != null and relation2 != ''"> and relation2 = #{relation2}</if> <if test="relation2 != null and relation2 != ''">and relation2 = #{relation2}</if>
<if test="name2 != null and name2 != ''"> and name2 = #{name2}</if> <if test="name2 != null and name2 != ''">and name2 = #{name2}</if>
<if test="sex2 != null and sex2 != ''"> and sex2 = #{sex2}</if> <if test="sex2 != null and sex2 != ''">and sex2 = #{sex2}</if>
<if test="relation3 != null and relation3 != ''"> and relation3 = #{relation3}</if> <if test="relation3 != null and relation3 != ''">and relation3 = #{relation3}</if>
<if test="name3 != null and name3 != ''"> and name3 = #{name3}</if> <if test="name3 != null and name3 != ''">and name3 = #{name3}</if>
<if test="sex3 != null and sex3 != ''"> and sex3 = #{sex3}</if> <if test="sex3 != null and sex3 != ''">and sex3 = #{sex3}</if>
<if test="relation4 != null and relation4 != ''"> and relation4 = #{relation4}</if> <if test="relation4 != null and relation4 != ''">and relation4 = #{relation4}</if>
<if test="name4 != null and name4 != ''"> and name4 = #{name4}</if> <if test="name4 != null and name4 != ''">and name4 = #{name4}</if>
<if test="sex4 != null and sex4 != ''"> and sex4 = #{sex4}</if> <if test="sex4 != null and sex4 != ''">and sex4 = #{sex4}</if>
<if test="relation5 != null and relation5 != ''"> and relation5 = #{relation5}</if> <if test="relation5 != null and relation5 != ''">and relation5 = #{relation5}</if>
<if test="name5 != null and name5 != ''"> and name5 = #{name5}</if> <if test="name5 != null and name5 != ''">and name5 = #{name5}</if>
<if test="sex5 != null and sex5 != ''"> and sex5 = #{sex5}</if> <if test="sex5 != null and sex5 != ''">and sex5 = #{sex5}</if>
<if test="jg1 != null and jg1 != ''"> and jg1 = #{jg1}</if> <if test="jg1 != null and jg1 != ''">and jg1 = #{jg1}</if>
<if test="jg2 != null and jg2 != ''"> and jg2 = #{jg2}</if> <if test="jg2 != null and jg2 != ''">and jg2 = #{jg2}</if>
<if test="cbr != null and cbr != ''"> and cbr like concat('%', #{cbr}, '%') </if> <if test="cbr != null and cbr != ''">and cbr like concat('%', #{cbr}, '%')</if>
<if test="cbDate != null "> and cb_date like concat('%', #{cbDate}, '%') </if> <if test="cbDate != null ">and cb_date like concat('%', #{cbDate}, '%')</if>
<if test="picIds != null and picIds != ''"> and pic_ids = #{picIds}</if> <if test="picIds != null and picIds != ''">and pic_ids = #{picIds}</if>
<if test="pictures != null and pictures != ''"> and pictures = #{pictures}</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="allPicIds != null and allPicIds != ''">and all_pic_ids = #{allPicIds}</if>
<if test="allPics != null and allPics != ''"> and all_pics = #{allPics}</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="errorCorrect != null and errorCorrect != ''">and error_correct = #{errorCorrect}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</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="auditName != null and auditName != ''">and audit_name like concat('%', #{auditName}, '%')</if>
<if test="auditResult != null and auditResult != ''"> and audit_result = #{auditResult}</if> <if test="auditResult != null and auditResult != ''">and audit_result = #{auditResult}</if>
<if test="auditReason != null and auditReason != ''"> and audit_reason = #{auditReason}</if> <if test="auditReason != null and auditReason != ''">and audit_reason = #{auditReason}</if>
</where> </where>
order by id desc order by id desc
</select> </select>
<select id="searchDaZfnyhkcgList" parameterType="DaZfnyhkcg" resultMap="DaZfnyhkcgResult"> <select id="searchDaZfnyhkcgList" parameterType="DaZfnyhkcg" resultMap="DaZfnyhkcgResult">
select distinct z.* from da_zfnyhkcg z select distinct z.* from da_zfnyhkcg z
left join da_user_catalog uc on z.mu_id = uc.mu_id left join da_user_catalog uc on z.mu_id = uc.mu_id
<where> <where>
<if test="userId != null "> and uc.user_id = #{userId}</if> <if test="userId != null ">and uc.user_id = #{userId}</if>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and ( name like concat('%', #{name}, '%') <!--and ( name like concat('%', #{name}, '%')
or name1 like concat('%', #{name}, '%') or name1 like concat('%', #{name}, '%')
or name2 like concat('%', #{name}, '%') or name2 like concat('%', #{name}, '%')
or name3 like concat('%', #{name}, '%') or name3 like concat('%', #{name}, '%')
or name4 like concat('%', #{name}, '%') or name4 like concat('%', #{name}, '%')
or name5 like concat('%', #{name}, '%') or name5 like concat('%', #{name}, '%')
)-->
and (
(name like concat('%', #{name}, '%')OR to_pinyin ( name ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name1 like concat('%', #{name}, '%')OR to_pinyin ( name1 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name2 like concat('%', #{name}, '%')OR to_pinyin ( name2 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name3 like concat('%', #{name}, '%')OR to_pinyin ( name3 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name4 like concat('%', #{name}, '%')OR to_pinyin ( name4 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name5 like concat('%', #{name}, '%')OR to_pinyin ( name5 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
) )
</if> </if>
</where> </where>
order by id desc order by id desc
</select> </select>
@ -171,7 +209,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskId != null">#{taskId},</if> <if test="taskId != null">#{taskId},</if>
<if test="ywType != null">#{ywType},</if> <if test="ywType != null">#{ywType},</if>
@ -213,7 +251,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
</trim> </trim>
</insert> </insert>
<update id="updateDaZfnyhkcg" parameterType="DaZfnyhkcg"> <update id="updateDaZfnyhkcg" parameterType="DaZfnyhkcg">

@ -1,60 +1,60 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.da.dangan.mapper.DaZqzMapper"> <mapper namespace="com.da.dangan.mapper.DaZqzMapper">
<resultMap type="DaZqz" id="DaZqzResult"> <resultMap type="DaZqz" id="DaZqzResult">
<result property="id" column="id" /> <result property="id" column="id"/>
<result property="taskId" column="task_id" /> <result property="taskId" column="task_id"/>
<result property="ywType" column="yw_type" /> <result property="ywType" column="yw_type"/>
<result property="muId" column="mu_id" /> <result property="muId" column="mu_id"/>
<result property="muPath" column="mu_path" /> <result property="muPath" column="mu_path"/>
<result property="num" column="num" /> <result property="num" column="num"/>
<result property="name" column="name" /> <result property="name" column="name"/>
<result property="cardId" column="card_id" /> <result property="cardId" column="card_id"/>
<result property="address" column="address" /> <result property="address" column="address"/>
<result property="djJg" column="dj_jg" /> <result property="djJg" column="dj_jg"/>
<result property="relation1" column="relation1" /> <result property="relation1" column="relation1"/>
<result property="name1" column="name1" /> <result property="name1" column="name1"/>
<result property="sex1" column="sex1" /> <result property="sex1" column="sex1"/>
<result property="birthDate1" column="birth_date1" /> <result property="birthDate1" column="birth_date1"/>
<result property="cardId1" column="card_id1" /> <result property="cardId1" column="card_id1"/>
<result property="relation2" column="relation2" /> <result property="relation2" column="relation2"/>
<result property="name2" column="name2" /> <result property="name2" column="name2"/>
<result property="sex2" column="sex2" /> <result property="sex2" column="sex2"/>
<result property="birthDate2" column="birth_date2" /> <result property="birthDate2" column="birth_date2"/>
<result property="cardId2" column="card_id2" /> <result property="cardId2" column="card_id2"/>
<result property="relation3" column="relation3" /> <result property="relation3" column="relation3"/>
<result property="name3" column="name3" /> <result property="name3" column="name3"/>
<result property="birthDate3" column="birth_date3" /> <result property="birthDate3" column="birth_date3"/>
<result property="sex3" column="sex3" /> <result property="sex3" column="sex3"/>
<result property="cardId3" column="card_id3" /> <result property="cardId3" column="card_id3"/>
<result property="relation4" column="relation4" /> <result property="relation4" column="relation4"/>
<result property="name4" column="name4" /> <result property="name4" column="name4"/>
<result property="sex4" column="sex4" /> <result property="sex4" column="sex4"/>
<result property="birthDate4" column="birth_date4" /> <result property="birthDate4" column="birth_date4"/>
<result property="cardId4" column="card_id4" /> <result property="cardId4" column="card_id4"/>
<result property="fwdw" column="fwdw" /> <result property="fwdw" column="fwdw"/>
<result property="qrAddress" column="qr_address" /> <result property="qrAddress" column="qr_address"/>
<result property="zqReason" column="zq_reason" /> <result property="zqReason" column="zq_reason"/>
<result property="pzjg" column="pzjg" /> <result property="pzjg" column="pzjg"/>
<result property="cbr" column="cbr" /> <result property="cbr" column="cbr"/>
<result property="qfDate" column="qf_date" /> <result property="qfDate" column="qf_date"/>
<result property="picIds" column="pic_ids" /> <result property="picIds" column="pic_ids"/>
<result property="pictures" column="pictures" /> <result property="pictures" column="pictures"/>
<result property="allPicIds" column="all_pic_ids" /> <result property="allPicIds" column="all_pic_ids"/>
<result property="allPics" column="all_pics" /> <result property="allPics" column="all_pics"/>
<result property="errorCorrect" column="error_correct" /> <result property="errorCorrect" column="error_correct"/>
<result property="auditStatus" column="audit_status" /> <result property="auditStatus" column="audit_status"/>
<result property="auditName" column="audit_name" /> <result property="auditName" column="audit_name"/>
<result property="auditResult" column="audit_result" /> <result property="auditResult" column="audit_result"/>
<result property="auditReason" column="audit_reason" /> <result property="auditReason" column="audit_reason"/>
<result property="remark" column="remark" /> <result property="remark" column="remark"/>
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by"/>
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time"/>
</resultMap> </resultMap>
<sql id="selectDaZqzVo"> <sql id="selectDaZqzVo">
@ -65,24 +65,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select distinct z.* from da_zqz z select distinct z.* from da_zqz z
left join da_user_catalog uc on z.mu_id = uc.mu_id left join da_user_catalog uc on z.mu_id = uc.mu_id
<where> <where>
<if test="userId != null "> and uc.user_id = #{userId}</if> <if test="userId != null ">and uc.user_id = #{userId}</if>
<if test="taskId != null "> and task_id = #{taskId}</if> <if test="taskId != null ">and task_id = #{taskId}</if>
<!-- flag=0 展示全部 =1不展示没有姓名的记录 --> <!-- flag=0 展示全部 =1不展示没有姓名的记录 -->
<if test="flag != null and flag=='1'.toString()"> and name !='无'</if> <if test="flag != null and flag=='1'.toString()">and name !='无'</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if> <if test="ywType != null and ywType != ''">and yw_type = #{ywType}</if>
<if test="muId != null "> and z.mu_id = #{muId}</if> <if test="muId != null ">and z.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if> <if test="muPath != null and muPath != ''">and mu_path = #{muPath}</if>
<if test="num != null and num != ''"> and num like concat('%',#{num}, '%') </if> <if test="num != null and num != ''">and num like concat('%',#{num}, '%')</if>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and ( name like concat('%', #{name}, '%') <!--and ( name like concat('%', #{name}, '%')
or name1 like concat('%', #{name}, '%') or name1 like concat('%', #{name}, '%')
or name2 like concat('%', #{name}, '%') or name2 like concat('%', #{name}, '%')
or name3 like concat('%', #{name}, '%') or name3 like concat('%', #{name}, '%')
or name4 like concat('%', #{name}, '%') or name4 like concat('%', #{name}, '%')
)-->
and (
(name like concat('%', #{name}, '%')OR to_pinyin ( name ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name1 like concat('%', #{name}, '%')OR to_pinyin ( name1 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name2 like concat('%', #{name}, '%')OR to_pinyin ( name2 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name3 like concat('%', #{name}, '%')OR to_pinyin ( name3 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name4 like concat('%', #{name}, '%')OR to_pinyin ( name4 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
) )
</if> </if>
<if test="cardId != null and cardId != ''"> <if test="cardId != null and cardId != ''">
and (card_id like concat('%', #{cardId}, '%') and (card_id like concat('%', #{cardId}, '%')
or card_id1 like concat('%', #{cardId}, '%') or card_id1 like concat('%', #{cardId}, '%')
or card_id2 like concat('%', #{cardId}, '%') or card_id2 like concat('%', #{cardId}, '%')
or card_id3 like concat('%', #{cardId}, '%') or card_id3 like concat('%', #{cardId}, '%')
@ -90,48 +106,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) )
</if> </if>
<if test="birthDate1 != null "> <if test="birthDate1 != null ">
and (birth_date1 like concat('%', #{birthDate1}, '%') and (birth_date1 like concat('%', #{birthDate1}, '%')
or birth_date2 like concat('%', #{birthDate1}, '%') or birth_date2 like concat('%', #{birthDate1}, '%')
or birth_date3 like concat('%', #{birthDate1}, '%') or birth_date3 like concat('%', #{birthDate1}, '%')
or birth_date4 like concat('%', #{birthDate1}, '%') or birth_date4 like concat('%', #{birthDate1}, '%')
) )
</if> </if>
<if test="address != null and address != ''"> and address = #{address}</if> <if test="address != null and address != ''">and address = #{address}</if>
<if test="djJg != null and djJg != ''"> and dj_jg = #{djJg}</if> <if test="djJg != null and djJg != ''">and dj_jg = #{djJg}</if>
<if test="relation1 != null and relation1 != ''"> and relation1 = #{relation1}</if> <if test="relation1 != null and relation1 != ''">and relation1 = #{relation1}</if>
<if test="name1 != null and name1 != ''"> and name1 = #{name1}</if> <if test="name1 != null and name1 != ''">and name1 = #{name1}</if>
<if test="sex1 != null and sex1 != ''"> and sex1 = #{sex1}</if> <if test="sex1 != null and sex1 != ''">and sex1 = #{sex1}</if>
<if test="cardId1 != null and cardId1 != ''"> and card_id1 = #{cardId1}</if> <if test="cardId1 != null and cardId1 != ''">and card_id1 = #{cardId1}</if>
<if test="relation2 != null and relation2 != ''"> and relation2 = #{relation2}</if> <if test="relation2 != null and relation2 != ''">and relation2 = #{relation2}</if>
<if test="name2 != null and name2 != ''"> and name2 = #{name2}</if> <if test="name2 != null and name2 != ''">and name2 = #{name2}</if>
<if test="sex2 != null and sex2 != ''"> and sex2 = #{sex2}</if> <if test="sex2 != null and sex2 != ''">and sex2 = #{sex2}</if>
<if test="birthDate2 != null "> and birth_date2 = #{birthDate2}</if> <if test="birthDate2 != null ">and birth_date2 = #{birthDate2}</if>
<if test="cardId2 != null and cardId2 != ''"> and card_id2 = #{cardId2}</if> <if test="cardId2 != null and cardId2 != ''">and card_id2 = #{cardId2}</if>
<if test="relation3 != null and relation3 != ''"> and relation3 = #{relation3}</if> <if test="relation3 != null and relation3 != ''">and relation3 = #{relation3}</if>
<if test="name3 != null and name3 != ''"> and name3 = #{name3}</if> <if test="name3 != null and name3 != ''">and name3 = #{name3}</if>
<if test="birthDate3 != null "> and birth_date3 = #{birthDate3}</if> <if test="birthDate3 != null ">and birth_date3 = #{birthDate3}</if>
<if test="sex3 != null and sex3 != ''"> and sex3 = #{sex3}</if> <if test="sex3 != null and sex3 != ''">and sex3 = #{sex3}</if>
<if test="cardId3 != null and cardId3 != ''"> and card_id3 = #{cardId3}</if> <if test="cardId3 != null and cardId3 != ''">and card_id3 = #{cardId3}</if>
<if test="relation4 != null and relation4 != ''"> and relation4 = #{relation4}</if> <if test="relation4 != null and relation4 != ''">and relation4 = #{relation4}</if>
<if test="name4 != null and name4 != ''"> and name4 = #{name4}</if> <if test="name4 != null and name4 != ''">and name4 = #{name4}</if>
<if test="sex4 != null and sex4 != ''"> and sex4 = #{sex4}</if> <if test="sex4 != null and sex4 != ''">and sex4 = #{sex4}</if>
<if test="birthDate4 != null "> and birth_date4 = #{birthDate4}</if> <if test="birthDate4 != null ">and birth_date4 = #{birthDate4}</if>
<if test="cardId4 != null and cardId4 != ''"> and card_id4 = #{cardId4}</if> <if test="cardId4 != null and cardId4 != ''">and card_id4 = #{cardId4}</if>
<if test="fwdw != null and fwdw != ''"> and fwdw = #{fwdw}</if> <if test="fwdw != null and fwdw != ''">and fwdw = #{fwdw}</if>
<if test="qrAddress != null and qrAddress != ''"> and qr_address = #{qrAddress}</if> <if test="qrAddress != null and qrAddress != ''">and qr_address = #{qrAddress}</if>
<if test="zqReason != null and zqReason != ''"> and zq_reason = #{zqReason}</if> <if test="zqReason != null and zqReason != ''">and zq_reason = #{zqReason}</if>
<if test="pzjg != null and pzjg != ''"> and pzjg = #{pzjg}</if> <if test="pzjg != null and pzjg != ''">and pzjg = #{pzjg}</if>
<if test="cbr != null and cbr != ''"> and cbr = #{cbr}</if> <if test="cbr != null and cbr != ''">and cbr = #{cbr}</if>
<if test="qfDate != null "> and qf_date = #{qfDate}</if> <if test="qfDate != null ">and qf_date = #{qfDate}</if>
<if test="picIds != null and picIds != ''"> and pic_ids = #{picIds}</if> <if test="picIds != null and picIds != ''">and pic_ids = #{picIds}</if>
<if test="pictures != null and pictures != ''"> and pictures = #{pictures}</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="allPicIds != null and allPicIds != ''">and all_pic_ids = #{allPicIds}</if>
<if test="allPics != null and allPics != ''"> and all_pics = #{allPics}</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="errorCorrect != null and errorCorrect != ''">and error_correct = #{errorCorrect}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</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="auditName != null and auditName != ''">and audit_name like concat('%', #{auditName}, '%')</if>
<if test="auditResult != null and auditResult != ''"> and audit_result = #{auditResult}</if> <if test="auditResult != null and auditResult != ''">and audit_result = #{auditResult}</if>
<if test="auditReason != null and auditReason != ''"> and audit_reason = #{auditReason}</if> <if test="auditReason != null and auditReason != ''">and audit_reason = #{auditReason}</if>
</where> </where>
order by id desc order by id desc
</select> </select>
@ -139,13 +155,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select distinct z.* from da_zqz z select distinct z.* from da_zqz z
left join da_user_catalog uc on z.mu_id = uc.mu_id left join da_user_catalog uc on z.mu_id = uc.mu_id
<where> <where>
<if test="userId != null "> and uc.user_id = #{userId}</if> <if test="userId != null ">and uc.user_id = #{userId}</if>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and ( name like concat('%', #{name}, '%') <!--nd ( name like concat('%', #{name}, '%')
or name1 like concat('%', #{name}, '%') or name1 like concat('%', #{name}, '%')
or name2 like concat('%', #{name}, '%') or name2 like concat('%', #{name}, '%')
or name3 like concat('%', #{name}, '%') or name3 like concat('%', #{name}, '%')
or name4 like concat('%', #{name}, '%') or name4 like concat('%', #{name}, '%')
or card_id like concat('%', #{name}, '%')
or card_id1 like concat('%', #{name}, '%')
or card_id2 like concat('%', #{name}, '%')
or card_id3 like concat('%', #{name}, '%')
or card_id4 like concat('%', #{name}, '%')
or birth_date1 like concat('%', #{name}, '%')
or birth_date2 like concat('%', #{name}, '%')
or birth_date3 like concat('%', #{name}, '%')
or birth_date4 like concat('%', #{name}, '%')
)-->
and (
(name like concat('%', #{name}, '%')OR to_pinyin ( name ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name1 like concat('%', #{name}, '%')OR to_pinyin ( name1 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name2 like concat('%', #{name}, '%')OR to_pinyin ( name2 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name3 like concat('%', #{name}, '%')OR to_pinyin ( name3 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or
(name4 like concat('%', #{name}, '%')OR to_pinyin ( name4 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
))
or card_id like concat('%', #{name}, '%') or card_id like concat('%', #{name}, '%')
or card_id1 like concat('%', #{name}, '%') or card_id1 like concat('%', #{name}, '%')
or card_id2 like concat('%', #{name}, '%') or card_id2 like concat('%', #{name}, '%')
@ -156,7 +197,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
or birth_date3 like concat('%', #{name}, '%') or birth_date3 like concat('%', #{name}, '%')
or birth_date4 like concat('%', #{name}, '%') or birth_date4 like concat('%', #{name}, '%')
) )
</if> </if>
</where> </where>
order by id desc order by id desc
</select> </select>

Loading…
Cancel
Save