INSERT INTO #{dynamic_securityFlow}.TLK_SECURITYCOMPLAINANT (
	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_companyName,
	ITEM_dataSoure,
	ITEM_complainant,
	ITEM_complainantPhone,
	ITEM_complainantCredentialType,
	ITEM_投诉人证件号码,
	ITEM_complainantUnit,
	ITEM_complainantReason,
	ITEM_acceptorRegulatory,
	ITEM_acceptor,
	ITEM_acceptanceTime,
	ITEM_handleRegulatory,
	ITEM_handler,
	ITEM_handlerTime,
	ITEM_handlerAdvice,
	ITEM_rectificationRequire,
	ITEM_reviewSituation,
	ID,
	AUTHORDEPTID,
	AUTHOR_USER_INDEX,
	SUBFORMIDS,
	INITIATOR,
	ITEM_DOMAIN,
	ITEM_COMPANYNAME,
	ITEM_DATASOURE,
	ITEM_COMPLAINANT,
	ITEM_COMPLAINANTPHONE,
	ITEM_COMPLAINANTCREDENTIALTYPE,
	ITEM_COMPLAINANTUNIT,
	ITEM_COMPLAINANTREASON,
	ITEM_ACCEPTORREGULATORY,
	ITEM_ACCEPTOR,
	ITEM_ACCEPTANCETIME,
	ITEM_HANDLEREGULATORY,
	ITEM_HANDLER,
	ITEM_HANDLERTIME,
	ITEM_HANDLERADVICE,
	ITEM_RECTIFICATIONREQUIRE,
	ITEM_REVIEWSITUATION,
	ITEM_domain 
)
VALUES
	(
		'#{PARENT}',
		'#{LASTMODIFIED}',
		'#{FORMNAME}',
		'#{STATE}',
		'#{AUDITUSER}',
		'#{AUDITDATE}',
		'#{AUTHOR}',
		'#{AUTHOR_DEPT_INDEX}',
		'#{CREATED}',
		'#{FORMID}',
		0,
		1,
		'#{APPLICATIONID}',
		'#{STATEINT}',
		'#{STATELABEL}',
		'#{AUDITORNAMES}',
		'#{LASTFLOWOPERATION}',
		'#{LASTMODIFIER}',
		'#{dynamic_domain_id}',
		'#{AUDITORLIST}',
		'#{COAUDITORLIST}',
		'#{STATELABELINFO}',
		'#{PREVAUDITNODE}',
		'#{PREVAUDITUSER}',
		'#{OPTIONITEM}',
		'#{SIGN}',
		'#{KINGGRIDSIGNATURE}',
		'#{ITEM_companyName}',
		'#{ITEM_dataSoure}',
		'#{ITEM_complainant}',
		'#{ITEM_complainantPhone}',
		'#{ITEM_complainantCredentialType}',
		'#{ITEM_投诉人证件号码}',
		'#{ITEM_complainantUnit}',
		'#{ITEM_complainantReason}',
		'#{ITEM_acceptorRegulatory}',
		'#{ITEM_acceptor}',
		'#{ITEM_acceptanceTime}',
		'#{ITEM_handleRegulatory}',
		'#{ITEM_handler}',
		'#{ITEM_handlerTime}',
		'#{ITEM_handlerAdvice}',
		'#{ITEM_rectificationRequire}',
		'#{ITEM_reviewSituation}',
		'#{ID}',
		'#{AUTHORDEPTID}',
		'#{AUTHOR_USER_INDEX}',
		'#{SUBFORMIDS}',
		'#{INITIATOR}',
		'#{ITEM_DOMAIN}',
		'#{ITEM_COMPANYNAME}',
		'#{ITEM_DATASOURE}',
		'#{ITEM_COMPLAINANT}',
		'#{ITEM_COMPLAINANTPHONE}',
		'#{ITEM_COMPLAINANTCREDENTIALTYPE}',
		'#{ITEM_COMPLAINANTUNIT}',
		'#{ITEM_COMPLAINANTREASON}',
		'#{ITEM_ACCEPTORREGULATORY}',
		'#{ITEM_ACCEPTOR}',
		'#{ITEM_ACCEPTANCETIME}',
		'#{ITEM_HANDLEREGULATORY}',
		'#{ITEM_HANDLER}',
		'#{ITEM_HANDLERTIME}',
		'#{ITEM_HANDLERADVICE}',
		'#{ITEM_RECTIFICATIONREQUIRE}',
		'#{ITEM_REVIEWSITUATION}',
		'#{ITEM_domain}' 
	) 
	ON DUPLICATE KEY UPDATE LASTMODIFIED = '#{LASTMODIFIED}',
	ITEM_companyName = '#{ITEM_companyName}',
	ITEM_dataSoure = '#{ITEM_dataSoure}',
	ITEM_complainant = '#{ITEM_complainant}',
	ITEM_complainantPhone = '#{ITEM_complainantPhone}',
	ITEM_complainantCredentialType = '#{ITEM_complainantCredentialType}',
	ITEM_投诉人证件号码 = '#{ITEM_投诉人证件号码}',
	ITEM_complainantUnit = '#{ITEM_complainantUnit}',
	ITEM_complainantReason = '#{ITEM_complainantReason}',
	ITEM_acceptorRegulatory = '#{ITEM_acceptorRegulatory}',
	ITEM_acceptor = '#{ITEM_acceptor}',
	ITEM_acceptanceTime = '#{ITEM_acceptanceTime}',
	ITEM_handleRegulatory = '#{ITEM_handleRegulatory}',
	ITEM_handler = '#{ITEM_handler}',
	ITEM_handlerTime = '#{ITEM_handlerTime}',
	ITEM_handlerAdvice = '#{ITEM_handlerAdvice}',
	ITEM_rectificationRequire = '#{ITEM_rectificationRequire}',
	ITEM_reviewSituation = '#{ITEM_reviewSituation}',
	ITEM_DOMAIN = '#{ITEM_DOMAIN}',
	ITEM_COMPANYNAME = '#{ITEM_COMPANYNAME}',
	ITEM_DATASOURE = '#{ITEM_DATASOURE}',
	ITEM_COMPLAINANT = '#{ITEM_COMPLAINANT}',
	ITEM_COMPLAINANTPHONE = '#{ITEM_COMPLAINANTPHONE}',
	ITEM_COMPLAINANTCREDENTIALTYPE = '#{ITEM_COMPLAINANTCREDENTIALTYPE}',
	ITEM_COMPLAINANTUNIT = '#{ITEM_COMPLAINANTUNIT}',
	ITEM_COMPLAINANTREASON = '#{ITEM_COMPLAINANTREASON}',
	ITEM_ACCEPTORREGULATORY = '#{ITEM_ACCEPTORREGULATORY}',
	ITEM_ACCEPTOR = '#{ITEM_ACCEPTOR}',
	ITEM_ACCEPTANCETIME = '#{ITEM_ACCEPTANCETIME}',
	ITEM_HANDLEREGULATORY = '#{ITEM_HANDLEREGULATORY}',
	ITEM_HANDLER = '#{ITEM_HANDLER}',
	ITEM_HANDLERTIME = '#{ITEM_HANDLERTIME}',
	ITEM_HANDLERADVICE = '#{ITEM_HANDLERADVICE}',
	ITEM_RECTIFICATIONREQUIRE = '#{ITEM_RECTIFICATIONREQUIRE}',
	ITEM_REVIEWSITUATION = '#{ITEM_REVIEWSITUATION}',
	ITEM_domain = '#{ITEM_domain}';
	
	update TLK_SECURITYCOMPLAINANT set 
  LASTMODIFIED = '#{LASTMODIFIED}',
	ITEM_companyName = '#{ITEM_companyName}',
	ITEM_dataSoure = '#{ITEM_dataSoure}',
	ITEM_complainant = '#{ITEM_complainant}',
	ITEM_complainantPhone = '#{ITEM_complainantPhone}',
	ITEM_complainantCredentialType = '#{ITEM_complainantCredentialType}',
	ITEM_投诉人证件号码 = '#{ITEM_投诉人证件号码}',
	ITEM_complainantUnit = '#{ITEM_complainantUnit}',
	ITEM_complainantReason = '#{ITEM_complainantReason}',
	ITEM_acceptorRegulatory = '#{ITEM_acceptorRegulatory}',
	ITEM_acceptor = '#{ITEM_acceptor}',
	ITEM_acceptanceTime = '#{ITEM_acceptanceTime}',
	ITEM_handleRegulatory = '#{ITEM_handleRegulatory}',
	ITEM_handler = '#{ITEM_handler}',
	ITEM_handlerTime = '#{ITEM_handlerTime}',
	ITEM_handlerAdvice = '#{ITEM_handlerAdvice}',
	ITEM_rectificationRequire = '#{ITEM_rectificationRequire}',
	ITEM_reviewSituation = '#{ITEM_reviewSituation}',
	ITEM_DOMAIN = '#{ITEM_DOMAIN}',
	ITEM_COMPANYNAME = '#{ITEM_COMPANYNAME}',
	ITEM_DATASOURE = '#{ITEM_DATASOURE}',
	ITEM_COMPLAINANT = '#{ITEM_COMPLAINANT}',
	ITEM_COMPLAINANTPHONE = '#{ITEM_COMPLAINANTPHONE}',
	ITEM_COMPLAINANTCREDENTIALTYPE = '#{ITEM_COMPLAINANTCREDENTIALTYPE}',
	ITEM_COMPLAINANTUNIT = '#{ITEM_COMPLAINANTUNIT}',
	ITEM_COMPLAINANTREASON = '#{ITEM_COMPLAINANTREASON}',
	ITEM_ACCEPTORREGULATORY = '#{ITEM_ACCEPTORREGULATORY}',
	ITEM_ACCEPTOR = '#{ITEM_ACCEPTOR}',
	ITEM_ACCEPTANCETIME = '#{ITEM_ACCEPTANCETIME}',
	ITEM_HANDLEREGULATORY = '#{ITEM_HANDLEREGULATORY}',
	ITEM_HANDLER = '#{ITEM_HANDLER}',
	ITEM_HANDLERTIME = '#{ITEM_HANDLERTIME}',
	ITEM_HANDLERADVICE = '#{ITEM_HANDLERADVICE}',
	ITEM_RECTIFICATIONREQUIRE = '#{ITEM_RECTIFICATIONREQUIRE}',
	ITEM_REVIEWSITUATION = '#{ITEM_REVIEWSITUATION}',
	ITEM_domain = '#{ITEM_domain}'
  where id='#{id}' and LASTMODIFIED<'#{LASTMODIFIED}';