zhongrj
2023-06-30 b1d7e4ca2e5f50ab40bb2b223861baf1e5231af7
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/mapper/AttResManagePersonMapper.xml
@@ -154,4 +154,24 @@
        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>