|
@@ -268,9 +268,9 @@
|
|
|
select vi.id, vi.create_time, vi.update_time, vi.is_del, vi.update_by, vi.user_name, vi.phone_num, vi.id_card
|
|
|
, vi.gender, vi.province, vi.city, vi.region, vi.now_in, vi.house_type, vi.update_by, vi.code
|
|
|
from czrk vi
|
|
|
- where vi.status = '1' and vi.update_time >= #{startTime} and vi.update_time <= #{endTime}
|
|
|
+ where vi.status = '1' and is_del = 'N' and vi.update_time >= #{startTime} and vi.update_time <= #{endTime}
|
|
|
<if test="userName != null and userName != ''">
|
|
|
- and (vi.user_name like concat( #{userName}, '%') or vi.id_card like concat( #{userName}, '%'))
|
|
|
+ and vi.user_name like concat( #{userName}, '%')
|
|
|
</if>
|
|
|
<if test="villageTowns != null and villageTowns != ''">
|
|
|
and vi.village_towns = #{villageTowns}
|
|
@@ -293,13 +293,6 @@
|
|
|
<if test="workUnit != null and workUnit != ''">and vi.work_unit = #{workUnit}</if>
|
|
|
<if test="nowIn != null and nowIn != ''">and vi.now_in = #{nowIn}</if>
|
|
|
<if test="gridId != null and gridId != ''">and vi.grid_id = #{gridId}</if>
|
|
|
-
|
|
|
- <if test="deptIdList != null and deptIdList.size() > 0">
|
|
|
- and vi.dept_id in
|
|
|
- <foreach item="deptId" collection="deptIdList" open="(" separator="," close=")">
|
|
|
- #{deptId}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
</select>
|
|
|
|
|
|
<select id="countByCzXz" resultType="int">
|
|
@@ -334,7 +327,7 @@
|
|
|
from czrk vi
|
|
|
where vi.status in ('2','3','4') and vi.update_time >= #{startTime} and vi.update_time <= #{endTime}
|
|
|
<if test="userName != null and userName != ''">
|
|
|
- and (vi.user_name like concat(#{userName}, '%') or vi.id_card like concat(#{userName}, '%'))
|
|
|
+ and vi.user_name like concat(#{userName}, '%')
|
|
|
</if>
|
|
|
<if test="villageTowns != null and villageTowns != ''">
|
|
|
and vi.village_towns = #{villageTowns}
|
|
@@ -358,13 +351,6 @@
|
|
|
<if test="workUnit != null and workUnit != ''">and vi.work_unit = #{workUnit}</if>
|
|
|
<if test="nowIn != null and nowIn != ''">and vi.now_in = #{nowIn}</if>
|
|
|
<if test="gridId != null and gridId != ''">and vi.grid_id = #{gridId}</if>
|
|
|
-
|
|
|
- <if test="deptIdList != null and deptIdList.size() > 0">
|
|
|
- and vi.dept_id in
|
|
|
- <foreach item="deptId" collection="deptIdList" open="(" separator="," close=")">
|
|
|
- #{deptId}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
</select>
|
|
|
|
|
|
<select id="countByCzJs" resultType="int">
|
|
@@ -399,7 +385,7 @@
|
|
|
, vi.house_type, vi.update_by, vi.code, vi.rlr, vi.yhzgx
|
|
|
from czrk vi
|
|
|
<!--把户主放第一位-->
|
|
|
- where vi.is_del = 'N' and code = #{code} order by house_type desc;
|
|
|
+ where vi.is_del = 'N' and code = #{code} order by house_type desc
|
|
|
</select>
|
|
|
|
|
|
<select id="listByCodeSynchronization" resultMap="CzrkResult">
|
|
@@ -409,7 +395,7 @@
|
|
|
vi.now_in, vi.code
|
|
|
from czrk vi
|
|
|
<!--把户主放第一位-->
|
|
|
- where vi.is_del = 'N' and code = #{code} order by house_type desc;
|
|
|
+ where vi.is_del = 'N' and code = #{code} order by house_type desc
|
|
|
</select>
|
|
|
|
|
|
|