|
|
@ -7,19 +7,16 @@ |
|
|
|
<select id="countEnterprisePatrol" resultType="java.lang.Integer"> |
|
|
|
select count(1) |
|
|
|
from ic_enterprise e |
|
|
|
inner join ic_enterprise_patrol_record r on (e.ID = r.ENTERPRISE_ID) |
|
|
|
where e.CUSTOMER_ID = #{customerId} |
|
|
|
and e.PLACE_ORG_NAME like CONCAT('%',#{search},'%') |
|
|
|
and (e.AGENCY_ID = #{agencyId} or e.AGENCY_PIDS like CONCAT(#{staffOrgIds}, '%')) |
|
|
|
and e.PLACE_TYPE = #{categoryKey} |
|
|
|
and e.DEL_FLAG = '0' |
|
|
|
and r.DEL_FLAG = '0' |
|
|
|
</select> |
|
|
|
|
|
|
|
<!--企事业单位巡查列表--> |
|
|
|
<select id="listEnterprisePatrol" resultType="com.epmet.dataaggre.dto.govorg.result.IcEnterisePatrolResultDTO"> |
|
|
|
select e.id enterpriseId, |
|
|
|
r.id patrolId, |
|
|
|
e.customer_id, |
|
|
|
e.grid_id, |
|
|
|
e.agency_id, |
|
|
@ -32,12 +29,10 @@ |
|
|
|
e.mobile, |
|
|
|
e.source_type |
|
|
|
from ic_enterprise e |
|
|
|
inner join ic_enterprise_patrol_record r on (e.ID = r.ENTERPRISE_ID) |
|
|
|
where e.CUSTOMER_ID = #{customerId} |
|
|
|
and e.PLACE_ORG_NAME like CONCAT('%',#{search},'%') |
|
|
|
and (e.AGENCY_ID = #{agencyId} or e.AGENCY_PIDS like CONCAT(#{staffOrgIds}, '%')) |
|
|
|
and e.PLACE_TYPE = #{categoryKey} |
|
|
|
and e.DEL_FLAG = '0' |
|
|
|
and r.DEL_FLAG = '0' |
|
|
|
</select> |
|
|
|
</mapper> |