| | |
| | | where a.phone = b."user_phone" and a.role_id <> b.role_id |
| | | </update> |
| | | |
| | | <!--通过水库代码获取巡查责任人及技术责任人手机号--> |
| | | <select id="getPersonListByWaterCodeList" resultType="java.lang.String"> |
| | | SELECT b."user_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" = 4 or 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> |
| | | group by b."user_phone" |
| | | </select> |
| | | |
| | | </mapper> |