INSERT INTO #{dynamic_securityFlow}.TLK_CONTRACTTOENTERPRISE (
	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,
	ID,
	ITEM_CONTRACTNAME,
	ITEM_BELONGENTERPRISE,
	ITEM_PARTYANAME,
	ITEM_PARTYAPHONE,
	ITEM_PARTYBNAME,
	ITEM_PARTYBPHONE,
	ITEM_PARTYCNAME,
	ITEM_PARTYCPHONE,
	ITEM_CONTRACTSTARTDATE,
	ITEM_ISNOTENDDATE,
	ITEM_CONTRACTENDDATE,
	ITEM_CONTRACTSTATE,
	ITEM_CONTRACTFILE,
	ITEM_DOMAIN_ID,
	AUTHORDEPTID,
	AUTHOR_USER_INDEX,
	SUBFORMIDS,
	INITIATOR 
)
VALUES
	(
		NULL,
		'#{LASTMODIFIED}',
		'#{FORMNAME}',
		NULL,
		NULL,
		NULL,
		NULL,
		NULL,
		'#{CREATED}',
		'#{FORMID}',
		0,
		1,
		'__wGomeHJBz6CpLFCCl4y',
		0,
		'',
		'',
		NULL,
		NULL,
		'#{dynamic_domain_id}',
		'{}',
		'{}',
		'[{\"nodes\":[{\"nodeId\":\"\",\"stateLabel\":\"\",\"state\":\"\",\"auditors\":[],\"coAuditors\":[]}]}]',
		NULL,
		NULL,
		NULL,
		NULL,
		NULL,
		'#{ID}',
		'#{ITEM_CONTRACTNAME}',
		'#{ITEM_BELONGENTERPRISE}',
		'#{ITEM_PARTYANAME}',
		'#{ITEM_PARTYAPHONE}',
		'#{ITEM_PARTYBNAME}',
		'#{ITEM_PARTYBPHONE}',
		'#{ITEM_PARTYCNAME}',
		'#{ITEM_PARTYCPHONE}',
		'#{ITEM_CONTRACTSTARTDATE}',
		'#{ITEM_ISNOTENDDATE}',
		'#{ITEM_CONTRACTENDDATE}',
		'#{ITEM_CONTRACTSTATE}',
		'#{ITEM_CONTRACTFILE}',
		'#{domainid}',
		'#{AUTHORDEPTID}',
		'#{AUTHOR_USER_INDEX}',
		'#{SUBFORMIDS}',
		'#{INITIATOR}' 
	) 
	ON DUPLICATE KEY UPDATE LASTMODIFIED = '#{LASTMODIFIED}',
	ITEM_CONTRACTNAME = '#{ITEM_CONTRACTNAME}',
	ITEM_BELONGENTERPRISE = '#{ITEM_BELONGENTERPRISE}',
	ITEM_PARTYANAME = '#{ITEM_PARTYANAME}',
	ITEM_PARTYAPHONE = '#{ITEM_PARTYAPHONE}',
	ITEM_PARTYBNAME = '#{ITEM_PARTYBNAME}',
	ITEM_PARTYBPHONE = '#{ITEM_PARTYBPHONE}',
	ITEM_PARTYCNAME = '#{ITEM_PARTYCNAME}',
	ITEM_PARTYCPHONE = '#{ITEM_PARTYCPHONE}',
	ITEM_CONTRACTSTARTDATE = '#{ITEM_CONTRACTSTARTDATE}',
	ITEM_ISNOTENDDATE = '#{ITEM_ISNOTENDDATE}',
	ITEM_CONTRACTENDDATE = '#{ITEM_CONTRACTENDDATE}',
	ITEM_CONTRACTSTATE = '#{ITEM_CONTRACTSTATE}',
	ITEM_CONTRACTFILE = '#{ITEM_CONTRACTFILE}';