| | |
| | | group by b."user_phone" |
| | | </select> |
| | | |
| | | <!--通过水库代码获取巡查责任人及技术责任人手机号--> |
| | | <select id="getPatrolPersonListByWaterCodeList" resultType="cn.gistack.sm.intelligentCall.entity.Scene"> |
| | | SELECT |
| | | a."guid" as waterCode, |
| | | a."name" as waterName, |
| | | b."user_name" as username, |
| | | b."user_phone" as userId, |
| | | b."user_phone" as phone |
| | | FROM SJZT_MD."att_res_base" a |
| | | LEFT JOIN SJZT_MD."att_res_manage_person" b ON a."guid" = b."res_guid" |
| | | where 1=1 and b."type" = 5 |
| | | <choose> |
| | | <when test="list!=null and list.size()>0"> |
| | | and "sk_code" in |
| | | <foreach collection="list" item="id" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and "sk_code" in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </select> |
| | | |
| | | <!--根据水库编号查询市县水利部人员姓名及联系方式--> |
| | | <select id="getCityCountyPersonListByResGuid" resultType="cn.gistack.sm.sjztmd.vo.PersonVO"> |
| | | select real_name as name,phone,#{type} as type from YWXT.blade_user bu |
| | |
| | | and bd.ad_code = #{adCode} |
| | | limit 3 |
| | | </select> |
| | | <select id="getPatrolResponsiblePersonByResCdList" |
| | | resultType="cn.gistack.sm.sjztmd.entity.PatrolResponsiblePerson"> |
| | | |
| | | select DISTINCT a."res_guid", c."name", b.id as user_id |
| | | from "SJZT_MD"."att_res_manage_person" a, |
| | | "BLADE_USER" b, |
| | | "SJZT_MD"."att_res_base" c |
| | | WHERE a."user_phone" = b.PHONE |
| | | and a."res_guid" = c."guid" |
| | | and a."type" = 5 |
| | | <choose> |
| | | <when test="ids!=null and ids.size()>0"> |
| | | and "res_guid" in |
| | | <foreach collection="ids" item="id" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and "res_guid" in ('') |
| | | </otherwise> |
| | | </choose> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |