<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="水压试验标准表查询">
	<query id="CoreProcessCHEMBIAS.QUERY" desc="">
		<![CDATA[
			select CIC,std_code, std_name, assortment_code,
			 assortment_name,
			 CREATE_NAME,
		     TO_CHAR(CREATE_TIME,'yyyy-mm-dd hh24:mi:ss') CREATE_TIME,
			 UPDATE_NAME,
			 TO_CHAR(UPDATE_TIME,'yyyy-mm-dd hh24:mi:ss') UPDATE_TIME,
			 DELETE_NAME,
			 TO_CHAR(DELETE_TIME,'yyyy-mm-dd hh24:mi:ss') DELETE_TIME,
			 VALIDFLAG
            from com_msc_std_chem_bias
		    WHERE VALIDFLAG in ('1' , ?)
		    order by CIC asc
		]]>
	</query>
	<query id="CoreProcessCHEMBIAS.SELECT" desc="查询条件">
		<![CDATA[
			select count(*) from com_msc_std_chem_bias where STD_CODE=? and ASSORTMENT_CODE=?
		]]>
	</query>
	<query id="CoreProcessCHEMBIAS.ADD" desc="新增">
		<![CDATA[
			insert into com_msc_std_chem_bias
  (CIC,std_code,std_name,assortment_code,assortment_name, create_name, 
  create_time)values((SELECT 'CF'|| (nvl(max(substr(CIC,3)),'1000')+1)  FROM  com_msc_std_chem_bias),?, ?, ?,?, ?, TO_DATE(?, 'yyyy-mm-dd hh24:mi:ss'))
		]]>
	</query>
	<query id="CoreProcessCHEMBIAS.doUpdate" desc="修改">
		<![CDATA[
			 UPDATE com_msc_std_chem_bias set
							std_code=?,
							std_name=?, 
							assortment_code=?, 
							assortment_name=?,
							UPDATE_NAME=?, 
							UPDATE_TIME=TO_DATE(?, 'yyyy-mm-dd hh24:mi:ss')
							WHERE CIC=?
		]]>
	</query>
	<query id="CoreProcessCHEMBIAS.DELETE" desc="作废">
		<![CDATA[
			 UPDATE com_msc_std_chem_bias T
			   SET T.DELETE_NAME = ?, T.DELETE_TIME = SYSDATE, T.VALIDFLAG = '0'
			   WHERE CIC=?
		]]>
	</query>

	<query id="CoreProcessCHEMBIAS.RESUME" desc="恢复">
		<![CDATA[
			UPDATE com_msc_std_chem_bias T
               SET T.DELETE_NAME = '', T.DELETE_TIME = '', T.VALIDFLAG = '1'
              WHERE CIC=?
		]]>
	</query>
</queryMap>