<![CDATA[select t1.* from (SELECT t1.COMPANY_ID, t101.NAME AS COMPANY_NAME, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORIGIN, t51.QUANTITY_COPY, t1.SCHEDULE_DATE, t1.STATE, t1.TYPE_ID, t51.NAME AS TYPE_ID_TEXT, t1.USER_ID, t81.NAME AS USER_NAME, t1.VENDOR_ID, t61.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 PURCHASE_REQUISITION_TYPE t51 ON t1.TYPE_ID = t51.ID LEFT JOIN RES_PARTNER t61 ON t1.VENDOR_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.USER_ID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID LEFT JOIN RES_COMPANY t91 ON t1.COMPANY_ID = t91.ID LEFT JOIN RES_PARTNER t101 ON t91.PARTNER_ID = t101.ID ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.COMPANY_ID, t101.NAME AS COMPANY_NAME, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.CURRENCY_ID, t111.NAME AS CURRENCY_NAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORIGIN, t51.QUANTITY_COPY, t1.SCHEDULE_DATE, t1.STATE, t1.TYPE_ID, t51.NAME AS TYPE_ID_TEXT, t1.USER_ID, t81.NAME AS USER_NAME, t1.VENDOR_ID, t61.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 PURCHASE_REQUISITION_TYPE t51 ON t1.TYPE_ID = t51.ID LEFT JOIN RES_PARTNER t61 ON t1.VENDOR_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.USER_ID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID LEFT JOIN RES_COMPANY t91 ON t1.COMPANY_ID = t91.ID LEFT JOIN RES_PARTNER t101 ON t91.PARTNER_ID = t101.ID LEFT JOIN RES_CURRENCY t111 ON t1.CURRENCY_ID = t111.ID ) t1 where id=#{id}]]>
<![CDATA[ SELECT t1.COMPANY_ID, t101.NAME AS COMPANY_NAME, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORIGIN, t51.QUANTITY_COPY, t1.SCHEDULE_DATE, t1.STATE, t1.TYPE_ID, t51.NAME AS TYPE_ID_TEXT, t1.USER_ID, t81.NAME AS USER_NAME, t1.VENDOR_ID, t61.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 PURCHASE_REQUISITION_TYPE t51 ON t1.TYPE_ID = t51.ID LEFT JOIN RES_PARTNER t61 ON t1.VENDOR_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.USER_ID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID LEFT JOIN RES_COMPANY t91 ON t1.COMPANY_ID = t91.ID LEFT JOIN RES_PARTNER t101 ON t91.PARTNER_ID = t101.ID
<![CDATA[ SELECT t1.COMPANY_ID, t101.NAME AS COMPANY_NAME, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.CURRENCY_ID, t111.NAME AS CURRENCY_NAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORIGIN, t51.QUANTITY_COPY, t1.SCHEDULE_DATE, t1.STATE, t1.TYPE_ID, t51.NAME AS TYPE_ID_TEXT, t1.USER_ID, t81.NAME AS USER_NAME, t1.VENDOR_ID, t61.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 PURCHASE_REQUISITION_TYPE t51 ON t1.TYPE_ID = t51.ID LEFT JOIN RES_PARTNER t61 ON t1.VENDOR_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.USER_ID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID LEFT JOIN RES_COMPANY t91 ON t1.COMPANY_ID = t91.ID LEFT JOIN RES_PARTNER t101 ON t91.PARTNER_ID = t101.ID LEFT JOIN RES_CURRENCY t111 ON t1.CURRENCY_ID = t111.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.COMPANY_ID, t101.NAME AS COMPANY_NAME, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORIGIN, t51.QUANTITY_COPY, t1.SCHEDULE_DATE, t1.STATE, t1.TYPE_ID, t51.NAME AS TYPE_ID_TEXT, t1.USER_ID, t81.NAME AS USER_NAME, t1.VENDOR_ID, t61.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 PURCHASE_REQUISITION_TYPE t51 ON t1.TYPE_ID = t51.ID LEFT JOIN RES_PARTNER t61 ON t1.VENDOR_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.USER_ID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID LEFT JOIN RES_COMPANY t91 ON t1.COMPANY_ID = t91.ID LEFT JOIN RES_PARTNER t101 ON t91.PARTNER_ID = t101.ID
<![CDATA[ SELECT t1.COMPANY_ID, t101.NAME AS COMPANY_NAME, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.CURRENCY_ID, t111.NAME AS CURRENCY_NAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORIGIN, t51.QUANTITY_COPY, t1.SCHEDULE_DATE, t1.STATE, t1.TYPE_ID, t51.NAME AS TYPE_ID_TEXT, t1.USER_ID, t81.NAME AS USER_NAME, t1.VENDOR_ID, t61.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 PURCHASE_REQUISITION_TYPE t51 ON t1.TYPE_ID = t51.ID LEFT JOIN RES_PARTNER t61 ON t1.VENDOR_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.USER_ID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID LEFT JOIN RES_COMPANY t91 ON t1.COMPANY_ID = t91.ID LEFT JOIN RES_PARTNER t101 ON t91.PARTNER_ID = t101.ID LEFT JOIN RES_CURRENCY t111 ON t1.CURRENCY_ID = t111.ID