Browse Source

Merge branch 'yantai_zhengwu_master' of http://git.elinkit.com.cn:7070/r/epmet-cloud into yantai_zhengwu_master

dev
lichao 2 years ago
parent
commit
d304ee853c
  1. 42
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml

42
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml

@ -71,19 +71,33 @@
</select> </select>
<select id="queryList" parameterType="map" resultType="com.epmet.dto.IcPropertyManagementDTO"> <select id="queryList" parameterType="map" resultType="com.epmet.dto.IcPropertyManagementDTO">
select m.* select * from (
from ic_property_management m select m.*,
where m.del_flag='0' (
and m.customer_id=#{customerId} SELECT
<if test="name != null and name != ''"> count(p.NEIGHBOR_HOOD_ID)
and m.name like concat('%',#{name},'%') FROM
</if> ic_neighbor_hood_property p
<if test="contactName != null and contactName != ''"> INNER JOIN ic_neighbor_hood h
and m.CONTACT_NAME like concat('%',#{contactName},'%') ON ( p.NEIGHBOR_HOOD_ID = h.ID )
</if> WHERE p.DEL_FLAG = '0'
<if test="contactMobile != null and contactMobile != ''"> and p.PROPERTY_ID =m.id
and m.CONTACT_MOBILE like concat('%',#{contactMobile},'%') AND (h.AGENCY_ID = #{agencyId} or h.AGENCY_PIDS like concat('%',#{agencyId},'%') )
</if> AND h.DEL_FLAG = '0'
order by m.CREATED_TIME desc )as totalNeighborHood
from ic_property_management m
where m.del_flag='0'
and m.customer_id=#{customerId}
<if test="name != null and name != ''">
and m.name like concat('%',#{name},'%')
</if>
<if test="contactName != null and contactName != ''">
and m.CONTACT_NAME like concat('%',#{contactName},'%')
</if>
<if test="contactMobile != null and contactMobile != ''">
and m.CONTACT_MOBILE like concat('%',#{contactMobile},'%')
</if>
)t
order by t.totalNeighborHood desc,t.CREATED_TIME desc
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save