INSERT INTO
  #{dynamic_securityFlow}.tlk_OverseasOperation (
    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_nationality,
    ITEM_operationType,
    ITEM_recordPolic,
    ITEM_recordDate,
    ITEM_startDate,
    ITEM_endDate,
    ITEM_businessScope,
    ITEM_domain_id,
    ITEM_companyName,
    ID,
    AUTHORDEPTID,
    AUTHOR_USER_INDEX,
    SUBFORMIDS,
    INITIATOR
  )
VALUES
  (
    '#{PARENT}',
    '#{LASTMODIFIED}',
    '#{FORMNAME}',
    '#{STATE}',
    '#{AUDITUSER}',
    '#{AUDITDATE}',
    '#{AUTHOR}',
    '#{AUTHOR_DEPT_INDEX}',
    '#{CREATED}',
    '__MaZa7PxhDJUKp4IGv0h',
    0,
    1,
    '__wGomeHJBz6CpLFCCl4y',
    '#{STATEINT}',
    '#{STATELABEL}',
    '#{AUDITORNAMES}',
    '#{LASTFLOWOPERATION}',
    '#{LASTMODIFIER}',
    '#{dynamic_domain_id}',
    '#{AUDITORLIST}',
    '#{COAUDITORLIST}',
    '#{STATELABELINFO}',
    '#{PREVAUDITNODE}',
    '#{PREVAUDITUSER}',
    '#{OPTIONITEM}',
    '#{SIGN}',
    '#{KINGGRIDSIGNATURE}',
    '#{ITEM_nationality}',
    '#{ITEM_operationType}',
    '#{ITEM_recordPolic}',
    '#{ITEM_recordDate}',
    '#{ITEM_startDate}',
    '#{ITEM_endDate}',
    '#{ITEM_businessScope}',
    '#{ITEM_domain_id}',
    '#{ITEM_companyName}',
    '#{ID}',
    '#{AUTHORDEPTID}',
    '#{AUTHOR_USER_INDEX}',
    '#{SUBFORMIDS}',
    '#{INITIATOR}'
  ) ON DUPLICATE KEY
UPDATE APPLICATIONID='__wGomeHJBz6CpLFCCl4y';
UPDATE tlk_OverseasOperation SET 
  LASTMODIFIED = '#{LASTMODIFIED}',
  ITEM_nationality = '#{ITEM_nationality}',
  ITEM_operationType = '#{ITEM_operationType}',
  ITEM_recordPolic = '#{ITEM_recordPolic}',
  ITEM_recordDate = '#{ITEM_recordDate}',
  ITEM_startDate = '#{ITEM_startDate}',
  ITEM_endDate = '#{ITEM_endDate}',
  ITEM_businessScope = '#{ITEM_businessScope}',
  ITEM_domain_id = '#{ITEM_domain_id}',
  ITEM_companyName = '#{ITEM_companyName}'
WHERE ID='#{ID}' and LASTMODIFIED< '#{LASTMODIFIED}'