<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="BOM备料清单">

	<query id="IBomBLDao.getBLCodeQuality" desc="查询备料码">
		<![CDATA[
			 SELECT 
       T.DESGIN_KEY,
       T.GROUP_NUM,
       T.PSC_BL,
       T.DESGIN_KEY_BL
 FROM SLM_ORD_DESIGN_MSC_BL T
 WHERE
T.DESGIN_KEY =?
		]]>
	</query>

	<query id="IBomBLDao.getBLCodeCraft" desc="查询备料码">
		<![CDATA[
			 SELECT 
       T.DESGIN_KEY,
       T.GROUP_NUM,
       T.PSC_BL,
       T.DESGIN_KEY_BL
 FROM Craft_ORD_DESIGN_MSC_BL T
 WHERE
T.DESGIN_KEY =?
		]]>
	</query>

	<query id="IBomBLDao.getBLInfo" desc="查询备料码信息">
		<![CDATA[
			SELECT PSC_BL,
       PRODUCCODE,
       PRODUCNAME,
       STD_CODE,
       STD_NAME,
       STEELCODE,
       STEELNAME,
       STD_STYLE,
       STD_STYLE_DESC,
       MODEL_CODE,
       MODEL_DESC,
       MIN_D,
       MIN_H,
       USE_CODE,
       USE_DESC,
       CREATE_NAME,
       CREATE_TIME,
       UPDATE_NAME,
       UPDATE_TIME,
       DELETE_NAME,
       DELETE_TIME,
       VALIDFLAG,
       MEMO,
       MIN_L,
       MAX_L,
       FILE_JPG
  FROM COM_MSC_BL T
 WHERE T.PSC_BL = ?
		]]>
	</query>

	<query id="IBomBLDao.saveBLInfo" desc="保存备料关系">
		<![CDATA[
			INSERT INTO SLM_ORD_DESIGN_BOM_BL
  (BOM, BOM_BL, BL_TYP, BL_MATERIAL_NO, BL_MATERIAL_DESC)
VALUES
  (?, ?, ?, ?, ?)
		]]>
	</query>

	<query id="IBomBLDao.getBLBom" desc="查询备料BOM">
		<![CDATA[
			SELECT MATERIAL_NO,
       MATERIAL_DESC,
       BOM,
       BOM_TYP,
       MSC_PLINE,
       WHOLE_BACKLOG,
       WHOLE_BACKLOG_DESC,
       MSC,
       MSC_DESC,
       GRADECODE,
       GRADENAME,
       SPEC_CODE_C,
       SPEC_NAME_C,
       SPEC_CODE_R,
       SPEC_NAME_R,
       SPEC_CODE_D,
       SPEC_NAME_D,
       SPEC_CODE_Z,
       SPEC_NAME_Z,
       A_IN_MATERIAL_NO,
       A_IN_MATERIAL_DESC,
       A_OUT_MATERIAL_NO,
       A_OUT_MATERIAL_DESC,
       B_IN_MATERIAL_NO,
       B_IN_MATERIAL_DESC,
       B_OUT_MATERIAL_NO,
       B_OUT_MATERIAL_DESC,
       C_IN_MATERIAL_NO,
       C_IN_MATERIAL_DESC,
       C_OUT_MATERIAL_NO,
       C_OUT_MATERIAL_DESC,
       D_IN_MATERIAL_NO,
       D_IN_MATERIAL_DESC,
       D_OUT_MATERIAL_NO,
       D_OUT_MATERIAL_DESC,
       E_IN_MATERIAL_NO,
       E_IN_MATERIAL_DESC,
       E_OUT_MATERIAL_NO,
       E_OUT_MATERIAL_DESC,
       F_IN_MATERIAL_NO,
       F_IN_MATERIAL_DESC,
       F_OUT_MATERIAL_NO,
       F_OUT_MATERIAL_DESC,
       J_IN_MATERIAL_NO,
       J_IN_MATERIAL_DESC,
       J_OUT_MATERIAL_NO,
       J_OUT_MATERIAL_DESC,
       I_IN_MATERIAL_NO,
       I_IN_MATERIAL_DESC,
       I_OUT_MATERIAL_NO,
       I_OUT_MATERIAL_DESC
  FROM SLM_ORD_DESIGN_BOM T
 WHERE T.MATERIAL_NO = ?
		]]>
	</query>

</queryMap>