<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="基础物料投入与产出">

	<query id="CoreBaseMaterialPl.getBaseMaterial" desc="查询基础物料">
		<![CDATA[
SELECT MATERIAL_NO,
       MATERIAL_DESC,
       PRODUCCODE,
       PRODUCNAME,
       PRODUC_JX,
       PRODUC_ENG,
       STD_STYLE,
       STD_STYLE_DESC,
       STEELCODE,
       STEELNAME,
       GRADECODE,
       GRADENAME,
       DIMATER,
       HEIGHT,
       SPEC_CODE,
       SPEC_NAME,
       MODEL_CODE,
       MODEL_DESC,
       DECODE(OUTSRC_ALLOW, '1', '是', '0', '否') OUTSRC_ALLOW,
       DECODE(FIRST_PRDC, '1', '是', '0', '否') FIRST_PRDC,
       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,
       DECODE(AUTO_CRAFT, '1', 'True', '0', 'False') AUTO_CRAFT,
       MATERIAL_TYPE_MAX,
       MATERIAL_TYPE_MID,
       MATERIAL_TYPE_MIN,
       PROPERTY_TYPE_1,
       PROPERTY_TYPE_2,
       MATERIAL_TYPE_MAX_DESC,
       MATERIAL_TYPE_MID_DESC,
       MATERIAL_TYPE_MIN_DESC,
       PROPERTY_TYPE_1_DESC,
       PROPERTY_TYPE_2_DESC,
       TOTAL_COST,
       TP_SERIES,
       SPECIAL_MODEL,
       UPMARKET_PRODUCT,
       HIGH_ADDITIONAL_PRODUCT
  FROM SLM_BASE_MATERIAL
		]]>
	</query>
	
	<query id="CoreBaseMaterialPl.getBaseMaterialByPk" desc="通过主键查询基础物料">
		<![CDATA[
SELECT * FROM SLM_BASE_MATERIAL T WHERE T.MATERIAL_NO = {0}
		]]>
	</query>

	<query id="CoreBaseMaterialPl.getBaseMaterialAPl" desc="查询基础物料投入与产出 电炉">
		<![CDATA[
				SELECT A.IN_MATERIAL_NO,
       B.IN_MATERIAL_DESC,
       A.OUT_MATERIAL_NO,
       B.OUT_MATERIAL_DESC,
       A.PLINE_CODE,
       A.PLINE_NAME,
       A.HR_CAPCTY,
       A.PRD_RATE,
       DECODE(A.DISABLE_FL, '1', 'True', 'False') DISABLE_FL,
       A.CREATE_NAME,
       A.PLINE_LEVEL,
       A.PROCESSING_COST,
       A.TOTAL_COST,
       TO_CHAR(A.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       A.UPDATE_NAME,
       TO_CHAR(A.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       A.DELETE_NAME,
       TO_CHAR(A.DELETE_TIME, 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME
  FROM SLM_BASE_MATERIAL_A_PL A, SLM_BASE_MATERIAL_A B
 WHERE A.IN_MATERIAL_NO = B.IN_MATERIAL_NO
   AND A.OUT_MATERIAL_NO = B.OUT_MATERIAL_NO

		]]>
	</query>

	<query id="CoreBaseMaterialPl.getBaseMaterialBPl" desc="查询基础物料投入与产出 铸造">
		<![CDATA[
SELECT A.IN_MATERIAL_NO,
       B.IN_MATERIAL_DESC,
       A.OUT_MATERIAL_NO,
       B.OUT_MATERIAL_DESC,
       A.PLINE_CODE,
       A.PLINE_NAME,
       A.HR_CAPCTY,
       A.PRD_RATE,
       DECODE(A.DISABLE_FL, '1', 'True', 'False') DISABLE_FL,
       A.CREATE_NAME,
       TO_CHAR(A.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       A.UPDATE_NAME,
       TO_CHAR(A.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       A.DELETE_NAME,
       TO_CHAR(A.DELETE_TIME, 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME,
       A.PLINE_LEVEL,
       A.PROCESSING_COST,
       A.TOTAL_COST,
       A.STOVE_CNT
  FROM SLM_BASE_MATERIAL_B_PL A, SLM_BASE_MATERIAL_B B
 WHERE A.IN_MATERIAL_NO = B.IN_MATERIAL_NO
   AND A.OUT_MATERIAL_NO = B.OUT_MATERIAL_NO

		]]>
	</query>

	<query id="CoreBaseMaterialPl.getBaseMaterialCPl" desc="查询基础物料投入与产出 锻造">
		<![CDATA[
SELECT T.IN_MATERIAL_NO,
       T.OUT_MATERIAL_NO,
       A.IN_MATERIAL_DESC,
       A.OUT_MATERIAL_DESC,
       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.PROCESSING_COST,
       T.TOTAL_COST
  FROM SLM_BASE_MATERIAL_C_PL T
   JOIN SLM_BASE_MATERIAL_C A
    ON A.IN_MATERIAL_NO = T.IN_MATERIAL_NO
   AND A.OUT_MATERIAL_NO = T.OUT_MATERIAL_NO

		]]>
	</query>

	<query id="CoreBaseMaterialPl.getBaseMaterialDPl" desc="查询基础物料投入与产出 轧制">
		<![CDATA[
SELECT T.IN_MATERIAL_NO,
       T.OUT_MATERIAL_NO,
       A.IN_MATERIAL_DESC,
       A.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.CROP_HEAD,
       T.WASTE_RATE,
       T.MANDREL_SIZE,
       T.PLINE_LEVEL,
       T.PROCESSING_COST,
       T.TOTAL_COST,
       T.TUBE_END_RATIO,
       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
  FROM SLM_BASE_MATERIAL_D_PL T
 JOIN SLM_BASE_MATERIAL_D A
    ON T.IN_MATERIAL_NO = A.IN_MATERIAL_NO
   AND T.OUT_MATERIAL_NO = A.OUT_MATERIAL_NO

		]]>
	</query>

	<query id="CoreBaseMaterialPl.getBaseMaterialEPl" desc="查询基础物料投入与产出 墩拔扩">
		<![CDATA[
SELECT T.IN_MATERIAL_NO,
       T.OUT_MATERIAL_NO,
       A.IN_MATERIAL_DESC,
       A.OUT_MATERIAL_DESC,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.HR_CAPCTY,
       T.PRD_RATE,
       DECODE(T.DISABLE_FL, '1', 'True', 'False') DISABLE_FL,
       T.CROP_HEAD,
       T.CROP_END,
       T.WASTE_RATE,
       DECODE(T.AUDIT_FLAG, '0', '无效', '1', '未审核', '2', '已生效') AUDIT_FLAG,
       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.UPSETTING_LENGTH,
       T.PLINE_LEVEL,
       T.PROCESSING_COST,
       T.TOTAL_COST
  FROM SLM_BASE_MATERIAL_E_PL T
  JOIN SLM_BASE_MATERIAL_E A
    ON A.IN_MATERIAL_NO = T.IN_MATERIAL_NO
   AND A.OUT_MATERIAL_NO = T.OUT_MATERIAL_NO

		]]>
	</query>

	<query id="CoreBaseMaterialPl.getBaseMaterialFPl" desc="查询基础物料投入与产出 热处理">
		<![CDATA[
SELECT T.IN_MATERIAL_NO,
       T.OUT_MATERIAL_NO,
       A.IN_MATERIAL_DESC,
       A.OUT_MATERIAL_DESC,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.HR_CAPCTY,
       T.PRD_RATE,
       DECODE(T.DISABLE_FL, '1', 'True', 'False') DISABLE_FL,
       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.PROCESSING_COST,
       T.TOTAL_COST
  FROM SLM_BASE_MATERIAL_F_PL T
   JOIN SLM_BASE_MATERIAL_F A
    ON A.IN_MATERIAL_NO = T.IN_MATERIAL_NO
   AND A.OUT_MATERIAL_NO = T.OUT_MATERIAL_NO

		]]>
	</query>

	<query id="CoreBaseMaterialPl.getBaseMaterialHPl" desc="查询基础物料投入与产出 接箍">
		<![CDATA[
SELECT T.IN_MATERIAL_NO,
       T.OUT_MATERIAL_NO,
       A.IN_MATERIAL_DESC,
       A.OUT_MATERIAL_DESC,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.HR_CAPCTY,
       T.PRD_RATE,
       DECODE(T.DISABLE_FL, '1', 'True', 'False') DISABLE_FL,
       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.PROCESSING_COST,
       T.TOTAL_COST
  FROM SLM_BASE_MATERIAL_H_PL T
   JOIN SLM_BASE_MATERIAL_H A
    ON A.IN_MATERIAL_NO = T.IN_MATERIAL_NO
   AND A.OUT_MATERIAL_NO = T.OUT_MATERIAL_NO
		]]>
	</query>

	<query id="CoreBaseMaterialPl.getBaseMaterialIPl" desc="查询基础物料投入与产出 加工">
		<![CDATA[
 SELECT 
       T.IN_MATERIAL_NO,
       T.IN_MATERIAL_DESC,
       T.OUT_MATERIAL_NO,
       T.OUT_MATERIAL_DESC,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.HR_CAPCTY,
       T.PRD_RATE,
       T.PLINE_LEVEL,
       T.WASTE_RATE,
       T.PROCESSING_COST,
       T.TOTAL_COST,
       T.CREATE_NAME,
       DECODE(T.DISABLE_FL, '1', 'True', 'False')  DISABLE_FL,
       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
 FROM SLM_BASE_MATERIAL_K_PL T
 WHERE
       1=1

		]]>
	</query>

	<query id="CoreBaseMaterialPl.updateBaseMaterialAPl" desc="修改基础物料投入与产出 电炉">
		<![CDATA[
				UPDATE SLM_BASE_MATERIAL_A_PL
                   SET HR_CAPCTY = '#HR_CAPCTY#',
                       PRD_RATE  = '#PRD_RATE#',
                       DISABLE_FL = '#DISABLE_FL#',
                       PLINE_LEVEL='#PLINE_LEVEL#',
                       PROCESSING_COST = '#PROCESSING_COST#',
                       TOTAL_COST = '#TOTAL_COST#',
                       UPDATE_NAME = '#UPDATE_NAME#',
     				   UPDATE_TIME = SYSDATE
            WHERE IN_MATERIAL_NO = '#IN_MATERIAL_NO#'
             AND OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
                  AND PLINE_CODE = '#PLINE_CODE#'
		]]>
	</query>

	<query id="CoreBaseMaterialPl.updateBaseMaterialBPl" desc="修改基础物料投入与产出 铸造">
		<![CDATA[
UPDATE SLM_BASE_MATERIAL_B_PL
   SET HR_CAPCTY   = '#HR_CAPCTY#',
       PRD_RATE    = '#PRD_RATE#',
       DISABLE_FL  = '#DISABLE_FL#',
       PLINE_LEVEL = '#PLINE_LEVEL#',
       PROCESSING_COST = '#PROCESSING_COST#',
       TOTAL_COST = '#TOTAL_COST#',
       STOVE_CNT   = '#STOVE_CNT#',
       UPDATE_NAME = '#UPDATE_NAME#',
       UPDATE_TIME = SYSDATE
 WHERE IN_MATERIAL_NO = '#IN_MATERIAL_NO#'
   AND OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
   AND PLINE_CODE = '#PLINE_CODE#'
		]]>
	</query>

	<query id="CoreBaseMaterialPl.updateBaseMaterialCPl" desc="修改基础物料投入与产出 锻造">
		<![CDATA[
UPDATE SLM_BASE_MATERIAL_C_PL
   SET HR_CAPCTY   = '#HR_CAPCTY#',
       PRD_RATE    = '#PRD_RATE#',
       DISABLE_FL  = '#DISABLE_FL#',
       PLINE_LEVEL = '#PLINE_LEVEL#',
       PROCESSING_COST = '#PROCESSING_COST#',
       TOTAL_COST = '#TOTAL_COST#',
       UPDATE_NAME = '#UPDATE_NAME#',
       UPDATE_TIME = SYSDATE
 WHERE IN_MATERIAL_NO = '#IN_MATERIAL_NO#'
   AND OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
   AND PLINE_CODE = '#PLINE_CODE#'
		]]>
	</query>

	<query id="CoreBaseMaterialPl.updateBaseMaterialDPl" desc="修改基础物料投入与产出 轧管">
		<![CDATA[
UPDATE SLM_BASE_MATERIAL_D_PL
   SET HR_CAPCTY    = '#HR_CAPCTY#',
       PRD_RATE     = '#PRD_RATE#',
       DBL_LEN_MAX  = '#DBL_LEN_MAX#',
       ROL_LEN_MIN  = '#ROL_LEN_MIN#',
       ROL_LEN_MAX  = '#ROL_LEN_MAX#',
       CROP_END     = '#CROP_END#',
       MANDREL_SIZE = '#MANDREL_SIZE#',
       DISABLE_FL   = '#DISABLE_FL#',
       CROP_HEAD    = '#CROP_HEAD#',
       WASTE_RATE   = '#WASTE_RATE#',
       PLINE_LEVEL   = '#PLINE_LEVEL#',
       PROCESSING_COST = '#PROCESSING_COST#',
       TOTAL_COST = '#TOTAL_COST#',
       TUBE_END_RATIO = '#TUBE_END_RATIO#',
       UPDATE_NAME  = '#UPDATE_NAME#',
       UPDATE_TIME  = SYSDATE
 WHERE IN_MATERIAL_NO = '#IN_MATERIAL_NO#'
   AND OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
   AND PLINE_CODE = '#PLINE_CODE#'
		]]>
	</query>

	<query id="CoreBaseMaterialPl.updateBaseMaterialEPl" desc="修改基础物料投入与产出 墩拔扩">
		<![CDATA[
UPDATE SLM_BASE_MATERIAL_E_PL
   SET HR_CAPCTY   = '#HR_CAPCTY#',
       PRD_RATE    = '#PRD_RATE#',
       DISABLE_FL  = '#DISABLE_FL#',
       CROP_HEAD   = '#CROP_HEAD#',
       CROP_END    = '#CROP_END#',
       WASTE_RATE  = '#WASTE_RATE#',
       PLINE_LEVEL='#PLINE_LEVEL#',
       PROCESSING_COST = '#PROCESSING_COST#',
       TOTAL_COST = '#TOTAL_COST#',
       UPDATE_NAME = '#UPDATE_NAME#',
       UPDATE_TIME = SYSDATE,
       UPSETTING_LENGTH='#UPSETTING_LENGTH#'
 WHERE IN_MATERIAL_NO = '#IN_MATERIAL_NO#'
   AND OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
   AND PLINE_CODE = '#PLINE_CODE#'
		]]>
	</query>

	<query id="CoreBaseMaterialPl.updateBaseMaterialFPl" desc="修改基础物料投入与产出 热处理">
		<![CDATA[
UPDATE SLM_BASE_MATERIAL_F_PL
   SET HR_CAPCTY   = '#HR_CAPCTY#',
       PRD_RATE    = '#PRD_RATE#',
       DISABLE_FL  = '#DISABLE_FL#',
       WASTE_RATE  = '#WASTE_RATE#',
       PLINE_LEVEL = '#PLINE_LEVEL#',
       PROCESSING_COST = '#PROCESSING_COST#',
       TOTAL_COST = '#TOTAL_COST#',
       UPDATE_NAME = '#UPDATE_NAME#',
       UPDATE_TIME = SYSDATE
 WHERE IN_MATERIAL_NO = '#IN_MATERIAL_NO#'
   AND OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
   AND PLINE_CODE = '#PLINE_CODE#'
		]]>
	</query>

	<query id="CoreBaseMaterialPl.updateBaseMaterialIPl" desc="修改基础物料投入与产出 加工">
		<![CDATA[
 UPDATE SLM_BASE_MATERIAL_K_PL T
   SET 
        T.HR_CAPCTY = '#HR_CAPCTY#',
        T.PRD_RATE = '#PRD_RATE#',
        T.PLINE_LEVEL = '#PLINE_LEVEL#',
        T.WASTE_RATE = '#WASTE_RATE#',
        T.PROCESSING_COST = '#PROCESSING_COST#',
        T.TOTAL_COST = '#TOTAL_COST#',
        T.UPDATE_NAME = '#UPDATE_NAME#',
        T.UPDATE_TIME = SYSDATE,
        T.DISABLE_FL = '#DISABLE_FL#'
 WHERE
T.IN_MATERIAL_NO = '#IN_MATERIAL_NO#'
AND T.OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
AND T.PLINE_CODE = '#PLINE_CODE#'
		]]>
	</query>

	<query id="CoreBaseMaterialPl.updateBaseMaterialJPl" desc="修改基础物料投入与产出 接箍">
		<![CDATA[
UPDATE SLM_BASE_MATERIAL_H_PL
   SET HR_CAPCTY   = '#HR_CAPCTY#',
       PRD_RATE    = '#PRD_RATE#',
       DISABLE_FL  = '#DISABLE_FL#',
       WASTE_RATE  = '#WASTE_RATE#',
       PLINE_LEVEL = '#PLINE_LEVEL#',
       PROCESSING_COST = '#PROCESSING_COST#',
       TOTAL_COST = '#TOTAL_COST#',
       UPDATE_NAME = '#UPDATE_NAME#',
       UPDATE_TIME = SYSDATE
 WHERE IN_MATERIAL_NO = '#IN_MATERIAL_NO#'
   AND OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
   AND PLINE_CODE = '#PLINE_CODE#'
		]]>
	</query>

	<query id="CoreBaseMaterialPl.queryMaterialDLvCnt" desc="修改基础物料投入与产出轧管优先级">
		<![CDATA[
SELECT T.PLINE_LEVEL
  FROM SLM_BASE_MATERIAL_D_PL T
 WHERE T.PLINE_LEVEL = '#PLINE_LEVEL#'
 AND T.IN_MATERIAL_NO = '#IN_MATERIAL_NO#'
 AND T.OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
 AND (T.IN_MATERIAL_NO <> '#IN_MATERIAL_NO#'
      OR T.OUT_MATERIAL_NO <> '#OUT_MATERIAL_NO#'
      OR T.PLINE_CODE <> '#PLINE_CODE#')
		]]>
	</query>


	<query id="CoreBaseMaterialPl.deleteBaseMaterialAPl" desc="删除基础物料投入与产出 电炉">
		<![CDATA[
 DELETE FROM SLM_BASE_MATERIAL_A_PL T 
 WHERE IN_MATERIAL_NO = '#IN_MATERIAL_NO#'
   AND OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
   AND PLINE_CODE = '#PLINE_CODE#'
		]]>
	</query>

	<query id="CoreBaseMaterialPl.deleteBaseMaterialBPl" desc="删除基础物料投入与产出 铸造">
		<![CDATA[
 DELETE FROM SLM_BASE_MATERIAL_B_PL T 
 WHERE IN_MATERIAL_NO = '#IN_MATERIAL_NO#'
   AND OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
   AND PLINE_CODE = '#PLINE_CODE#'
		]]>
	</query>

	<query id="CoreBaseMaterialPl.deleteBaseMaterialCPl" desc="删除基础物料投入与产出 锻造">
		<![CDATA[
 DELETE FROM SLM_BASE_MATERIAL_C_PL T 
 WHERE IN_MATERIAL_NO = '#IN_MATERIAL_NO#'
   AND OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
   AND PLINE_CODE = '#PLINE_CODE#'
		]]>
	</query>

	<query id="CoreBaseMaterialPl.deleteBaseMaterialDPl" desc="删除基础物料投入与产出 轧制">
		<![CDATA[
 DELETE FROM SLM_BASE_MATERIAL_D_PL T 
 WHERE IN_MATERIAL_NO = '#IN_MATERIAL_NO#'
   AND OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
   AND PLINE_CODE = '#PLINE_CODE#'
		]]>
	</query>

	<query id="CoreBaseMaterialPl.deleteBaseMaterialEPl" desc="删除基础物料投入与产出 镦拔扩">
		<![CDATA[
 DELETE FROM SLM_BASE_MATERIAL_E_PL T 
 WHERE IN_MATERIAL_NO = '#IN_MATERIAL_NO#'
   AND OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
   AND PLINE_CODE = '#PLINE_CODE#'
		]]>
	</query>

	<query id="CoreBaseMaterialPl.deleteBaseMaterialFPl" desc="删除基础物料投入与产出 热处理">
		<![CDATA[
 DELETE FROM SLM_BASE_MATERIAL_F_PL T 
 WHERE IN_MATERIAL_NO = '#IN_MATERIAL_NO#'
   AND OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
   AND PLINE_CODE = '#PLINE_CODE#'
		]]>
	</query>

	<query id="CoreBaseMaterialPl.deleteBaseMaterialIPl" desc="删除基础物料投入与产出 加工">
		<![CDATA[
 DELETE FROM SLM_BASE_MATERIAL_K_PL T 
 WHERE OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
   AND PLINE_CODE = '#PLINE_CODE#'
   AND T.IN_MATERIAL_NO='#IN_MATERIAL_NO#'
		]]>
	</query>

	<query id="CoreBaseMaterialPl.deleteBaseMaterialJPl" desc="删除基础物料投入与产出 接箍加工">
		<![CDATA[
 DELETE FROM SLM_BASE_MATERIAL_J_PL T 
 WHERE IN_MATERIAL_NO = '#IN_MATERIAL_NO#'
   AND OUT_MATERIAL_NO = '#OUT_MATERIAL_NO#'
   AND PLINE_CODE = '#PLINE_CODE#'
		]]>
	</query>
	
	<query id="CoreBaseMaterialPl.updateBaseMaterial" desc="修改基础物料">
		<![CDATA[
UPDATE SLM_BASE_MATERIAL T
   SET T.UPDATE_NAME             = '#UPDATE_NAME#',
       T.UPDATE_TIME             = SYSDATE,
       T.MATERIAL_TYPE_MAX       = '#MATERIAL_TYPE_MAX#',
       T.MATERIAL_TYPE_MID       = '#MATERIAL_TYPE_MID#',
       T.MATERIAL_TYPE_MIN       = '#MATERIAL_TYPE_MIN#',
       T.PROPERTY_TYPE_1         = '#PROPERTY_TYPE1#',
       T.PROPERTY_TYPE_2         = '#PROPERTY_TYPE2#',
       T.TP_SERIES               = '#TP_SERIES#',
       T.SPECIAL_MODEL           = '#SPECIAL_MODEL#',
       T.UPMARKET_PRODUCT        = '#UPMARKET_PRODUCT#',
       T.HIGH_ADDITIONAL_PRODUCT = '#HIGH_ADDITIONAL_PRODUCT#',
       T.MATERIAL_TYPE_MAX_DESC  = '#MATERIAL_TYPE_MAX_DESC#',
       T.MATERIAL_TYPE_MID_DESC  = '#MATERIAL_TYPE_MID_DESC#',
       T.MATERIAL_TYPE_MIN_DESC  = '#MATERIAL_TYPE_MIN_DESC#',
       T.PROPERTY_TYPE_1_DESC    = '#PROPERTY_TYPE1_DESC#',
       T.PROPERTY_TYPE_2_DESC    = '#PROPERTY_TYPE2_DESC#',
       T.TOTAL_COST = '#TOTAL_COST#',
       T.AUTO_CRAFT = '#AUTO_CRAFT#'
 WHERE T.MATERIAL_NO = '#MATERIAL_NO#'
		]]>
	</query>
	
	<query id="CoreBaseMaterialPl.deleteBaseMaterial" desc="删除基础物料">
		<![CDATA[
 DELETE FROM SLM_BASE_MATERIAL T 
 WHERE T.MATERIAL_NO = '#MATERIAL_NO#'
		]]>
	</query>

</queryMap>