<![CDATA[select t1.* from (SELECT (SELECT ARRAY_TO_JSON(ARRAY_AGG(T.*)) FROM (SELECT M2.ID AS SRFKEY, M2.NAME AS SRFMAJORTEXT FROM RES_PARTNER_RES_PARTNER_CATEGORY_REL M1 LEFT JOIN RES_PARTNER_CATEGORY M2 ON M1.CATEGORY_ID = M2.ID WHERE M1.PARTNER_ID =T1.ID ) T) AS CATEGORY_ID, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.TYPE, t1.VAT FROM RES_PARTNER t1 ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT (SELECT ARRAY_TO_JSON(ARRAY_AGG(T.*)) FROM (SELECT M2.ID AS SRFKEY, M2.NAME AS SRFMAJORTEXT FROM RES_PARTNER_RES_PARTNER_CATEGORY_REL M1 LEFT JOIN RES_PARTNER_CATEGORY M2 ON M1.CATEGORY_ID = M2.ID WHERE M1.PARTNER_ID =T1.ID ) T) AS CATEGORY_ID, t1.COMPANY_ID, t31.NAME AS COMPANY_ID_TEXT, t1.COUNTRY_ID, t41.NAME AS COUNTRY_ID_TEXT, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.STATE_ID, t51.NAME AS STATE_ID_TEXT, t1.TITLE, t11.NAME AS TITLE_TEXT, t1.TYPE, t1.VAT FROM RES_PARTNER t1 LEFT JOIN RES_PARTNER_TITLE t11 ON t1.TITLE = t11.ID LEFT JOIN RES_COMPANY t21 ON t1.COMPANY_ID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN RES_COUNTRY t41 ON t1.COUNTRY_ID = t41.ID LEFT JOIN RES_COUNTRY_STATE t51 ON t1.STATE_ID = t51.ID ) t1 where id=#{id}]]>
<![CDATA[ SELECT t1.COMPANY_ID, t31.NAME AS COMPANY_ID_TEXT, t1.COUNTRY_ID, t41.NAME AS COUNTRY_ID_TEXT, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.STATE_ID, t51.NAME AS STATE_ID_TEXT, t1.TITLE, t11.NAME AS TITLE_TEXT, t1.TYPE, t1.VAT FROM RES_PARTNER t1 LEFT JOIN RES_PARTNER_TITLE t11 ON t1.TITLE = t11.ID LEFT JOIN RES_COMPANY t21 ON t1.COMPANY_ID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN RES_COUNTRY t41 ON t1.COUNTRY_ID = t41.ID LEFT JOIN RES_COUNTRY_STATE t51 ON t1.STATE_ID = t51.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT (SELECT ARRAY_TO_JSON(ARRAY_AGG(T.*)) FROM (SELECT M2.ID AS SRFKEY, M2.NAME AS SRFMAJORTEXT FROM RES_PARTNER_RES_PARTNER_CATEGORY_REL M1 LEFT JOIN RES_PARTNER_CATEGORY M2 ON M1.CATEGORY_ID = M2.ID WHERE M1.PARTNER_ID =T1.ID ) T) AS CATEGORY_ID, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.TYPE, t1.VAT FROM RES_PARTNER t1
<![CDATA[ SELECT (SELECT ARRAY_TO_JSON(ARRAY_AGG(T.*)) FROM (SELECT M2.ID AS SRFKEY, M2.NAME AS SRFMAJORTEXT FROM RES_PARTNER_RES_PARTNER_CATEGORY_REL M1 LEFT JOIN RES_PARTNER_CATEGORY M2 ON M1.CATEGORY_ID = M2.ID WHERE M1.PARTNER_ID =T1.ID ) T) AS CATEGORY_ID, t1.COMPANY_ID, t31.NAME AS COMPANY_ID_TEXT, t1.COUNTRY_ID, t41.NAME AS COUNTRY_ID_TEXT, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.STATE_ID, t51.NAME AS STATE_ID_TEXT, t1.TITLE, t11.NAME AS TITLE_TEXT, t1.TYPE, t1.VAT FROM RES_PARTNER t1 LEFT JOIN RES_PARTNER_TITLE t11 ON t1.TITLE = t11.ID LEFT JOIN RES_COMPANY t21 ON t1.COMPANY_ID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN RES_COUNTRY t41 ON t1.COUNTRY_ID = t41.ID LEFT JOIN RES_COUNTRY_STATE t51 ON t1.STATE_ID = t51.ID
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_leave-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Hr_leave-Get')")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_leave-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Hr_leave-Get')")