INSERT INTO
  #{dynamic_kaopei}.tlk_qualify_person_apply (
  id,
  formid,
  domainid,
  applicationid,
  CREATEd,
  LASTMODIFIED,
  ITEM_LEARNNAME,
  ITEM_LEARNID,
  ITEM_NAME,
  ITEM_PHONE,
  ITEM_IDCARDNO,
  ITEM_SEX,
  ITEM_HEIGHT,
  ITEM_EDUCATION,
  ITEM_NATION,
  ITEM_RESIDENTPLACETYPE,
  ITEM_RESIDENTTYPE,
  ITEM_SECURITYID,
  ITEM_CONTRACTNAME,
  ITEM_SECONDPARTYNAME,
  ITEM_EFFECTSTARTDATE,
  ITEM_EFFECTENDDATE,
  ITEM_IDCARDNOFRONTURL,
  ITEM_IDCARDNOBACKURL,
  ITEM_ISTRUE,
  ITEM_AGENTNAME,
  ITEM_AGENTIDCARDNO,
  ITEM_AGENTPHONE,
  ITEM_AVATAR,
  ITEM_MATERIALAPPROVESTATUS,
  ITEM_MATERIALAPPROVEDATE,
  ITEM_MATERIALAPPROVEPERNAME,
  ITEM_MATERIALAPPROVEPERIDCARDNO,
  ITEM_APPLYSTATUS,
  ITEM_CHECKSTATUS,
  ITEM_BACKGROUNDSTATUS,
  ITEM_PAYSTATE,
  ITEM_PAYDATE,
  ITEM_TRAINID,
  ITEM_TRAINNAME,
  ITEM_CONTRACTFILE,
  ITEM_ORDERID,
  ITEM_MATERIALAPPROVEFAILREASON,
  ITEM_APPROVEFAILREASON,
  ITEM_EDUCATIONCARD,
  ITEM_PHYSICAL,
  ITEM_ISSUBSIDY,
  ITEM_FINGERPRINTCODE,
  ITEM_FINGERPRINTCODETYPE,
  ITEM_EXAMNUM,
  ITEM_REVIEWRESULT,
  ITEM_REVIEWSTATUS,
  ITEM_BACKGROUND_TIME,
  ITEM_MESSAGESTATUS,
  ITEM_PROGRESS,
  ITEM_TRUEPITURE,
  ITEM_WRITTENSCORE,
  ITEM_OPERATESCORE,
  ITEM_EXAMID,
  ITEM_APPTYPE,
  ITEM_BACKGROUDSTATUSTIME
)
VALUES
  (
    REPLACE (
      '#{id}',
      '__3p4Ro0NJIbAnbx6tmEc',
      '__btCmLDlw8qaZvjlKLf4'
    ),
    '__btCmLDlw8qaZvjlKLf4',
    '#{dynamic_domain_id}',
    '__ebVTJ4Qkg61oQ2jlCCL',
    '#{CREATEd}',
    '#{LASTMODIFIED}',
    '#{ITEM_LEARNNAME}',
    '#{ITEM_LEARNID}',
    '#{ITEM_NAME}',
    '#{ITEM_PHONE}',
    '#{ITEM_IDCARDNO}',
    '#{ITEM_SEX}',
    '#{ITEM_HEIGHT}',
    '#{ITEM_EDUCATION}',
    '#{ITEM_NATION}',
    '#{ITEM_RESIDENTPLACETYPE}',
    '#{ITEM_RESIDENTTYPE}',
    '#{ITEM_SECURITYID}',
    '#{ITEM_CONTRACTNAME}',
    '#{ITEM_SECONDPARTYNAME}',
    '#{ITEM_EFFECTSTARTDATE}',
    '#{ITEM_EFFECTENDDATE}',
    '#{ITEM_IDCARDNOFRONTURL}',
    '#{ITEM_IDCARDNOBACKURL}',
    '#{ITEM_ISTRUE}',
    '#{ITEM_AGENTNAME}',
    '#{ITEM_AGENTIDCARDNO}',
    '#{ITEM_AGENTPHONE}',
    '#{ITEM_AVATAR}',
    '#{ITEM_MATERIALAPPROVESTATUS}',
    '#{ITEM_MATERIALAPPROVEDATE}',
    '#{ITEM_MATERIALAPPROVEPERNAME}',
    '#{ITEM_MATERIALAPPROVEPERIDCARDNO}',
    '#{ITEM_APPLYSTATUS}',
    '#{ITEM_CHECKSTATUS}',
    '#{ITEM_BACKGROUNDSTATUS}',
    '#{ITEM_PAYSTATE}',
    '#{ITEM_PAYDATE}',
    '#{ITEM_TRAINID}',
    '#{ITEM_TRAINNAME}',
    '#{ITEM_CONTRACTFILE}',
    '#{ITEM_ORDERID}',
    '#{ITEM_MATERIALAPPROVEFAILREASON}',
    '#{ITEM_APPROVEFAILREASON}',
    '#{ITEM_EDUCATIONCARD}',
    '#{ITEM_PHYSICAL}',
    '#{ITEM_ISSUBSIDY}',
    '#{ITEM_FINGERPRINTCODE}',
    '#{ITEM_FINGERPRINTCODETYPE}',
    '#{ITEM_EXAMNUM}',
    '#{ITEM_REVIEWRESULT}',
    '#{ITEM_REVIEWSTATUS}',
    '#{ITEM_BACKGROUND_TIME}',
    '#{ITEM_MESSAGESTATUS}',
    '#{ITEM_PROGRESS}',
    '#{ITEM_TRUEPITURE}',
    '#{ITEM_WRITTENSCORE}',
    '#{ITEM_OPERATESCORE}',
    REPLACE (
      '#{ITEM_EXAMID}',
      '__TguP7KZtUDBVC1gHr6k',
      '__UYZQQRronq7KSLUMbnD'
    ),
    '#{ITEM_APPTYPE}',
    '#{ITEM_BACKGROUDSTATUSTIME}'
  ) ON DUPLICATE KEY
