insert into #{dynamic_securityFlow}.tlk_otherinspectionrecords (LASTMODIFIED,FORMNAME,STATE,CREATED,FORMID,ISTMP,VERSIONS,APPLICATIONID,DOMAINID,ITEM_punishObjectType,ITEM_userName,ITEM_organizationName,ITEM_phone,ITEM_credentialType,ITEM_CREDENTIALCODE,ITEM_code,ITEM_commendationRewardTime,ITEM_punishReason,ITEM_punishContent,ITEM_handleRegulatory,ID,ITEM_CREDENTIAL,ITEM_PUNISHBASIS) VALUES ('#{LASTMODIFIED}','#{FORMNAME}','#{STATE}','#{CREATED}','#{FORMID}',0,1,'#{APPLICATIONID}','#{dynamic_domain_id}','#{ITEM_punishObjectType}','#{ITEM_userName}','#{ITEM_organizationName}','#{ITEM_phone}','#{ITEM_credentialType}','#{ITEM_CREDENTIALCODE}','#{ITEM_code}','#{ITEM_commendationRewardTime}','#{ITEM_punishReason}','#{ITEM_punishContent}','#{ITEM_handleRegulatory}','#{ID}','#{ITEM_CREDENTIAL}','#{ITEM_PUNISHBASIS}') ON DUPLICATE KEY UPDATE domainid='#{dynamic_domain_id}';

update #{dynamic_securityFlow}.tlk_otherinspectionrecords set LASTMODIFIED = '#{LASTMODIFIED}',FORMNAME = '#{FORMNAME}',STATE = '#{STATE}',CREATED = '#{CREATED}',FORMID = '#{FORMID}',ISTMP = 0,VERSIONS = 1,APPLICATIONID = '#{APPLICATIONID}',ITEM_punishObjectType = '#{ITEM_punishObjectType}',ITEM_userName = '#{ITEM_userName}',ITEM_organizationName = '#{ITEM_organizationName}',ITEM_phone = '#{ITEM_phone}',ITEM_credentialType = '#{ITEM_credentialType}',ITEM_CREDENTIALCODE = '#{ITEM_CREDENTIALCODE}',ITEM_code = '#{ITEM_code}',ITEM_commendationRewardTime = '#{ITEM_commendationRewardTime}',ITEM_punishReason = '#{ITEM_punishReason}',ITEM_punishContent = '#{ITEM_punishContent}',ITEM_handleRegulatory = '#{ITEM_handleRegulatory}',ITEM_CREDENTIAL = '#{ITEM_CREDENTIAL}',ITEM_PUNISHBASIS = '#{ITEM_PUNISHBASIS}' where id = '#{ID}' and LASTMODIFIED > '#{LASTMODIFIED}';