|
|
@ -76,34 +76,34 @@ |
|
|
|
<select id="getListbrief" resultType="com.epmet.dto.result.PartyUnitListbrieResultDTO"> |
|
|
|
SELECT |
|
|
|
a.id, |
|
|
|
b.GRID_ID, |
|
|
|
-- b.GRID_ID, |
|
|
|
a.UNIT_NAME, |
|
|
|
a.type, |
|
|
|
a.SERVICE_MATTER |
|
|
|
FROM |
|
|
|
ic_party_unit a |
|
|
|
LEFT JOIN ic_party_activity b ON a.id = b.UNIT_ID |
|
|
|
AND b.DEL_FLAG = '0' |
|
|
|
-- LEFT JOIN ic_party_activity b ON a.id = b.UNIT_ID |
|
|
|
-- AND b.DEL_FLAG = '0' |
|
|
|
<where> |
|
|
|
a.DEL_FLAG = '0' |
|
|
|
AND a.AGENCY_ID = #{form.agencyId} |
|
|
|
AND a.CUSTOMER_ID = #{customerId} |
|
|
|
<if test="gridId != null and gridId != ''"> |
|
|
|
AND b.GRID_ID = #{form.gridId} |
|
|
|
</if> |
|
|
|
<if test="unitName != null and unitName != ''"> |
|
|
|
<!-- <if test="gridId != null and gridId != ''">--> |
|
|
|
<!-- AND b.GRID_ID = #{form.gridId}--> |
|
|
|
<!-- </if>--> |
|
|
|
<if test="form.unitName != null and form.unitName != ''"> |
|
|
|
AND a.UNIT_NAME = #{form.unitName} |
|
|
|
</if> |
|
|
|
<if test="serviceMatter != null and serviceMatter != ''"> |
|
|
|
<if test="form.serviceMatter != null and form.serviceMatter != ''"> |
|
|
|
AND a.SERVICE_MATTER = #{form.serviceMatter} |
|
|
|
</if> |
|
|
|
<if test="type != null and type != ''"> |
|
|
|
<if test="form.type != null and form.type != ''"> |
|
|
|
AND a.type = #{form.type} |
|
|
|
</if> |
|
|
|
<if test="contact != null and contact != ''"> |
|
|
|
<if test="form.contact != null and form.contact != ''"> |
|
|
|
AND a.CONTACT = #{form.contact} |
|
|
|
</if> |
|
|
|
<if test="contactMobile != null and contactMobile != ''"> |
|
|
|
<if test="form.contactMobile != null and form.contactMobile != ''"> |
|
|
|
AND a.CONTACT_MOBILE = #{form.contactMobile} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|