<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="铸机基础数据">

	<query id="FrmPlnBasePlineLz.query" desc="查询">
             <![CDATA[
 SELECT 
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.PROCESS_CODE,
       T.PROCESS_DESC,
       T.FLOW_NUM_MAX,
       T.ZB_LEFT_WT,
       TO_CHAR(T.CREAT_TIME, 'YYYY-MM-DD HH24:MI:SS') CREAT_TIME,
       T.CREATE_NAME,
       T.UPDATE_NAME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.FURNACE_NUM_MAX,
       T.PLINE_CODE_A,
       T.PLINE_NAME_A,
       DECODE(T.DEF_VAL,'1','是','/') DEF_VAL
 FROM PLN_BASE_PLINE_LZ T
 order by  T.PLINE_CODE
                 ]]>
	</query>

	<query id="FrmPlnBasePlineLz.add" desc="新增">
             <![CDATA[
 INSERT INTO PLN_BASE_PLINE_LZ(
        PLINE_CODE,
        PLINE_NAME,
        PROCESS_CODE,
        PROCESS_DESC,
        FLOW_NUM_MAX,
        ZB_LEFT_WT,
        CREAT_TIME,
        CREATE_NAME,
        UPDATE_NAME,
        UPDATE_TIME,
        FURNACE_NUM_MAX,
        PLINE_CODE_A,
        PLINE_NAME_A,DEF_VAL)
 VALUES( 
        ?, ?, ?,    ?, ?, ?, SYSDATE,  ?, null, null, ?, ?, ?,?)
                 ]]>
	</query>

	<query id="FrmPlnBasePlineLz.update" desc="修改">
             <![CDATA[
UPDATE PLN_BASE_PLINE_LZ T
   SET T.PROCESS_CODE    = ?,
       T.PROCESS_DESC    = ?,
       T.FLOW_NUM_MAX    = ?,
       T.ZB_LEFT_WT      = ?,
       T.UPDATE_NAME     = ?,
       T.UPDATE_TIME     = SYSDATE,
       T.FURNACE_NUM_MAX = ?,
       T.PLINE_CODE_A    = ?,
       T.PLINE_NAME_A    = ?,
       T.DEF_VAL         =?
 WHERE T.PLINE_CODE = ?
 AND T.PLINE_CODE_A = ?
                 ]]>
	</query>

	<query id="FrmPlnBasePlineLz.delete" desc="删除">
             <![CDATA[
DELETE PLN_BASE_PLINE_LZ T  WHERE T.PLINE_CODE = ?
                 ]]>
	</query>

	<query id="FrmPlnBasePlineLz.checkPline" desc="验证">
             <![CDATA[
select count(1) from PLN_BASE_PLINE_LZ T  WHERE T.PLINE_CODE = ? AND T.PLINE_CODE_A=?
                 ]]>
	</query>

</queryMap>