INSERT INTO
  baibaodunflow.tlk_drugman (
    `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_questionType`,
    `ITEM_documentID`,
    `ITEM_drugerName`,
    `ITEM_phone`,
    `ITEM_companyName`,
    `ITEM_domain_id`,
    `ITEM_workStatus`,
    `ITEM_compareTime`,
    `ITEM_registerPoliceAddressID`,
    `ITEM_registerPoliceAddress`,
    `ITEM_policeStatus`,
    `ITEM_policeInternalAdvice`,
    `ITEM_policeExternalAdvice`,
    `ITEM_policeSuggestedTreatment`,
    `ITEM_policeMan`,
    `ITEM_policeOrganization`,
    `ITEM_policeTime`,
    `ITEM_companyMan`,
    `ITEM_companyTime`,
    `ITEM_companyStatus`,
    `ITEM_companyTreatment`,
    `ID`,
    `ITEM_lastCompareTime`,
    `AUTHORDEPTID`,
    `AUTHOR_USER_INDEX`,
    `SUBFORMIDS`,
    `INITIATOR`
  )
VALUES
  (
    '#{PARENT}',
    '#{LASTMODIFIED}',
    '#{FORMNAME}',
    '#{STATE}',
    '#{AUDITUSER}',
    '#{AUDITDATE}',
    '#{AUTHOR}',
    '#{AUTHOR_DEPT_INDEX}',
    '#{CREATED}',
    '__ayxQHDgCgft8cKU690v',
    '#{ISTMP}',
    '#{VERSIONS}',
    '__DXZvc8mnEmDqMARhK7G',
    '#{STATEINT}',
    '#{STATELABEL}',
    '#{AUDITORNAMES}',
    '#{LASTFLOWOPERATION}',
    '#{LASTMODIFIER}',
    '#{ITEM_domain_id}',
    '#{AUDITORLIST}',
    '#{COAUDITORLIST}',
    '#{STATELABELINFO}',
    '#{PREVAUDITNODE}',
    '#{PREVAUDITUSER}',
    '#{OPTIONITEM}',
    '#{SIGN}',
    '#{KINGGRIDSIGNATURE}',
    '#{ITEM_questionType}',
    '#{ITEM_documentID}',
    '#{ITEM_drugerName}',
    '#{ITEM_phone}',
    '#{ITEM_companyName}',
    '#{ITEM_domain_id}',
    '#{ITEM_workStatus}',
    '#{ITEM_compareTime}',
    '#{ITEM_registerPoliceAddressID}',
    '#{ITEM_registerPoliceAddress}',
    '#{ITEM_policeStatus}',
    '#{ITEM_policeInternalAdvice}',
    '#{ITEM_policeExternalAdvice}',
    '#{ITEM_policeSuggestedTreatment}',
    '#{ITEM_policeMan}',
    '#{ITEM_policeOrganization}',
    '#{ITEM_policeTime}',
    '#{ITEM_companyMan}',
    '#{ITEM_companyTime}',
    '#{ITEM_companyStatus}',
    '#{ITEM_companyTreatment}',
    REPLACE (
      '#{ID}',
      '__gwmsYV1yeFHTlLPuMzz',
      '__ayxQHDgCgft8cKU690v'
    ),
    '#{ITEM_lastCompareTime}',
    '#{AUTHORDEPTID}',
    '#{AUTHOR_USER_INDEX}',
    '#{SUBFORMIDS}',
    '#{INITIATOR}'
  ) ON DUPLICATE KEY
UPDATE APPLICATIONID='__DXZvc8mnEmDqMARhK7G';
UPDATE baibaodunflow.tlk_drugman set 
  LASTMODIFIED = '#{LASTMODIFIED}',
  ITEM_policeStatus = '#{ITEM_policeStatus}',
  ITEM_policeInternalAdvice = '#{ITEM_policeInternalAdvice}',
  ITEM_policeExternalAdvice = '#{ITEM_policeExternalAdvice}',
  ITEM_policeSuggestedTreatment = '#{ITEM_policeSuggestedTreatment}',
  ITEM_policeMan = '#{ITEM_policeMan}',
  ITEM_policeOrganization = '#{ITEM_policeOrganization}',
  ITEM_policeTime = '#{ITEM_policeTime}'
WHERE ID=REPLACE (
      '#{ID}',
      '__gwmsYV1yeFHTlLPuMzz',
      '__ayxQHDgCgft8cKU690v'
    )