INSERT INTO #{dynamic_securityFlow}.TLK_SECURITY_GUARD_LEAVE (
	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_SECURITY_GUARD_NAME,
	ITEM_GUARD_CARDID,
	ITEM_GUARD_PHONE,
	ID,
	ITEM_ARRIVE_AREA,
	ITEM_GUARDDETAIL_ADDRESS,
	ITEM_LEAVE_TIME,
	ITEM_BACK_TIME,
	ITEM_TRANSPORT,
	ITEM_TIME_ARRVE,
	ITEM_COM_NAME,
	ITEM_SUBORDINATECOMPANIES,
	AUTHORDEPTID,
	AUTHOR_USER_INDEX,
	SUBFORMIDS,
	INITIATOR 
)
VALUES
	(
		'#{PARENT}',
		'#{LASTMODIFIED}',
		'#{FORMNAME}',
		'#{STATE}',
		'#{AUDITUSER}',
		'#{AUDITDATE}',
		'#{AUTHOR}',
		'#{AUTHOR_DEPT_INDEX}',
		'#{CREATED}',
		'__eKBsx3yXj7h31qs2nul',
		0,
		1,
		'__wGomeHJBz6CpLFCCl4y',
		'#{STATEINT}',
		'#{STATELABEL}',
		'#{AUDITORNAMES}',
		'#{LASTFLOWOPERATION}',
		'#{LASTMODIFIER}',
		'#{dynamic_domain_id}',
		'#{AUDITORLIST}',
		'#{COAUDITORLIST}',
		'#{STATELABELINFO}',
		'#{PREVAUDITNODE}',
		'#{PREVAUDITUSER}',
		'#{OPTIONITEM}',
		'#{SIGN}',
		'#{KINGGRIDSIGNATURE}',
		'#{ITEM_SECURITY_GUARD_NAME}',
		'#{ITEM_GUARD_CARDID}',
		'#{ITEM_GUARD_PHONE}',
		REPLACE ( '#{id}', '__fnjHO5sr2IGlgd0Ig7I', '__eKBsx3yXj7h31qs2nul'),
		'#{ITEM_ARRIVE_AREA}',
		'#{ITEM_GUARDDETAIL_ADDRESS}',
		'#{ITEM_LEAVE_TIME}',
		'#{ITEM_BACK_TIME}',
		'#{ITEM_TRANSPORT}',
		'#{ITEM_TIME_ARRVE}',
		'#{ITEM_COM_NAME}',
		'#{ITEM_SUBORDINATECOMPANIES}',
		'#{AUTHORDEPTID}',
		'#{AUTHOR_USER_INDEX}',
		'#{SUBFORMIDS}',
		'#{INITIATOR}' 
	) 
	ON DUPLICATE KEY UPDATE LASTMODIFIED = '#{LASTMODIFIED}',
	ITEM_SECURITY_GUARD_NAME = '#{ITEM_SECURITY_GUARD_NAME}',
	ITEM_GUARD_CARDID = '#{ITEM_GUARD_CARDID}',
	ITEM_GUARD_PHONE = '#{ITEM_GUARD_PHONE}',
	ITEM_ARRIVE_AREA = '#{ITEM_ARRIVE_AREA}',
	ITEM_GUARDDETAIL_ADDRESS = '#{ITEM_GUARDDETAIL_ADDRESS}',
	ITEM_LEAVE_TIME = '#{ITEM_LEAVE_TIME}',
	ITEM_BACK_TIME = '#{ITEM_BACK_TIME}',
	ITEM_TRANSPORT = '#{ITEM_TRANSPORT}',
	ITEM_TIME_ARRVE = '#{ITEM_TIME_ARRVE}',
	ITEM_COM_NAME = '#{ITEM_COM_NAME}',
	ITEM_SUBORDINATECOMPANIES = '#{ITEM_SUBORDINATECOMPANIES}';