You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
118 lines
4.3 KiB
118 lines
4.3 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.epmet.dao.ChangeRelocationDao">
|
|
|
|
<resultMap type="com.epmet.entity.ChangeRelocationEntity" id="changeRelocationMap">
|
|
<result property="id" column="ID"/>
|
|
<result property="name" column="NAME"/>
|
|
<result property="gender" column="GENDER"/>
|
|
<result property="age" column="AGE"/>
|
|
<result property="pid" column="PID"/>
|
|
<result property="agencyId" column="AGENCY_ID"/>
|
|
<result property="agencyName" column="AGENCY_NAME"/>
|
|
<result property="villageId" column="VILLAGE_ID"/>
|
|
<result property="villageName" column="VILLAGE_NAME"/>
|
|
<result property="buildId" column="BUILD_ID"/>
|
|
<result property="buildName" column="BUILD_NAME"/>
|
|
<result property="unitId" column="UNIT_ID"/>
|
|
<result property="unitName" column="UNIT_NAME"/>
|
|
<result property="homeId" column="HOME_ID"/>
|
|
<result property="homeName" column="HOME_NAME"/>
|
|
<result property="address" column="ADDRESS"/>
|
|
<result property="type" column="TYPE"/>
|
|
<result property="ownerName" column="OWNER_NAME"/>
|
|
<result property="oldDept" column="OLD_DEPT"/>
|
|
<result property="oldAddress" column="OLD_ADDRESS"/>
|
|
<result property="oldHome" column="OLD_HOME"/>
|
|
<result property="reason" column="REASON"/>
|
|
<result property="delFlag" column="DEL_FLAG"/>
|
|
<result property="revision" column="REVISION"/>
|
|
<result property="createdBy" column="CREATED_BY"/>
|
|
<result property="createdTime" column="CREATED_TIME"/>
|
|
<result property="updatedBy" column="UPDATED_BY"/>
|
|
<result property="updatedTime" column="UPDATED_TIME"/>
|
|
<result property="customerId" column="CUSTOMER_ID"/>
|
|
</resultMap>
|
|
|
|
<select id="getRelocationList" resultType="com.epmet.dto.ChangeRelocationDTO">
|
|
SELECT
|
|
r.id,
|
|
u.`NAME`,
|
|
r.ID_CARD,
|
|
u.GENDER,
|
|
r.age,
|
|
u.MOBILE,
|
|
r.PID,
|
|
r.AGENCY_ID,
|
|
r.AGENCY_NAME,
|
|
r.VILLAGE_ID,
|
|
r.VILLAGE_NAME,
|
|
r.BUILD_ID,
|
|
r.BUILD_NAME,
|
|
r.UNIT_ID,
|
|
r.UNIT_NAME,
|
|
r.HOME_ID,
|
|
r.HOME_NAME,
|
|
r.ADDRESS,
|
|
r.TYPE,
|
|
r.OWNER_NAME,
|
|
r.OLD_DEPT,
|
|
r.OLD_ADDRESS,
|
|
r.OLD_HOME,
|
|
r.REASON,
|
|
r.CREATED_TIME,
|
|
r.UPDATED_TIME,
|
|
r.OUT_OF_TIME,
|
|
r.IC_USER_ID
|
|
FROM
|
|
pli_change_relocation r
|
|
LEFT JOIN ic_resi_user u ON u.ID_CARD = r.ID_CARD
|
|
LEFT JOIN pli_change_welfare w ON r.ID_CARD = w.ID_CARD
|
|
AND w.DEL_FLAG = '0'
|
|
WHERE
|
|
r.DEL_FLAG = '0'
|
|
<if test="customerId != null and customerId != ''">
|
|
AND r.CUSTOMER_ID = #{customerId}
|
|
</if>
|
|
<if test="gridId != null and gridId != ''">
|
|
AND r.AGENCY_ID = #{gridId}
|
|
</if>
|
|
<if test="villageId != null and villageId != ''">
|
|
AND r.VILLAGE_ID = #{villageId}
|
|
</if>
|
|
<if test="buildId != null and buildId != ''">
|
|
AND r.BUILD_ID = #{buildId}
|
|
</if>
|
|
<if test="unitId != null and unitId != ''">
|
|
AND r.UNIT_ID = #{unitId}
|
|
</if>
|
|
<if test="homeId != null and homeId != ''">
|
|
AND r.HOME_ID = #{homeId}
|
|
</if>
|
|
<if test="name != null and name != ''">
|
|
AND r.NAME = #{name}
|
|
</if>
|
|
<if test="idCard != null and idCard != ''">
|
|
AND r.ID_CARD = #{idCard}
|
|
</if>
|
|
<if test="mobile != null and mobile != ''">
|
|
AND r.MOBILE = #{mobile}
|
|
</if>
|
|
<if test="startTime != null and startTime != ''">
|
|
AND r.OUT_OF_TIME >= #{startTime}
|
|
</if>
|
|
<if test="endTime != null and endTime != ''">
|
|
AND r.OUT_OF_TIME <= #{endTime}
|
|
</if>
|
|
<if test="isWelfare != null and isWelfare != ''">
|
|
<if test="isWelfare == '0' or isWelfare == 0">
|
|
AND w.DEL_FLAG = '0'
|
|
</if>
|
|
<if test="isWelfare == '1' or isWelfare == 1">
|
|
AND w.DEL_FLAG IS NULL
|
|
</if>
|
|
</if>
|
|
order by r.CREATED_TIME desc
|
|
</select>
|
|
</mapper>
|
|
|