|
@@ -25,6 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="cityId" column="city_id" />
|
|
|
<result property="city" column="city" />
|
|
|
<result property="regionId" column="region_id" />
|
|
|
+ <result property="isRl" column="is_rl" />
|
|
|
<result property="region" column="region" />
|
|
|
<result property="villageTownsId" column="village_towns_id" />
|
|
|
<result property="villageTowns" column="village_towns" />
|
|
@@ -47,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
select id, user_name, gender, age, birthday,dept_id, id_card, phone_num, code, house_type, rlr, rl_time, yhzgx
|
|
|
, work_unit, province_id, province, city_id, city, region_id, region, village_towns_id, village_towns
|
|
|
, village_id, village, villager_group_id, villager_group, now_in, remark, status, create_by, create_time
|
|
|
- , update_by, update_time, is_del, delete_reason, dept_id, is_rl from czrk
|
|
|
+ , update_by, update_time, is_del, delete_reason, dept_id, is_rl, key_industries from czrk
|
|
|
</sql>
|
|
|
|
|
|
<select id="listByRlry" resultMap="CzrkResult">
|
|
@@ -101,10 +102,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<select id="listByRlryRel" resultType="com.boman.domain.Czrk">
|
|
|
- select czrk.id, czrk.user_name userName, czrk.phone_num phoneNum, czrk.id_card idCard, czrk.gender, czrk.province
|
|
|
- , czrk.city, czrk.region, czrk.house_type houseType, czrk.update_by updateBy, czrk.code, czrk.rlr
|
|
|
- , czrk.update_time updateTime, czrk.delete_reason deleteReason, czrk.now_in nowIn, jzdz.province provinceXjd
|
|
|
- , jzdz.city cityXjd, jzdz.region regionXjd, jzdz.town villageTownsXjd, jzdz.village villageXjd, jzdz.now_in domicile
|
|
|
+ SELECT
|
|
|
+ czrk.id,
|
|
|
+ ANY_VALUE(czrk.user_name) userName,
|
|
|
+ ANY_VALUE(czrk.phone_num) phoneNum,
|
|
|
+ ANY_VALUE(czrk.id_card) idCard,
|
|
|
+ ANY_VALUE(czrk.gender),
|
|
|
+ ANY_VALUE(czrk.province),
|
|
|
+ ANY_VALUE(czrk.is_rl),
|
|
|
+ ANY_VALUE(czrk.city),
|
|
|
+ ANY_VALUE(czrk.region),
|
|
|
+ ANY_VALUE(czrk.house_type) houseType,
|
|
|
+ ANY_VALUE(czrk.update_by) updateBy,
|
|
|
+ ANY_VALUE(czrk. CODE),
|
|
|
+ ANY_VALUE(czrk.rlr),
|
|
|
+ ANY_VALUE(czrk.update_time) updateTime,
|
|
|
+ ANY_VALUE(czrk.delete_reason) deleteReason,
|
|
|
+ ANY_VALUE(czrk.now_in) nowIn,
|
|
|
+ ANY_VALUE(jzdz.province) provinceXjd,
|
|
|
+ ANY_VALUE(jzdz.city) cityXjd,
|
|
|
+ ANY_VALUE(jzdz.region) regionXjd,
|
|
|
+ ANY_VALUE(jzdz.town) villageTownsXjd,
|
|
|
+ ANY_VALUE(jzdz.village) villageXjd,
|
|
|
+ ANY_VALUE(jzdz.now_in) domicile
|
|
|
from czrk
|
|
|
left join czrk_jzdz jzdz on czrk.id = jzdz.czrk_id
|
|
|
<where>
|
|
@@ -157,7 +177,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</foreach>
|
|
|
</if>
|
|
|
</where>
|
|
|
- order by czrk.update_time DESC
|
|
|
+ GROUP BY czrk.id ORDER BY czrk.update_time DESC
|
|
|
</select>
|
|
|
|
|
|
<select id="listByXz" resultMap="CzrkResult">
|
|
@@ -180,8 +200,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="gender != null and gender != ''"> and vi.gender = #{gender}</if>
|
|
|
<if test="idCard != null and idCard != ''"> and vi.id_card like concat('%', #{idCard}, '%')</if>
|
|
|
<if test="phoneNum != null and phoneNum != ''"> and vi.phone_num = #{phoneNum}</if>
|
|
|
- <if test="params.startAge != null and params.startAge != ''"> and vi.age >= #{params.startAge}</if>
|
|
|
- <if test="params.endAge != null and params.endAge != ''"> and vi.age <= #{params.endAge}</if>
|
|
|
+ <!--<if test="params.startAge != null and params.startAge != ''"> and vi.age >= #{params.startAge}</if>
|
|
|
+ <if test="params.endAge != null and params.endAge != ''"> and vi.age <= #{params.endAge}</if>-->
|
|
|
<if test="status != null and status != ''"> and vi.status = #{status}</if>
|
|
|
<if test="code != null and code != ''"> and vi.code = #{code}</if>
|
|
|
<if test="birthday != null and birthday != ''"> and vi.birthday = #{birthday}</if>
|
|
@@ -248,8 +268,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="gender != null and gender != ''"> and vi.gender = #{gender}</if>
|
|
|
<if test="idCard != null and idCard != ''"> and vi.id_card like concat('%', #{idCard}, '%')</if>
|
|
|
<if test="phoneNum != null and phoneNum != ''"> and vi.phone_num = #{phoneNum}</if>
|
|
|
- <if test="params.startAge != null and params.startAge != ''"> and vi.age >= #{params.startAge}</if>
|
|
|
- <if test="params.endAge != null and params.endAge != ''"> and vi.age <= #{params.endAge}</if>
|
|
|
+ <!--<if test="params.startAge != null and params.startAge != ''"> and vi.age >= #{params.startAge}</if>
|
|
|
+ <if test="params.endAge != null and params.endAge != ''"> and vi.age <= #{params.endAge}</if>-->
|
|
|
<if test="status != null and status != ''"> and vi.status = #{status}</if>
|
|
|
<if test="code != null and code != ''"> and vi.code = #{code}</if>
|
|
|
<if test="birthday != null and birthday != ''"> and vi.birthday = #{birthday}</if>
|
|
@@ -343,6 +363,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</choose>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="listIsRl" resultMap="CzrkResult">
|
|
|
+ SELECT id, is_rl
|
|
|
+ from czrk
|
|
|
+ where is_del = 'N'
|
|
|
+ <if test="userName != null and userName != ''">
|
|
|
+ and user_name like concat('%', #{userName}, '%')
|
|
|
+ </if>
|
|
|
+ <choose>
|
|
|
+ <when test="type == 1">and province_id = #{areaId}</when>
|
|
|
+ <when test="type == 2">and city_id = #{areaId}</when>
|
|
|
+ <when test="type == 3">and region_id = #{areaId}</when>
|
|
|
+ <when test="type == 4">and village_towns_id = #{areaId}</when>
|
|
|
+ <when test="type == 5">and village_id = #{areaId}</when>
|
|
|
+ </choose>
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="stsByWrl" resultType="int">
|
|
|
select count(vi.id)
|
|
|
from czrk vi
|
|
@@ -373,6 +409,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="idCard != null">id_card,</if>
|
|
|
<if test="phoneNum != null">phone_num,</if>
|
|
|
<if test="code != null">code,</if>
|
|
|
+ <if test="keyIndustries != null">key_Industries,</if>
|
|
|
<if test="houseType != null">house_type,</if>
|
|
|
<if test="rlr != null">rlr,</if>
|
|
|
<if test="rlTime != null">rl_time,</if>
|
|
@@ -408,6 +445,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="idCard != null">#{idCard},</if>
|
|
|
<if test="phoneNum != null">#{phoneNum},</if>
|
|
|
<if test="code != null">#{code},</if>
|
|
|
+ <if test="keyIndustries != null">#{keyIndustries},</if>
|
|
|
<if test="houseType != null">#{houseType},</if>
|
|
|
<if test="rlr != null">#{rlr},</if>
|
|
|
<if test="rlTime != null">#{rlTime},</if>
|
|
@@ -446,6 +484,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="idCard != null">id_card = #{idCard},</if>
|
|
|
<if test="phoneNum != null">phone_num = #{phoneNum},</if>
|
|
|
<if test="code != null">code = #{code},</if>
|
|
|
+ <if test="keyIndustries != null">key_industries = #{keyIndustries},</if>
|
|
|
<if test="houseType != null">house_type = #{houseType},</if>
|
|
|
<if test="rlr != null">rlr = #{rlr},</if>
|
|
|
<if test="rlTime != null">rl_time = #{rlTime},</if>
|