<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="铸造产线能力">

	<query id="FrmBasematerialBPl.getBaseMaterialB" desc="查询基础锻造物料">
             <![CDATA[
               SELECT 
       T.IN_MATERIAL_NO,
       T.IN_MATERIAL_DESC,
       T.OUT_MATERIAL_NO,
       T.OUT_MATERIAL_DESC
 FROM SLM_BASE_MATERIAL_B T
 WHERE
T.IN_MATERIAL_NO =?
AND T.OUT_MATERIAL_NO =?
                 ]]>
	</query>

	<query id="FrmBaseMaterialBPl.getBaseMaterialBPl" desc="查询铸造物料产线能力">
             <![CDATA[
            SELECT T.IN_MATERIAL_NO,
       T1.IN_MATERIAL_DESC,
       T1.OUT_MATERIAL_DESC,
       T.OUT_MATERIAL_NO,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.HR_CAPCTY,
       T.PRD_RATE,
       DECODE(T.DISABLE_FL,'1','True','False') DISABLE_FL,
       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,
       T.DELETE_NAME,
       TO_CHAR(T.DELETE_TIME, 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME,
       T.PLINE_LEVEL,
       T.STOVE_CNT,
       T.PROCESSING_COST,
       T.TOTAL_COST
  FROM SLM_BASE_MATERIAL_B_PL T, SLM_BASE_MATERIAL_B t1
 WHERE T.IN_MATERIAL_NO = T1.IN_MATERIAL_NO
   AND T.OUT_MATERIAL_NO = T1.OUT_MATERIAL_NO
   AND T.IN_MATERIAL_NO = ?
   AND T.OUT_MATERIAL_NO = ?
                 ]]>
	</query>

	<query id="FrmBaseMaterialBPl.updateBaseMaterialBPl" desc="修改铸造物料产线能力">
             <![CDATA[
             UPDATE SLM_BASE_MATERIAL_B_PL T
   SET 
        T.IN_MATERIAL_NO = '#IN_MATERIAL_NO#',
        T.OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#',
        T.PLINE_CODE = '#PLINE_CODE#',
        T.PLINE_NAME = '#PLINE_NAME#',
        T.HR_CAPCTY = '#HR_CAPCTY#',
        T.PRD_RATE = '#PRD_RATE#',
        T.DISABLE_FL = '#DISABLE_FL#',
        T.UPDATE_NAME = '#UPDATE_NAME#',
        T.UPDATE_TIME = SYSDATE,
        T.PLINE_LEVEL = '#PLINE_LEVEL#',
        T.STOVE_CNT = '#STOVE_CNT#',
        T.PROCESSING_COST = '#PROCESSING_COST#',
        T.TOTAL_COST = '#TOTAL_COST#'
 WHERE
T.IN_MATERIAL_NO = '#IN_MATERIAL_NO#'
AND T.OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
AND T.PLINE_CODE = '#PLINE_CODE#'
                 ]]>
	</query>

</queryMap>