UPDATE
  ITEM_LEARNNAME = '#{ITEM_LEARNNAME}',
  ITEM_MATERIALAPPROVESTATUS = '#{ITEM_MATERIALAPPROVESTATUS}',
  ITEM_MATERIALAPPROVEDATE = '#{ITEM_MATERIALAPPROVEDATE}',
  ITEM_MATERIALAPPROVEPERNAME = '#{ITEM_MATERIALAPPROVEPERNAME}',
  ITEM_MATERIALAPPROVEPERIDCARDNO = '#{ITEM_MATERIALAPPROVEPERIDCARDNO}',
  ITEM_APPLYSTATUS = '#{ITEM_APPLYSTATUS}',
  ITEM_BACKGROUNDSTATUS = '#{ITEM_BACKGROUNDSTATUS}',
  ITEM_TRAINID = '#{ITEM_TRAINID}',
  ITEM_TRAINNAME = '#{ITEM_TRAINNAME}',
  ITEM_MATERIALAPPROVEFAILREASON = '#{ITEM_MATERIALAPPROVEFAILREASON}',
  ITEM_APPROVEFAILREASON = '#{ITEM_APPROVEFAILREASON}',
  ITEM_PROGRESS = '#{ITEM_PROGRESS}',
  ITEM_WRITTENSCORE = '#{ITEM_WRITTENSCORE}',
  ITEM_OPERATESCORE = '#{ITEM_OPERATESCORE}',
  ITEM_EXAMID = REPLACE (
    '#{ITEM_EXAMID}',
    '__TguP7KZtUDBVC1gHr6k',
    '__UYZQQRronq7KSLUMbnD'
  ),
  ITEM_APPTYPE = '#{ITEM_APPTYPE}',
  ITEM_BACKGROUDSTATUSTIME = '#{ITEM_BACKGROUDSTATUSTIME}';