<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc = "送判单管理">
<query id = "FrmApplyCode.doQueryApplyJudge" desc = "查询送判单">
SELECT 
       T.JUGDE_APPLY_CODE,
       T.JUDGE_STOVE_NO,
       T.BATCH_NO,
       T.BATCH_GROUD_NO,
       T.PROCESS_CODE,
       T.PLINE_CODE,
       T.ACT_COUNT,
       T.ACT_WEIGHT,
       T.ACT_THEORY_WEIGHT,
       T.PRO_ORDER_ID,
       T.FACE_RESULT_CODE,
       T.SPEC_RESULT_CODE,
       T.CHEM_RESULT_CODE,
       T.PHY_RESULT_CODE,
       T.DETECT_RESULT_CODE,
       T.WPRESSURE_RESULT_CODE,
       T.PROCESS_RESULT_CODE,
       T.FACE_RESULT_PATH,
       T.SPEC_RESULT_PATH,
       T.CHEM_RESULT_PATH,
       T.PHY_RESULT_PATH,
       T.DETECT_RESULT_PATH,
       T.WPRESSURE_RESULT_PATH,
       T.PROCESS_RESULT_PATH,
       T.VALIDFLAG,
       T.APPLY_NAME,
       TO_CHAR(T.APPLY_TIME, 'YYYY-MM-DD HH24:MI:SS') APPLY_TIME,
       T.MEMO,
       T.QUALITY_GROUP,
       T.MATERIAL_NO,
       T.MATERIAL_NAME,
       T.PRODUCCODE,
       T.PRODUCNAME,
       T.STEELCODE,
       T.STEELNAME,
       T.GRADECODE,
       T.GRADENAME,
       T.SPEC_CODE,
       T.SPEC_NAME,
       T.MODEL_CODE,
       T.MODEL_DESC,
       T.STD_CODE,
       T.STD_NAME,
       T.STD_STYLE,
       T.STD_STYLE_DESC,
       T.CRAF_NO,
       T.LOT_NO,
       T.PLINE_NAME,
       T.PRO_ORDER_NO,
       T.TARGET,
       T.PROCESS_STATUS,
       T.MAT_GOWHERE_CODE,
       T.MAT_GOWHERE_NAME,
       T.ACT_DIMATER,
       T.ACT_HEIGHT,
       T.ACT_LEN_MIN,
       T.ACT_LEN_MAX,
       T.JUDGE_RESULT_CODE,
       T.JUDGE_RESULT,
       TO_CHAR(T.JUDGE_RESULT_TIME, 'YYYY-MM-DD HH24:MI:SS') JUDGE_RESULT_TIME,
       T.JUDGE_MAKER,
       T.IF_SET_ZY_PLAN,
       T.TESTING_GRADE,
       T.TESTING_TYPE,
       T.TESTING_GRADE1,
       T.TESTING_TYPE1,
       T.DETECT_RESULT_CODE1,
       T.DETECT_RESULT_PATH1,
       T.ORD_LN_DLY_PK,
       T.APPLY_FLAG,
       T.BACK_JUGDE_MEMO,
       T.INSTOCK_FLAG,
       T.BELONG_CODE,
       T.BELONG_NAME,
       T.ISENDGX,
       T.EXIT_TEMP,
       T.SAMPLE_NEWS,
       T.ACT_LEN,
       T.BELONG_CODE_JUGDE,
       T.BELONG_NAME_JUGDE,
       T.GX_PLAN_NO,
       T.INPUT_WEIGHT,
       T.INPUT_COUNT,
       T.OUTPUT_WEIGHT,
       T.OUTPUT_COUNT,
       T.BAL_YEAR_MONTH,
       DECODE(T.IS_FLAG,'0','有效','1','无效')IS_FLAG,
       DECODE(T.IS_ALL_SCRAP,'0','正常','1','整炉废','2','白条','3','红冲','4','成品利库')IS_ALL_SCRAP,
       T.IS_CARRY_VOER,
       T.STOVE_NO,
       T.STEEL_STANDRAD,
       T.PRO_PLAN_ID_NEXT,
       T.GX_PLAN_NO_NEXT,
       T.LK_FLAG,
       T.JUDGE_MEMO,
       T.JUDGE_ORDER,
       T.JUDGE_GROUP,
       T.JUDGE_STOVE_NO_SEQ,
       T.NEXT_PROCESS_CDOE,
       T.JUGDE_APPLY_SEQUENO,
       T.AUDIT_RESULT,
       T.AUDIT_MEMO,
       T.JUDGE_TOLRESULT_CODE,
       T.JUDGE_TOLRESULT,
       TO_CHAR(T.JUDGE_TOLRESULT_TIME, 'YYYY-MM-DD HH24:MI:SS') JUDGE_TOLRESULT_TIME,
       T.JUDGE_TOLMAKER,
       T.JUDGE_TOLMEMO,
       T.JUDGE_TOLORDER,
       T.JUDGE_TOLGROUP,
       T.AUDIT_TOLRESULT,
       T.AUDIT_TOLMEMO,
       T.JUGDE_CONVICTED,
       T.JUGDE_TOLCONVICTED,
       T.INSTANCY_FLAG,
       T.TOL_INSTANCY_FLAG,
       T.CRAFT_SEQ,
       T.INDEX_SEQ,
       T.CIC,
       T.PIC,
       T.SIC,
       T.DIC,
       T.WIC,
       T.GIC,
       T.HEAT_PLAN_NO_NEXT,
       T.CHECK_NO,
       T.HEAT_PLAN_NO,
       T.DELIVERY_STATE_CODE,
       T.DELIVERY_STATE_NAME,
       T.LOAD_JUDGE_STOVE_NO,
       T.ZP_M_LH,
       T.ZP_COLL,
       T.HTT_TYPE,
       T.MIN_TEMP,
       T.HTT_TECHNOLOGY,
       T.NOTCH_INFO,
       T.NOTCH_LENGTH,
       T.NOTCH_WIDTH,
       T.NOTCH_DEPTH,
       T.LOT_NO_GROUP,
       T.TEST_PRESSURE,
       T.HOLDTIME_TIME,
       T.TEST_PRESSURE_Y,
       T.MCH_WATERGAGE_RESULT,
       T.MCH_PATH_RESULT,
       T.MCH_CHAMFERING_RESULT,
       T.MCH_TWISTINGLY_RESULT,
       T.MCH_DIMENSIONS_RESULT,
       T.MCH_VISUAL_RESULT,
       T.MCH_THREAD_INSPECTION_RESULT,
       T.MCH_REMANENCE_RESULT,
       T.MCH_RADIOACTIVITY_RESULT,
       T.MCH_BEVEL_RESULT,
       T.ANGLE_VAL,
       T.EDGE_VAL,
       T.ZBS_FLAG,
       T.TESTING_STANDAR,
       T.DRIFT_MODEL_MIN,
       T.MEASURED_END_PART,
       T.MEASURED_MIDDLE_PART,
       T.MEASURED_TAIL_PART,
       T.JUDGE_FILE_MEMO,
       T.JUDGE_FILE_TOLMEMO,
       T.ZC_JUDGE_CONDITION,
       T.BUNDLE_NUM,
       T.LIKU_PROCESS_CODE,
       T.LOAD_BATCH_NO,
       T.BUNDLING_MEMO,
       T.ZZB_FLAG
 FROM QCM_ZG_JUGDE_APPLY T
 WHERE 1 = 1
</query>
<query id = "FrmApplyCode.updateQcmFlag" desc = "作废">
UPDATE QCM_ZG_JUGDE_APPLY T
   SET T.IS_FLAG = '1'
 WHERE T.JUGDE_APPLY_CODE = '#JUGDE_APPLY_CODE#'
   AND T.JUGDE_APPLY_SEQUENO = '#JUGDE_APPLY_SEQUENO#'
</query>
<query id = "FrmApplyCode.cancelScrap" desc = "恢复">
UPDATE QCM_ZG_JUGDE_APPLY T
   SET T.IS_FLAG = '0'
 WHERE T.JUGDE_APPLY_CODE = '#JUGDE_APPLY_CODE#'
   AND T.JUGDE_APPLY_SEQUENO = '#JUGDE_APPLY_SEQUENO#'
</query>
<query id = "FrmApplyCode.getJudgeResult" desc = "获取工序判定结果">
<![CDATA[
SELECT T.BASENAME,T.BASECODE FROM COM_BASE_INFO T WHERE T.BASECODE LIKE '%407407%' AND T.BASECODE <>'407407'
]]>
</query>
</queryMap>