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

	<query id="FrmBaseMaterialDPl.getBaseMaterialD" desc="查询基础轧管物料">
             <![CDATA[
              SELECT 
       T.IN_MATERIAL_NO,
       T.IN_MATERIAL_DESC,
       T.OUT_MATERIAL_NO,
       T.OUT_MATERIAL_DESC
 FROM SLM_BASE_MATERIAL_D T
 WHERE
T.IN_MATERIAL_NO =?
AND T.OUT_MATERIAL_NO =?
                 ]]>
	</query>

	<query id="FrmBaseMaterialDPl.getBaseMaterialDPl" desc="查询轧管物料产线能力">
             <![CDATA[
              SELECT 
       T.IN_MATERIAL_NO,
       T1.IN_MATERIAL_DESC,
       T.OUT_MATERIAL_NO,
       T1.OUT_MATERIAL_DESC,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.HR_CAPCTY,
       T.PRD_RATE,
       T.DBL_LEN_MAX,
       T.ROL_LEN_MIN,
       T.ROL_LEN_MAX,
       T.CROP_END,
       T.MANDREL_SIZE,
       DECODE(T.DISABLE_FL,'1','True','False') DISABLE_FL,
       T.CROP_HEAD,
       T.WASTE_RATE,
       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.TUBE_END_RATIO
 FROM SLM_BASE_MATERIAL_D_PL T,SLM_BASE_MATERIAL_D 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="FrmBaseMaterialDPl.updateBaseMaterialDPl" desc="修改轧管物料产线能力">
             <![CDATA[
              UPDATE SLM_BASE_MATERIAL_D_PL T
   SET 
        T.HR_CAPCTY = '#HR_CAPCTY#',
        T.PRD_RATE = '#PRD_RATE#',
        T.DBL_LEN_MAX = '#DBL_LEN_MAX#',
        T.ROL_LEN_MIN = '#ROL_LEN_MIN#',
        T.ROL_LEN_MAX = '#ROL_LEN_MAX#',
        T.CROP_END = '#CROP_END#',
        T.MANDREL_SIZE = '#MANDREL_SIZE#',
        T.DISABLE_FL = '#DISABLE_FL#',
        T.CROP_HEAD = '#CROP_HEAD#',
        T.WASTE_RATE = '#WASTE_RATE#',
        T.UPDATE_NAME = '#UPDATE_NAME#',
        T.UPDATE_TIME = SYSDATE,
        T.PLINE_LEVEL = '#PLINE_LEVEL#',
        T.TUBE_END_RATIO='#TUBE_END_RATIO#'
 WHERE
T.IN_MATERIAL_NO ='#IN_MATERIAL_NO#'
AND T.OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
AND T.PLINE_CODE ='#PLINE_CODE#'
                 ]]>
	</query>

</queryMap>