INSERT INTO
  #{dynamic_securityFlow}.tlk_jfDeviceInventoryRecord (
    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_EQUIPTYPE,
    ITEM_EQUIPNO,
    ITEM_EQUIPNAME,
    ITEM_INVENTORYTYPE,
    ITEM_REMAINQUALITY,
    ITEM_SECURITYNAME,
    ITEM_SECURITYCERTIFICATENUM,
    ITEM_INVENTORYDATE,
    ITEM_INVENTORYQUALITY,
    ITEM_REGISTRANT,
    ITEM_REGISTRANTDATE,
    ITEM_REMARK,
    ITEM_EQUIPID,
    ID,
    ITEM_securityCertificateType
  )
VALUES
  (
    '#{PARENT}',
    '#{LASTMODIFIED}',
    '#{FORMNAME}',
    '#{STATE}',
    '#{AUDITUSER}',
    '#{AUDITDATE}',
    '#{AUTHOR}',
    '#{AUTHORDEPTID}',
    '#{AUTHOR_DEPT_INDEX}',
    '#{AUTHOR_USER_INDEX}',
    '#{CREATED}',
    '__K5Wm7ex6o3JpO5qCBXP',
    '#{SUBFORMIDS}',
    '#{INITIATOR}',
    0,
    1,
    '__wGomeHJBz6CpLFCCl4y',
    '#{STATEINT}',
    '#{STATELABEL}',
    '#{AUDITORNAMES}',
    '#{LASTFLOWOPERATION}',
    '#{LASTMODIFIER}',
    '#{dynamic_domain_id}',
    '#{AUDITORLIST}',
    '#{COAUDITORLIST}',
    '#{STATELABELINFO}',
    '#{PREVAUDITNODE}',
    '#{PREVAUDITUSER}',
    '#{OPTIONITEM}',
    '#{SIGN}',
    '#{KINGGRIDSIGNATURE}',
    '#{ITEM_EQUIPTYPE}',
    '#{ITEM_EQUIPNO}',
    '#{ITEM_EQUIPNAME}',
    '#{ITEM_INVENTORYTYPE}',
    '#{ITEM_REMAINQUALITY}',
    '#{ITEM_SECURITYNAME}',
    '#{ITEM_SECURITYCERTIFICATENUM}',
    '#{ITEM_INVENTORYDATE}',
    '#{ITEM_INVENTORYQUALITY}',
    '#{ITEM_REGISTRANT}',
    '#{ITEM_REGISTRANTDATE}',
    '#{ITEM_REMARK}',
    REPLACE ( '#{ITEM_EQUIPID}', '__l7BrzXMoqKcYK2XaavK', '__Ey49DY2zkSwWaRs29Kf'),
    REPLACE ( '#{id}', '__MLcGaIQhergnAKWJnFs', '__K5Wm7ex6o3JpO5qCBXP'),
    '#{ITEM_securityCertificateType}'
  ) ON DUPLICATE KEY
UPDATE
  LASTMODIFIED = '#{LASTMODIFIED}',
  ITEM_EQUIPTYPE = '#{ITEM_EQUIPTYPE}',
  ITEM_EQUIPNO = '#{ITEM_EQUIPNO}',
  ITEM_EQUIPNAME = '#{ITEM_EQUIPNAME}',
  ITEM_INVENTORYTYPE = '#{ITEM_INVENTORYTYPE}',
  ITEM_REMAINQUALITY = '#{ITEM_REMAINQUALITY}',
  ITEM_SECURITYNAME = '#{ITEM_SECURITYNAME}',
  ITEM_SECURITYCERTIFICATENUM = '#{ITEM_SECURITYCERTIFICATENUM}',
  ITEM_INVENTORYDATE = '#{ITEM_INVENTORYDATE}',
  ITEM_INVENTORYQUALITY = '#{ITEM_INVENTORYQUALITY}',
  ITEM_REGISTRANT = '#{ITEM_REGISTRANT}',
  ITEM_REGISTRANTDATE = '#{ITEM_REGISTRANTDATE}',
  ITEM_REMARK = '#{ITEM_REMARK}',
  ITEM_EQUIPID = REPLACE ( '#{ITEM_EQUIPID}', '__l7BrzXMoqKcYK2XaavK', '__Ey49DY2zkSwWaRs29Kf'),
  ITEM_securityCertificateType = '#{ITEM_securityCertificateType}';