<![CDATA[select t1.* from (SELECT 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.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 ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT 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 ) t1 where id=#{id}]]>
<![CDATA[ SELECT 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.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
<![CDATA[ SELECT 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
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT 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.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
<![CDATA[ SELECT 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