INSERT INTO
  #{dynamic_securityFlow}.tlk_CompanyInformation (
    PARENT,
    LASTMODIFIED,
    FORMNAME,
    STATE,
    AUDITUSER,
    AUDITDATE,
    AUTHOR,
    AUTHOR_DEPT_INDEX,
    CREATED,
    FORMID,
    ISTMP,
    VERSIONS,
    APPLICATIONID,
    STATEINT,
    STATELABEL,
    AUDITORNAMES,
    LASTFLOWOPERATION,
    LASTMODIFIER,
    DOMAINID,
    AUDITORLIST,
    COAUDITORLIST,
    STATELABELINFO,
    PREVAUDITNODE,
    PREVAUDITUSER,
    OPTIONITEM,
    SIGN,
    KINGGRIDSIGNATURE,
    ITEM_companyName,
    ITEM_isSub,
    ITEM_companyPhone,
    ITEM_companyFax,
    ITEM_economicType,
    ITEM_companyType,
    ITEM_registerAddress,
    ITEM_officeAddress,
    ITEM_registerAddressDetail,
    ITEM_officeAddressDetail,
    ITEM_companyStatus,
    ITEM_groupName,
    ITEM_domain_id,
    ITEM_groupDocumentType,
    ITEM_groupLegalPerson,
    ITEM_groupDocumentNO,
    ITEM_groupPhone,
    ITEM_systemAdmin,
    ITEM_legalPerson,
    ITEM_legalPersonPhone,
    ITEM_documentType,
    ITEM_nationality,
    ITEM_documentID,
    ITEM_registeredCapital,
    ITEM_fixedAssets,
    ITEM_annuaTurnover,
    ITEM_profitTaxes,
    ITEM_registerDocumentType,
    ITEM_registerID,
    ITEM_registerPhoto,
    ITEM_officeType,
    ITEM_securityServicePermitNo,
    ITEM_securityServicePhoto,
    ITEM_issuingSecurityService,
    ITEM_issueServiceDate,
    ITEM_businessScope,
    ITEM_HRLevel,
    ITEM_armedEscortLevel,
    ITEM_securityPrecautions,
    ITEM_isRiskAssessment,
    ITEM_securityTrainPermitNo,
    ITEM_securityTrainPhoto,
    ITEM_issuingTrainPermit,
    ITEM_issueTrainDate,
    ITEM_trainScope,
    ITEM_SecurityNums,
    ITEM_securityGroupLevel,
    ID,
    ITEM_securityType,
    ITEM_isInvoivingPlaces,
    ITEM_isKeyProtectionUnits,
    ITEM_saas_organId,
    ITEM_saas_LearnId,
    AUTHORDEPTID,
    AUTHOR_USER_INDEX,
    SUBFORMIDS,
    INITIATOR,
    ITEM_attendanceSiteType,
    item_companycode
  )
VALUES
  (
    '#{PARENT}',
    '#{LASTMODIFIED}',
    '#{FORMNAME}',
    '#{STATE}',
    '#{AUDITUSER}',
    '#{AUDITDATE}',
    '#{AUTHOR}',
    '#{AUTHOR_DEPT_INDEX}',
    '#{CREATED}',
    '__AOkTvsah9VLicJhQ1FO',
    0,
    1,
    '__DXZvc8mnEmDqMARhK7G',
    '#{STATEINT}',
    '#{STATELABEL}',
    '#{AUDITORNAMES}',
    '#{LASTFLOWOPERATION}',
    '#{LASTMODIFIER}',
    '#{dynamic_domain_id}',
    '#{AUDITORLIST}',
    '#{COAUDITORLIST}',
    '#{STATELABELINFO}',
    '#{PREVAUDITNODE}',
    '#{PREVAUDITUSER}',
    '#{OPTIONITEM}',
    '#{SIGN}',
    '#{KINGGRIDSIGNATURE}',
    '#{ITEM_companyName}',
    '#{ITEM_isSub}',
    '#{ITEM_companyPhone}',
    '#{ITEM_companyFax}',
    '#{ITEM_economicType}',
    '#{ITEM_companyType}',
    '#{ITEM_registerAddress}',
    '#{ITEM_officeAddress}',
    '#{ITEM_registerAddressDetail}',
    '#{ITEM_officeAddressDetail}',
    '#{ITEM_companyStatus}',
    '#{ITEM_groupName}',
    '#{ITEM_domain_id}',
    '#{ITEM_groupDocumentType}',
    '#{ITEM_groupLegalPerson}',
    '#{ITEM_groupDocumentNO}',
    '#{ITEM_groupPhone}',
    '#{ITEM_systemAdmin}',
    '#{ITEM_legalPerson}',
    '#{ITEM_legalPersonPhone}',
    '#{ITEM_documentType}',
    '#{ITEM_nationality}',
    '#{ITEM_documentID}',
    '#{ITEM_registeredCapital}',
    '#{ITEM_fixedAssets}',
    '#{ITEM_annuaTurnover}',
    '#{ITEM_profitTaxes}',
    '#{ITEM_registerDocumentType}',
    '#{ITEM_registerID}',
    '#{ITEM_registerPhoto}',
    '#{ITEM_officeType}',
    '#{ITEM_securityServicePermitNo}',
    '#{ITEM_securityServicePhoto}',
    '#{ITEM_issuingSecurityService}',
    '#{ITEM_issueServiceDate}',
    '#{ITEM_businessScope}',
    '#{ITEM_HRLevel}',
    '#{ITEM_armedEscortLevel}',
    '#{ITEM_securityPrecautions}',
    '#{ITEM_isRiskAssessment}',
    '#{ITEM_securityTrainPermitNo}',
    '#{ITEM_securityTrainPhoto}',
    '#{ITEM_issuingTrainPermit}',
    '#{ITEM_issueTrainDate}',
    '#{ITEM_trainScope}',
    '#{ITEM_SecurityNums}',
    '#{ITEM_securityGroupLevel}',
    '#{ID}',
    '#{ITEM_securityType}',
    '#{ITEM_isInvoivingPlaces}',
    '#{ITEM_isKeyProtectionUnits}',
    '#{ITEM_saas_organId}',
    '#{ITEM_saas_LearnId}',
    '#{AUTHORDEPTID}',
    '#{AUTHOR_USER_INDEX}',
    '#{SUBFORMIDS}',
    '#{INITIATOR}',
    '#{ITEM_attendanceSiteType}',
    '#{item_companycode}'
  ) ON DUPLICATE KEY
