<![CDATA[select t1.* from (SELECT t1.ACTIVE, t1.ALIAS_ID, t41.ALIAS_NAME, t1.AT_LEAST_ONE_INBOUND, t1.AT_LEAST_ONE_OUTBOUND, t1.BANK_ACCOUNT_ID, t51.ACC_NUMBER AS BANK_ACC_NUMBER, t51.BANK_ID, t1.BANK_STATEMENTS_SOURCE, t1.CODE, t1.COLOR, t1.COMPANY_ID, t131.NAME AS COMPANY_ID_TEXT, t101.PARTNER_ID AS COMPANY_PARTNER_ID, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t121.NAME AS CURRENCY_ID_TEXT, t1.DEFAULT_CREDIT_ACCOUNT_ID, t91.NAME AS DEFAULT_CREDIT_ACCOUNT_ID_TEXT, t1.DEFAULT_DEBIT_ACCOUNT_ID, t111.NAME AS DEFAULT_DEBIT_ACCOUNT_ID_TEXT, t1.GROUP_INVOICE_LINES, t1.ID, t1.JOURNAL_USER, t1.LOSS_ACCOUNT_ID, t81.NAME AS LOSS_ACCOUNT_ID_TEXT, t1.NAME, t1.POST_AT_BANK_REC, t1.PROFIT_ACCOUNT_ID, t31.NAME AS PROFIT_ACCOUNT_ID_TEXT, t1.REFUND_SEQUENCE, t1.REFUND_SEQUENCE_ID, t1.SEQUENCE, t1.SEQUENCE_ID, t1.SHOW_ON_DASHBOARD, t1.TYPE, t1.UPDATE_POSTED, t1.WRITE_DATE, t1.WRITE_UID, t71.NAME AS WRITE_UID_TEXT FROM ACCOUNT_JOURNAL 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 ACCOUNT_ACCOUNT t31 ON t1.PROFIT_ACCOUNT_ID = t31.ID LEFT JOIN MAIL_ALIAS t41 ON t1.ALIAS_ID = t41.ID LEFT JOIN RES_PARTNER_BANK t51 ON t1.BANK_ACCOUNT_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 LEFT JOIN ACCOUNT_ACCOUNT t81 ON t1.LOSS_ACCOUNT_ID = t81.ID LEFT JOIN ACCOUNT_ACCOUNT t91 ON t1.DEFAULT_CREDIT_ACCOUNT_ID = t91.ID LEFT JOIN RES_COMPANY t101 ON t1.COMPANY_ID = t101.ID LEFT JOIN ACCOUNT_ACCOUNT t111 ON t1.DEFAULT_DEBIT_ACCOUNT_ID = t111.ID LEFT JOIN RES_CURRENCY t121 ON t1.CURRENCY_ID = t121.ID LEFT JOIN RES_PARTNER t131 ON t101.PARTNER_ID = t131.ID ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.ACTIVE, t1.ALIAS_ID, t41.ALIAS_NAME, t1.AT_LEAST_ONE_INBOUND, t1.AT_LEAST_ONE_OUTBOUND, t1.BANK_ACCOUNT_ID, t51.ACC_NUMBER AS BANK_ACC_NUMBER, t51.BANK_ID, t1.BANK_STATEMENTS_SOURCE, t1.CODE, t1.COLOR, t1.COMPANY_ID, t131.NAME AS COMPANY_ID_TEXT, t101.PARTNER_ID AS COMPANY_PARTNER_ID, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t121.NAME AS CURRENCY_ID_TEXT, t1.DEFAULT_CREDIT_ACCOUNT_ID, t91.NAME AS DEFAULT_CREDIT_ACCOUNT_ID_TEXT, t1.DEFAULT_DEBIT_ACCOUNT_ID, t111.NAME AS DEFAULT_DEBIT_ACCOUNT_ID_TEXT, t1.ID, t1.LOSS_ACCOUNT_ID, t81.NAME AS LOSS_ACCOUNT_ID_TEXT, t1.NAME, t1.PROFIT_ACCOUNT_ID, t31.NAME AS PROFIT_ACCOUNT_ID_TEXT, t1.REFUND_SEQUENCE, t1.REFUND_SEQUENCE_ID, t1.SEQUENCE, t1.SEQUENCE_ID, t1.SHOW_ON_DASHBOARD, t1.TYPE, t1.WRITE_DATE, t1.WRITE_UID, t71.NAME AS WRITE_UID_TEXT FROM ACCOUNT_JOURNAL 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 ACCOUNT_ACCOUNT t31 ON t1.PROFIT_ACCOUNT_ID = t31.ID LEFT JOIN MAIL_ALIAS t41 ON t1.ALIAS_ID = t41.ID LEFT JOIN RES_PARTNER_BANK t51 ON t1.BANK_ACCOUNT_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 LEFT JOIN ACCOUNT_ACCOUNT t81 ON t1.LOSS_ACCOUNT_ID = t81.ID LEFT JOIN ACCOUNT_ACCOUNT t91 ON t1.DEFAULT_CREDIT_ACCOUNT_ID = t91.ID LEFT JOIN RES_COMPANY t101 ON t1.COMPANY_ID = t101.ID LEFT JOIN ACCOUNT_ACCOUNT t111 ON t1.DEFAULT_DEBIT_ACCOUNT_ID = t111.ID LEFT JOIN RES_CURRENCY t121 ON t1.CURRENCY_ID = t121.ID LEFT JOIN RES_PARTNER t131 ON t101.PARTNER_ID = t131.ID ) t1 where id=#{id}]]>
<![CDATA[ SELECT t1.ACTIVE, t1.ALIAS_ID, t41.ALIAS_NAME, t1.AT_LEAST_ONE_INBOUND, t1.AT_LEAST_ONE_OUTBOUND, t1.BANK_ACCOUNT_ID, t51.ACC_NUMBER AS BANK_ACC_NUMBER, t51.BANK_ID, t1.BANK_STATEMENTS_SOURCE, t1.CODE, t1.COLOR, t1.COMPANY_ID, t131.NAME AS COMPANY_ID_TEXT, t101.PARTNER_ID AS COMPANY_PARTNER_ID, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t121.NAME AS CURRENCY_ID_TEXT, t1.DEFAULT_CREDIT_ACCOUNT_ID, t91.NAME AS DEFAULT_CREDIT_ACCOUNT_ID_TEXT, t1.DEFAULT_DEBIT_ACCOUNT_ID, t111.NAME AS DEFAULT_DEBIT_ACCOUNT_ID_TEXT, t1.GROUP_INVOICE_LINES, t1.ID, t1.JOURNAL_USER, t1.LOSS_ACCOUNT_ID, t81.NAME AS LOSS_ACCOUNT_ID_TEXT, t1.NAME, t1.POST_AT_BANK_REC, t1.PROFIT_ACCOUNT_ID, t31.NAME AS PROFIT_ACCOUNT_ID_TEXT, t1.REFUND_SEQUENCE, t1.REFUND_SEQUENCE_ID, t1.SEQUENCE, t1.SEQUENCE_ID, t1.SHOW_ON_DASHBOARD, t1.TYPE, t1.UPDATE_POSTED, t1.WRITE_DATE, t1.WRITE_UID, t71.NAME AS WRITE_UID_TEXT FROM ACCOUNT_JOURNAL 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 ACCOUNT_ACCOUNT t31 ON t1.PROFIT_ACCOUNT_ID = t31.ID LEFT JOIN MAIL_ALIAS t41 ON t1.ALIAS_ID = t41.ID LEFT JOIN RES_PARTNER_BANK t51 ON t1.BANK_ACCOUNT_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 LEFT JOIN ACCOUNT_ACCOUNT t81 ON t1.LOSS_ACCOUNT_ID = t81.ID LEFT JOIN ACCOUNT_ACCOUNT t91 ON t1.DEFAULT_CREDIT_ACCOUNT_ID = t91.ID LEFT JOIN RES_COMPANY t101 ON t1.COMPANY_ID = t101.ID LEFT JOIN ACCOUNT_ACCOUNT t111 ON t1.DEFAULT_DEBIT_ACCOUNT_ID = t111.ID LEFT JOIN RES_CURRENCY t121 ON t1.CURRENCY_ID = t121.ID LEFT JOIN RES_PARTNER t131 ON t101.PARTNER_ID = t131.ID
<![CDATA[ SELECT t1.ACTIVE, t1.ALIAS_ID, t41.ALIAS_NAME, t1.AT_LEAST_ONE_INBOUND, t1.AT_LEAST_ONE_OUTBOUND, t1.BANK_ACCOUNT_ID, t51.ACC_NUMBER AS BANK_ACC_NUMBER, t51.BANK_ID, t1.BANK_STATEMENTS_SOURCE, t1.CODE, t1.COLOR, t1.COMPANY_ID, t131.NAME AS COMPANY_ID_TEXT, t101.PARTNER_ID AS COMPANY_PARTNER_ID, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t121.NAME AS CURRENCY_ID_TEXT, t1.DEFAULT_CREDIT_ACCOUNT_ID, t91.NAME AS DEFAULT_CREDIT_ACCOUNT_ID_TEXT, t1.DEFAULT_DEBIT_ACCOUNT_ID, t111.NAME AS DEFAULT_DEBIT_ACCOUNT_ID_TEXT, t1.ID, t1.LOSS_ACCOUNT_ID, t81.NAME AS LOSS_ACCOUNT_ID_TEXT, t1.NAME, t1.PROFIT_ACCOUNT_ID, t31.NAME AS PROFIT_ACCOUNT_ID_TEXT, t1.REFUND_SEQUENCE, t1.REFUND_SEQUENCE_ID, t1.SEQUENCE, t1.SEQUENCE_ID, t1.SHOW_ON_DASHBOARD, t1.TYPE, t1.WRITE_DATE, t1.WRITE_UID, t71.NAME AS WRITE_UID_TEXT FROM ACCOUNT_JOURNAL 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 ACCOUNT_ACCOUNT t31 ON t1.PROFIT_ACCOUNT_ID = t31.ID LEFT JOIN MAIL_ALIAS t41 ON t1.ALIAS_ID = t41.ID LEFT JOIN RES_PARTNER_BANK t51 ON t1.BANK_ACCOUNT_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 LEFT JOIN ACCOUNT_ACCOUNT t81 ON t1.LOSS_ACCOUNT_ID = t81.ID LEFT JOIN ACCOUNT_ACCOUNT t91 ON t1.DEFAULT_CREDIT_ACCOUNT_ID = t91.ID LEFT JOIN RES_COMPANY t101 ON t1.COMPANY_ID = t101.ID LEFT JOIN ACCOUNT_ACCOUNT t111 ON t1.DEFAULT_DEBIT_ACCOUNT_ID = t111.ID LEFT JOIN RES_CURRENCY t121 ON t1.CURRENCY_ID = t121.ID LEFT JOIN RES_PARTNER t131 ON t101.PARTNER_ID = t131.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVE, t1.ALIAS_ID, t41.ALIAS_NAME, t1.AT_LEAST_ONE_INBOUND, t1.AT_LEAST_ONE_OUTBOUND, t1.BANK_ACCOUNT_ID, t51.ACC_NUMBER AS BANK_ACC_NUMBER, t51.BANK_ID, t1.BANK_STATEMENTS_SOURCE, t1.CODE, t1.COLOR, t1.COMPANY_ID, t131.NAME AS COMPANY_ID_TEXT, t101.PARTNER_ID AS COMPANY_PARTNER_ID, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t121.NAME AS CURRENCY_ID_TEXT, t1.DEFAULT_CREDIT_ACCOUNT_ID, t91.NAME AS DEFAULT_CREDIT_ACCOUNT_ID_TEXT, t1.DEFAULT_DEBIT_ACCOUNT_ID, t111.NAME AS DEFAULT_DEBIT_ACCOUNT_ID_TEXT, t1.GROUP_INVOICE_LINES, t1.ID, t1.JOURNAL_USER, t1.LOSS_ACCOUNT_ID, t81.NAME AS LOSS_ACCOUNT_ID_TEXT, t1.NAME, t1.POST_AT_BANK_REC, t1.PROFIT_ACCOUNT_ID, t31.NAME AS PROFIT_ACCOUNT_ID_TEXT, t1.REFUND_SEQUENCE, t1.REFUND_SEQUENCE_ID, t1.SEQUENCE, t1.SEQUENCE_ID, t1.SHOW_ON_DASHBOARD, t1.TYPE, t1.UPDATE_POSTED, t1.WRITE_DATE, t1.WRITE_UID, t71.NAME AS WRITE_UID_TEXT FROM ACCOUNT_JOURNAL 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 ACCOUNT_ACCOUNT t31 ON t1.PROFIT_ACCOUNT_ID = t31.ID LEFT JOIN MAIL_ALIAS t41 ON t1.ALIAS_ID = t41.ID LEFT JOIN RES_PARTNER_BANK t51 ON t1.BANK_ACCOUNT_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 LEFT JOIN ACCOUNT_ACCOUNT t81 ON t1.LOSS_ACCOUNT_ID = t81.ID LEFT JOIN ACCOUNT_ACCOUNT t91 ON t1.DEFAULT_CREDIT_ACCOUNT_ID = t91.ID LEFT JOIN RES_COMPANY t101 ON t1.COMPANY_ID = t101.ID LEFT JOIN ACCOUNT_ACCOUNT t111 ON t1.DEFAULT_DEBIT_ACCOUNT_ID = t111.ID LEFT JOIN RES_CURRENCY t121 ON t1.CURRENCY_ID = t121.ID LEFT JOIN RES_PARTNER t131 ON t101.PARTNER_ID = t131.ID
<![CDATA[ SELECT t1.ACTIVE, t1.ALIAS_ID, t41.ALIAS_NAME, t1.AT_LEAST_ONE_INBOUND, t1.AT_LEAST_ONE_OUTBOUND, t1.BANK_ACCOUNT_ID, t51.ACC_NUMBER AS BANK_ACC_NUMBER, t51.BANK_ID, t1.BANK_STATEMENTS_SOURCE, t1.CODE, t1.COLOR, t1.COMPANY_ID, t131.NAME AS COMPANY_ID_TEXT, t101.PARTNER_ID AS COMPANY_PARTNER_ID, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t121.NAME AS CURRENCY_ID_TEXT, t1.DEFAULT_CREDIT_ACCOUNT_ID, t91.NAME AS DEFAULT_CREDIT_ACCOUNT_ID_TEXT, t1.DEFAULT_DEBIT_ACCOUNT_ID, t111.NAME AS DEFAULT_DEBIT_ACCOUNT_ID_TEXT, t1.ID, t1.LOSS_ACCOUNT_ID, t81.NAME AS LOSS_ACCOUNT_ID_TEXT, t1.NAME, t1.PROFIT_ACCOUNT_ID, t31.NAME AS PROFIT_ACCOUNT_ID_TEXT, t1.REFUND_SEQUENCE, t1.REFUND_SEQUENCE_ID, t1.SEQUENCE, t1.SEQUENCE_ID, t1.SHOW_ON_DASHBOARD, t1.TYPE, t1.WRITE_DATE, t1.WRITE_UID, t71.NAME AS WRITE_UID_TEXT FROM ACCOUNT_JOURNAL 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 ACCOUNT_ACCOUNT t31 ON t1.PROFIT_ACCOUNT_ID = t31.ID LEFT JOIN MAIL_ALIAS t41 ON t1.ALIAS_ID = t41.ID LEFT JOIN RES_PARTNER_BANK t51 ON t1.BANK_ACCOUNT_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 LEFT JOIN ACCOUNT_ACCOUNT t81 ON t1.LOSS_ACCOUNT_ID = t81.ID LEFT JOIN ACCOUNT_ACCOUNT t91 ON t1.DEFAULT_CREDIT_ACCOUNT_ID = t91.ID LEFT JOIN RES_COMPANY t101 ON t1.COMPANY_ID = t101.ID LEFT JOIN ACCOUNT_ACCOUNT t111 ON t1.DEFAULT_DEBIT_ACCOUNT_ID = t111.ID LEFT JOIN RES_CURRENCY t121 ON t1.CURRENCY_ID = t121.ID LEFT JOIN RES_PARTNER t131 ON t101.PARTNER_ID = t131.ID
<![CDATA[select t1.* from (SELECT t51.ACTIVE, t1.ADDITIONAL_NOTE, t1.ADDRESS_HOME_ID, t81.NAME AS ADDRESS_HOME_ID_TEXT, t1.ADDRESS_ID, t171.NAME AS ADDRESS_ID_TEXT, t1.BANK_ACCOUNT_ID, t1.BARCODE, t1.BIRTHDAY, t1.CERTIFICATE, t1.CHILDREN, t1.COACH_ID, t211.NAME AS COACH_ID_TEXT, t1.COLOR, t1.COMPANY_ID, t191.NAME AS COMPANY_ID_TEXT, t1.COUNTRY_ID, t221.NAME AS COUNTRY_ID_TEXT, t1.COUNTRY_OF_BIRTH, t131.NAME AS COUNTRY_OF_BIRTH_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t71.NAME AS CREATE_UID_TEXT, t1.DEPARTMENT_ID, t121.NAME AS DEPARTMENT_ID_TEXT, t1.EMERGENCY_CONTACT, t1.EMERGENCY_PHONE, t1.EXPENSE_MANAGER_ID, t151.NAME AS EXPENSE_MANAGER_ID_TEXT, t1.GENDER, t1.ID, t1.IDENTIFICATION_ID, t1.JOB_ID, t161.NAME AS JOB_ID_TEXT, t1.JOB_TITLE, t1.KM_HOME_WORK, t1.LAST_ATTENDANCE_ID, t1.MARITAL, t1.MEDIC_EXAM, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.MOBILE_PHONE, t51.NAME, t1.NOTES, t1.PARENT_ID, t21.NAME AS PARENT_ID_TEXT, t1.PASSPORT_ID, t1.PERMIT_NO, t1.PIN, t1.PLACE_OF_BIRTH, t1.RESOURCE_CALENDAR_ID, t91.NAME AS RESOURCE_CALENDAR_ID_TEXT, t1.RESOURCE_ID, t1.SINID, t1.SPOUSE_BIRTHDATE, t1.SPOUSE_COMPLETE_NAME, t1.SSNID, t1.STUDY_FIELD, t1.STUDY_SCHOOL, t51.TZ, t1.USER_ID, t111.NAME AS USER_ID_TEXT, t1.VEHICLE, t1.VISA_EXPIRE, t1.VISA_NO, t1.WORK_EMAIL, t1.WORK_LOCATION, t1.WORK_PHONE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM HR_EMPLOYEE t1 LEFT JOIN HR_EMPLOYEE t11 ON t1.PARENT_ID = t11.ID LEFT JOIN RESOURCE_RESOURCE t21 ON t11.RESOURCE_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_RESOURCE t51 ON t1.RESOURCE_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 RES_PARTNER t81 ON t1.ADDRESS_HOME_ID = t81.ID LEFT JOIN RESOURCE_CALENDAR t91 ON t1.RESOURCE_CALENDAR_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.USER_ID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN HR_DEPARTMENT t121 ON t1.DEPARTMENT_ID = t121.ID LEFT JOIN RES_COUNTRY t131 ON t1.COUNTRY_OF_BIRTH = t131.ID LEFT JOIN RES_USERS t141 ON t1.EXPENSE_MANAGER_ID = t141.ID LEFT JOIN RES_PARTNER t151 ON t141.PARTNER_ID = t151.ID LEFT JOIN HR_JOB t161 ON t1.JOB_ID = t161.ID LEFT JOIN RES_PARTNER t171 ON t1.ADDRESS_ID = t171.ID LEFT JOIN RES_COMPANY t181 ON t1.COMPANY_ID = t181.ID LEFT JOIN RES_PARTNER t191 ON t181.PARTNER_ID = t191.ID LEFT JOIN HR_EMPLOYEE t201 ON t1.COACH_ID = t201.ID LEFT JOIN RESOURCE_RESOURCE t211 ON t201.RESOURCE_ID = t211.ID LEFT JOIN RES_COUNTRY t221 ON t1.COUNTRY_ID = t221.ID ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT t51.ACTIVE, t1.ADDITIONAL_NOTE, t1.ADDRESS_HOME_ID, t81.NAME AS ADDRESS_HOME_ID_TEXT, t1.ADDRESS_ID, t171.NAME AS ADDRESS_ID_TEXT, t1.BANK_ACCOUNT_ID, t1.BARCODE, t1.BIRTHDAY, t1.CERTIFICATE, t1.CHILDREN, t1.COACH_ID, t211.NAME AS COACH_ID_TEXT, t1.COLOR, t1.COMPANY_ID, t191.NAME AS COMPANY_ID_TEXT, t1.COUNTRY_ID, t221.NAME AS COUNTRY_ID_TEXT, t1.COUNTRY_OF_BIRTH, t131.NAME AS COUNTRY_OF_BIRTH_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t71.NAME AS CREATE_UID_TEXT, t1.DEPARTMENT_ID, t121.NAME AS DEPARTMENT_ID_TEXT, t1.EMERGENCY_CONTACT, t1.EMERGENCY_PHONE, t1.EXPENSE_MANAGER_ID, t151.NAME AS EXPENSE_MANAGER_ID_TEXT, t1.GENDER, t1.ID, t1.IDENTIFICATION_ID, t1.JOB_ID, t161.NAME AS JOB_ID_TEXT, t1.JOB_TITLE, t1.KM_HOME_WORK, t1.LAST_ATTENDANCE_ID, t1.LEAVE_MANAGER_ID, t1.MARITAL, t1.MEDIC_EXAM, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.MOBILE_PHONE, t51.NAME, t1.NOTES, t1.PARENT_ID, t21.NAME AS PARENT_ID_TEXT, t1.PASSPORT_ID, t1.PERMIT_NO, t1.PIN, t1.PLACE_OF_BIRTH, t1.RESOURCE_CALENDAR_ID, t91.NAME AS RESOURCE_CALENDAR_ID_TEXT, t1.RESOURCE_ID, t1.SINID, t1.SPOUSE_BIRTHDATE, t1.SPOUSE_COMPLETE_NAME, t1.SSNID, t1.STUDY_FIELD, t1.STUDY_SCHOOL, t51.TZ, t1.USER_ID, t111.NAME AS USER_ID_TEXT, t1.VEHICLE, t1.VISA_EXPIRE, t1.VISA_NO, t1.WORK_EMAIL, t1.WORK_LOCATION, t1.WORK_PHONE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM HR_EMPLOYEE t1 LEFT JOIN HR_EMPLOYEE t11 ON t1.PARENT_ID = t11.ID LEFT JOIN RESOURCE_RESOURCE t21 ON t11.RESOURCE_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_RESOURCE t51 ON t1.RESOURCE_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 RES_PARTNER t81 ON t1.ADDRESS_HOME_ID = t81.ID LEFT JOIN RESOURCE_CALENDAR t91 ON t1.RESOURCE_CALENDAR_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.USER_ID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN HR_DEPARTMENT t121 ON t1.DEPARTMENT_ID = t121.ID LEFT JOIN RES_COUNTRY t131 ON t1.COUNTRY_OF_BIRTH = t131.ID LEFT JOIN RES_USERS t141 ON t1.EXPENSE_MANAGER_ID = t141.ID LEFT JOIN RES_PARTNER t151 ON t141.PARTNER_ID = t151.ID LEFT JOIN HR_JOB t161 ON t1.JOB_ID = t161.ID LEFT JOIN RES_PARTNER t171 ON t1.ADDRESS_ID = t171.ID LEFT JOIN RES_COMPANY t181 ON t1.COMPANY_ID = t181.ID LEFT JOIN RES_PARTNER t191 ON t181.PARTNER_ID = t191.ID LEFT JOIN HR_EMPLOYEE t201 ON t1.COACH_ID = t201.ID LEFT JOIN RESOURCE_RESOURCE t211 ON t201.RESOURCE_ID = t211.ID LEFT JOIN RES_COUNTRY t221 ON t1.COUNTRY_ID = t221.ID ) t1 where id=#{id}]]>
<![CDATA[ SELECT t51.ACTIVE, t1.ADDRESS_HOME_ID, t81.NAME AS ADDRESS_HOME_ID_TEXT, t1.ADDRESS_ID, t171.NAME AS ADDRESS_ID_TEXT, t1.BANK_ACCOUNT_ID, t1.BARCODE, t1.BIRTHDAY, t1.CERTIFICATE, t1.CHILDREN, t1.COACH_ID, t211.NAME AS COACH_ID_TEXT, t1.COLOR, t1.COMPANY_ID, t191.NAME AS COMPANY_ID_TEXT, t1.COUNTRY_ID, t221.NAME AS COUNTRY_ID_TEXT, t1.COUNTRY_OF_BIRTH, t131.NAME AS COUNTRY_OF_BIRTH_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t71.NAME AS CREATE_UID_TEXT, t1.DEPARTMENT_ID, t121.NAME AS DEPARTMENT_ID_TEXT, t1.EMERGENCY_CONTACT, t1.EMERGENCY_PHONE, t1.EXPENSE_MANAGER_ID, t151.NAME AS EXPENSE_MANAGER_ID_TEXT, t1.GENDER, t1.ID, t1.IDENTIFICATION_ID, t1.JOB_ID, t161.NAME AS JOB_ID_TEXT, t1.JOB_TITLE, t1.KM_HOME_WORK, t1.LAST_ATTENDANCE_ID, t1.MARITAL, t1.MEDIC_EXAM, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.MOBILE_PHONE, t51.NAME, t1.PARENT_ID, t21.NAME AS PARENT_ID_TEXT, t1.PASSPORT_ID, t1.PERMIT_NO, t1.PIN, t1.PLACE_OF_BIRTH, t1.RESOURCE_CALENDAR_ID, t91.NAME AS RESOURCE_CALENDAR_ID_TEXT, t1.RESOURCE_ID, t1.SINID, t1.SPOUSE_BIRTHDATE, t1.SPOUSE_COMPLETE_NAME, t1.SSNID, t1.STUDY_FIELD, t1.STUDY_SCHOOL, t51.TZ, t1.USER_ID, t111.NAME AS USER_ID_TEXT, t1.VEHICLE, t1.VISA_EXPIRE, t1.VISA_NO, t1.WORK_EMAIL, t1.WORK_LOCATION, t1.WORK_PHONE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM HR_EMPLOYEE t1 LEFT JOIN HR_EMPLOYEE t11 ON t1.PARENT_ID = t11.ID LEFT JOIN RESOURCE_RESOURCE t21 ON t11.RESOURCE_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_RESOURCE t51 ON t1.RESOURCE_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 RES_PARTNER t81 ON t1.ADDRESS_HOME_ID = t81.ID LEFT JOIN RESOURCE_CALENDAR t91 ON t1.RESOURCE_CALENDAR_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.USER_ID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN HR_DEPARTMENT t121 ON t1.DEPARTMENT_ID = t121.ID LEFT JOIN RES_COUNTRY t131 ON t1.COUNTRY_OF_BIRTH = t131.ID LEFT JOIN RES_USERS t141 ON t1.EXPENSE_MANAGER_ID = t141.ID LEFT JOIN RES_PARTNER t151 ON t141.PARTNER_ID = t151.ID LEFT JOIN HR_JOB t161 ON t1.JOB_ID = t161.ID LEFT JOIN RES_PARTNER t171 ON t1.ADDRESS_ID = t171.ID LEFT JOIN RES_COMPANY t181 ON t1.COMPANY_ID = t181.ID LEFT JOIN RES_PARTNER t191 ON t181.PARTNER_ID = t191.ID LEFT JOIN HR_EMPLOYEE t201 ON t1.COACH_ID = t201.ID LEFT JOIN RESOURCE_RESOURCE t211 ON t201.RESOURCE_ID = t211.ID LEFT JOIN RES_COUNTRY t221 ON t1.COUNTRY_ID = t221.ID
<![CDATA[ SELECT t51.ACTIVE, t1.ADDRESS_HOME_ID, t81.NAME AS ADDRESS_HOME_ID_TEXT, t1.ADDRESS_ID, t171.NAME AS ADDRESS_ID_TEXT, t1.BANK_ACCOUNT_ID, t1.BARCODE, t1.BIRTHDAY, t1.CERTIFICATE, t1.CHILDREN, t1.COACH_ID, t211.NAME AS COACH_ID_TEXT, t1.COLOR, t1.COMPANY_ID, t191.NAME AS COMPANY_ID_TEXT, t1.COUNTRY_ID, t221.NAME AS COUNTRY_ID_TEXT, t1.COUNTRY_OF_BIRTH, t131.NAME AS COUNTRY_OF_BIRTH_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t71.NAME AS CREATE_UID_TEXT, t1.DEPARTMENT_ID, t121.NAME AS DEPARTMENT_ID_TEXT, t1.EMERGENCY_CONTACT, t1.EMERGENCY_PHONE, t1.EXPENSE_MANAGER_ID, t151.NAME AS EXPENSE_MANAGER_ID_TEXT, t1.GENDER, t1.ID, t1.IDENTIFICATION_ID, t1.JOB_ID, t161.NAME AS JOB_ID_TEXT, t1.JOB_TITLE, t1.KM_HOME_WORK, t1.LAST_ATTENDANCE_ID, t1.LEAVE_MANAGER_ID, t1.MARITAL, t1.MEDIC_EXAM, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.MOBILE_PHONE, t51.NAME, t1.PARENT_ID, t21.NAME AS PARENT_ID_TEXT, t1.PASSPORT_ID, t1.PERMIT_NO, t1.PIN, t1.PLACE_OF_BIRTH, t1.RESOURCE_CALENDAR_ID, t91.NAME AS RESOURCE_CALENDAR_ID_TEXT, t1.RESOURCE_ID, t1.SINID, t1.SPOUSE_BIRTHDATE, t1.SPOUSE_COMPLETE_NAME, t1.SSNID, t1.STUDY_FIELD, t1.STUDY_SCHOOL, t51.TZ, t1.USER_ID, t111.NAME AS USER_ID_TEXT, t1.VEHICLE, t1.VISA_EXPIRE, t1.VISA_NO, t1.WORK_EMAIL, t1.WORK_LOCATION, t1.WORK_PHONE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM HR_EMPLOYEE t1 LEFT JOIN HR_EMPLOYEE t11 ON t1.PARENT_ID = t11.ID LEFT JOIN RESOURCE_RESOURCE t21 ON t11.RESOURCE_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_RESOURCE t51 ON t1.RESOURCE_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 RES_PARTNER t81 ON t1.ADDRESS_HOME_ID = t81.ID LEFT JOIN RESOURCE_CALENDAR t91 ON t1.RESOURCE_CALENDAR_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.USER_ID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN HR_DEPARTMENT t121 ON t1.DEPARTMENT_ID = t121.ID LEFT JOIN RES_COUNTRY t131 ON t1.COUNTRY_OF_BIRTH = t131.ID LEFT JOIN RES_USERS t141 ON t1.EXPENSE_MANAGER_ID = t141.ID LEFT JOIN RES_PARTNER t151 ON t141.PARTNER_ID = t151.ID LEFT JOIN HR_JOB t161 ON t1.JOB_ID = t161.ID LEFT JOIN RES_PARTNER t171 ON t1.ADDRESS_ID = t171.ID LEFT JOIN RES_COMPANY t181 ON t1.COMPANY_ID = t181.ID LEFT JOIN RES_PARTNER t191 ON t181.PARTNER_ID = t191.ID LEFT JOIN HR_EMPLOYEE t201 ON t1.COACH_ID = t201.ID LEFT JOIN RESOURCE_RESOURCE t211 ON t201.RESOURCE_ID = t211.ID LEFT JOIN RES_COUNTRY t221 ON t1.COUNTRY_ID = t221.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t51.ACTIVE, t1.ADDITIONAL_NOTE, t1.ADDRESS_HOME_ID, t81.NAME AS ADDRESS_HOME_ID_TEXT, t1.ADDRESS_ID, t171.NAME AS ADDRESS_ID_TEXT, t1.BANK_ACCOUNT_ID, t1.BARCODE, t1.BIRTHDAY, t1.CERTIFICATE, t1.CHILDREN, t1.COACH_ID, t211.NAME AS COACH_ID_TEXT, t1.COLOR, t1.COMPANY_ID, t191.NAME AS COMPANY_ID_TEXT, t1.COUNTRY_ID, t221.NAME AS COUNTRY_ID_TEXT, t1.COUNTRY_OF_BIRTH, t131.NAME AS COUNTRY_OF_BIRTH_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t71.NAME AS CREATE_UID_TEXT, t1.DEPARTMENT_ID, t121.NAME AS DEPARTMENT_ID_TEXT, t1.EMERGENCY_CONTACT, t1.EMERGENCY_PHONE, t1.EXPENSE_MANAGER_ID, t151.NAME AS EXPENSE_MANAGER_ID_TEXT, t1.GENDER, t1.ID, t1.IDENTIFICATION_ID, t1.JOB_ID, t161.NAME AS JOB_ID_TEXT, t1.JOB_TITLE, t1.KM_HOME_WORK, t1.LAST_ATTENDANCE_ID, t1.MARITAL, t1.MEDIC_EXAM, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.MOBILE_PHONE, t51.NAME, t1.NOTES, t1.PARENT_ID, t21.NAME AS PARENT_ID_TEXT, t1.PASSPORT_ID, t1.PERMIT_NO, t1.PIN, t1.PLACE_OF_BIRTH, t1.RESOURCE_CALENDAR_ID, t91.NAME AS RESOURCE_CALENDAR_ID_TEXT, t1.RESOURCE_ID, t1.SINID, t1.SPOUSE_BIRTHDATE, t1.SPOUSE_COMPLETE_NAME, t1.SSNID, t1.STUDY_FIELD, t1.STUDY_SCHOOL, t51.TZ, t1.USER_ID, t111.NAME AS USER_ID_TEXT, t1.VEHICLE, t1.VISA_EXPIRE, t1.VISA_NO, t1.WORK_EMAIL, t1.WORK_LOCATION, t1.WORK_PHONE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM HR_EMPLOYEE t1 LEFT JOIN HR_EMPLOYEE t11 ON t1.PARENT_ID = t11.ID LEFT JOIN RESOURCE_RESOURCE t21 ON t11.RESOURCE_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_RESOURCE t51 ON t1.RESOURCE_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 RES_PARTNER t81 ON t1.ADDRESS_HOME_ID = t81.ID LEFT JOIN RESOURCE_CALENDAR t91 ON t1.RESOURCE_CALENDAR_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.USER_ID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN HR_DEPARTMENT t121 ON t1.DEPARTMENT_ID = t121.ID LEFT JOIN RES_COUNTRY t131 ON t1.COUNTRY_OF_BIRTH = t131.ID LEFT JOIN RES_USERS t141 ON t1.EXPENSE_MANAGER_ID = t141.ID LEFT JOIN RES_PARTNER t151 ON t141.PARTNER_ID = t151.ID LEFT JOIN HR_JOB t161 ON t1.JOB_ID = t161.ID LEFT JOIN RES_PARTNER t171 ON t1.ADDRESS_ID = t171.ID LEFT JOIN RES_COMPANY t181 ON t1.COMPANY_ID = t181.ID LEFT JOIN RES_PARTNER t191 ON t181.PARTNER_ID = t191.ID LEFT JOIN HR_EMPLOYEE t201 ON t1.COACH_ID = t201.ID LEFT JOIN RESOURCE_RESOURCE t211 ON t201.RESOURCE_ID = t211.ID LEFT JOIN RES_COUNTRY t221 ON t1.COUNTRY_ID = t221.ID
<![CDATA[ SELECT t51.ACTIVE, t1.ADDITIONAL_NOTE, t1.ADDRESS_HOME_ID, t81.NAME AS ADDRESS_HOME_ID_TEXT, t1.ADDRESS_ID, t171.NAME AS ADDRESS_ID_TEXT, t1.BANK_ACCOUNT_ID, t1.BARCODE, t1.BIRTHDAY, t1.CERTIFICATE, t1.CHILDREN, t1.COACH_ID, t211.NAME AS COACH_ID_TEXT, t1.COLOR, t1.COMPANY_ID, t191.NAME AS COMPANY_ID_TEXT, t1.COUNTRY_ID, t221.NAME AS COUNTRY_ID_TEXT, t1.COUNTRY_OF_BIRTH, t131.NAME AS COUNTRY_OF_BIRTH_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t71.NAME AS CREATE_UID_TEXT, t1.DEPARTMENT_ID, t121.NAME AS DEPARTMENT_ID_TEXT, t1.EMERGENCY_CONTACT, t1.EMERGENCY_PHONE, t1.EXPENSE_MANAGER_ID, t151.NAME AS EXPENSE_MANAGER_ID_TEXT, t1.GENDER, t1.ID, t1.IDENTIFICATION_ID, t1.JOB_ID, t161.NAME AS JOB_ID_TEXT, t1.JOB_TITLE, t1.KM_HOME_WORK, t1.LAST_ATTENDANCE_ID, t1.LEAVE_MANAGER_ID, t1.MARITAL, t1.MEDIC_EXAM, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.MOBILE_PHONE, t51.NAME, t1.NOTES, t1.PARENT_ID, t21.NAME AS PARENT_ID_TEXT, t1.PASSPORT_ID, t1.PERMIT_NO, t1.PIN, t1.PLACE_OF_BIRTH, t1.RESOURCE_CALENDAR_ID, t91.NAME AS RESOURCE_CALENDAR_ID_TEXT, t1.RESOURCE_ID, t1.SINID, t1.SPOUSE_BIRTHDATE, t1.SPOUSE_COMPLETE_NAME, t1.SSNID, t1.STUDY_FIELD, t1.STUDY_SCHOOL, t51.TZ, t1.USER_ID, t111.NAME AS USER_ID_TEXT, t1.VEHICLE, t1.VISA_EXPIRE, t1.VISA_NO, t1.WORK_EMAIL, t1.WORK_LOCATION, t1.WORK_PHONE, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM HR_EMPLOYEE t1 LEFT JOIN HR_EMPLOYEE t11 ON t1.PARENT_ID = t11.ID LEFT JOIN RESOURCE_RESOURCE t21 ON t11.RESOURCE_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_RESOURCE t51 ON t1.RESOURCE_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 RES_PARTNER t81 ON t1.ADDRESS_HOME_ID = t81.ID LEFT JOIN RESOURCE_CALENDAR t91 ON t1.RESOURCE_CALENDAR_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.USER_ID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN HR_DEPARTMENT t121 ON t1.DEPARTMENT_ID = t121.ID LEFT JOIN RES_COUNTRY t131 ON t1.COUNTRY_OF_BIRTH = t131.ID LEFT JOIN RES_USERS t141 ON t1.EXPENSE_MANAGER_ID = t141.ID LEFT JOIN RES_PARTNER t151 ON t141.PARTNER_ID = t151.ID LEFT JOIN HR_JOB t161 ON t1.JOB_ID = t161.ID LEFT JOIN RES_PARTNER t171 ON t1.ADDRESS_ID = t171.ID LEFT JOIN RES_COMPANY t181 ON t1.COMPANY_ID = t181.ID LEFT JOIN RES_PARTNER t191 ON t181.PARTNER_ID = t191.ID LEFT JOIN HR_EMPLOYEE t201 ON t1.COACH_ID = t201.ID LEFT JOIN RESOURCE_RESOURCE t211 ON t201.RESOURCE_ID = t211.ID LEFT JOIN RES_COUNTRY t221 ON t1.COUNTRY_ID = t221.ID