INSERT INTO #{dynamic_securityFlow}.TLK_SUPERVISIONCHECKRECORD (
	PARENT,
	LASTMODIFIED,
	FORMNAME,
	STATE,
	AUDITUSER,
	AUDITDATE,
	AUTHOR,
	AUTHORDEPTID,
	AUTHOR_DEPT_INDEX,
	AUTHOR_USER_INDEX,
	CREATED,
	FORMID,
	SUBFORMIDS,
	INITIATOR,
	ISTMP,
	VERSIONS,
	APPLICATIONID,
	STATEINT,
	STATELABEL,
	AUDITORNAMES,
	LASTFLOWOPERATION,
	LASTMODIFIER,
	DOMAINID,
	AUDITORLIST,
	COAUDITORLIST,
	STATELABELINFO,
	PREVAUDITNODE,
	PREVAUDITUSER,
	OPTIONITEM,
	SIGN,
	KINGGRIDSIGNATURE,
	ITEM_COMPANYPROBLEM,
	ITEM_STATIONPROBLEM,
	ITEM_INSPECTIONCONTENT,
	ITEM_INSPECTIONRECORDS,
	ITEM_HANDLEREGULATORY,
	ITEM_RECTIFICATIONREQUIRE,
	ITEM_REVIEWSITUATION,
	ITEM_COMPANYNAME,
	ITEM_DUTYSTATION,
	ITEM_OFFICEPOLICEADDRESS,
	ITEM_INSPECTER,
	ITEM_INSPECTTIME,
	ITEM_DATASOURE,
	ITEM_Q1,
	ITEM_Q1REMARK,
	ITEM_Q2,
	ITEM_Q2REMARK,
	ITEM_Q3,
	ITEM_Q3REMARK,
	ITEM_Q4,
	ITEM_Q4REMARK,
	ITEM_Q5,
	ITEM_Q5REMARK,
	ITEM_Q6,
	ITEM_Q6REMARK,
	ITEM_Q7,
	ITEM_Q7REMARK,
	ITEM_Q8,
	ITEM_Q8REMARK,
	ITEM_Q9,
	ITEM_Q9REMARK,
	ITEM_Q10,
	ITEM_Q10REMARK,
	ITEM_Q11,
	ITEM_Q11REMARK,
	ITEM_Q12,
	ITEM_Q12REMARK,
	ITEM_Q13,
	ITEM_Q13REMARK,
	ITEM_Q14,
	ITEM_Q14REMARK,
	ITEM_Q15,
	ITEM_Q15REMARK,
	ITEM_Q16,
	ITEM_Q16REMARK,
	ITEM_Q17,
	ITEM_Q17REMARK,
	ITEM_Q18,
	ITEM_Q18REMARK,
	ITEM_Q19,
	ITEM_Q19REMARK,
	ITEM_REGISTERPOLICEADDRESS,
	ITEM_CREATER,
	ITEM_SOURCESIGNATURE,
	ITEM_TARGETSIGNATURE,
	ITEM_CREATETIME,
	ID,
	ITEM_DOMAINID_B,
	ITEM_domainid_B 
)
VALUES
	(
		'#{PARENT}',
		'#{LASTMODIFIED}',
		'#{FORMNAME}',
		'#{STATE}',
		'#{AUDITUSER}',
		'#{AUDITDATE}',
		'#{AUTHOR}',
		'#{AUTHORDEPTID}',
		'#{AUTHOR_DEPT_INDEX}',
		'#{AUTHOR_USER_INDEX}',
		'#{CREATED}',
		'#{FORMID}',
		'#{SUBFORMIDS}',
		'#{INITIATOR}',
		0,
		1,
		'#{APPLICATIONID}',
		'#{STATEINT}',
		'#{STATELABEL}',
		'#{AUDITORNAMES}',
		'#{LASTFLOWOPERATION}',
		'#{LASTMODIFIER}',
		'#{dynamic_domain_id}',
		'#{AUDITORLIST}',
		'#{COAUDITORLIST}',
		'#{STATELABELINFO}',
		'#{PREVAUDITNODE}',
		'#{PREVAUDITUSER}',
		'#{OPTIONITEM}',
		'#{SIGN}',
		'#{KINGGRIDSIGNATURE}',
		'#{ITEM_COMPANYPROBLEM}',
		'#{ITEM_STATIONPROBLEM}',
		'#{ITEM_INSPECTIONCONTENT}',
		'#{ITEM_INSPECTIONRECORDS}',
		'#{ITEM_HANDLEREGULATORY}',
		'#{ITEM_RECTIFICATIONREQUIRE}',
		'#{ITEM_REVIEWSITUATION}',
		'#{ITEM_COMPANYNAME}',
		'#{ITEM_DUTYSTATION}',
		'#{ITEM_OFFICEPOLICEADDRESS}',
		'#{ITEM_INSPECTER}',
		'#{ITEM_INSPECTTIME}',
		'#{ITEM_DATASOURE}',
		'#{ITEM_Q1}',
		'#{ITEM_Q1REMARK}',
		'#{ITEM_Q2}',
		'#{ITEM_Q2REMARK}',
		'#{ITEM_Q3}',
		'#{ITEM_Q3REMARK}',
		'#{ITEM_Q4}',
		'#{ITEM_Q4REMARK}',
		'#{ITEM_Q5}',
		'#{ITEM_Q5REMARK}',
		'#{ITEM_Q6}',
		'#{ITEM_Q6REMARK}',
		'#{ITEM_Q7}',
		'#{ITEM_Q7REMARK}',
		'#{ITEM_Q8}',
		'#{ITEM_Q8REMARK}',
		'#{ITEM_Q9}',
		'#{ITEM_Q9REMARK}',
		'#{ITEM_Q10}',
		'#{ITEM_Q10REMARK}',
		'#{ITEM_Q11}',
		'#{ITEM_Q11REMARK}',
		'#{ITEM_Q12}',
		'#{ITEM_Q12REMARK}',
		'#{ITEM_Q13}',
		'#{ITEM_Q13REMARK}',
		'#{ITEM_Q14}',
		'#{ITEM_Q14REMARK}',
		'#{ITEM_Q15}',
		'#{ITEM_Q15REMARK}',
		'#{ITEM_Q16}',
		'#{ITEM_Q16REMARK}',
		'#{ITEM_Q17}',
		'#{ITEM_Q17REMARK}',
		'#{ITEM_Q18}',
		'#{ITEM_Q18REMARK}',
		'#{ITEM_Q19}',
		'#{ITEM_Q19REMARK}',
		'#{ITEM_REGISTERPOLICEADDRESS}',
		'#{ITEM_CREATER}',
		'#{ITEM_SOURCESIGNATURE}',
		'#{ITEM_TARGETSIGNATURE}',
		'#{ITEM_CREATETIME}',
		'#{ID}',
		'#{ITEM_DOMAINID_B}',
		'#{ITEM_domainid_B}' 
	) 
	ON DUPLICATE KEY UPDATE LASTMODIFIED = '#{LASTMODIFIED}',
	ITEM_COMPANYPROBLEM = '#{ITEM_COMPANYPROBLEM}',
	ITEM_STATIONPROBLEM = '#{ITEM_STATIONPROBLEM}',
	ITEM_INSPECTIONCONTENT = '#{ITEM_INSPECTIONCONTENT}',
	ITEM_INSPECTIONRECORDS = '#{ITEM_INSPECTIONRECORDS}',
	ITEM_HANDLEREGULATORY = '#{ITEM_HANDLEREGULATORY}',
	ITEM_RECTIFICATIONREQUIRE = '#{ITEM_RECTIFICATIONREQUIRE}',
	ITEM_REVIEWSITUATION = '#{ITEM_REVIEWSITUATION}',
	ITEM_COMPANYNAME = '#{ITEM_COMPANYNAME}',
	ITEM_DUTYSTATION = '#{ITEM_DUTYSTATION}',
	ITEM_OFFICEPOLICEADDRESS = '#{ITEM_OFFICEPOLICEADDRESS}',
	ITEM_INSPECTER = '#{ITEM_INSPECTER}',
	ITEM_INSPECTTIME = '#{ITEM_INSPECTTIME}',
	ITEM_DATASOURE = '#{ITEM_DATASOURE}',
	ITEM_Q1 = '#{ITEM_Q1}',
	ITEM_Q1REMARK = '#{ITEM_Q1REMARK}',
	ITEM_Q2 = '#{ITEM_Q2}',
	ITEM_Q2REMARK = '#{ITEM_Q2REMARK}',
	ITEM_Q3 = '#{ITEM_Q3}',
	ITEM_Q3REMARK = '#{ITEM_Q3REMARK}',
	ITEM_Q4 = '#{ITEM_Q4}',
	ITEM_Q4REMARK = '#{ITEM_Q4REMARK}',
	ITEM_Q5 = '#{ITEM_Q5}',
	ITEM_Q5REMARK = '#{ITEM_Q5REMARK}',
	ITEM_Q6 = '#{ITEM_Q6}',
	ITEM_Q6REMARK = '#{ITEM_Q6REMARK}',
	ITEM_Q7 = '#{ITEM_Q7}',
	ITEM_Q7REMARK = '#{ITEM_Q7REMARK}',
	ITEM_Q8 = '#{ITEM_Q8}',
	ITEM_Q8REMARK = '#{ITEM_Q8REMARK}',
	ITEM_Q9 = '#{ITEM_Q9}',
	ITEM_Q9REMARK = '#{ITEM_Q9REMARK}',
	ITEM_Q10 = '#{ITEM_Q10}',
	ITEM_Q10REMARK = '#{ITEM_Q10REMARK}',
	ITEM_Q11 = '#{ITEM_Q11}',
	ITEM_Q11REMARK = '#{ITEM_Q11REMARK}',
	ITEM_Q12 = '#{ITEM_Q12}',
	ITEM_Q12REMARK = '#{ITEM_Q12REMARK}',
	ITEM_Q13 = '#{ITEM_Q13}',
	ITEM_Q13REMARK = '#{ITEM_Q13REMARK}',
	ITEM_Q14 = '#{ITEM_Q14}',
	ITEM_Q14REMARK = '#{ITEM_Q14REMARK}',
	ITEM_Q15 = '#{ITEM_Q15}',
	ITEM_Q15REMARK = '#{ITEM_Q15REMARK}',
	ITEM_Q16 = '#{ITEM_Q16}',
	ITEM_Q16REMARK = '#{ITEM_Q16REMARK}',
	ITEM_Q17 = '#{ITEM_Q17}',
	ITEM_Q17REMARK = '#{ITEM_Q17REMARK}',
	ITEM_Q18 = '#{ITEM_Q18}',
	ITEM_Q18REMARK = '#{ITEM_Q18REMARK}',
	ITEM_Q19 = '#{ITEM_Q19}',
	ITEM_Q19REMARK = '#{ITEM_Q19REMARK}',
	ITEM_REGISTERPOLICEADDRESS = '#{ITEM_REGISTERPOLICEADDRESS}',
	ITEM_CREATER = '#{ITEM_CREATER}',
	ITEM_SOURCESIGNATURE = '#{ITEM_SOURCESIGNATURE}',
	ITEM_TARGETSIGNATURE = '#{ITEM_TARGETSIGNATURE}',
	ITEM_CREATETIME = '#{ITEM_CREATETIME}',
	ITEM_DOMAINID_B = '#{ITEM_DOMAINID_B}',
	ITEM_domainid_B = '#{ITEM_domainid_B}';
	
	update TLK_SUPERVISIONCHECKRECORD set 
 LASTMODIFIED = '#{LASTMODIFIED}',
	ITEM_COMPANYPROBLEM = '#{ITEM_COMPANYPROBLEM}',
	ITEM_STATIONPROBLEM = '#{ITEM_STATIONPROBLEM}',
	ITEM_INSPECTIONCONTENT = '#{ITEM_INSPECTIONCONTENT}',
	ITEM_INSPECTIONRECORDS = '#{ITEM_INSPECTIONRECORDS}',
	ITEM_HANDLEREGULATORY = '#{ITEM_HANDLEREGULATORY}',
	ITEM_RECTIFICATIONREQUIRE = '#{ITEM_RECTIFICATIONREQUIRE}',
	ITEM_REVIEWSITUATION = '#{ITEM_REVIEWSITUATION}',
	ITEM_COMPANYNAME = '#{ITEM_COMPANYNAME}',
	ITEM_DUTYSTATION = '#{ITEM_DUTYSTATION}',
	ITEM_OFFICEPOLICEADDRESS = '#{ITEM_OFFICEPOLICEADDRESS}',
	ITEM_INSPECTER = '#{ITEM_INSPECTER}',
	ITEM_INSPECTTIME = '#{ITEM_INSPECTTIME}',
	ITEM_DATASOURE = '#{ITEM_DATASOURE}',
	ITEM_Q1 = '#{ITEM_Q1}',
	ITEM_Q1REMARK = '#{ITEM_Q1REMARK}',
	ITEM_Q2 = '#{ITEM_Q2}',
	ITEM_Q2REMARK = '#{ITEM_Q2REMARK}',
	ITEM_Q3 = '#{ITEM_Q3}',
	ITEM_Q3REMARK = '#{ITEM_Q3REMARK}',
	ITEM_Q4 = '#{ITEM_Q4}',
	ITEM_Q4REMARK = '#{ITEM_Q4REMARK}',
	ITEM_Q5 = '#{ITEM_Q5}',
	ITEM_Q5REMARK = '#{ITEM_Q5REMARK}',
	ITEM_Q6 = '#{ITEM_Q6}',
	ITEM_Q6REMARK = '#{ITEM_Q6REMARK}',
	ITEM_Q7 = '#{ITEM_Q7}',
	ITEM_Q7REMARK = '#{ITEM_Q7REMARK}',
	ITEM_Q8 = '#{ITEM_Q8}',
	ITEM_Q8REMARK = '#{ITEM_Q8REMARK}',
	ITEM_Q9 = '#{ITEM_Q9}',
	ITEM_Q9REMARK = '#{ITEM_Q9REMARK}',
	ITEM_Q10 = '#{ITEM_Q10}',
	ITEM_Q10REMARK = '#{ITEM_Q10REMARK}',
	ITEM_Q11 = '#{ITEM_Q11}',
	ITEM_Q11REMARK = '#{ITEM_Q11REMARK}',
	ITEM_Q12 = '#{ITEM_Q12}',
	ITEM_Q12REMARK = '#{ITEM_Q12REMARK}',
	ITEM_Q13 = '#{ITEM_Q13}',
	ITEM_Q13REMARK = '#{ITEM_Q13REMARK}',
	ITEM_Q14 = '#{ITEM_Q14}',
	ITEM_Q14REMARK = '#{ITEM_Q14REMARK}',
	ITEM_Q15 = '#{ITEM_Q15}',
	ITEM_Q15REMARK = '#{ITEM_Q15REMARK}',
	ITEM_Q16 = '#{ITEM_Q16}',
	ITEM_Q16REMARK = '#{ITEM_Q16REMARK}',
	ITEM_Q17 = '#{ITEM_Q17}',
	ITEM_Q17REMARK = '#{ITEM_Q17REMARK}',
	ITEM_Q18 = '#{ITEM_Q18}',
	ITEM_Q18REMARK = '#{ITEM_Q18REMARK}',
	ITEM_Q19 = '#{ITEM_Q19}',
	ITEM_Q19REMARK = '#{ITEM_Q19REMARK}',
	ITEM_REGISTERPOLICEADDRESS = '#{ITEM_REGISTERPOLICEADDRESS}',
	ITEM_CREATER = '#{ITEM_CREATER}',
	ITEM_SOURCESIGNATURE = '#{ITEM_SOURCESIGNATURE}',
	ITEM_TARGETSIGNATURE = '#{ITEM_TARGETSIGNATURE}',
	ITEM_CREATETIME = '#{ITEM_CREATETIME}',
	ITEM_DOMAINID_B = '#{ITEM_DOMAINID_B}',
	ITEM_domainid_B = '#{ITEM_domainid_B}'
  where id='#{id}' and LASTMODIFIED<'#{LASTMODIFIED}';