<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="水压试验标准表查询">
	<query id="CoreProcessCHEMBIASC.QUERY" desc="">
		<![CDATA[
			select cic, index_seq, chem_code, chem_name,DECODE(whole_backlog,'A','单一元素','B','复合元素') whole_backlog, chem_formula, min_sign,
			 min_val, max_sign, max_val, std_min_sign, std_min_val, std_max_sign,
            std_max_val, create_name, create_time,VALIDFLAG
            from com_msc_std_chem_bias_c
				   WHERE VALIDFLAG in ('1' , ?)
		]]>
	</query>
	<query id="CoreProcessCHEMBIASC.ADD" desc="新增">
		<![CDATA[
			 insert into com_msc_std_chem_bias_c
  (cic, index_seq, chem_code, chem_name, whole_backlog, chem_formula, min_sign, min_val, 
  max_sign, max_val, std_min_sign,std_min_val, std_max_sign, std_max_val, create_name, create_time)
values
  (?,(select nvl(max(index_seq),'0')+1 as index_seq from com_msc_std_chem_bias_c), ?, ?, ?, ?, ?, ?, ?, ?,
   ?, ?, ?, ?, ?,TO_DATE(?, 'yyyy-mm-dd hh24:mi:ss'))
		]]>
	</query>
	<query id="CoreProcessCHEMBIASC.doUpdate" desc="修改">
		<![CDATA[
			 UPDATE com_msc_std_chem_bias_c set
							chem_code=?, chem_name=?, whole_backlog=?,
							chem_formula=?, min_sign=?, min_val=?, 
                            max_sign=?, max_val=?, std_min_sign=?,
                            std_min_val=?, std_max_sign=?, std_max_val=?,
							UPDATE_NAME=?, 
							UPDATE_TIME=TO_DATE(?, 'yyyy-mm-dd hh24:mi:ss')
							WHERE cic=? and index_seq=to_number(?)
		]]>
	</query>
	<query id="CoreProcessCHEMBIASC.DELETE" desc="作废">
		<![CDATA[
			 UPDATE com_msc_std_chem_bias_c T
			   SET T.DELETE_NAME = ?, T.DELETE_TIME = SYSDATE, T.VALIDFLAG = '0'
			 WHERE t.cic=? and t.index_seq=to_number(?)
		]]>
	</query>

	<query id="CoreProcessCHEMBIASC.RESUME" desc="恢复">
		<![CDATA[
			UPDATE com_msc_std_chem_bias_c T
               SET T.DELETE_NAME = '', T.DELETE_TIME = '', T.VALIDFLAG = '1'
              WHERE t.cic=? and t.index_seq=to_number(?)
		]]>
	</query>
</queryMap>