<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="理化实绩信息表">
	<query id="QcmJhyPhyDbResultDAL.query" desc="查询炉成分实绩表">
		<![CDATA[
 SELECT E.SAMPLE_ID, E.SAMPLE_NO, NVL(E.VALUE1, '/') VALUE1, C.PHY_CODE, C.PHY_NAME
   FROM COM_BASE_PHY_C B, COM_BASE_PHY C
   LEFT JOIN qcm_jhy_lg_phyresult E
     ON E.PHY_CODE = C.PHY_CODE
    AND E.JUDGE_STOVE_NO = {0}
  WHERE B.PHY_CODE = C.PHY_TYPE_C
    AND B.VALIDFLAG = '1'
    AND C.VALIDFLAG = '1'
    AND B.PHY_CODE = {1}
    ORDER BY E.SAMPLE_NO
		]]>
	</query>
	
	<query id="QcmJhyPhyDbResultDAL.queryQcmJhyDbResult" desc="查询低倍检验记录">
		<![CDATA[
  SELECT * FROM QCM_JHY_LG_PHYRESULT T WHERE T.JUDGE_STOVE_NO = {0}
		]]>
	</query>
	
	<query id="QcmJhyPhyDbResultDAL.queryCraftProcessC" desc="获取工艺评审铸造对应的二级工序">
		<![CDATA[
SELECT T.PROCESS_CODE_C VALUE
      FROM CRAFT_ORD_DESIGN_MSC_PL_PRC T
     WHERE T.DESGIN_KEY = {0}
       AND T.MSC_PLINE = {1}
       AND T.PROCESS_CODE = {2}
		]]>
	</query>
	
	<query id="QcmJhyPhyDbResultDAL.queryCraftDbCnt" desc="查询工艺评审是否有低倍">
		<![CDATA[
SELECT COUNT(1) COUNT
      FROM CRAFT_ORD_DESIGN_STD_PIC T
     WHERE T.DESGIN_KEY = {0}
       AND T.MSC_PLINE = {1}
       AND T.PROCESS_CODE = {2}
       AND T.PIC = {3}
       AND T.PHY_NAME_MAX LIKE '%低倍%'
		]]>
	</query>
	
	<query id="QcmJhyPhyDbResultDAL.queryJhyDbCnt" desc="查询检化验是否有低倍">
		<![CDATA[
SELECT COUNT(1) COUNT FROM qcm_jhy_lg_phyresult T WHERE T.JUDGE_STOVE_NO = {0}
		]]>
	</query>
	
	<query id="QcmJhyPhyDbResultDAL.updateJhyDbCxFlag" desc="修改检化验低倍同步标志">
		<![CDATA[
UPDATE STEER_PHYDB_AUDIT_RESULT T
   SET T.CX_FLAG = {1}
 WHERE T.CHANGE_HEAT_NO = {0}
		]]>
	</query>
</queryMap>