<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="成品报表">
    <query id="FrmProductReport.Query" desc="查询">
        <![CDATA[
             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,
                   T.IS_FLAG,
                   T.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,
                   T.AUTO_JUDGE,
                   T.DRIFT_MODEL_MIN2,
                   T.DRIFT_MODEL_LEN,
                   T.DRIFT_MODEL_LEN2,
                   T.SUPPLY_UNIT,
                   T.SUPPLY_UNIT_DESC,
                   T.INPUT_WEIGHT2,
                   T.KP_FLAG,
				   B.BASENAME as Factory_Region
             FROM QCM_ZG_JUGDE_APPLY T
             LEFT JOIN (select T1.BASENAME,t.* from COM_BASE_PLINE t,COM_BASE_INFO T1 WHERE T.FACTORY_CODE = T1.BASECODE) B ON T.PLINE_CODE = B.PLINE_CODE
             WHERE T.TARGET = 'A'
        ]]>
    </query>

    <query id="FrmProductReport.QueryFactory" desc="查询生产区域">
        <![CDATA[
            select T1.BASENAME,T1.BASECODE from COM_BASE_PLINE t,COM_BASE_INFO T1 WHERE T.FACTORY_CODE = T1.BASECODE GROUP BY T1.BASENAME,T1.BASECODE
        ]]>
    </query>
</queryMap>