<![CDATA[select t1.* from (SELECT t1.ACCOUNT_DEST_ID, t21.NAME AS ACCOUNT_DEST_ID_TEXT, t1.ACCOUNT_SRC_ID, t31.NAME AS ACCOUNT_SRC_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t71.NAME AS CREATE_UID_TEXT, t1.ID, t1.POSITION_ID, t11.NAME AS POSITION_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t51.NAME AS WRITE_UID_TEXT FROM ACCOUNT_FISCAL_POSITION_ACCOUNT_TEMPLATE t1 LEFT JOIN ACCOUNT_FISCAL_POSITION_TEMPLATE t11 ON t1.POSITION_ID = t11.ID LEFT JOIN ACCOUNT_ACCOUNT_TEMPLATE t21 ON t1.ACCOUNT_DEST_ID = t21.ID LEFT JOIN ACCOUNT_ACCOUNT_TEMPLATE t31 ON t1.ACCOUNT_SRC_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.WRITE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN RES_USERS t61 ON t1.CREATE_UID = t61.ID LEFT JOIN RES_PARTNER t71 ON t61.PARTNER_ID = t71.ID ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.ACCOUNT_DEST_ID, t21.NAME AS ACCOUNT_DEST_ID_TEXT, t1.ACCOUNT_SRC_ID, t31.NAME AS ACCOUNT_SRC_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t71.NAME AS CREATE_UID_TEXT, t1.ID, t1.POSITION_ID, t11.NAME AS POSITION_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t51.NAME AS WRITE_UID_TEXT FROM ACCOUNT_FISCAL_POSITION_ACCOUNT_TEMPLATE t1 LEFT JOIN ACCOUNT_FISCAL_POSITION_TEMPLATE t11 ON t1.POSITION_ID = t11.ID LEFT JOIN ACCOUNT_ACCOUNT_TEMPLATE t21 ON t1.ACCOUNT_DEST_ID = t21.ID LEFT JOIN ACCOUNT_ACCOUNT_TEMPLATE t31 ON t1.ACCOUNT_SRC_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.WRITE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN RES_USERS t61 ON t1.CREATE_UID = t61.ID LEFT JOIN RES_PARTNER t71 ON t61.PARTNER_ID = t71.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.ACCOUNT_DEST_ID, t21.NAME AS ACCOUNT_DEST_ID_TEXT, t1.ACCOUNT_SRC_ID, t31.NAME AS ACCOUNT_SRC_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t71.NAME AS CREATE_UID_TEXT, t1.ID, t1.POSITION_ID, t11.NAME AS POSITION_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t51.NAME AS WRITE_UID_TEXT FROM ACCOUNT_FISCAL_POSITION_ACCOUNT_TEMPLATE t1 LEFT JOIN ACCOUNT_FISCAL_POSITION_TEMPLATE t11 ON t1.POSITION_ID = t11.ID LEFT JOIN ACCOUNT_ACCOUNT_TEMPLATE t21 ON t1.ACCOUNT_DEST_ID = t21.ID LEFT JOIN ACCOUNT_ACCOUNT_TEMPLATE t31 ON t1.ACCOUNT_SRC_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.WRITE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN RES_USERS t61 ON t1.CREATE_UID = t61.ID LEFT JOIN RES_PARTNER t71 ON t61.PARTNER_ID = t71.ID
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.JOURNAL_ID, t51.NAME AS JOURNAL_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM ACCOUNT_INVOICE_IMPORT_WIZARD 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 ACCOUNT_JOURNAL t51 ON t1.JOURNAL_ID = t51.ID ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.JOURNAL_ID, t51.NAME AS JOURNAL_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM ACCOUNT_INVOICE_IMPORT_WIZARD 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 ACCOUNT_JOURNAL t51 ON t1.JOURNAL_ID = t51.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.JOURNAL_ID, t51.NAME AS JOURNAL_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM ACCOUNT_INVOICE_IMPORT_WIZARD 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 ACCOUNT_JOURNAL t51 ON t1.JOURNAL_ID = t51.ID
<![CDATA[select t1.* from (SELECT t1.ACCOUNT_ID, t51.NAME AS ACCOUNT_ID_TEXT, t1.AMOUNT, t1.AMOUNT_TYPE, t1.AUTO_RECONCILE, t1.CHART_TEMPLATE_ID, t61.NAME AS CHART_TEMPLATE_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t81.NAME AS CREATE_UID_TEXT, t1.FORCE_SECOND_TAX_INCLUDED, t1.FORCE_TAX_INCLUDED, t1.HAS_SECOND_LINE, t1.ID, t1.LABEL, t1.MATCH_AMOUNT, t1.MATCH_AMOUNT_MAX, t1.MATCH_AMOUNT_MIN, t1.MATCH_LABEL, t1.MATCH_LABEL_PARAM, t1.MATCH_NATURE, t1.MATCH_PARTNER, t1.MATCH_SAME_CURRENCY, t1.MATCH_TOTAL_AMOUNT, t1.MATCH_TOTAL_AMOUNT_PARAM, t1.NAME, t1.RULE_TYPE, t1.SECOND_ACCOUNT_ID, t91.NAME AS SECOND_ACCOUNT_ID_TEXT, t1.SECOND_AMOUNT, t1.SECOND_AMOUNT_TYPE, t1.SECOND_LABEL, t1.SECOND_TAX_ID, t41.NAME AS SECOND_TAX_ID_TEXT, t1.SEQUENCE, t1.TAX_ID, t31.NAME AS TAX_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM ACCOUNT_RECONCILE_MODEL_TEMPLATE 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 ACCOUNT_TAX_TEMPLATE t31 ON t1.TAX_ID = t31.ID LEFT JOIN ACCOUNT_TAX_TEMPLATE t41 ON t1.SECOND_TAX_ID = t41.ID LEFT JOIN ACCOUNT_ACCOUNT_TEMPLATE t51 ON t1.ACCOUNT_ID = t51.ID LEFT JOIN ACCOUNT_CHART_TEMPLATE t61 ON t1.CHART_TEMPLATE_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.CREATE_UID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID LEFT JOIN ACCOUNT_ACCOUNT_TEMPLATE t91 ON t1.SECOND_ACCOUNT_ID = t91.ID ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.ACCOUNT_ID, t71.NAME AS ACCOUNT_ID_TEXT, t1.ACTIVE, t1.AMOUNT, t1.AMOUNT_TYPE, t1.ANALYTIC, t1.CASH_BASIS_ACCOUNT_ID, t11.NAME AS CASH_BASIS_ACCOUNT_ID_TEXT, t1.CASH_BASIS_BASE_ACCOUNT_ID, t51.NAME AS CASH_BASIS_BASE_ACCOUNT_ID_TEXT, t1.CHART_TEMPLATE_ID, t21.NAME AS CHART_TEMPLATE_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t101.NAME AS CREATE_UID_TEXT, t1.DESCRIPTION, t1.ID, t1.INCLUDE_BASE_AMOUNT, t1.NAME, t1.PRICE_INCLUDE, t1.REFUND_ACCOUNT_ID, t81.NAME AS REFUND_ACCOUNT_ID_TEXT, t1.SEQUENCE, t1.TAX_EXIGIBILITY, t1.TAX_GROUP_ID, t61.NAME AS TAX_GROUP_ID_TEXT, t1.TYPE_TAX_USE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM ACCOUNT_TAX_TEMPLATE t1 LEFT JOIN ACCOUNT_ACCOUNT_TEMPLATE t11 ON t1.CASH_BASIS_ACCOUNT_ID = t11.ID LEFT JOIN ACCOUNT_CHART_TEMPLATE t21 ON t1.CHART_TEMPLATE_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 ACCOUNT_ACCOUNT_TEMPLATE t51 ON t1.CASH_BASIS_BASE_ACCOUNT_ID = t51.ID LEFT JOIN ACCOUNT_TAX_GROUP t61 ON t1.TAX_GROUP_ID = t61.ID LEFT JOIN ACCOUNT_ACCOUNT_TEMPLATE t71 ON t1.ACCOUNT_ID = t71.ID LEFT JOIN ACCOUNT_ACCOUNT_TEMPLATE t81 ON t1.REFUND_ACCOUNT_ID = t81.ID LEFT JOIN RES_USERS t91 ON t1.CREATE_UID = t91.ID LEFT JOIN RES_PARTNER t101 ON t91.PARTNER_ID = t101.ID ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.ACCOUNT_ID, t71.NAME AS ACCOUNT_ID_TEXT, t1.ACTIVE, t1.AMOUNT, t1.AMOUNT_TYPE, t1.ANALYTIC, t1.CASH_BASIS_ACCOUNT_ID, t11.NAME AS CASH_BASIS_ACCOUNT_ID_TEXT, t1.CASH_BASIS_BASE_ACCOUNT_ID, t51.NAME AS CASH_BASIS_BASE_ACCOUNT_ID_TEXT, t1.CHART_TEMPLATE_ID, t21.NAME AS CHART_TEMPLATE_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t101.NAME AS CREATE_UID_TEXT, t1.DESCRIPTION, t1.ID, t1.INCLUDE_BASE_AMOUNT, t1.NAME, t1.PRICE_INCLUDE, t1.REFUND_ACCOUNT_ID, t81.NAME AS REFUND_ACCOUNT_ID_TEXT, t1.SEQUENCE, t1.TAX_EXIGIBILITY, t1.TAX_GROUP_ID, t61.NAME AS TAX_GROUP_ID_TEXT, t1.TYPE_TAX_USE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM ACCOUNT_TAX_TEMPLATE t1 LEFT JOIN ACCOUNT_ACCOUNT_TEMPLATE t11 ON t1.CASH_BASIS_ACCOUNT_ID = t11.ID LEFT JOIN ACCOUNT_CHART_TEMPLATE t21 ON t1.CHART_TEMPLATE_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 ACCOUNT_ACCOUNT_TEMPLATE t51 ON t1.CASH_BASIS_BASE_ACCOUNT_ID = t51.ID LEFT JOIN ACCOUNT_TAX_GROUP t61 ON t1.TAX_GROUP_ID = t61.ID LEFT JOIN ACCOUNT_ACCOUNT_TEMPLATE t71 ON t1.ACCOUNT_ID = t71.ID LEFT JOIN ACCOUNT_ACCOUNT_TEMPLATE t81 ON t1.REFUND_ACCOUNT_ID = t81.ID LEFT JOIN RES_USERS t91 ON t1.CREATE_UID = t91.ID LEFT JOIN RES_PARTNER t101 ON t91.PARTNER_ID = t101.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.ACCOUNT_ID, t71.NAME AS ACCOUNT_ID_TEXT, t1.ACTIVE, t1.AMOUNT, t1.AMOUNT_TYPE, t1.ANALYTIC, t1.CASH_BASIS_ACCOUNT_ID, t11.NAME AS CASH_BASIS_ACCOUNT_ID_TEXT, t1.CASH_BASIS_BASE_ACCOUNT_ID, t51.NAME AS CASH_BASIS_BASE_ACCOUNT_ID_TEXT, t1.CHART_TEMPLATE_ID, t21.NAME AS CHART_TEMPLATE_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t101.NAME AS CREATE_UID_TEXT, t1.DESCRIPTION, t1.ID, t1.INCLUDE_BASE_AMOUNT, t1.NAME, t1.PRICE_INCLUDE, t1.REFUND_ACCOUNT_ID, t81.NAME AS REFUND_ACCOUNT_ID_TEXT, t1.SEQUENCE, t1.TAX_EXIGIBILITY, t1.TAX_GROUP_ID, t61.NAME AS TAX_GROUP_ID_TEXT, t1.TYPE_TAX_USE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM ACCOUNT_TAX_TEMPLATE t1 LEFT JOIN ACCOUNT_ACCOUNT_TEMPLATE t11 ON t1.CASH_BASIS_ACCOUNT_ID = t11.ID LEFT JOIN ACCOUNT_CHART_TEMPLATE t21 ON t1.CHART_TEMPLATE_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 ACCOUNT_ACCOUNT_TEMPLATE t51 ON t1.CASH_BASIS_BASE_ACCOUNT_ID = t51.ID LEFT JOIN ACCOUNT_TAX_GROUP t61 ON t1.TAX_GROUP_ID = t61.ID LEFT JOIN ACCOUNT_ACCOUNT_TEMPLATE t71 ON t1.ACCOUNT_ID = t71.ID LEFT JOIN ACCOUNT_ACCOUNT_TEMPLATE t81 ON t1.REFUND_ACCOUNT_ID = t81.ID LEFT JOIN RES_USERS t91 ON t1.CREATE_UID = t91.ID LEFT JOIN RES_PARTNER t101 ON t91.PARTNER_ID = t101.ID
<![CDATA[select t1.* from (SELECT t1.ADDED, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.STATE, t1.UPDATED, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM BASE_MODULE_UPDATE 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 ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.ADDED, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.STATE, t1.UPDATED, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM BASE_MODULE_UPDATE 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
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.ADDED, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.STATE, t1.UPDATED, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM BASE_MODULE_UPDATE 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
<![CDATA[select t1.* from (SELECT (SELECT array_to_json(array_agg(t.*)) FROM (SELECT m1.CATEGORY_ID as srfkey, m2.NAME AS srfmajortext FROM res_partner_res_partner_category_rel m1 LEFT JOIN RES_PARTNER_CATEGORY m2 ON m1.CATEGORY_ID = m2.ID where m1.partner_id =t1.id ) t) AS CATEGORY_ID, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.TYPE, t1.VAT FROM RES_PARTNER t1 ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT (SELECT ARRAY_TO_JSON(ARRAY_AGG(T.*)) FROM (SELECT M2.ID AS SRFKEY, M2.NAME AS SRFMAJORTEXT FROM RES_PARTNER_RES_PARTNER_CATEGORY_REL M1 LEFT JOIN RES_PARTNER_CATEGORY M2 ON M1.CATEGORY_ID = M2.ID WHERE M1.PARTNER_ID =T1.ID ) T) AS CATEGORY_ID, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.TYPE, t1.VAT FROM RES_PARTNER t1 ) t1 where id=#{id}]]>
<![CDATA[ SELECT (SELECT array_to_json(array_agg(t.*)) FROM (SELECT m1.CATEGORY_ID as srfkey, m2.NAME AS srfmajortext FROM res_partner_res_partner_category_rel m1 LEFT JOIN RES_PARTNER_CATEGORY m2 ON m1.CATEGORY_ID = m2.ID where m1.partner_id =t1.id ) t) AS CATEGORY_ID, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.TYPE, t1.VAT FROM RES_PARTNER t1
<![CDATA[ SELECT (SELECT ARRAY_TO_JSON(ARRAY_AGG(T.*)) FROM (SELECT M2.ID AS SRFKEY, M2.NAME AS SRFMAJORTEXT FROM RES_PARTNER_RES_PARTNER_CATEGORY_REL M1 LEFT JOIN RES_PARTNER_CATEGORY M2 ON M1.CATEGORY_ID = M2.ID WHERE M1.PARTNER_ID =T1.ID ) T) AS CATEGORY_ID, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.TYPE, t1.VAT FROM RES_PARTNER t1
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM RES_USERS_LOG 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 ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM RES_USERS_LOG 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
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM RES_USERS_LOG 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
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.VALUE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM BASE_IMPORT_TESTS_MODELS_M2O_REQUIRED 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 ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.VALUE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM BASE_IMPORT_TESTS_MODELS_M2O_REQUIRED 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
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.VALUE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM BASE_IMPORT_TESTS_MODELS_M2O_REQUIRED 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
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.DEADLINE, t1.EVENT_ID, t21.NAME AS EVENT_ID_TEXT, t1.EVENT_TYPE_ID, t11.NAME AS EVENT_TYPE_ID_TEXT, t1.ID, t1.NAME, t1.PRICE, t1.PRODUCT_ID, t81.NAME AS PRODUCT_ID_TEXT, t1.SEATS_AVAILABILITY, t1.SEATS_AVAILABLE, t1.SEATS_MAX, t1.SEATS_RESERVED, t1.SEATS_UNCONFIRMED, t1.SEATS_USED, t1.WRITE_DATE, t1.WRITE_UID, t61.NAME AS WRITE_UID_TEXT FROM EVENT_EVENT_TICKET t1 LEFT JOIN EVENT_TYPE t11 ON t1.EVENT_TYPE_ID = t11.ID LEFT JOIN EVENT_EVENT t21 ON t1.EVENT_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_USERS t51 ON t1.WRITE_UID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN PRODUCT_PRODUCT t71 ON t1.PRODUCT_ID = t71.ID LEFT JOIN PRODUCT_TEMPLATE t81 ON t71.PRODUCT_TMPL_ID = t81.ID ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.DEADLINE, t1.EVENT_ID, t21.NAME AS EVENT_ID_TEXT, t1.EVENT_TYPE_ID, t11.NAME AS EVENT_TYPE_ID_TEXT, t1.ID, t1.NAME, t1.PRICE, t1.PRODUCT_ID, t81.NAME AS PRODUCT_ID_TEXT, t1.SEATS_AVAILABILITY, t1.SEATS_AVAILABLE, t1.SEATS_MAX, t1.SEATS_RESERVED, t1.SEATS_UNCONFIRMED, t1.SEATS_USED, t1.WRITE_DATE, t1.WRITE_UID, t61.NAME AS WRITE_UID_TEXT FROM EVENT_EVENT_TICKET t1 LEFT JOIN EVENT_TYPE t11 ON t1.EVENT_TYPE_ID = t11.ID LEFT JOIN EVENT_EVENT t21 ON t1.EVENT_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_USERS t51 ON t1.WRITE_UID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN PRODUCT_PRODUCT t71 ON t1.PRODUCT_ID = t71.ID LEFT JOIN PRODUCT_TEMPLATE t81 ON t71.PRODUCT_TMPL_ID = t81.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.DEADLINE, t1.EVENT_ID, t21.NAME AS EVENT_ID_TEXT, t1.EVENT_TYPE_ID, t11.NAME AS EVENT_TYPE_ID_TEXT, t1.ID, t1.NAME, t1.PRICE, t1.PRODUCT_ID, t81.NAME AS PRODUCT_ID_TEXT, t1.SEATS_AVAILABILITY, t1.SEATS_AVAILABLE, t1.SEATS_MAX, t1.SEATS_RESERVED, t1.SEATS_UNCONFIRMED, t1.SEATS_USED, t1.WRITE_DATE, t1.WRITE_UID, t61.NAME AS WRITE_UID_TEXT FROM EVENT_EVENT_TICKET t1 LEFT JOIN EVENT_TYPE t11 ON t1.EVENT_TYPE_ID = t11.ID LEFT JOIN EVENT_EVENT t21 ON t1.EVENT_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_USERS t51 ON t1.WRITE_UID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN PRODUCT_PRODUCT t71 ON t1.PRODUCT_ID = t71.ID LEFT JOIN PRODUCT_TEMPLATE t81 ON t71.PRODUCT_TMPL_ID = t81.ID
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t31.NAME AS CREATE_UID_TEXT, t1.EVENT_TYPE_ID, t11.NAME AS EVENT_TYPE_ID_TEXT, t1.ID, t1.INTERVAL_NBR, t1.INTERVAL_TYPE, t1.INTERVAL_UNIT, t1.TEMPLATE_ID, t61.NAME AS TEMPLATE_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t51.NAME AS WRITE_UID_TEXT FROM EVENT_TYPE_MAIL t1 LEFT JOIN EVENT_TYPE t11 ON t1.EVENT_TYPE_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.CREATE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.WRITE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN MAIL_TEMPLATE t61 ON t1.TEMPLATE_ID = t61.ID ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t31.NAME AS CREATE_UID_TEXT, t1.EVENT_TYPE_ID, t11.NAME AS EVENT_TYPE_ID_TEXT, t1.ID, t1.INTERVAL_NBR, t1.INTERVAL_TYPE, t1.INTERVAL_UNIT, t1.TEMPLATE_ID, t61.NAME AS TEMPLATE_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t51.NAME AS WRITE_UID_TEXT FROM EVENT_TYPE_MAIL t1 LEFT JOIN EVENT_TYPE t11 ON t1.EVENT_TYPE_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.CREATE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.WRITE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN MAIL_TEMPLATE t61 ON t1.TEMPLATE_ID = t61.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t31.NAME AS CREATE_UID_TEXT, t1.EVENT_TYPE_ID, t11.NAME AS EVENT_TYPE_ID_TEXT, t1.ID, t1.INTERVAL_NBR, t1.INTERVAL_TYPE, t1.INTERVAL_UNIT, t1.TEMPLATE_ID, t61.NAME AS TEMPLATE_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t51.NAME AS WRITE_UID_TEXT FROM EVENT_TYPE_MAIL t1 LEFT JOIN EVENT_TYPE t11 ON t1.EVENT_TYPE_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.CREATE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.WRITE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN MAIL_TEMPLATE t61 ON t1.TEMPLATE_ID = t61.ID
<![CDATA[select t1.* from (SELECT t1.ACQUISITION_DATE, t1.ACTIVE, t1.BRAND_ID, t91.NAME AS BRAND_ID_TEXT, t1.CAR_VALUE, t1.CO2, t1.COLOR, t1.COMPANY_ID, t21.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t71.NAME AS CREATE_UID_TEXT, t1.DOORS, t1.DRIVER_ID, t51.NAME AS DRIVER_ID_TEXT, t1.FIRST_CONTRACT_DATE, t1.FUEL_TYPE, t1.HORSEPOWER, t1.HORSEPOWER_TAX, t1.ID, t1.LICENSE_PLATE, t1.LOCATION, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.MODEL_ID, t81.NAME AS MODEL_ID_TEXT, t1.MODEL_YEAR, t1.NAME, t1.ODOMETER_UNIT, t1.POWER, t1.RESIDUAL_VALUE, t1.SEATS, t1.STATE_ID, t101.NAME AS STATE_ID_TEXT, t1.TRANSMISSION, t1.VIN_SN, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM FLEET_VEHICLE t1 LEFT JOIN RES_COMPANY t11 ON t1.COMPANY_ID = 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 RES_PARTNER t51 ON t1.DRIVER_ID = t51.ID LEFT JOIN RES_USERS t61 ON t1.CREATE_UID = t61.ID LEFT JOIN RES_PARTNER t71 ON t61.PARTNER_ID = t71.ID LEFT JOIN FLEET_VEHICLE_MODEL t81 ON t1.MODEL_ID = t81.ID LEFT JOIN FLEET_VEHICLE_MODEL_BRAND t91 ON t1.BRAND_ID = t91.ID LEFT JOIN FLEET_VEHICLE_STATE t101 ON t1.STATE_ID = t101.ID ) t1 where id=#{id}]]>
<![CDATA[ SELECT t1.ACQUISITION_DATE, t1.ACTIVE, t1.BRAND_ID, t91.NAME AS BRAND_ID_TEXT, t1.CAR_VALUE, t1.CO2, t1.COLOR, t1.COMPANY_ID, t21.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t71.NAME AS CREATE_UID_TEXT, t1.DOORS, t1.DRIVER_ID, t51.NAME AS DRIVER_ID_TEXT, t1.FIRST_CONTRACT_DATE, t1.FUEL_TYPE, t1.HORSEPOWER, t1.HORSEPOWER_TAX, t1.ID, t1.LICENSE_PLATE, t1.LOCATION, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.MODEL_ID, t81.NAME AS MODEL_ID_TEXT, t1.MODEL_YEAR, t1.NAME, t1.ODOMETER_UNIT, t1.POWER, t1.RESIDUAL_VALUE, t1.SEATS, t1.STATE_ID, t101.NAME AS STATE_ID_TEXT, t1.TRANSMISSION, t1.VIN_SN, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM FLEET_VEHICLE t1 LEFT JOIN RES_COMPANY t11 ON t1.COMPANY_ID = 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 RES_PARTNER t51 ON t1.DRIVER_ID = t51.ID LEFT JOIN RES_USERS t61 ON t1.CREATE_UID = t61.ID LEFT JOIN RES_PARTNER t71 ON t61.PARTNER_ID = t71.ID LEFT JOIN FLEET_VEHICLE_MODEL t81 ON t1.MODEL_ID = t81.ID LEFT JOIN FLEET_VEHICLE_MODEL_BRAND t91 ON t1.BRAND_ID = t91.ID LEFT JOIN FLEET_VEHICLE_STATE t101 ON t1.STATE_ID = t101.ID
<![CDATA[ SELECT t1.ACQUISITION_DATE, t1.ACTIVE, t1.BRAND_ID, t91.NAME AS BRAND_ID_TEXT, t1.CAR_VALUE, t1.CO2, t1.COLOR, t1.COMPANY_ID, t21.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t71.NAME AS CREATE_UID_TEXT, t1.DOORS, t1.DRIVER_ID, t51.NAME AS DRIVER_ID_TEXT, t1.FIRST_CONTRACT_DATE, t1.FUEL_TYPE, t1.HORSEPOWER, t1.HORSEPOWER_TAX, t1.ID, t1.LICENSE_PLATE, t1.LOCATION, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.MODEL_ID, t81.NAME AS MODEL_ID_TEXT, t1.MODEL_YEAR, t1.NAME, t1.ODOMETER_UNIT, t1.POWER, t1.RESIDUAL_VALUE, t1.SEATS, t1.STATE_ID, t101.NAME AS STATE_ID_TEXT, t1.TRANSMISSION, t1.VIN_SN, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM FLEET_VEHICLE t1 LEFT JOIN RES_COMPANY t11 ON t1.COMPANY_ID = 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 RES_PARTNER t51 ON t1.DRIVER_ID = t51.ID LEFT JOIN RES_USERS t61 ON t1.CREATE_UID = t61.ID LEFT JOIN RES_PARTNER t71 ON t61.PARTNER_ID = t71.ID LEFT JOIN FLEET_VEHICLE_MODEL t81 ON t1.MODEL_ID = t81.ID LEFT JOIN FLEET_VEHICLE_MODEL_BRAND t91 ON t1.BRAND_ID = t91.ID LEFT JOIN FLEET_VEHICLE_STATE t101 ON t1.STATE_ID = t101.ID
]]>
]]>
</sql>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.ACQUISITION_DATE, t1.ACTIVE, t1.BRAND_ID, t91.NAME AS BRAND_ID_TEXT, t1.CAR_VALUE, t1.CO2, t1.COLOR, t1.COMPANY_ID, t21.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t71.NAME AS CREATE_UID_TEXT, t1.DOORS, t1.DRIVER_ID, t51.NAME AS DRIVER_ID_TEXT, t1.FIRST_CONTRACT_DATE, t1.FUEL_TYPE, t1.HORSEPOWER, t1.HORSEPOWER_TAX, t1.ID, t1.LICENSE_PLATE, t1.LOCATION, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.MODEL_ID, t81.NAME AS MODEL_ID_TEXT, t1.MODEL_YEAR, t1.NAME, t1.ODOMETER_UNIT, t1.POWER, t1.RESIDUAL_VALUE, t1.SEATS, t1.STATE_ID, t101.NAME AS STATE_ID_TEXT, t1.TRANSMISSION, t1.VIN_SN, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM FLEET_VEHICLE t1 LEFT JOIN RES_COMPANY t11 ON t1.COMPANY_ID = 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 RES_PARTNER t51 ON t1.DRIVER_ID = t51.ID LEFT JOIN RES_USERS t61 ON t1.CREATE_UID = t61.ID LEFT JOIN RES_PARTNER t71 ON t61.PARTNER_ID = t71.ID LEFT JOIN FLEET_VEHICLE_MODEL t81 ON t1.MODEL_ID = t81.ID LEFT JOIN FLEET_VEHICLE_MODEL_BRAND t91 ON t1.BRAND_ID = t91.ID LEFT JOIN FLEET_VEHICLE_STATE t101 ON t1.STATE_ID = t101.ID
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.DATE_END, t1.DATE_START, t1.DRIVER_ID, t21.NAME AS DRIVER_ID_TEXT, t1.ID, t1.VEHICLE_ID, t11.NAME AS VEHICLE_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t61.NAME AS WRITE_UID_TEXT FROM FLEET_VEHICLE_ASSIGNATION_LOG t1 LEFT JOIN FLEET_VEHICLE t11 ON t1.VEHICLE_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t1.DRIVER_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_USERS t51 ON t1.WRITE_UID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.DATE_END, t1.DATE_START, t1.DRIVER_ID, t21.NAME AS DRIVER_ID_TEXT, t1.ID, t1.VEHICLE_ID, t11.NAME AS VEHICLE_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t61.NAME AS WRITE_UID_TEXT FROM FLEET_VEHICLE_ASSIGNATION_LOG t1 LEFT JOIN FLEET_VEHICLE t11 ON t1.VEHICLE_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t1.DRIVER_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_USERS t51 ON t1.WRITE_UID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.DATE_END, t1.DATE_START, t1.DRIVER_ID, t21.NAME AS DRIVER_ID_TEXT, t1.ID, t1.VEHICLE_ID, t11.NAME AS VEHICLE_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t61.NAME AS WRITE_UID_TEXT FROM FLEET_VEHICLE_ASSIGNATION_LOG t1 LEFT JOIN FLEET_VEHICLE t11 ON t1.VEHICLE_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t1.DRIVER_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_USERS t51 ON t1.WRITE_UID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID
<![CDATA[select t1.* from (SELECT t1.CHALLENGE_ID, t41.NAME AS CHALLENGE_ID_TEXT, t1.CLOSED, t11.COMPUTATION_MODE, t1.CREATE_DATE, t1.CREATE_UID, t31.NAME AS CREATE_UID_TEXT, t1.CURRENT, t11.CONDITION AS DEFINITION_CONDITION, t11.DESCRIPTION AS DEFINITION_DESCRIPTION, t11.DISPLAY_MODE AS DEFINITION_DISPLAY, t1.DEFINITION_ID, t11.NAME AS DEFINITION_ID_TEXT, t1.END_DATE, t1.ID, t1.LAST_UPDATE, t1.LINE_ID, t81.NAME AS LINE_ID_TEXT, t1.REMIND_UPDATE_DELAY, t1.START_DATE, t1.STATE, t1.TARGET_GOAL, t1.TO_UPDATE, t1.USER_ID, t101.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t61.NAME AS WRITE_UID_TEXT FROM GAMIFICATION_GOAL t1 LEFT JOIN GAMIFICATION_GOAL_DEFINITION t11 ON t1.DEFINITION_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.CREATE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN GAMIFICATION_CHALLENGE t41 ON t1.CHALLENGE_ID = t41.ID LEFT JOIN RES_USERS t51 ON t1.WRITE_UID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN GAMIFICATION_CHALLENGE_LINE t71 ON t1.LINE_ID = t71.ID LEFT JOIN GAMIFICATION_GOAL_DEFINITION t81 ON t71.DEFINITION_ID = t81.ID LEFT JOIN RES_USERS t91 ON t1.USER_ID = t91.ID LEFT JOIN RES_PARTNER t101 ON t91.PARTNER_ID = t101.ID ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.CHALLENGE_ID, t31.NAME AS CHALLENGE_ID_TEXT, t1.CLOSED, t61.COMPUTATION_MODE, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.CURRENT, t61.CONDITION AS DEFINITION_CONDITION, t61.DISPLAY_MODE AS DEFINITION_DISPLAY, t1.DEFINITION_ID, t61.NAME AS DEFINITION_ID_TEXT, t1.END_DATE, t1.ID, t1.LAST_UPDATE, t1.LINE_ID, t81.NAME AS LINE_ID_TEXT, t1.REMIND_UPDATE_DELAY, t1.START_DATE, t1.STATE, t1.TARGET_GOAL, t1.TO_UPDATE, t1.USER_ID, t101.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t51.NAME AS WRITE_UID_TEXT FROM GAMIFICATION_GOAL 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 GAMIFICATION_CHALLENGE t31 ON t1.CHALLENGE_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.WRITE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN GAMIFICATION_GOAL_DEFINITION t61 ON t1.DEFINITION_ID = t61.ID LEFT JOIN GAMIFICATION_CHALLENGE_LINE t71 ON t1.LINE_ID = t71.ID LEFT JOIN GAMIFICATION_GOAL_DEFINITION t81 ON t71.DEFINITION_ID = t81.ID LEFT JOIN RES_USERS t91 ON t1.USER_ID = t91.ID LEFT JOIN RES_PARTNER t101 ON t91.PARTNER_ID = t101.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.CHALLENGE_ID, t41.NAME AS CHALLENGE_ID_TEXT, t1.CLOSED, t11.COMPUTATION_MODE, t1.CREATE_DATE, t1.CREATE_UID, t31.NAME AS CREATE_UID_TEXT, t1.CURRENT, t11.CONDITION AS DEFINITION_CONDITION, t11.DESCRIPTION AS DEFINITION_DESCRIPTION, t11.DISPLAY_MODE AS DEFINITION_DISPLAY, t1.DEFINITION_ID, t11.NAME AS DEFINITION_ID_TEXT, t1.END_DATE, t1.ID, t1.LAST_UPDATE, t1.LINE_ID, t81.NAME AS LINE_ID_TEXT, t1.REMIND_UPDATE_DELAY, t1.START_DATE, t1.STATE, t1.TARGET_GOAL, t1.TO_UPDATE, t1.USER_ID, t101.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t61.NAME AS WRITE_UID_TEXT FROM GAMIFICATION_GOAL t1 LEFT JOIN GAMIFICATION_GOAL_DEFINITION t11 ON t1.DEFINITION_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.CREATE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN GAMIFICATION_CHALLENGE t41 ON t1.CHALLENGE_ID = t41.ID LEFT JOIN RES_USERS t51 ON t1.WRITE_UID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN GAMIFICATION_CHALLENGE_LINE t71 ON t1.LINE_ID = t71.ID LEFT JOIN GAMIFICATION_GOAL_DEFINITION t81 ON t71.DEFINITION_ID = t81.ID LEFT JOIN RES_USERS t91 ON t1.USER_ID = t91.ID LEFT JOIN RES_PARTNER t101 ON t91.PARTNER_ID = t101.ID
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.SEQUENCE, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM HR_CONTRACT_TYPE 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 ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.SEQUENCE, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM HR_CONTRACT_TYPE 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
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.SEQUENCE, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM HR_CONTRACT_TYPE 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
<![CDATA[select t1.* from (SELECT t1.COLOR, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM HR_EMPLOYEE_CATEGORY 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 ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.COLOR, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM HR_EMPLOYEE_CATEGORY 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
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.COLOR, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM HR_EMPLOYEE_CATEGORY 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
<![CDATA[select t1.* from (SELECT t1.ACCOUNTING_DATE, t1.ACCOUNT_MOVE_ID, t101.NAME AS ACCOUNT_MOVE_ID_TEXT, t1.ADDRESS_ID, t121.NAME AS ADDRESS_ID_TEXT, t1.BANK_JOURNAL_ID, t51.NAME AS BANK_JOURNAL_ID_TEXT, t1.COMPANY_ID, t161.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t141.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t111.NAME AS CURRENCY_ID_TEXT, t1.DEPARTMENT_ID, t41.NAME AS DEPARTMENT_ID_TEXT, t1.EMPLOYEE_ID, t71.NAME AS EMPLOYEE_ID_TEXT, t1.ID, t1.JOURNAL_ID, t11.NAME AS JOURNAL_ID_TEXT, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.NAME, t1.STATE, t1.TOTAL_AMOUNT, t1.USER_ID, t31.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t91.NAME AS WRITE_UID_TEXT FROM HR_EXPENSE_SHEET t1 LEFT JOIN ACCOUNT_JOURNAL t11 ON t1.JOURNAL_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.USER_ID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN HR_DEPARTMENT t41 ON t1.DEPARTMENT_ID = t41.ID LEFT JOIN ACCOUNT_JOURNAL t51 ON t1.BANK_JOURNAL_ID = t51.ID LEFT JOIN HR_EMPLOYEE t61 ON t1.EMPLOYEE_ID = t61.ID LEFT JOIN RESOURCE_RESOURCE t71 ON t61.RESOURCE_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_MOVE t101 ON t1.ACCOUNT_MOVE_ID = t101.ID LEFT JOIN RES_CURRENCY t111 ON t1.CURRENCY_ID = t111.ID LEFT JOIN RES_PARTNER t121 ON t1.ADDRESS_ID = t121.ID LEFT JOIN RES_USERS t131 ON t1.CREATE_UID = t131.ID LEFT JOIN RES_PARTNER t141 ON t131.PARTNER_ID = t141.ID LEFT JOIN RES_COMPANY t151 ON t1.COMPANY_ID = t151.ID LEFT JOIN RES_PARTNER t161 ON t151.PARTNER_ID = t161.ID ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.ACCOUNTING_DATE, t1.ACCOUNT_MOVE_ID, t101.NAME AS ACCOUNT_MOVE_ID_TEXT, t1.ADDRESS_ID, t121.NAME AS ADDRESS_ID_TEXT, t1.BANK_JOURNAL_ID, t51.NAME AS BANK_JOURNAL_ID_TEXT, t1.COMPANY_ID, t161.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t141.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t111.NAME AS CURRENCY_ID_TEXT, t1.DEPARTMENT_ID, t41.NAME AS DEPARTMENT_ID_TEXT, t1.EMPLOYEE_ID, t71.NAME AS EMPLOYEE_ID_TEXT, t1.ID, t1.JOURNAL_ID, t11.NAME AS JOURNAL_ID_TEXT, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.NAME, t1.STATE, t1.TOTAL_AMOUNT, t1.USER_ID, t31.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t91.NAME AS WRITE_UID_TEXT FROM HR_EXPENSE_SHEET t1 LEFT JOIN ACCOUNT_JOURNAL t11 ON t1.JOURNAL_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.USER_ID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN HR_DEPARTMENT t41 ON t1.DEPARTMENT_ID = t41.ID LEFT JOIN ACCOUNT_JOURNAL t51 ON t1.BANK_JOURNAL_ID = t51.ID LEFT JOIN HR_EMPLOYEE t61 ON t1.EMPLOYEE_ID = t61.ID LEFT JOIN RESOURCE_RESOURCE t71 ON t61.RESOURCE_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_MOVE t101 ON t1.ACCOUNT_MOVE_ID = t101.ID LEFT JOIN RES_CURRENCY t111 ON t1.CURRENCY_ID = t111.ID LEFT JOIN RES_PARTNER t121 ON t1.ADDRESS_ID = t121.ID LEFT JOIN RES_USERS t131 ON t1.CREATE_UID = t131.ID LEFT JOIN RES_PARTNER t141 ON t131.PARTNER_ID = t141.ID LEFT JOIN RES_COMPANY t151 ON t1.COMPANY_ID = t151.ID LEFT JOIN RES_PARTNER t161 ON t151.PARTNER_ID = t161.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.ACCOUNTING_DATE, t1.ACCOUNT_MOVE_ID, t101.NAME AS ACCOUNT_MOVE_ID_TEXT, t1.ADDRESS_ID, t121.NAME AS ADDRESS_ID_TEXT, t1.BANK_JOURNAL_ID, t51.NAME AS BANK_JOURNAL_ID_TEXT, t1.COMPANY_ID, t161.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t141.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t111.NAME AS CURRENCY_ID_TEXT, t1.DEPARTMENT_ID, t41.NAME AS DEPARTMENT_ID_TEXT, t1.EMPLOYEE_ID, t71.NAME AS EMPLOYEE_ID_TEXT, t1.ID, t1.JOURNAL_ID, t11.NAME AS JOURNAL_ID_TEXT, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.NAME, t1.STATE, t1.TOTAL_AMOUNT, t1.USER_ID, t31.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t91.NAME AS WRITE_UID_TEXT FROM HR_EXPENSE_SHEET t1 LEFT JOIN ACCOUNT_JOURNAL t11 ON t1.JOURNAL_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.USER_ID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN HR_DEPARTMENT t41 ON t1.DEPARTMENT_ID = t41.ID LEFT JOIN ACCOUNT_JOURNAL t51 ON t1.BANK_JOURNAL_ID = t51.ID LEFT JOIN HR_EMPLOYEE t61 ON t1.EMPLOYEE_ID = t61.ID LEFT JOIN RESOURCE_RESOURCE t71 ON t61.RESOURCE_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_MOVE t101 ON t1.ACCOUNT_MOVE_ID = t101.ID LEFT JOIN RES_CURRENCY t111 ON t1.CURRENCY_ID = t111.ID LEFT JOIN RES_PARTNER t121 ON t1.ADDRESS_ID = t121.ID LEFT JOIN RES_USERS t131 ON t1.CREATE_UID = t131.ID LEFT JOIN RES_PARTNER t141 ON t131.PARTNER_ID = t141.ID LEFT JOIN RES_COMPANY t151 ON t1.COMPANY_ID = t151.ID LEFT JOIN RES_PARTNER t161 ON t151.PARTNER_ID = t161.ID
<![CDATA[select t1.* from (SELECT t1.ACTIVE, t1.CATEGORY_ID, t61.NAME AS CATEGORY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.DESCRIPTION, t1.ID, t1.NAME, t1.PRICE, t1.SUPPLIER, t31.NAME AS SUPPLIER_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t51.NAME AS WRITE_UID_TEXT FROM LUNCH_PRODUCT 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_PARTNER t31 ON t1.SUPPLIER = t31.ID LEFT JOIN RES_USERS t41 ON t1.WRITE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN LUNCH_PRODUCT_CATEGORY t61 ON t1.CATEGORY_ID = t61.ID ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVE, t1.CATEGORY_ID, t61.NAME AS CATEGORY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.PRICE, t1.SUPPLIER, t31.NAME AS SUPPLIER_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t51.NAME AS WRITE_UID_TEXT FROM LUNCH_PRODUCT 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_PARTNER t31 ON t1.SUPPLIER = t31.ID LEFT JOIN RES_USERS t41 ON t1.WRITE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN LUNCH_PRODUCT_CATEGORY t61 ON t1.CATEGORY_ID = t61.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVE, t1.CATEGORY_ID, t61.NAME AS CATEGORY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.DESCRIPTION, t1.ID, t1.NAME, t1.PRICE, t1.SUPPLIER, t31.NAME AS SUPPLIER_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t51.NAME AS WRITE_UID_TEXT FROM LUNCH_PRODUCT 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_PARTNER t31 ON t1.SUPPLIER = t31.ID LEFT JOIN RES_USERS t41 ON t1.WRITE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN LUNCH_PRODUCT_CATEGORY t61 ON t1.CATEGORY_ID = t61.ID
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.PRECISION, t1.RATIO, t1.RATIO_TYPE, t1.ROUNDING_TYPE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM MRO_PM_METER_RATIO 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 ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.PRECISION, t1.RATIO, t1.RATIO_TYPE, t1.ROUNDING_TYPE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM MRO_PM_METER_RATIO 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
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.PRECISION, t1.RATIO, t1.RATIO_TYPE, t1.ROUNDING_TYPE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM MRO_PM_METER_RATIO 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
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t31.NAME AS CREATE_UID_TEXT, t1.ID, t1.LOT_ID, t71.NAME AS LOT_ID_TEXT, t1.PRODUCTION_ID, t41.NAME AS PRODUCTION_ID_TEXT, t1.PRODUCT_ID, t61.NAME AS PRODUCT_ID_TEXT, t1.PRODUCT_QTY, t61.TRACKING AS PRODUCT_TRACKING, t1.PRODUCT_UOM_ID, t11.NAME AS PRODUCT_UOM_ID_TEXT, t1.SERIAL, t1.WRITE_DATE, t1.WRITE_UID, t91.NAME AS WRITE_UID_TEXT FROM MRP_PRODUCT_PRODUCE t1 LEFT JOIN UOM_UOM t11 ON t1.PRODUCT_UOM_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.CREATE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN MRP_PRODUCTION t41 ON t1.PRODUCTION_ID = t41.ID LEFT JOIN PRODUCT_PRODUCT t51 ON t1.PRODUCT_ID = t51.ID LEFT JOIN PRODUCT_TEMPLATE t61 ON t51.PRODUCT_TMPL_ID = t61.ID LEFT JOIN STOCK_PRODUCTION_LOT t71 ON t1.LOT_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 ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t31.NAME AS CREATE_UID_TEXT, t1.ID, t1.LOT_ID, t71.NAME AS LOT_ID_TEXT, t1.PRODUCTION_ID, t41.NAME AS PRODUCTION_ID_TEXT, t1.PRODUCT_ID, t61.NAME AS PRODUCT_ID_TEXT, t1.PRODUCT_QTY, t61.TRACKING AS PRODUCT_TRACKING, t1.PRODUCT_UOM_ID, t11.NAME AS PRODUCT_UOM_ID_TEXT, t1.SERIAL, t1.WRITE_DATE, t1.WRITE_UID, t91.NAME AS WRITE_UID_TEXT FROM MRP_PRODUCT_PRODUCE t1 LEFT JOIN UOM_UOM t11 ON t1.PRODUCT_UOM_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.CREATE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN MRP_PRODUCTION t41 ON t1.PRODUCTION_ID = t41.ID LEFT JOIN PRODUCT_PRODUCT t51 ON t1.PRODUCT_ID = t51.ID LEFT JOIN PRODUCT_TEMPLATE t61 ON t51.PRODUCT_TMPL_ID = t61.ID LEFT JOIN STOCK_PRODUCTION_LOT t71 ON t1.LOT_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
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t31.NAME AS CREATE_UID_TEXT, t1.ID, t1.LOT_ID, t71.NAME AS LOT_ID_TEXT, t1.PRODUCTION_ID, t41.NAME AS PRODUCTION_ID_TEXT, t1.PRODUCT_ID, t61.NAME AS PRODUCT_ID_TEXT, t1.PRODUCT_QTY, t61.TRACKING AS PRODUCT_TRACKING, t1.PRODUCT_UOM_ID, t11.NAME AS PRODUCT_UOM_ID_TEXT, t1.SERIAL, t1.WRITE_DATE, t1.WRITE_UID, t91.NAME AS WRITE_UID_TEXT FROM MRP_PRODUCT_PRODUCE t1 LEFT JOIN UOM_UOM t11 ON t1.PRODUCT_UOM_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.CREATE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN MRP_PRODUCTION t41 ON t1.PRODUCTION_ID = t41.ID LEFT JOIN PRODUCT_PRODUCT t51 ON t1.PRODUCT_ID = t51.ID LEFT JOIN PRODUCT_TEMPLATE t61 ON t51.PRODUCT_TMPL_ID = t61.ID LEFT JOIN STOCK_PRODUCTION_LOT t71 ON t1.LOT_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
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.FOLD, t1.ID, t1.NAME, t1.SEQUENCE, t1.USER_ID, t61.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM NOTE_STAGE 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_USERS t51 ON t1.USER_ID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.FOLD, t1.ID, t1.NAME, t1.SEQUENCE, t1.USER_ID, t61.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM NOTE_STAGE 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_USERS t51 ON t1.USER_ID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.FOLD, t1.ID, t1.NAME, t1.SEQUENCE, t1.USER_ID, t61.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM NOTE_STAGE 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_USERS t51 ON t1.USER_ID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.NOTE, t1.RES_ID, t1.RES_MODEL, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM PORTAL_SHARE 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 ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.RES_ID, t1.RES_MODEL, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM PORTAL_SHARE 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
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.NOTE, t1.RES_ID, t1.RES_MODEL, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM PORTAL_SHARE 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
<![CDATA[select t1.* from (SELECT t1.APPLIED_ON, t1.BASE, t1.BASE_PRICELIST_ID, t41.NAME AS BASE_PRICELIST_ID_TEXT, t1.CATEG_ID, t31.NAME AS CATEG_ID_TEXT, t1.COMPANY_ID, t111.NAME AS COMPANY_ID_TEXT, t1.COMPUTE_PRICE, t1.CREATE_DATE, t1.CREATE_UID, t91.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t21.NAME AS CURRENCY_ID_TEXT, t1.DATE_END, t1.DATE_START, t1.FIXED_PRICE, t1.ID, t1.MIN_QUANTITY, t1.PERCENT_PRICE, t1.PRICELIST_ID, t11.NAME AS PRICELIST_ID_TEXT, t1.PRICE_DISCOUNT, t1.PRICE_MAX_MARGIN, t1.PRICE_MIN_MARGIN, t1.PRICE_ROUND, t1.PRICE_SURCHARGE, t1.PRODUCT_ID, t131.NAME AS PRODUCT_ID_TEXT, t1.PRODUCT_TMPL_ID, t71.NAME AS PRODUCT_TMPL_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t61.NAME AS WRITE_UID_TEXT FROM PRODUCT_PRICELIST_ITEM t1 LEFT JOIN PRODUCT_PRICELIST t11 ON t1.PRICELIST_ID = t11.ID LEFT JOIN RES_CURRENCY t21 ON t1.CURRENCY_ID = t21.ID LEFT JOIN PRODUCT_CATEGORY t31 ON t1.CATEG_ID = t31.ID LEFT JOIN PRODUCT_PRICELIST t41 ON t1.BASE_PRICELIST_ID = t41.ID LEFT JOIN RES_USERS t51 ON t1.WRITE_UID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN PRODUCT_TEMPLATE t71 ON t1.PRODUCT_TMPL_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.CREATE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN RES_COMPANY t101 ON t1.COMPANY_ID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN PRODUCT_PRODUCT t121 ON t1.PRODUCT_ID = t121.ID LEFT JOIN PRODUCT_TEMPLATE t131 ON t121.PRODUCT_TMPL_ID = t131.ID ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.APPLIED_ON, t1.BASE, t1.BASE_PRICELIST_ID, t41.NAME AS BASE_PRICELIST_ID_TEXT, t1.CATEG_ID, t31.NAME AS CATEG_ID_TEXT, t1.COMPANY_ID, t111.NAME AS COMPANY_ID_TEXT, t1.COMPUTE_PRICE, t1.CREATE_DATE, t1.CREATE_UID, t91.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t21.NAME AS CURRENCY_ID_TEXT, t1.DATE_END, t1.DATE_START, t1.FIXED_PRICE, t1.ID, t1.MIN_QUANTITY, t1.PERCENT_PRICE, t1.PRICELIST_ID, t11.NAME AS PRICELIST_ID_TEXT, t1.PRICE_DISCOUNT, t1.PRICE_MAX_MARGIN, t1.PRICE_MIN_MARGIN, t1.PRICE_ROUND, t1.PRICE_SURCHARGE, t1.PRODUCT_ID, t131.NAME AS PRODUCT_ID_TEXT, t1.PRODUCT_TMPL_ID, t71.NAME AS PRODUCT_TMPL_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t61.NAME AS WRITE_UID_TEXT FROM PRODUCT_PRICELIST_ITEM t1 LEFT JOIN PRODUCT_PRICELIST t11 ON t1.PRICELIST_ID = t11.ID LEFT JOIN RES_CURRENCY t21 ON t1.CURRENCY_ID = t21.ID LEFT JOIN PRODUCT_CATEGORY t31 ON t1.CATEG_ID = t31.ID LEFT JOIN PRODUCT_PRICELIST t41 ON t1.BASE_PRICELIST_ID = t41.ID LEFT JOIN RES_USERS t51 ON t1.WRITE_UID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN PRODUCT_TEMPLATE t71 ON t1.PRODUCT_TMPL_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.CREATE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN RES_COMPANY t101 ON t1.COMPANY_ID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN PRODUCT_PRODUCT t121 ON t1.PRODUCT_ID = t121.ID LEFT JOIN PRODUCT_TEMPLATE t131 ON t121.PRODUCT_TMPL_ID = t131.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.APPLIED_ON, t1.BASE, t1.BASE_PRICELIST_ID, t41.NAME AS BASE_PRICELIST_ID_TEXT, t1.CATEG_ID, t31.NAME AS CATEG_ID_TEXT, t1.COMPANY_ID, t111.NAME AS COMPANY_ID_TEXT, t1.COMPUTE_PRICE, t1.CREATE_DATE, t1.CREATE_UID, t91.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t21.NAME AS CURRENCY_ID_TEXT, t1.DATE_END, t1.DATE_START, t1.FIXED_PRICE, t1.ID, t1.MIN_QUANTITY, t1.PERCENT_PRICE, t1.PRICELIST_ID, t11.NAME AS PRICELIST_ID_TEXT, t1.PRICE_DISCOUNT, t1.PRICE_MAX_MARGIN, t1.PRICE_MIN_MARGIN, t1.PRICE_ROUND, t1.PRICE_SURCHARGE, t1.PRODUCT_ID, t131.NAME AS PRODUCT_ID_TEXT, t1.PRODUCT_TMPL_ID, t71.NAME AS PRODUCT_TMPL_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t61.NAME AS WRITE_UID_TEXT FROM PRODUCT_PRICELIST_ITEM t1 LEFT JOIN PRODUCT_PRICELIST t11 ON t1.PRICELIST_ID = t11.ID LEFT JOIN RES_CURRENCY t21 ON t1.CURRENCY_ID = t21.ID LEFT JOIN PRODUCT_CATEGORY t31 ON t1.CATEG_ID = t31.ID LEFT JOIN PRODUCT_PRICELIST t41 ON t1.BASE_PRICELIST_ID = t41.ID LEFT JOIN RES_USERS t51 ON t1.WRITE_UID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN PRODUCT_TEMPLATE t71 ON t1.PRODUCT_TMPL_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.CREATE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN RES_COMPANY t101 ON t1.COMPANY_ID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN PRODUCT_PRODUCT t121 ON t1.PRODUCT_ID = t121.ID LEFT JOIN PRODUCT_TEMPLATE t131 ON t121.PRODUCT_TMPL_ID = t131.ID
<![CDATA[select t1.* from (SELECT t1.COMPANY_ID, t21.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t81.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.RESOURCE_CALENDAR_ID, t51.NAME AS RESOURCE_CALENDAR_ID_TEXT, t1.RESOURCE_ID, t61.NAME AS RESOURCE_ID_TEXT, t61.TZ, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM RESOURCE_TEST t1 LEFT JOIN RES_COMPANY t11 ON t1.COMPANY_ID = 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 RESOURCE_CALENDAR t51 ON t1.RESOURCE_CALENDAR_ID = t51.ID LEFT JOIN RESOURCE_RESOURCE t61 ON t1.RESOURCE_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.CREATE_UID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.COMPANY_ID, t21.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t81.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.RESOURCE_CALENDAR_ID, t51.NAME AS RESOURCE_CALENDAR_ID_TEXT, t1.RESOURCE_ID, t61.NAME AS RESOURCE_ID_TEXT, t61.TZ, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM RESOURCE_TEST t1 LEFT JOIN RES_COMPANY t11 ON t1.COMPANY_ID = 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 RESOURCE_CALENDAR t51 ON t1.RESOURCE_CALENDAR_ID = t51.ID LEFT JOIN RESOURCE_RESOURCE t61 ON t1.RESOURCE_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.CREATE_UID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.COMPANY_ID, t21.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t81.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.RESOURCE_CALENDAR_ID, t51.NAME AS RESOURCE_CALENDAR_ID_TEXT, t1.RESOURCE_ID, t61.NAME AS RESOURCE_ID_TEXT, t61.TZ, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM RESOURCE_TEST t1 LEFT JOIN RES_COMPANY t11 ON t1.COMPANY_ID = 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 RESOURCE_CALENDAR t51 ON t1.RESOURCE_CALENDAR_ID = t51.ID LEFT JOIN RESOURCE_RESOURCE t61 ON t1.RESOURCE_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.CREATE_UID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID
<![CDATA[select t1.* from (SELECT t1.ADVANCE_PAYMENT_METHOD, t1.AMOUNT, t1.COUNT, t1.CREATE_DATE, t1.CREATE_UID, t71.NAME AS CREATE_UID_TEXT, t1.DEPOSIT_ACCOUNT_ID, t11.NAME AS DEPOSIT_ACCOUNT_ID_TEXT, t1.ID, t1.PRODUCT_ID, t31.NAME AS PRODUCT_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t51.NAME AS WRITE_UID_TEXT FROM SALE_ADVANCE_PAYMENT_INV t1 LEFT JOIN ACCOUNT_ACCOUNT t11 ON t1.DEPOSIT_ACCOUNT_ID = t11.ID LEFT JOIN PRODUCT_PRODUCT t21 ON t1.PRODUCT_ID = t21.ID LEFT JOIN PRODUCT_TEMPLATE t31 ON t21.PRODUCT_TMPL_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.WRITE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN RES_USERS t61 ON t1.CREATE_UID = t61.ID LEFT JOIN RES_PARTNER t71 ON t61.PARTNER_ID = t71.ID ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.ADVANCE_PAYMENT_METHOD, t1.AMOUNT, t1.COUNT, t1.CREATE_DATE, t1.CREATE_UID, t71.NAME AS CREATE_UID_TEXT, t1.DEPOSIT_ACCOUNT_ID, t11.NAME AS DEPOSIT_ACCOUNT_ID_TEXT, t1.ID, t1.PRODUCT_ID, t31.NAME AS PRODUCT_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t51.NAME AS WRITE_UID_TEXT FROM SALE_ADVANCE_PAYMENT_INV t1 LEFT JOIN ACCOUNT_ACCOUNT t11 ON t1.DEPOSIT_ACCOUNT_ID = t11.ID LEFT JOIN PRODUCT_PRODUCT t21 ON t1.PRODUCT_ID = t21.ID LEFT JOIN PRODUCT_TEMPLATE t31 ON t21.PRODUCT_TMPL_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.WRITE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN RES_USERS t61 ON t1.CREATE_UID = t61.ID LEFT JOIN RES_PARTNER t71 ON t61.PARTNER_ID = t71.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.ADVANCE_PAYMENT_METHOD, t1.AMOUNT, t1.COUNT, t1.CREATE_DATE, t1.CREATE_UID, t71.NAME AS CREATE_UID_TEXT, t1.DEPOSIT_ACCOUNT_ID, t11.NAME AS DEPOSIT_ACCOUNT_ID_TEXT, t1.ID, t1.PRODUCT_ID, t31.NAME AS PRODUCT_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t51.NAME AS WRITE_UID_TEXT FROM SALE_ADVANCE_PAYMENT_INV t1 LEFT JOIN ACCOUNT_ACCOUNT t11 ON t1.DEPOSIT_ACCOUNT_ID = t11.ID LEFT JOIN PRODUCT_PRODUCT t21 ON t1.PRODUCT_ID = t21.ID LEFT JOIN PRODUCT_TEMPLATE t31 ON t21.PRODUCT_TMPL_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.WRITE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN RES_USERS t61 ON t1.CREATE_UID = t61.ID LEFT JOIN RES_PARTNER t71 ON t61.PARTNER_ID = t71.ID
<![CDATA[select t1.* from (SELECT t1.CATEGORY_ID, t11.NAME AS CATEGORY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t91.NAME AS CREATE_UID_TEXT, t1.FIXED_LOCATION_ID, t21.NAME AS FIXED_LOCATION_ID_TEXT, t1.ID, t1.PRODUCT_ID, t61.NAME AS PRODUCT_ID_TEXT, t1.PUTAWAY_ID, t71.NAME AS PUTAWAY_ID_TEXT, t1.SEQUENCE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM STOCK_FIXED_PUTAWAY_STRAT t1 LEFT JOIN PRODUCT_CATEGORY t11 ON t1.CATEGORY_ID = t11.ID LEFT JOIN STOCK_LOCATION t21 ON t1.FIXED_LOCATION_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 PRODUCT_PRODUCT t51 ON t1.PRODUCT_ID = t51.ID LEFT JOIN PRODUCT_TEMPLATE t61 ON t51.PRODUCT_TMPL_ID = t61.ID LEFT JOIN PRODUCT_PUTAWAY t71 ON t1.PUTAWAY_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.CREATE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.CATEGORY_ID, t11.NAME AS CATEGORY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t91.NAME AS CREATE_UID_TEXT, t1.FIXED_LOCATION_ID, t21.NAME AS FIXED_LOCATION_ID_TEXT, t1.ID, t1.PRODUCT_ID, t61.NAME AS PRODUCT_ID_TEXT, t1.PUTAWAY_ID, t71.NAME AS PUTAWAY_ID_TEXT, t1.SEQUENCE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM STOCK_FIXED_PUTAWAY_STRAT t1 LEFT JOIN PRODUCT_CATEGORY t11 ON t1.CATEGORY_ID = t11.ID LEFT JOIN STOCK_LOCATION t21 ON t1.FIXED_LOCATION_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 PRODUCT_PRODUCT t51 ON t1.PRODUCT_ID = t51.ID LEFT JOIN PRODUCT_TEMPLATE t61 ON t51.PRODUCT_TMPL_ID = t61.ID LEFT JOIN PRODUCT_PUTAWAY t71 ON t1.PUTAWAY_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.CREATE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.CATEGORY_ID, t11.NAME AS CATEGORY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t91.NAME AS CREATE_UID_TEXT, t1.FIXED_LOCATION_ID, t21.NAME AS FIXED_LOCATION_ID_TEXT, t1.ID, t1.PRODUCT_ID, t61.NAME AS PRODUCT_ID_TEXT, t1.PUTAWAY_ID, t71.NAME AS PUTAWAY_ID_TEXT, t1.SEQUENCE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM STOCK_FIXED_PUTAWAY_STRAT t1 LEFT JOIN PRODUCT_CATEGORY t11 ON t1.CATEGORY_ID = t11.ID LEFT JOIN STOCK_LOCATION t21 ON t1.FIXED_LOCATION_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 PRODUCT_PRODUCT t51 ON t1.PRODUCT_ID = t51.ID LEFT JOIN PRODUCT_TEMPLATE t61 ON t51.PRODUCT_TMPL_ID = t61.ID LEFT JOIN PRODUCT_PUTAWAY t71 ON t1.PUTAWAY_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.CREATE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID
<![CDATA[select t1.* from (SELECT t1.COMPANY_ID, t131.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t91.NAME AS CREATE_UID_TEXT, t1.ID, t1.INVENTORY_ID, t31.NAME AS INVENTORY_ID_TEXT, t31.LOCATION_ID AS INVENTORY_LOCATION_ID, t1.LOCATION_ID, t51.NAME AS LOCATION_ID_TEXT, t1.PACKAGE_ID, t11.NAME AS PACKAGE_ID_TEXT, t1.PARTNER_ID, t41.NAME AS PARTNER_ID_TEXT, t1.PRODUCT_ID, t71.NAME AS PRODUCT_ID_TEXT, t1.PRODUCT_QTY, t71.TRACKING AS PRODUCT_TRACKING, t21.CATEGORY_ID AS PRODUCT_UOM_CATEGORY_ID, t1.PRODUCT_UOM_ID, t21.NAME AS PRODUCT_UOM_ID_TEXT, t1.PROD_LOT_ID, t141.NAME AS PROD_LOT_ID_TEXT, t31.STATE, t1.THEORETICAL_QTY, t1.WRITE_DATE, t1.WRITE_UID, t111.NAME AS WRITE_UID_TEXT FROM STOCK_INVENTORY_LINE t1 LEFT JOIN STOCK_QUANT_PACKAGE t11 ON t1.PACKAGE_ID = t11.ID LEFT JOIN UOM_UOM t21 ON t1.PRODUCT_UOM_ID = t21.ID LEFT JOIN STOCK_INVENTORY t31 ON t1.INVENTORY_ID = t31.ID LEFT JOIN RES_PARTNER t41 ON t1.PARTNER_ID = t41.ID LEFT JOIN STOCK_LOCATION t51 ON t1.LOCATION_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 RES_USERS t81 ON t1.CREATE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.WRITE_UID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN RES_COMPANY t121 ON t1.COMPANY_ID = t121.ID LEFT JOIN RES_PARTNER t131 ON t121.PARTNER_ID = t131.ID LEFT JOIN STOCK_PRODUCTION_LOT t141 ON t1.PROD_LOT_ID = t141.ID ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.COMPANY_ID, t131.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t91.NAME AS CREATE_UID_TEXT, t1.ID, t1.INVENTORY_ID, t31.NAME AS INVENTORY_ID_TEXT, t31.LOCATION_ID AS INVENTORY_LOCATION_ID, t1.LOCATION_ID, t51.NAME AS LOCATION_ID_TEXT, t1.PACKAGE_ID, t11.NAME AS PACKAGE_ID_TEXT, t1.PARTNER_ID, t41.NAME AS PARTNER_ID_TEXT, t1.PRODUCT_ID, t71.NAME AS PRODUCT_ID_TEXT, t1.PRODUCT_QTY, t71.TRACKING AS PRODUCT_TRACKING, t21.CATEGORY_ID AS PRODUCT_UOM_CATEGORY_ID, t1.PRODUCT_UOM_ID, t21.NAME AS PRODUCT_UOM_ID_TEXT, t1.PROD_LOT_ID, t141.NAME AS PROD_LOT_ID_TEXT, t31.STATE, t1.THEORETICAL_QTY, t1.WRITE_DATE, t1.WRITE_UID, t111.NAME AS WRITE_UID_TEXT FROM STOCK_INVENTORY_LINE t1 LEFT JOIN STOCK_QUANT_PACKAGE t11 ON t1.PACKAGE_ID = t11.ID LEFT JOIN UOM_UOM t21 ON t1.PRODUCT_UOM_ID = t21.ID LEFT JOIN STOCK_INVENTORY t31 ON t1.INVENTORY_ID = t31.ID LEFT JOIN RES_PARTNER t41 ON t1.PARTNER_ID = t41.ID LEFT JOIN STOCK_LOCATION t51 ON t1.LOCATION_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 RES_USERS t81 ON t1.CREATE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.WRITE_UID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN RES_COMPANY t121 ON t1.COMPANY_ID = t121.ID LEFT JOIN RES_PARTNER t131 ON t121.PARTNER_ID = t131.ID LEFT JOIN STOCK_PRODUCTION_LOT t141 ON t1.PROD_LOT_ID = t141.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.COMPANY_ID, t131.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t91.NAME AS CREATE_UID_TEXT, t1.ID, t1.INVENTORY_ID, t31.NAME AS INVENTORY_ID_TEXT, t31.LOCATION_ID AS INVENTORY_LOCATION_ID, t1.LOCATION_ID, t51.NAME AS LOCATION_ID_TEXT, t1.PACKAGE_ID, t11.NAME AS PACKAGE_ID_TEXT, t1.PARTNER_ID, t41.NAME AS PARTNER_ID_TEXT, t1.PRODUCT_ID, t71.NAME AS PRODUCT_ID_TEXT, t1.PRODUCT_QTY, t71.TRACKING AS PRODUCT_TRACKING, t21.CATEGORY_ID AS PRODUCT_UOM_CATEGORY_ID, t1.PRODUCT_UOM_ID, t21.NAME AS PRODUCT_UOM_ID_TEXT, t1.PROD_LOT_ID, t141.NAME AS PROD_LOT_ID_TEXT, t31.STATE, t1.THEORETICAL_QTY, t1.WRITE_DATE, t1.WRITE_UID, t111.NAME AS WRITE_UID_TEXT FROM STOCK_INVENTORY_LINE t1 LEFT JOIN STOCK_QUANT_PACKAGE t11 ON t1.PACKAGE_ID = t11.ID LEFT JOIN UOM_UOM t21 ON t1.PRODUCT_UOM_ID = t21.ID LEFT JOIN STOCK_INVENTORY t31 ON t1.INVENTORY_ID = t31.ID LEFT JOIN RES_PARTNER t41 ON t1.PARTNER_ID = t41.ID LEFT JOIN STOCK_LOCATION t51 ON t1.LOCATION_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 RES_USERS t81 ON t1.CREATE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.WRITE_UID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN RES_COMPANY t121 ON t1.COMPANY_ID = t121.ID LEFT JOIN RES_PARTNER t131 ON t121.PARTNER_ID = t131.ID LEFT JOIN STOCK_PRODUCTION_LOT t141 ON t1.PROD_LOT_ID = t141.ID
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.MOVE_ID, t51.NAME AS MOVE_ID_TEXT, t1.PRODUCT_ID, t21.NAME AS PRODUCT_ID_TEXT, t1.QUANTITY, t1.TO_REFUND, t51.PRODUCT_UOM AS UOM_ID, t1.WIZARD_ID, t1.WRITE_DATE, t1.WRITE_UID, t71.NAME AS WRITE_UID_TEXT FROM STOCK_RETURN_PICKING_LINE t1 LEFT JOIN PRODUCT_PRODUCT t11 ON t1.PRODUCT_ID = t11.ID LEFT JOIN PRODUCT_TEMPLATE t21 ON t11.PRODUCT_TMPL_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 STOCK_MOVE t51 ON t1.MOVE_ID = t51.ID LEFT JOIN RES_USERS t61 ON t1.WRITE_UID = t61.ID LEFT JOIN RES_PARTNER t71 ON t61.PARTNER_ID = t71.ID ) t1 where id=#{id}]]>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.MOVE_ID, t51.NAME AS MOVE_ID_TEXT, t1.PRODUCT_ID, t21.NAME AS PRODUCT_ID_TEXT, t1.QUANTITY, t1.TO_REFUND, t51.PRODUCT_UOM AS UOM_ID, t1.WIZARD_ID, t1.WRITE_DATE, t1.WRITE_UID, t71.NAME AS WRITE_UID_TEXT FROM STOCK_RETURN_PICKING_LINE t1 LEFT JOIN PRODUCT_PRODUCT t11 ON t1.PRODUCT_ID = t11.ID LEFT JOIN PRODUCT_TEMPLATE t21 ON t11.PRODUCT_TMPL_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 STOCK_MOVE t51 ON t1.MOVE_ID = t51.ID LEFT JOIN RES_USERS t61 ON t1.WRITE_UID = t61.ID LEFT JOIN RES_PARTNER t71 ON t61.PARTNER_ID = t71.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.MOVE_ID, t51.NAME AS MOVE_ID_TEXT, t1.PRODUCT_ID, t21.NAME AS PRODUCT_ID_TEXT, t1.QUANTITY, t1.TO_REFUND, t51.PRODUCT_UOM AS UOM_ID, t1.WIZARD_ID, t1.WRITE_DATE, t1.WRITE_UID, t71.NAME AS WRITE_UID_TEXT FROM STOCK_RETURN_PICKING_LINE t1 LEFT JOIN PRODUCT_PRODUCT t11 ON t1.PRODUCT_ID = t11.ID LEFT JOIN PRODUCT_TEMPLATE t21 ON t11.PRODUCT_TMPL_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 STOCK_MOVE t51 ON t1.MOVE_ID = t51.ID LEFT JOIN RES_USERS t61 ON t1.WRITE_UID = t61.ID LEFT JOIN RES_PARTNER t71 ON t61.PARTNER_ID = t71.ID