<![CDATA[select t1.* from (SELECT t1.ACCOUNT_ANALYTIC_ID, t81.NAME AS ACCOUNT_ANALYTIC_NAME, t1.COMPANY_ID, t101.NAME AS COMPANY_NAME, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UNAME, t1.DISPLAY_NAME, t1.ID, t1.MOVE_DEST_ID, t111.NAME AS MOVE_DEST_NAME, t1.NAME, t1.PRICE_UNIT, t1.PRODUCT_ID, t71.NAME AS PRODUCT_NAME, t1.PRODUCT_QTY, t1.PRODUCT_UOM_ID, t121.NAME AS PRODUCT_UOM_NAME, t1.QTY_ORDERED, t1.REQUISITION_ID, t51.NAME AS REQUISITION_NAME, t1.SCHEDULE_DATE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION_LINE t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.WRITE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN PURCHASE_REQUISITION t51 ON t1.REQUISITION_ID = t51.ID LEFT JOIN PRODUCT_PRODUCT t61 ON t1.PRODUCT_ID = t61.ID LEFT JOIN PRODUCT_TEMPLATE t71 ON t61.PRODUCT_TMPL_ID = t71.ID LEFT JOIN ACCOUNT_ANALYTIC_ACCOUNT t81 ON t1.ACCOUNT_ANALYTIC_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 STOCK_MOVE t111 ON t1.MOVE_DEST_ID = t111.ID LEFT JOIN UOM_UOM t121 ON t1.PRODUCT_UOM_ID = t121.ID ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.ACCOUNT_ANALYTIC_ID, t81.NAME AS ACCOUNT_ANALYTIC_NAME, t1.COMPANY_ID, t101.NAME AS COMPANY_NAME, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UNAME, t1.ID, t1.MOVE_DEST_ID, t111.NAME AS MOVE_DEST_NAME, t1.NAME, t1.PRICE_UNIT, t1.PRODUCT_ID, t71.NAME AS PRODUCT_NAME, t1.PRODUCT_QTY, t1.PRODUCT_UOM_ID, t121.NAME AS PRODUCT_UOM_NAME, t1.QTY_ORDERED, t1.REQUISITION_ID, t51.NAME AS REQUISITION_NAME, t1.SCHEDULE_DATE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION_LINE t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.WRITE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN PURCHASE_REQUISITION t51 ON t1.REQUISITION_ID = t51.ID LEFT JOIN PRODUCT_PRODUCT t61 ON t1.PRODUCT_ID = t61.ID LEFT JOIN PRODUCT_TEMPLATE t71 ON t61.PRODUCT_TMPL_ID = t71.ID LEFT JOIN ACCOUNT_ANALYTIC_ACCOUNT t81 ON t1.ACCOUNT_ANALYTIC_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 STOCK_MOVE t111 ON t1.MOVE_DEST_ID = t111.ID LEFT JOIN UOM_UOM t121 ON t1.PRODUCT_UOM_ID = t121.ID ) t1 where id=#{id}]]>
<![CDATA[ SELECT t1.ACCOUNT_ANALYTIC_ID, t81.NAME AS ACCOUNT_ANALYTIC_NAME, t1.COMPANY_ID, t101.NAME AS COMPANY_NAME, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UNAME, t1.DISPLAY_NAME, t1.ID, t1.MOVE_DEST_ID, t111.NAME AS MOVE_DEST_NAME, t1.NAME, t1.PRICE_UNIT, t1.PRODUCT_ID, t71.NAME AS PRODUCT_NAME, t1.PRODUCT_QTY, t1.PRODUCT_UOM_ID, t121.NAME AS PRODUCT_UOM_NAME, t1.QTY_ORDERED, t1.REQUISITION_ID, t51.NAME AS REQUISITION_NAME, t1.SCHEDULE_DATE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION_LINE t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.WRITE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN PURCHASE_REQUISITION t51 ON t1.REQUISITION_ID = t51.ID LEFT JOIN PRODUCT_PRODUCT t61 ON t1.PRODUCT_ID = t61.ID LEFT JOIN PRODUCT_TEMPLATE t71 ON t61.PRODUCT_TMPL_ID = t71.ID LEFT JOIN ACCOUNT_ANALYTIC_ACCOUNT t81 ON t1.ACCOUNT_ANALYTIC_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 STOCK_MOVE t111 ON t1.MOVE_DEST_ID = t111.ID LEFT JOIN UOM_UOM t121 ON t1.PRODUCT_UOM_ID = t121.ID
<![CDATA[ SELECT t1.ACCOUNT_ANALYTIC_ID, t81.NAME AS ACCOUNT_ANALYTIC_NAME, t1.COMPANY_ID, t101.NAME AS COMPANY_NAME, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UNAME, t1.ID, t1.MOVE_DEST_ID, t111.NAME AS MOVE_DEST_NAME, t1.NAME, t1.PRICE_UNIT, t1.PRODUCT_ID, t71.NAME AS PRODUCT_NAME, t1.PRODUCT_QTY, t1.PRODUCT_UOM_ID, t121.NAME AS PRODUCT_UOM_NAME, t1.QTY_ORDERED, t1.REQUISITION_ID, t51.NAME AS REQUISITION_NAME, t1.SCHEDULE_DATE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION_LINE t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.WRITE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN PURCHASE_REQUISITION t51 ON t1.REQUISITION_ID = t51.ID LEFT JOIN PRODUCT_PRODUCT t61 ON t1.PRODUCT_ID = t61.ID LEFT JOIN PRODUCT_TEMPLATE t71 ON t61.PRODUCT_TMPL_ID = t71.ID LEFT JOIN ACCOUNT_ANALYTIC_ACCOUNT t81 ON t1.ACCOUNT_ANALYTIC_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 STOCK_MOVE t111 ON t1.MOVE_DEST_ID = t111.ID LEFT JOIN UOM_UOM t121 ON t1.PRODUCT_UOM_ID = t121.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.ACCOUNT_ANALYTIC_ID, t81.NAME AS ACCOUNT_ANALYTIC_NAME, t1.COMPANY_ID, t101.NAME AS COMPANY_NAME, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UNAME, t1.DISPLAY_NAME, t1.ID, t1.MOVE_DEST_ID, t111.NAME AS MOVE_DEST_NAME, t1.NAME, t1.PRICE_UNIT, t1.PRODUCT_ID, t71.NAME AS PRODUCT_NAME, t1.PRODUCT_QTY, t1.PRODUCT_UOM_ID, t121.NAME AS PRODUCT_UOM_NAME, t1.QTY_ORDERED, t1.REQUISITION_ID, t51.NAME AS REQUISITION_NAME, t1.SCHEDULE_DATE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION_LINE t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.WRITE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN PURCHASE_REQUISITION t51 ON t1.REQUISITION_ID = t51.ID LEFT JOIN PRODUCT_PRODUCT t61 ON t1.PRODUCT_ID = t61.ID LEFT JOIN PRODUCT_TEMPLATE t71 ON t61.PRODUCT_TMPL_ID = t71.ID LEFT JOIN ACCOUNT_ANALYTIC_ACCOUNT t81 ON t1.ACCOUNT_ANALYTIC_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 STOCK_MOVE t111 ON t1.MOVE_DEST_ID = t111.ID LEFT JOIN UOM_UOM t121 ON t1.PRODUCT_UOM_ID = t121.ID
<![CDATA[ SELECT t1.ACCOUNT_ANALYTIC_ID, t81.NAME AS ACCOUNT_ANALYTIC_NAME, t1.COMPANY_ID, t101.NAME AS COMPANY_NAME, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UNAME, t1.ID, t1.MOVE_DEST_ID, t111.NAME AS MOVE_DEST_NAME, t1.NAME, t1.PRICE_UNIT, t1.PRODUCT_ID, t71.NAME AS PRODUCT_NAME, t1.PRODUCT_QTY, t1.PRODUCT_UOM_ID, t121.NAME AS PRODUCT_UOM_NAME, t1.QTY_ORDERED, t1.REQUISITION_ID, t51.NAME AS REQUISITION_NAME, t1.SCHEDULE_DATE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION_LINE t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.WRITE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN PURCHASE_REQUISITION t51 ON t1.REQUISITION_ID = t51.ID LEFT JOIN PRODUCT_PRODUCT t61 ON t1.PRODUCT_ID = t61.ID LEFT JOIN PRODUCT_TEMPLATE t71 ON t61.PRODUCT_TMPL_ID = t71.ID LEFT JOIN ACCOUNT_ANALYTIC_ACCOUNT t81 ON t1.ACCOUNT_ANALYTIC_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 STOCK_MOVE t111 ON t1.MOVE_DEST_ID = t111.ID LEFT JOIN UOM_UOM t121 ON t1.PRODUCT_UOM_ID = t121.ID