<?xml version="1.0" encoding="UTF-8" ?>
<queryMap>
    <query id="FrmGateFrim1.doQueryOutList" dese="查询接箍出库信息">
        <![CDATA[
        SELECT MACH_NM,
       T.DEAL_NUM,
       T.DEAL_WT,
       TO_CHAR(T.DEAL_TIME, 'YYYY-MM-DD HH24:MI:SS') DEAL_TIME,
       T.STORAGE_NO,
       T.LOCATION_NO,
       T.STORAGE_ATTR_NAME,
       T.STORAGE_TYPE_NAME,
       T.TAR_STORAGE_NO,
       T.TAR_LOCATION_NO,
       T.TAR_STORAGE_ATTR_NAME,
       T.TAR_STORAGE_TYPE_NAME,
       DECODE(T.TAR_REC_FLAG, '0', '未接收', '1', '已接收') TAR_REC_FLAG,
       DECODE(T.HAND_FLAG, '0', '自动', '1', '人工') HAND_FLAG,
       T.CREATE_NAME,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       T.UPDATE_NAME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.DEAL_ORDE,
       T.DEAL_TYPE_CODE,
       T.DEAL_TYPE_NAME,
       T.SOURCE_CODE,
       T.SOURCE_NAME,
       T.TAR_CODE,
       T.TAR_NAME,
       T.KEP_NO,
       T.TAR_KEP_NO,
       T.MAT_NO,
       T.RESULT_NO,
       T.ZY_PLAN_ID,
       T.PRO_PLAN_ID,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.JUDGE_STOVE_NO,
       T.BATCH_NO,
       T.BL_WL_DESC,
       T.MIN_D,
       T.MIN_H,
       T.CODE_JG,
       T.GRADENAME,
       T.STEELNAME,
       T.MODEL_DESC,
       T.OUTDIAMETER,
       T.WALLTHICK,
       T.SPEC_JG_DESC,
       T.STYLE_JG,
       T.DIAMETER,
       T.CHECK_J_VAL,
       T.AIMLENGTH,
       T.SINGLEWEIGHT,
       T.MONITORDEMAND,
       T.IF_MONITOR_JG,
       T.PRDCR_NO,
       T.PRODUCER,
       T.WO_ID,
       TO_CHAR(T.PRODUCER_TIME, 'YYYY-MM-DD HH24:MI:SS') PRODUCER_TIME,
       DECODE(NVL(T.LEAVE_FACTORY_FLAG,0),'0','未确认','1','已确认') LEAVE_FACTORY_FLAG,
       T.LEAVE_FACTORY_NAME,
       TO_CHAR(T.LEAVE_FACTORY_TIME, 'YYYY-MM-DD HH24:MI:SS') LEAVE_FACTORY_TIME
  FROM COUPLING_MAT_DEAL T
 WHERE 1 = 1
       ]]>
    </query>

    <query id="FrmGateFrim1.Confirm" dese="确认出厂">
        UPDATE COUPLING_MAT_DEAL T
        SET
            T.LEAVE_FACTORY_FLAG = '1',
            T.LEAVE_FACTORY_NAME = ?,
            T.LEAVE_FACTORY_TIME = SYSDATE
        WHERE T.DEAL_ORDE = ?
    </query>

    <query id="FrmGateFrim1.CancelConfirm" dese="撤销确认出厂">
        UPDATE COUPLING_MAT_DEAL T
        SET
            T.LEAVE_FACTORY_FLAG = '0',
            T.LEAVE_FACTORY_NAME = '',
            T.LEAVE_FACTORY_TIME = null
        WHERE T.DEAL_ORDE = ?
    </query>
</queryMap>