|
|
@ -164,9 +164,15 @@ |
|
|
|
AND p.id IN ( |
|
|
|
SELECT r.PLACE_ORG_ID FROM ic_place_patrol_record r |
|
|
|
<where> |
|
|
|
r.FINAL_RESULT = 1 and r.DEL_FLAG = 0 |
|
|
|
r.DEL_FLAG = 0 |
|
|
|
<if test="null != danger and danger == 0"> |
|
|
|
AND r.FINAL_RESULT = 0 |
|
|
|
</if> |
|
|
|
<if test="null != danger and danger == 1"> |
|
|
|
AND r.FIRST_RESULT = 1 |
|
|
|
</if> |
|
|
|
<if test="null != orgType and orgType !=''"> |
|
|
|
<if test="null != orgId and orgId != '' and orgType == 'agancy'"> |
|
|
|
<if test="null != orgId and orgId != '' and orgType == 'agency'"> |
|
|
|
AND r.agency_id = #{orgId} |
|
|
|
</if> |
|
|
|
<if test="null != orgId and orgId != '' and orgType == 'grid'"> |
|
|
@ -174,9 +180,10 @@ |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
GROUP BY r.PLACE_ORG_ID |
|
|
|
) |
|
|
|
<if test="null != orgType and orgType !=''"> |
|
|
|
<if test="null != orgId and orgId != '' and orgType == 'agancy'"> |
|
|
|
<if test="null != orgId and orgId != '' and orgType == 'agency'"> |
|
|
|
AND p.agency_id = #{orgId} |
|
|
|
</if> |
|
|
|
<if test="null != orgId and orgId != '' and orgType == 'grid'"> |
|
|
@ -184,7 +191,7 @@ |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
|
|
|
|
GROUP BY p.id |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|