<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc = "改判明细">
<query id = "FrmGpRpt.getGpDataB" desc = "改判明细汇总">
<![CDATA[
SELECT 
       JUDGE_ID,
       JUDGE_STOVE_NO_OLD,
       BATCH_NO_OLD,
       BATCH_GROUD_NO_OLD,
       sum(nvl(ACT_COUNT,0))ACT_COUNT,
       sum(nvl(ACT_WEIGHT,0))ACT_WEIGHT,
       max(JUDGE_STOVE_NO)JUDGE_STOVE_NO,
       max(BATCH_NO)BATCH_NO,
       max(BATCH_GROUD_NO)BATCH_GROUD_NO,
       max(MATERIAL_NO_OLD)MATERIAL_NO_OLD,
       max(MATERIAL_NAME_OLD)MATERIAL_NAME_OLD,
       max(PRODUCCODE_OLD)PRODUCCODE_OLD,
       max(PRODUCNAME_OLD)PRODUCNAME_OLD,
       max(STEELCODE_OLD)STEELCODE_OLD,
       max(STEELNAME_OLD)STEELNAME_OLD,
       max(SPEC_CODE_OLD)SPEC_CODE_OLD,
       max(SPEC_NAME_OLD)SPEC_NAME_OLD,
       max(MODEL_CODE_OLD)MODEL_CODE_OLD,
       max(MODEL_DESC_OLD)MODEL_DESC_OLD,
       max(STD_STYLE_OLD)STD_STYLE_OLD,
       max(STD_STYLE_DESC_OLD)STD_STYLE_DESC_OLD,
       max(MATERIAL_NO)MATERIAL_NO,
       max(MATERIAL_NAME)MATERIAL_NAME,
       max(PRODUCCODE)PRODUCCODE,
       max(PRODUCNAME)PRODUCNAME,
       max(STEELCODE)STEELCODE,
       max(STEELNAME)STEELNAME,
       max(SPEC_CODE)SPEC_CODE,
       max(SPEC_NAME)SPEC_NAME,
       max(MODEL_CODE)MODEL_CODE,
       max(MODEL_DESC)MODEL_DESC,
       max(STD_STYLE)STD_STYLE,
       max(STD_STYLE_DESC)STD_STYLE_DESC,
       max(CREATE_NAME)CREATE_NAME,
       max(TO_CHAR(CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS')) CREATE_TIME,
       max(SUBMIT_NAME)SUBMIT_NAME,
       max(TO_CHAR(SUBMIT_TIME, 'YYYY-MM-DD HH24:MI:SS')) SUBMIT_TIME,
       max(AGREE_NAME)AGREE_NAME,
       max(TO_CHAR(AGREE_TIME, 'YYYY-MM-DD HH24:MI:SS')) AGREE_TIME,
       max(DECODE(AGREE_FLAG,'0','未提交审批','1','提交审批','2','审批通过','3','审批不通过'))AGREE_FLAG,
       max(CREATE_MEMO)CREATE_MEMO,
       max(SUBMIT_MEMO)SUBMIT_MEMO,
       max(AGREE_MEMO)AGREE_MEMO,
       max(DECODE(VALID_FLAG,'0','无效','1','有效'))VALID_FLAG,
       max(DELETE_NAME)DELETE_NAME,
       max(TO_CHAR(DELETE_TIME, 'YYYY-MM-DD HH24:MI:SS')) DELETE_TIME,
       max(BELONG_CODE)BELONG_CODE,
       max(BELONG_NAME)BELONG_NAME,
       SUPPLY_UNIT_CODE,
       SUPPLY_UNIT
 FROM QCM_ZG_JUDGE_CHANGE
 WHERE VALID_FLAG = '1'
 ]]>
</query>
</queryMap>