INSERT INTO
  #{dynamic_securityFlow}.TLK_GUN (
    PARENT,
    LASTMODIFIED,
    FORMNAME,
    STATE,
    AUDITUSER,
    AUDITDATE,
    AUTHOR,
    AUTHORDEPTID,
    AUTHOR_DEPT_INDEX,
    AUTHOR_USER_INDEX,
    CREATED,
    FORMID,
    SUBFORMIDS,
    INITIATOR,
    ISTMP,
    VERSIONS,
    APPLICATIONID,
    STATEINT,
    STATELABEL,
    AUDITORNAMES,
    LASTFLOWOPERATION,
    LASTMODIFIER,
    DOMAINID,
    AUDITORLIST,
    COAUDITORLIST,
    STATELABELINFO,
    PREVAUDITNODE,
    PREVAUDITUSER,
    OPTIONITEM,
    SIGN,
    KINGGRIDSIGNATURE,
    ITEM_GUNNO,
    ITEM_GUNMODEL,
    ITEM_GUNSTATUS,
    ITEM_MANUFACTURERS,
    ITEM_BUYDATE,
    ITEM_CA,
    ITEM_GUNADMIN,
    ITEM_GUNBULLETTRACERECORD,
    ITEM_REMARK,
    ITEM_DOMAINIDH,
    ITEM_DOMAINNAME,
    ID,
    ITEM_DOMAIN_ID
  )
VALUES
  (
    NULL,
    '#{LASTMODIFIED}',
    '#{FORMNAME}',
    NULL,
    NULL,
    NULL,
    NULL,
    '#{AUTHORDEPTID}',
    NULL,
    '#{AUTHOR_USER_INDEX}',
    '#{CREATED}',
    '__1NKM7JInoCac6Ot7kXm',
    '#{SUBFORMIDS}',
    '#{INITIATOR}',
    0,
    1,
    '__wGomeHJBz6CpLFCCl4y',
    '#{STATEINT}',
    '#{STATELABEL}',
    '#{AUDITORNAMES}',
    '#{LASTFLOWOPERATION}',
    '#{LASTMODIFIER}',
    '#{dynamic_domain_id}',
    '#{AUDITORLIST}',
    '#{COAUDITORLIST}',
    '#{STATELABELINFO}',
    '#{PREVAUDITNODE}',
    '#{PREVAUDITUSER}',
    '#{OPTIONITEM}',
    '#{SIGN}',
    '#{KINGGRIDSIGNATURE}',
    '#{ITEM_GUNNO}',
    '#{ITEM_GUNMODEL}',
    '#{ITEM_GUNSTATUS}',
    '#{ITEM_MANUFACTURERS}',
    '#{ITEM_BUYDATE}',
    '#{ITEM_CA}',
    '#{ITEM_GUNADMIN}',
    '#{ITEM_GUNBULLETTRACERECORD}',
    '#{ITEM_REMARK}',
    '#{ITEM_DOMAINIDH}',
    '#{ITEM_DOMAINNAME}',
    REPLACE (
      '#{id}',
      '__D8cUSnel3yRvBM9g4P3',
      '__1NKM7JInoCac6Ot7kXm'
    ),
    '#{domainid}'
  ) ON DUPLICATE KEY
UPDATE
  LASTMODIFIED = '#{LASTMODIFIED}',
  ITEM_GUNNO = '#{ITEM_GUNNO}',
  ITEM_GUNMODEL = '#{ITEM_GUNMODEL}',
  ITEM_GUNSTATUS = '#{ITEM_GUNSTATUS}',
  ITEM_MANUFACTURERS = '#{ITEM_MANUFACTURERS}',
  ITEM_BUYDATE = '#{ITEM_BUYDATE}',
  ITEM_CA = '#{ITEM_CA}',
  ITEM_GUNADMIN = '#{ITEM_GUNADMIN}',
  ITEM_GUNBULLETTRACERECORD = '#{ITEM_GUNBULLETTRACERECORD}',
  ITEM_REMARK = '#{ITEM_REMARK}',
  ITEM_DOMAINIDH = '#{ITEM_DOMAINIDH}',
  ITEM_DOMAINNAME = '#{ITEM_DOMAINNAME}',
  ITEM_DOMAIN_ID = '#{ITEM_DOMAIN_ID}';