<![CDATA[select t1.* from (SELECT t1.ACCESS_TOKEN, t1.AMOUNT_TAX, t1.AMOUNT_TOTAL, t1.AMOUNT_UNTAXED, t1.COMPANY_ID, t61.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t121.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t41.NAME AS CURRENCY_ID_TEXT, t1.DATE_APPROVE, t1.DATE_ORDER, t1.DATE_PLANNED, t1.DEST_ADDRESS_ID, t71.NAME AS DEST_ADDRESS_ID_TEXT, t1.FISCAL_POSITION_ID, t31.NAME AS FISCAL_POSITION_ID_TEXT, t1.GROUP_ID, t1.ID, t1.INCOTERM_ID, t151.NAME AS INCOTERM_ID_TEXT, t1.INVOICE_COUNT, t1.INVOICE_STATUS, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.NAME, t1.NOTES, t1.ORIGIN, t1.PARTNER_ID, t131.NAME AS PARTNER_ID_TEXT, t1.PARTNER_REF, t1.PAYMENT_TERM_ID, t101.NAME AS PAYMENT_TERM_ID_TEXT, t1.PICKING_COUNT, t1.PICKING_TYPE_ID, t141.NAME AS PICKING_TYPE_ID_TEXT, t1.REQUISITION_ID, t1.STATE, t1.USER_ID, t21.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t91.NAME AS WRITE_UID_TEXT FROM PURCHASE_ORDER t1 LEFT JOIN RES_USERS t11 ON t1.USER_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN ACCOUNT_FISCAL_POSITION t31 ON t1.FISCAL_POSITION_ID = t31.ID LEFT JOIN RES_CURRENCY t41 ON t1.CURRENCY_ID = t41.ID LEFT JOIN RES_COMPANY t51 ON t1.COMPANY_ID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN RES_PARTNER t71 ON t1.DEST_ADDRESS_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.WRITE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN ACCOUNT_PAYMENT_TERM t101 ON t1.PAYMENT_TERM_ID = t101.ID LEFT JOIN RES_USERS t111 ON t1.CREATE_UID = t111.ID LEFT JOIN RES_PARTNER t121 ON t111.PARTNER_ID = t121.ID LEFT JOIN RES_PARTNER t131 ON t1.PARTNER_ID = t131.ID LEFT JOIN STOCK_PICKING_TYPE t141 ON t1.PICKING_TYPE_ID = t141.ID LEFT JOIN ACCOUNT_INCOTERMS t151 ON t1.INCOTERM_ID = t151.ID ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.ACCESS_TOKEN, t1.AMOUNT_TAX, t1.AMOUNT_TOTAL, t1.AMOUNT_UNTAXED, t1.COMPANY_ID, t61.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t121.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t41.NAME AS CURRENCY_ID_TEXT, t1.DATE_APPROVE, t1.DATE_ORDER, t1.DATE_PLANNED, t1.DEST_ADDRESS_ID, t71.NAME AS DEST_ADDRESS_ID_TEXT, t1.FISCAL_POSITION_ID, t31.NAME AS FISCAL_POSITION_ID_TEXT, t1.GROUP_ID, t1.ID, t1.INCOTERM_ID, t151.NAME AS INCOTERM_ID_TEXT, t1.INVOICE_COUNT, t1.INVOICE_STATUS, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.NAME, t1.NOTES, t1.ORIGIN, t1.PARTNER_ID, t131.NAME AS PARTNER_ID_TEXT, t1.PARTNER_REF, t1.PAYMENT_TERM_ID, t101.NAME AS PAYMENT_TERM_ID_TEXT, t1.PICKING_COUNT, t1.PICKING_TYPE_ID, t141.NAME AS PICKING_TYPE_ID_TEXT, t1.REQUISITION_ID, t161.NAME AS REQUISITION_ID_TEXT, t1.STATE, t1.USER_ID, t21.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t91.NAME AS WRITE_UID_TEXT FROM PURCHASE_ORDER t1 LEFT JOIN RES_USERS t11 ON t1.USER_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN ACCOUNT_FISCAL_POSITION t31 ON t1.FISCAL_POSITION_ID = t31.ID LEFT JOIN RES_CURRENCY t41 ON t1.CURRENCY_ID = t41.ID LEFT JOIN RES_COMPANY t51 ON t1.COMPANY_ID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN RES_PARTNER t71 ON t1.DEST_ADDRESS_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.WRITE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN ACCOUNT_PAYMENT_TERM t101 ON t1.PAYMENT_TERM_ID = t101.ID LEFT JOIN RES_USERS t111 ON t1.CREATE_UID = t111.ID LEFT JOIN RES_PARTNER t121 ON t111.PARTNER_ID = t121.ID LEFT JOIN RES_PARTNER t131 ON t1.PARTNER_ID = t131.ID LEFT JOIN STOCK_PICKING_TYPE t141 ON t1.PICKING_TYPE_ID = t141.ID LEFT JOIN ACCOUNT_INCOTERMS t151 ON t1.INCOTERM_ID = t151.ID LEFT JOIN PURCHASE_REQUISITION t161 ON t1.REQUISITION_ID = t161.ID ) t1 where id=#{id}]]>
<![CDATA[ SELECT t1.ACCESS_TOKEN, t1.AMOUNT_TAX, t1.AMOUNT_TOTAL, t1.AMOUNT_UNTAXED, t1.COMPANY_ID, t61.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t121.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t41.NAME AS CURRENCY_ID_TEXT, t1.DATE_APPROVE, t1.DATE_ORDER, t1.DATE_PLANNED, t1.DEST_ADDRESS_ID, t71.NAME AS DEST_ADDRESS_ID_TEXT, t1.FISCAL_POSITION_ID, t31.NAME AS FISCAL_POSITION_ID_TEXT, t1.GROUP_ID, t1.ID, t1.INCOTERM_ID, t151.NAME AS INCOTERM_ID_TEXT, t1.INVOICE_COUNT, t1.INVOICE_STATUS, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.NAME, t1.ORIGIN, t1.PARTNER_ID, t131.NAME AS PARTNER_ID_TEXT, t1.PARTNER_REF, t1.PAYMENT_TERM_ID, t101.NAME AS PAYMENT_TERM_ID_TEXT, t1.PICKING_COUNT, t1.PICKING_TYPE_ID, t141.NAME AS PICKING_TYPE_ID_TEXT, t1.REQUISITION_ID, t1.STATE, t1.USER_ID, t21.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t91.NAME AS WRITE_UID_TEXT FROM PURCHASE_ORDER t1 LEFT JOIN RES_USERS t11 ON t1.USER_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN ACCOUNT_FISCAL_POSITION t31 ON t1.FISCAL_POSITION_ID = t31.ID LEFT JOIN RES_CURRENCY t41 ON t1.CURRENCY_ID = t41.ID LEFT JOIN RES_COMPANY t51 ON t1.COMPANY_ID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN RES_PARTNER t71 ON t1.DEST_ADDRESS_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.WRITE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN ACCOUNT_PAYMENT_TERM t101 ON t1.PAYMENT_TERM_ID = t101.ID LEFT JOIN RES_USERS t111 ON t1.CREATE_UID = t111.ID LEFT JOIN RES_PARTNER t121 ON t111.PARTNER_ID = t121.ID LEFT JOIN RES_PARTNER t131 ON t1.PARTNER_ID = t131.ID LEFT JOIN STOCK_PICKING_TYPE t141 ON t1.PICKING_TYPE_ID = t141.ID LEFT JOIN ACCOUNT_INCOTERMS t151 ON t1.INCOTERM_ID = t151.ID
<![CDATA[ SELECT t1.ACCESS_TOKEN, t1.AMOUNT_TAX, t1.AMOUNT_TOTAL, t1.AMOUNT_UNTAXED, t1.COMPANY_ID, t61.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t121.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t41.NAME AS CURRENCY_ID_TEXT, t1.DATE_APPROVE, t1.DATE_ORDER, t1.DATE_PLANNED, t1.DEST_ADDRESS_ID, t71.NAME AS DEST_ADDRESS_ID_TEXT, t1.FISCAL_POSITION_ID, t31.NAME AS FISCAL_POSITION_ID_TEXT, t1.GROUP_ID, t1.ID, t1.INCOTERM_ID, t151.NAME AS INCOTERM_ID_TEXT, t1.INVOICE_COUNT, t1.INVOICE_STATUS, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.NAME, t1.ORIGIN, t1.PARTNER_ID, t131.NAME AS PARTNER_ID_TEXT, t1.PARTNER_REF, t1.PAYMENT_TERM_ID, t101.NAME AS PAYMENT_TERM_ID_TEXT, t1.PICKING_COUNT, t1.PICKING_TYPE_ID, t141.NAME AS PICKING_TYPE_ID_TEXT, t1.REQUISITION_ID, t161.NAME AS REQUISITION_ID_TEXT, t1.STATE, t1.USER_ID, t21.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t91.NAME AS WRITE_UID_TEXT FROM PURCHASE_ORDER t1 LEFT JOIN RES_USERS t11 ON t1.USER_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN ACCOUNT_FISCAL_POSITION t31 ON t1.FISCAL_POSITION_ID = t31.ID LEFT JOIN RES_CURRENCY t41 ON t1.CURRENCY_ID = t41.ID LEFT JOIN RES_COMPANY t51 ON t1.COMPANY_ID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN RES_PARTNER t71 ON t1.DEST_ADDRESS_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.WRITE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN ACCOUNT_PAYMENT_TERM t101 ON t1.PAYMENT_TERM_ID = t101.ID LEFT JOIN RES_USERS t111 ON t1.CREATE_UID = t111.ID LEFT JOIN RES_PARTNER t121 ON t111.PARTNER_ID = t121.ID LEFT JOIN RES_PARTNER t131 ON t1.PARTNER_ID = t131.ID LEFT JOIN STOCK_PICKING_TYPE t141 ON t1.PICKING_TYPE_ID = t141.ID LEFT JOIN ACCOUNT_INCOTERMS t151 ON t1.INCOTERM_ID = t151.ID LEFT JOIN PURCHASE_REQUISITION t161 ON t1.REQUISITION_ID = t161.ID
]]>
]]>
</sql>
</sql>
<!--数据查询[View]-->
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.ACCESS_TOKEN, t1.AMOUNT_TAX, t1.AMOUNT_TOTAL, t1.AMOUNT_UNTAXED, t1.COMPANY_ID, t61.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t121.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t41.NAME AS CURRENCY_ID_TEXT, t1.DATE_APPROVE, t1.DATE_ORDER, t1.DATE_PLANNED, t1.DEST_ADDRESS_ID, t71.NAME AS DEST_ADDRESS_ID_TEXT, t1.FISCAL_POSITION_ID, t31.NAME AS FISCAL_POSITION_ID_TEXT, t1.GROUP_ID, t1.ID, t1.INCOTERM_ID, t151.NAME AS INCOTERM_ID_TEXT, t1.INVOICE_COUNT, t1.INVOICE_STATUS, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.NAME, t1.NOTES, t1.ORIGIN, t1.PARTNER_ID, t131.NAME AS PARTNER_ID_TEXT, t1.PARTNER_REF, t1.PAYMENT_TERM_ID, t101.NAME AS PAYMENT_TERM_ID_TEXT, t1.PICKING_COUNT, t1.PICKING_TYPE_ID, t141.NAME AS PICKING_TYPE_ID_TEXT, t1.REQUISITION_ID, t1.STATE, t1.USER_ID, t21.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t91.NAME AS WRITE_UID_TEXT FROM PURCHASE_ORDER t1 LEFT JOIN RES_USERS t11 ON t1.USER_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN ACCOUNT_FISCAL_POSITION t31 ON t1.FISCAL_POSITION_ID = t31.ID LEFT JOIN RES_CURRENCY t41 ON t1.CURRENCY_ID = t41.ID LEFT JOIN RES_COMPANY t51 ON t1.COMPANY_ID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN RES_PARTNER t71 ON t1.DEST_ADDRESS_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.WRITE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN ACCOUNT_PAYMENT_TERM t101 ON t1.PAYMENT_TERM_ID = t101.ID LEFT JOIN RES_USERS t111 ON t1.CREATE_UID = t111.ID LEFT JOIN RES_PARTNER t121 ON t111.PARTNER_ID = t121.ID LEFT JOIN RES_PARTNER t131 ON t1.PARTNER_ID = t131.ID LEFT JOIN STOCK_PICKING_TYPE t141 ON t1.PICKING_TYPE_ID = t141.ID LEFT JOIN ACCOUNT_INCOTERMS t151 ON t1.INCOTERM_ID = t151.ID
<![CDATA[ SELECT t1.ACCESS_TOKEN, t1.AMOUNT_TAX, t1.AMOUNT_TOTAL, t1.AMOUNT_UNTAXED, t1.COMPANY_ID, t61.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t121.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t41.NAME AS CURRENCY_ID_TEXT, t1.DATE_APPROVE, t1.DATE_ORDER, t1.DATE_PLANNED, t1.DEST_ADDRESS_ID, t71.NAME AS DEST_ADDRESS_ID_TEXT, t1.FISCAL_POSITION_ID, t31.NAME AS FISCAL_POSITION_ID_TEXT, t1.GROUP_ID, t1.ID, t1.INCOTERM_ID, t151.NAME AS INCOTERM_ID_TEXT, t1.INVOICE_COUNT, t1.INVOICE_STATUS, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.NAME, t1.NOTES, t1.ORIGIN, t1.PARTNER_ID, t131.NAME AS PARTNER_ID_TEXT, t1.PARTNER_REF, t1.PAYMENT_TERM_ID, t101.NAME AS PAYMENT_TERM_ID_TEXT, t1.PICKING_COUNT, t1.PICKING_TYPE_ID, t141.NAME AS PICKING_TYPE_ID_TEXT, t1.REQUISITION_ID, t161.NAME AS REQUISITION_ID_TEXT, t1.STATE, t1.USER_ID, t21.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t91.NAME AS WRITE_UID_TEXT FROM PURCHASE_ORDER t1 LEFT JOIN RES_USERS t11 ON t1.USER_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN ACCOUNT_FISCAL_POSITION t31 ON t1.FISCAL_POSITION_ID = t31.ID LEFT JOIN RES_CURRENCY t41 ON t1.CURRENCY_ID = t41.ID LEFT JOIN RES_COMPANY t51 ON t1.COMPANY_ID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN RES_PARTNER t71 ON t1.DEST_ADDRESS_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.WRITE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN ACCOUNT_PAYMENT_TERM t101 ON t1.PAYMENT_TERM_ID = t101.ID LEFT JOIN RES_USERS t111 ON t1.CREATE_UID = t111.ID LEFT JOIN RES_PARTNER t121 ON t111.PARTNER_ID = t121.ID LEFT JOIN RES_PARTNER t131 ON t1.PARTNER_ID = t131.ID LEFT JOIN STOCK_PICKING_TYPE t141 ON t1.PICKING_TYPE_ID = t141.ID LEFT JOIN ACCOUNT_INCOTERMS t151 ON t1.INCOTERM_ID = t151.ID LEFT JOIN PURCHASE_REQUISITION t161 ON t1.REQUISITION_ID = t161.ID
<![CDATA[select t1.* from (SELECT t1.ACTIVE, t1.CATEGORY_ID, t31.NAME AS CATEGORY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t51.NAME AS CREATE_UID_TEXT, t1.FACTOR, t1.ID, t31.IS_POS_GROUPABLE, t31.MEASURE_TYPE, t1.NAME, t1.ROUNDING, t1.UOM_TYPE, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM UOM_UOM 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 UOM_CATEGORY t31 ON t1.CATEGORY_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.CREATE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID ) t1 where id=#{id}]]>
<where><iftest="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVE, t1.CATEGORY_ID, t31.NAME AS CATEGORY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t51.NAME AS CREATE_UID_TEXT, t1.FACTOR, t1.ID, t31.IS_POS_GROUPABLE, t31.MEASURE_TYPE, t1.NAME, t1.ROUNDING, t1.UOM_TYPE, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM UOM_UOM 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 UOM_CATEGORY t31 ON t1.CATEGORY_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.CREATE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVE, t1.CATEGORY_ID, t31.NAME AS CATEGORY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t51.NAME AS CREATE_UID_TEXT, t1.FACTOR, t1.ID, t31.IS_POS_GROUPABLE, t31.MEASURE_TYPE, t1.NAME, t1.ROUNDING, t1.UOM_TYPE, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM UOM_UOM 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 UOM_CATEGORY t31 ON t1.CATEGORY_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.CREATE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Uom_uom-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Uom_uom-Get')")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Uom_uom-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Uom_uom-Get')")