<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="基础信息">
	<query id="JdgCouplingPhosphateResult.Query" desc="查询接箍磷化、镀铜">
		<![CDATA[
SELECT '合格' JDUGE_RESULT, A.COAT_TYPE,a.PLINE_CODE, T.COL_COUNT
  FROM COUPLING_PHOSPHATE_RESULT T, PLN_ZY_JG_WORKBILL A
 WHERE T.JUDGE_STOVE_NO = {0}
   AND T.BATCH_NO = {1}
   AND T.WO_ID = {2}
   AND A.WO_ID = T.WO_ID
		]]>
	</query>
	
	<query id="JdgCouplingPhosphateResult.QueryPb" desc="查询接箍喷标、压印">
		<![CDATA[
SELECT '喷标' FLAG, A.SPRAY_COUNT, A.SPRAY_CONTENT,A.PLINE_CODE
  FROM COUPLING_PHOSPHATE_RESULT A
 WHERE A.JUDGE_STOVE_NO = {0}
   AND A.BATCH_NO = {1}
   AND A.WO_ID = {2}
   AND A.SPRAY_COUNT IS NOT NULL
UNION ALL
SELECT '压印' FLAG, B.EMB_COUNT, B.EMB_CONTENT,B.PLINE_CODE
  FROM coupling_cut_result B
 WHERE B.JUDGE_STOVE_NO = {0}
   AND B.BATCH_NO = {1}
   AND B.WO_ID = {2}
   AND B.EMB_COUNT IS NOT NULL
		]]>
	</query>

	<query id="JdgCouplingPhosphateResult.QueryPbByPline" desc="查询接箍喷标、压印">
		<![CDATA[
SELECT '喷标' FLAG, A.SPRAY_COUNT, A.SPRAY_CONTENT
  FROM COUPLING_PHOSPHATE_RESULT A
 WHERE A.JUDGE_STOVE_NO = {0}
   AND A.BATCH_NO = {1}
   AND A.WO_ID = {2}
   AND A.PLINE_CODE = {3}
   AND A.SPRAY_COUNT IS NOT NULL
UNION ALL
SELECT '压印' FLAG, B.EMB_COUNT, B.EMB_CONTENT
  FROM coupling_cut_result B
 WHERE B.JUDGE_STOVE_NO = {0}
   AND B.BATCH_NO = {1}
   AND B.WO_ID = {2}
   and B.PLINE_CODE = {3}
   AND B.EMB_COUNT IS NOT NULL
		]]>
	</query>
</queryMap>