<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="权限功能表查询">
	<query id="CoreWellProductivity.QUERY" desc="权限功能">
		<![CDATA[
			SELECT WELL_CODE,
			       WELL_NAME,
			       WEIGHT,
			       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,
			       MEMO
			  FROM COM_BASE_WELL
			 WHERE 1 = 1
			   AND WELL_NAME||'&' LIKE '%' || ? || '%'
		]]>
	</query>
	<query id="CoreWellProductivity.ADD" desc="新增">
		<![CDATA[
			 insert into COM_BASE_WELL
							(WELL_CODE, 
							WELL_NAME, 
							WEIGHT, 
							create_name, 
							create_time, 
							validflag, 
							memo)
							values(?,?,?,
							?,to_date(?, 'yyyy-mm-dd hh24:mi:ss'),
							?,?)
							
			  
		]]>
	</query>
	<query id="CoreWellProductivity.MODIFY" desc="修改">
		<![CDATA[
			 update COM_BASE_WELL set
							WELL_NAME=?, 
							WEIGHT=?, 
							update_name=?, 
							update_time=to_date(?, 'yyyy-mm-dd hh24:mi:ss'),
							memo=? 
							where WELL_CODE=?
		]]>
	</query>
	<query id="CoreWellProductivity.DELETE" desc="作废">
		<![CDATA[
			 update COM_BASE_WELL set
							delete_name=?, 
							delete_time=to_date(?, 'yyyy-mm-dd hh24:mi:ss'), 
							VALIDFLAG = 0
							where WELL_CODE=?
		]]>
	</query>
	
	<query id="CoreWellProductivity.bindValid" desc="绑定产线状态表">
		<![CDATA[
			 select ID,NAME from COM_BASE_RECORDSSTATE
		]]>
	</query>
	
</queryMap>