|
@ -16,16 +16,19 @@ |
|
|
<result property="address" column="address"/> |
|
|
<result property="address" column="address"/> |
|
|
<result property="houseType" column="houseType"/> |
|
|
<result property="houseType" column="houseType"/> |
|
|
<result property="totalResi" column="totalResi"/> |
|
|
<result property="totalResi" column="totalResi"/> |
|
|
<collection property="list" ofType="com.epmet.dto.result.CollectListResultDTO$CollectListMemberResultDTO" column="id" select="selectMemberList"/> |
|
|
<result property="domicilePlace" column="domicilePlace"></result> |
|
|
|
|
|
<collection property="list" ofType="com.epmet.dto.result.CollectListResultDTO$CollectListMemberResultDTO" column="{id=id,domicilePlace=domicile_place}" select="selectMemberList"/> |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
<select id="getCollectList" resultMap="getCollectListMap"> |
|
|
<select id="getCollectList" resultMap="getCollectListMap"> |
|
|
SELECT |
|
|
SELECT |
|
|
c.id as id, |
|
|
distinct c.id as id, |
|
|
c.HOUSE_HOLDER_NAME AS houseHolderName, |
|
|
c.HOUSE_HOLDER_NAME AS houseHolderName, |
|
|
c.ADDRESS AS address, |
|
|
c.ADDRESS AS address, |
|
|
c.HOUSE_TYPE AS houseType, |
|
|
c.HOUSE_TYPE AS houseType, |
|
|
c.TOTAL_RESI AS totalResi |
|
|
c.TOTAL_RESI AS totalResi, |
|
|
|
|
|
#{domicilePlace} as domicile_place |
|
|
FROM ic_resi_collect c |
|
|
FROM ic_resi_collect c |
|
|
|
|
|
left join ic_resi_member m on(c.id=m.IC_RESI_COLLECT_ID and m.del_flag='0') |
|
|
WHERE c.DEL_FLAG = 0 |
|
|
WHERE c.DEL_FLAG = 0 |
|
|
<if test='orgId != null and orgId != "" '> |
|
|
<if test='orgId != null and orgId != "" '> |
|
|
AND CONCAT(c.PIDS,':',c.AGENCY_ID) LIKE CONCAT('%',#{orgId},'%') |
|
|
AND CONCAT(c.PIDS,':',c.AGENCY_ID) LIKE CONCAT('%',#{orgId},'%') |
|
@ -43,12 +46,11 @@ |
|
|
AND c.id=#{id} |
|
|
AND c.id=#{id} |
|
|
</if> |
|
|
</if> |
|
|
<if test='domicilePlace != null and domicilePlace != "" '> |
|
|
<if test='domicilePlace != null and domicilePlace != "" '> |
|
|
AND c.DOMICILE_PLACE LIKE CONCAT('%',#{domicilePlace},'%') |
|
|
AND m.DOMICILE_PLACE LIKE CONCAT('%',#{domicilePlace},'%') |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
|
|
|
ORDER BY c.CREATED_TIME DESC |
|
|
ORDER BY c.CREATED_TIME DESC |
|
|
</select> |
|
|
</select> |
|
|
<select id="selectMemberList" resultType="com.epmet.dto.result.CollectListResultDTO$CollectListMemberResultDTO"> |
|
|
<select id="selectMemberList" parameterType="map" resultType="com.epmet.dto.result.CollectListResultDTO$CollectListMemberResultDTO"> |
|
|
select |
|
|
select |
|
|
m.`NAME` AS memberName, |
|
|
m.`NAME` AS memberName, |
|
|
m.ID_NUM AS memberIdNum, |
|
|
m.ID_NUM AS memberIdNum, |
|
@ -63,6 +65,9 @@ |
|
|
from ic_resi_member m |
|
|
from ic_resi_member m |
|
|
where m.DEL_FLAG = 0 |
|
|
where m.DEL_FLAG = 0 |
|
|
and m.IC_RESI_COLLECT_ID = #{id} |
|
|
and m.IC_RESI_COLLECT_ID = #{id} |
|
|
|
|
|
<if test='domicilePlace != null and domicilePlace != "" '> |
|
|
|
|
|
AND m.DOMICILE_PLACE LIKE CONCAT('%',#{domicilePlace},'%') |
|
|
|
|
|
</if> |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<update id="updateRec" parameterType="map"> |
|
|
<update id="updateRec" parameterType="map"> |
|
|