INSERT INTO
  baibaodunflow.tlk_securitymastermanagement (
    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_NAME,
    ITEM_SEX,
    ITEM_PHONE,
    ID,
    ITEM_SECURITYCOMPANY,
    ITEM_TRAININGINSTITUTIONS,
    ITEM_EDUCATION,
    ITEM_STARTDATE,
    ITEM_ENDDATE,
    ITEM_JOB,
    ITEM_DEGREE,
    ITEM_CERTIFICATENO,
    ITEM_CERTIFICATEDATE,
    ITEM_WORKPLACE,
    ITEM_ADMISSIONNUMBER,
    ITEM_THEORETICALSCORE,
    ITEM_PRACTICALSCORE,
    ITEM_COMPREHENSIVESCORE,
    ITEM_DOCUMENTID,
    AUTHORDEPTID,
    AUTHOR_USER_INDEX,
    SUBFORMIDS,
    INITIATOR,
    ITEM_JOBTYPEAPTITUDE
  )
VALUES
  (
    '#{PARENT}',
    '#{LASTMODIFIED}',
    '#{FORMNAME}',
    '#{STATE}',
    '#{AUDITUSER}',
    '#{AUDITDATE}',
    '#{AUTHOR}',
    '#{AUTHOR_DEPT_INDEX}',
    '#{CREATED}',
    '__aiVYZFCVqeVj0fju94l',
    '#{ISTMP}',
    '#{VERSIONS}',
    '__wGomeHJBz6CpLFCCl4y',
    '#{STATEINT}',
    '#{STATELABEL}',
    '#{AUDITORNAMES}',
    '#{LASTFLOWOPERATION}',
    '#{LASTMODIFIER}',
    '#{DOMAINID}',
    '#{AUDITORLIST}',
    '#{COAUDITORLIST}',
    '#{STATELABELINFO}',
    '#{PREVAUDITNODE}',
    '#{PREVAUDITUSER}',
    '#{OPTIONITEM}',
    '#{SIGN}',
    '#{KINGGRIDSIGNATURE}',
    '#{ITEM_NAME}',
    '#{ITEM_SEX}',
    '#{ITEM_PHONE}',
    '#{ID}',
    '#{ITEM_SECURITYCOMPANY}',
    '#{ITEM_TRAININGINSTITUTIONS}',
    '#{ITEM_EDUCATION}',
    '#{ITEM_STARTDATE}',
    '#{ITEM_ENDDATE}',
    '#{ITEM_JOB}',
    '#{ITEM_DEGREE}',
    '#{ITEM_CERTIFICATENO}',
    '#{ITEM_CERTIFICATEDATE}',
    '#{ITEM_WORKPLACE}',
    '#{ITEM_ADMISSIONNUMBER}',
    '#{ITEM_THEORETICALSCORE}',
    '#{ITEM_PRACTICALSCORE}',
    '#{ITEM_COMPREHENSIVESCORE}',
    '#{ITEM_DOCUMENTID}',
    '#{AUTHORDEPTID}',
    '#{AUTHOR_USER_INDEX}',
    '#{SUBFORMIDS}',
    '#{INITIATOR}',
    '#{ITEM_JOBTYPEAPTITUDE}'
  ) ON DUPLICATE KEY
UPDATE  APPLICATIONID='__wGomeHJBz6CpLFCCl4y';

UPDATE baibaodunflow.tlk_securitymastermanagement set
  LASTMODIFIED = '#{LASTMODIFIED}',
  ITEM_SECURITYCOMPANY = '#{ITEM_SECURITYCOMPANY}',
  ITEM_TRAININGINSTITUTIONS = '#{ITEM_TRAININGINSTITUTIONS}',
  ITEM_EDUCATION = '#{ITEM_EDUCATION}',
  ITEM_STARTDATE = '#{ITEM_STARTDATE}',
  ITEM_ENDDATE = '#{ITEM_ENDDATE}',
  ITEM_JOB = '#{ITEM_JOB}',
  ITEM_DEGREE = '#{ITEM_DEGREE}',
  ITEM_CERTIFICATENO = '#{ITEM_CERTIFICATENO}',
  ITEM_CERTIFICATEDATE = '#{ITEM_CERTIFICATEDATE}',
  ITEM_WORKPLACE = '#{ITEM_WORKPLACE}',
  ITEM_ADMISSIONNUMBER = '#{ITEM_ADMISSIONNUMBER}',
  ITEM_THEORETICALSCORE = '#{ITEM_THEORETICALSCORE}',
  ITEM_PRACTICALSCORE = '#{ITEM_PRACTICALSCORE}',
  ITEM_COMPREHENSIVESCORE = '#{ITEM_COMPREHENSIVESCORE}',
  ITEM_DOCUMENTID = '#{ITEM_DOCUMENTID}',
  ITEM_JOBTYPEAPTITUDE = '#{ITEM_JOBTYPEAPTITUDE}'
WHERE ID='#{ID}' and LASTMODIFIED< '#{LASTMODIFIED}'