<![CDATA[select t1.* from (SELECT t1.ACTIVITY_DATE_DEADLINE, t1.ACTIVITY_STATE, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORDER_COUNT, t1.ORIGIN, t1.SCHEDULE_DATE, t1.VENDOR_ID, t51.NAME AS VENDOR_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t1.VENDOR_ID = t51.ID ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.ACTIVITY_DATE_DEADLINE, t1.ACTIVITY_STATE, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORDER_COUNT, t1.ORIGIN, t1.SCHEDULE_DATE, t1.TYPE_ID, t1.VENDOR_ID, t51.NAME AS VENDOR_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t1.VENDOR_ID = t51.ID ) t1 where id=#{id}]]>
<![CDATA[ SELECT t1.ACTIVITY_DATE_DEADLINE, t1.ACTIVITY_STATE, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORDER_COUNT, t1.ORIGIN, t1.SCHEDULE_DATE, t1.VENDOR_ID, t51.NAME AS VENDOR_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t1.VENDOR_ID = t51.ID
<![CDATA[ SELECT t1.ACTIVITY_DATE_DEADLINE, t1.ACTIVITY_STATE, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORDER_COUNT, t1.ORIGIN, t1.SCHEDULE_DATE, t1.TYPE_ID, t1.VENDOR_ID, t51.NAME AS VENDOR_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t1.VENDOR_ID = t51.ID
]]>
]]>
</sql>
</sql>
<!--数据查询[View]-->
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVITY_DATE_DEADLINE, t1.ACTIVITY_STATE, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORDER_COUNT, t1.ORIGIN, t1.SCHEDULE_DATE, t1.VENDOR_ID, t51.NAME AS VENDOR_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t1.VENDOR_ID = t51.ID
<![CDATA[ SELECT t1.ACTIVITY_DATE_DEADLINE, t1.ACTIVITY_STATE, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORDER_COUNT, t1.ORIGIN, t1.SCHEDULE_DATE, t1.TYPE_ID, t1.VENDOR_ID, t51.NAME AS VENDOR_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t1.VENDOR_ID = t51.ID
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Crm_lead-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Crm_lead-Get')")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Crm_lead-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Crm_lead-Get')")