<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="检验报告">
	
	<query id="QcmJyEquipment.AddEquipment" desc="新增检测报告">
	<![CDATA[
		INSERT INTO QCM_JY_EQUIPMENT(
		            EID,
		            ITEMS,
		            RESULT,
		            CREATE_NAME,
		            CREATE_TIME,
		            UPDATE_NAME,
		            UPDATE_TIME)
		     VALUES( 
		            equipmentseq_yff.nextval,
		            ?,
		            ?,
		            ?,
		            SYSDATE,
		            null,
		            null)
	]]>
	</query>
	
	<query id="QcmJyEquipment.UpdateEquipment" desc="修改检测报告">
	<![CDATA[
		 UPDATE QCM_JY_EQUIPMENT T
		   SET 
		        T.ITEMS = ?,
		        T.RESULT = ?,
		        T.UPDATE_NAME = ?,
		        T.UPDATE_TIME = SYSDATE
		  WHERE
				T.EID = ?
		
	]]>
	</query>
		
	<query id = "QcmJyEquipment.deleteEquipment" desc = "删除">  
	<![CDATA[
	DELETE FROM QCM_JY_EQUIPMENT Q WHERE Q.EID =?
	]]>
	</query>


	<query id = "QcmJyEquipment.selectEquipmentInfobyitems" desc = "根据设备名称以及型号  查找是否已有数据">
	<![CDATA[
	select count(1) acount
	  from QCM_JY_EQUIPMENT q
	 WHERE q.ITEMS = ?
	   and q.RESULT = ?
	]]>
	</query>
	
	
	<query id='QcmJyEquipment.FindEquipmentInfo' desc="查询检测报告">
	<![CDATA[
	 SELECT 
	   T.EID,
       T.ITEMS,
       T.RESULT,
       T.CREATE_NAME,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       T.UPDATE_NAME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME
	 FROM QCM_JY_EQUIPMENT T
	 WHERE 1=1
	  ]]>
	</query>
	<query id='QcmJyEquipment.FindEquipmentInResult' desc="查询检测报告">
	<![CDATA[
	 SELECT 
       T.RESULT
	 FROM QCM_JY_EQUIPMENT T
	 WHERE 1=1
	  ]]>
	</query>
	
</queryMap>