|
|
|
|
@ -74,27 +74,11 @@
|
|
|
|
|
<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="name != null and name != ''">
|
|
|
|
|
<!--and ( name like concat('%', #{name}, '%')
|
|
|
|
|
and ( name like concat('%', #{name}, '%')
|
|
|
|
|
or name1 like concat('%', #{name}, '%')
|
|
|
|
|
or name2 like concat('%', #{name}, '%')
|
|
|
|
|
or name3 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 test="cardId != null and cardId != ''">
|
|
|
|
|
@ -151,17 +135,28 @@
|
|
|
|
|
</where>
|
|
|
|
|
order by id desc
|
|
|
|
|
</select>
|
|
|
|
|
<!--检索+同音字-->
|
|
|
|
|
<select id="searchDaZqzList" parameterType="DaZqz" resultMap="DaZqzResult">
|
|
|
|
|
select distinct z.* from da_zqz z
|
|
|
|
|
left join da_user_catalog uc on z.mu_id = uc.mu_id
|
|
|
|
|
<where>
|
|
|
|
|
<if test="userId != null ">and uc.user_id = #{userId}</if>
|
|
|
|
|
<if test="name != null and name != ''">
|
|
|
|
|
<!--nd ( name like concat('%', #{name}, '%')
|
|
|
|
|
or name1 like concat('%', #{name}, '%')
|
|
|
|
|
or name2 like concat('%', #{name}, '%')
|
|
|
|
|
or name3 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} ), '%'
|
|
|
|
|
))
|
|
|
|
|
or card_id like concat('%', #{name}, '%')
|
|
|
|
|
or card_id1 like concat('%', #{name}, '%')
|
|
|
|
|
or card_id2 like concat('%', #{name}, '%')
|
|
|
|
|
@ -173,20 +168,32 @@
|
|
|
|
|
or birth_date4 like concat('%', #{name}, '%')
|
|
|
|
|
)-->
|
|
|
|
|
and (
|
|
|
|
|
(name like concat('%', #{name}, '%')OR to_pinyin ( name ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
|
|
|
|
|
))
|
|
|
|
|
name_p LIKE #{name}
|
|
|
|
|
or
|
|
|
|
|
(name1 like concat('%', #{name}, '%')OR to_pinyin ( name1 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
|
|
|
|
|
))
|
|
|
|
|
name1_p LIKE #{name}
|
|
|
|
|
or
|
|
|
|
|
(name2 like concat('%', #{name}, '%')OR to_pinyin ( name2 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
|
|
|
|
|
))
|
|
|
|
|
name2_p LIKE #{name}
|
|
|
|
|
or
|
|
|
|
|
(name3 like concat('%', #{name}, '%')OR to_pinyin ( name3 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
|
|
|
|
|
))
|
|
|
|
|
name3_p LIKE #{name}
|
|
|
|
|
or
|
|
|
|
|
(name4 like concat('%', #{name}, '%')OR to_pinyin ( name4 ) LIKE CONCAT( '%', to_pinyin ( #{name} ), '%'
|
|
|
|
|
))
|
|
|
|
|
name4_p LIKE #{name}
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by id desc
|
|
|
|
|
</select>
|
|
|
|
|
<!--检索+无同音字-->
|
|
|
|
|
<select id="searchDaZqzList1" parameterType="DaZqz" resultMap="DaZqzResult">
|
|
|
|
|
select distinct z.* from da_zqz z
|
|
|
|
|
left join da_user_catalog uc on z.mu_id = uc.mu_id
|
|
|
|
|
<where>
|
|
|
|
|
<if test="userId != null ">and uc.user_id = #{userId}</if>
|
|
|
|
|
<if test="name != null and name != ''">
|
|
|
|
|
and ( name like concat('%', #{name}, '%')
|
|
|
|
|
or name1 like concat('%', #{name}, '%')
|
|
|
|
|
or name2 like concat('%', #{name}, '%')
|
|
|
|
|
or name3 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}, '%')
|
|
|
|
|
@ -222,27 +229,27 @@
|
|
|
|
|
<if test="muId != null">mu_id,</if>
|
|
|
|
|
<if test="muPath != null">mu_path,</if>
|
|
|
|
|
<if test="num != null">num,</if>
|
|
|
|
|
<if test="name != null">name,</if>
|
|
|
|
|
<if test="name != null">name,name_p,</if>
|
|
|
|
|
<if test="cardId != null">card_id,</if>
|
|
|
|
|
<if test="address != null">address,</if>
|
|
|
|
|
<if test="djJg != null">dj_jg,</if>
|
|
|
|
|
<if test="relation1 != null">relation1,</if>
|
|
|
|
|
<if test="name1 != null">name1,</if>
|
|
|
|
|
<if test="name1 != null">name1,name1_p,</if>
|
|
|
|
|
<if test="sex1 != null">sex1,</if>
|
|
|
|
|
<if test="birthDate1 != null">birth_date1,</if>
|
|
|
|
|
<if test="cardId1 != null">card_id1,</if>
|
|
|
|
|
<if test="relation2 != null">relation2,</if>
|
|
|
|
|
<if test="name2 != null">name2,</if>
|
|
|
|
|
<if test="name2 != null">name2,name2_p,</if>
|
|
|
|
|
<if test="sex2 != null">sex2,</if>
|
|
|
|
|
<if test="birthDate2 != null">birth_date2,</if>
|
|
|
|
|
<if test="cardId2 != null">card_id2,</if>
|
|
|
|
|
<if test="relation3 != null">relation3,</if>
|
|
|
|
|
<if test="name3 != null">name3,</if>
|
|
|
|
|
<if test="name3 != null">name3,name3_p,</if>
|
|
|
|
|
<if test="birthDate3 != null">birth_date3,</if>
|
|
|
|
|
<if test="sex3 != null">sex3,</if>
|
|
|
|
|
<if test="cardId3 != null">card_id3,</if>
|
|
|
|
|
<if test="relation4 != null">relation4,</if>
|
|
|
|
|
<if test="name4 != null">name4,</if>
|
|
|
|
|
<if test="name4 != null">name4,name4_p,</if>
|
|
|
|
|
<if test="sex4 != null">sex4,</if>
|
|
|
|
|
<if test="birthDate4 != null">birth_date4,</if>
|
|
|
|
|
<if test="cardId4 != null">card_id4,</if>
|
|
|
|
|
@ -273,27 +280,27 @@
|
|
|
|
|
<if test="muId != null">#{muId},</if>
|
|
|
|
|
<if test="muPath != null">#{muPath},</if>
|
|
|
|
|
<if test="num != null">#{num},</if>
|
|
|
|
|
<if test="name != null">#{name},</if>
|
|
|
|
|
<if test="name != null">#{name},to_pinyin ( #{name} ),</if>
|
|
|
|
|
<if test="cardId != null">#{cardId},</if>
|
|
|
|
|
<if test="address != null">#{address},</if>
|
|
|
|
|
<if test="djJg != null">#{djJg},</if>
|
|
|
|
|
<if test="relation1 != null">#{relation1},</if>
|
|
|
|
|
<if test="name1 != null">#{name1},</if>
|
|
|
|
|
<if test="name1 != null">#{name1},to_pinyin ( #{name1} ),</if>
|
|
|
|
|
<if test="sex1 != null">#{sex1},</if>
|
|
|
|
|
<if test="birthDate1 != null">#{birthDate1},</if>
|
|
|
|
|
<if test="cardId1 != null">#{cardId1},</if>
|
|
|
|
|
<if test="relation2 != null">#{relation2},</if>
|
|
|
|
|
<if test="name2 != null">#{name2},</if>
|
|
|
|
|
<if test="name2 != null">#{name2},to_pinyin ( #{name2} ),</if>
|
|
|
|
|
<if test="sex2 != null">#{sex2},</if>
|
|
|
|
|
<if test="birthDate2 != null">#{birthDate2},</if>
|
|
|
|
|
<if test="cardId2 != null">#{cardId2},</if>
|
|
|
|
|
<if test="relation3 != null">#{relation3},</if>
|
|
|
|
|
<if test="name3 != null">#{name3},</if>
|
|
|
|
|
<if test="name3 != null">#{name3},to_pinyin ( #{name3} ),</if>
|
|
|
|
|
<if test="birthDate3 != null">#{birthDate3},</if>
|
|
|
|
|
<if test="sex3 != null">#{sex3},</if>
|
|
|
|
|
<if test="cardId3 != null">#{cardId3},</if>
|
|
|
|
|
<if test="relation4 != null">#{relation4},</if>
|
|
|
|
|
<if test="name4 != null">#{name4},</if>
|
|
|
|
|
<if test="name4 != null">#{name4},to_pinyin ( #{name4} ),</if>
|
|
|
|
|
<if test="sex4 != null">#{sex4},</if>
|
|
|
|
|
<if test="birthDate4 != null">#{birthDate4},</if>
|
|
|
|
|
<if test="cardId4 != null">#{cardId4},</if>
|
|
|
|
|
@ -328,27 +335,27 @@
|
|
|
|
|
<if test="muId != null">mu_id = #{muId},</if>
|
|
|
|
|
<if test="muPath != null">mu_path = #{muPath},</if>
|
|
|
|
|
<if test="num != null">num = #{num},</if>
|
|
|
|
|
<if test="name != null">name = #{name},</if>
|
|
|
|
|
<if test="name != null">name = #{name}, name_p = to_pinyin ( #{name} ),</if>
|
|
|
|
|
<if test="cardId != null">card_id = #{cardId},</if>
|
|
|
|
|
<if test="address != null">address = #{address},</if>
|
|
|
|
|
<if test="djJg != null">dj_jg = #{djJg},</if>
|
|
|
|
|
<if test="relation1 != null">relation1 = #{relation1},</if>
|
|
|
|
|
<if test="name1 != null">name1 = #{name1},</if>
|
|
|
|
|
<if test="name1 != null">name1 = #{name1},name1_p = to_pinyin ( #{name1} ),</if>
|
|
|
|
|
<if test="sex1 != null">sex1 = #{sex1},</if>
|
|
|
|
|
<if test="birthDate1 != null">birth_date1 = #{birthDate1},</if>
|
|
|
|
|
<if test="cardId1 != null">card_id1 = #{cardId1},</if>
|
|
|
|
|
<if test="relation2 != null">relation2 = #{relation2},</if>
|
|
|
|
|
<if test="name2 != null">name2 = #{name2},</if>
|
|
|
|
|
<if test="name2 != null">name2 = #{name2},name2_p = to_pinyin ( #{name2} ),</if>
|
|
|
|
|
<if test="sex2 != null">sex2 = #{sex2},</if>
|
|
|
|
|
<if test="birthDate2 != null">birth_date2 = #{birthDate2},</if>
|
|
|
|
|
<if test="cardId2 != null">card_id2 = #{cardId2},</if>
|
|
|
|
|
<if test="relation3 != null">relation3 = #{relation3},</if>
|
|
|
|
|
<if test="name3 != null">name3 = #{name3},</if>
|
|
|
|
|
<if test="name3 != null">name3 = #{name3},name3_p = to_pinyin ( #{name3} ),</if>
|
|
|
|
|
<if test="birthDate3 != null">birth_date3 = #{birthDate3},</if>
|
|
|
|
|
<if test="sex3 != null">sex3 = #{sex3},</if>
|
|
|
|
|
<if test="cardId3 != null">card_id3 = #{cardId3},</if>
|
|
|
|
|
<if test="relation4 != null">relation4 = #{relation4},</if>
|
|
|
|
|
<if test="name4 != null">name4 = #{name4},</if>
|
|
|
|
|
<if test="name4 != null">name4 = #{name4},name4_p = to_pinyin ( #{name4} ),</if>
|
|
|
|
|
<if test="sex4 != null">sex4 = #{sex4},</if>
|
|
|
|
|
<if test="birthDate4 != null">birth_date4 = #{birthDate4},</if>
|
|
|
|
|
<if test="cardId4 != null">card_id4 = #{cardId4},</if>
|
|
|
|
|
|