UPDATE
  APPLICATIONID = '__DXZvc8mnEmDqMARhK7G';
UPDATE
  tlk_CompanyInformation
set
  LASTMODIFIED = '#{LASTMODIFIED}',
  ITEM_companyName = '#{ITEM_companyName}',
  ITEM_isSub = '#{ITEM_isSub}',
  ITEM_companyPhone = '#{ITEM_companyPhone}',
  ITEM_companyFax = '#{ITEM_companyFax}',
  ITEM_economicType = '#{ITEM_economicType}',
  ITEM_companyType = '#{ITEM_companyType}',
  ITEM_registerAddress = '#{ITEM_registerAddress}',
  ITEM_officeAddress = '#{ITEM_officeAddress}',
  ITEM_registerAddressDetail = '#{ITEM_registerAddressDetail}',
  ITEM_officeAddressDetail = '#{ITEM_officeAddressDetail}',
  ITEM_companyStatus = '#{ITEM_companyStatus}',
  ITEM_groupName = '#{ITEM_groupName}',
  ITEM_domain_id = '#{ITEM_domain_id}',
  ITEM_groupDocumentType = '#{ITEM_groupDocumentType}',
  ITEM_groupLegalPerson = '#{ITEM_groupLegalPerson}',
  ITEM_groupDocumentNO = '#{ITEM_groupDocumentNO}',
  ITEM_groupPhone = '#{ITEM_groupPhone}',
  ITEM_systemAdmin = '#{ITEM_systemAdmin}',
  ITEM_legalPerson = '#{ITEM_legalPerson}',
  ITEM_legalPersonPhone = '#{ITEM_legalPersonPhone}',
  ITEM_documentType = '#{ITEM_documentType}',
  ITEM_nationality = '#{ITEM_nationality}',
  ITEM_documentID = '#{ITEM_documentID}',
  ITEM_registeredCapital = '#{ITEM_registeredCapital}',
  ITEM_fixedAssets = '#{ITEM_fixedAssets}',
  ITEM_annuaTurnover = '#{ITEM_annuaTurnover}',
  ITEM_profitTaxes = '#{ITEM_profitTaxes}',
  ITEM_registerDocumentType = '#{ITEM_registerDocumentType}',
  ITEM_registerID = '#{ITEM_registerID}',
  ITEM_registerPhoto = '#{ITEM_registerPhoto}',
  ITEM_officeType = '#{ITEM_officeType}',
  ITEM_securityServicePermitNo = '#{ITEM_securityServicePermitNo}',
  ITEM_securityServicePhoto = '#{ITEM_securityServicePhoto}',
  ITEM_issuingSecurityService = '#{ITEM_issuingSecurityService}',
  ITEM_issueServiceDate = '#{ITEM_issueServiceDate}',
  ITEM_businessScope = '#{ITEM_businessScope}',
  ITEM_HRLevel = '#{ITEM_HRLevel}',
  ITEM_armedEscortLevel = '#{ITEM_armedEscortLevel}',
  ITEM_securityPrecautions = '#{ITEM_securityPrecautions}',
  ITEM_isRiskAssessment = '#{ITEM_isRiskAssessment}',
  ITEM_securityTrainPermitNo = '#{ITEM_securityTrainPermitNo}',
  ITEM_securityTrainPhoto = '#{ITEM_securityTrainPhoto}',
  ITEM_issuingTrainPermit = '#{ITEM_issuingTrainPermit}',
  ITEM_issueTrainDate = '#{ITEM_issueTrainDate}',
  ITEM_trainScope = '#{ITEM_trainScope}',
  ITEM_SecurityNums = '#{ITEM_SecurityNums}',
  ITEM_securityGroupLevel = '#{ITEM_securityGroupLevel}',
  ITEM_securityType = '#{ITEM_securityType}',
  ITEM_isInvoivingPlaces = '#{ITEM_isInvoivingPlaces}',
  ITEM_isKeyProtectionUnits = '#{ITEM_isKeyProtectionUnits}',
  ITEM_saas_organId = '#{ITEM_saas_organId}',
  ITEM_saas_LearnId = '#{ITEM_saas_LearnId}',
  ITEM_attendanceSiteType = '#{ITEM_attendanceSiteType}',
  item_companycode = '#{item_companycode}'
WHERE
  id = '#{ID}'
  and LASTMODIFIED < '#{LASTMODIFIED}'