<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc = "修改质保书备注">
<query id = "FrmUpdateMemo.doQueryZbs" desc = "查询质保书数据">
SELECT T.ORDER_NO,
       T.ORDER_SEQ,
       MAX(T.DELIVERY_STATE_CODE)DELIVERY_STATE_CODE,
       MAX(T.DELIVERY_STATE_NAME)DELIVERY_STATE_NAME,
       MAX(T.STEELCODE)STEELCODE,
       MAX(T.STEELNAME)STEELNAME,
       MAX(T.ORDER_SPEC_CODE)ORDER_SPEC_CODE,
       MAX(T.ORDER_SPEC_DESC)ORDER_SPEC_DESC,
       MAX(T.GRADECODE)GRADECODE,
       MAX(T.GRADENAME)GRADENAME,
       MAX(T.MODEL_CODE)MODEL_CODE,
       MAX(T.MODEL_DESC)MODEL_DESC,
       MAX(T.CUSTOMER_NO)CUSTOMER_NO,
       MAX(T.CUSTOMER_NM)CUSTOMER_NM,
       MAX(T.RECEIV_NO)RECEIV_NO,
       MAX(T.RECEIV_NM)RECEIV_NM,
       MAX(T.USE_CODE)USE_CODE,
       MAX(T.USE_DESC)USE_DESC,
       MAX(T.STD_CODE)STD_CODE,
       MAX(T.STD_NAME)STD_NAME,
       MAX(T.ZBS_ADD_ASK_DESC)ZBS_ADD_ASK_DESC,
       MAX(T.ZBS_MEMO)ZBS_MEMO,
       MAX(T.ZBS_MEMO_JG)ZBS_MEMO_JG,
       T.ORD_LN_PK,
       T.ORD_LN_DLY_PK,
       MAX(T.CUSTM_ORDER_NO)CUSTM_ORDER_NO,
       MAX(T.STD_STYLE)STD_STYLE,
       MAX(T.STD_STYLE_DESC)STD_STYLE_DESC,
       MAX(T.PRODUCCODE)PRODUCCODE,
       MAX(T.PRODUCNAME)PRODUCNAME,
       MAX(T.LEN_NO)LEN_NO,
       MAX(T.LEN_DESC)LEN_DESC,
       MAX(DECODE(T.OUTPUT_STD_NO,'122701','产品标准','122702','用途码描述','122703','产品标准+用途码描述'))OUTPUT_STD_NO
  FROM QCM_ZBS_INFO T
 WHERE 1 = 1
</query>
<query id = "FrmUpdateMemo.updateMemo" desc = "修改质保书备注">
UPDATE QCM_ZBS_INFO T
   SET T.ZBS_MEMO       = '#ZBS_MEMO#',
       T.ZBS_MEMO_JG    = '#ZBS_MEMO_JG#',
       T.CUSTM_ORDER_NO = '#CUSTM_ORDER_NO#'
 WHERE T.ORDER_NO = '#ORDER_NO#'
   AND T.ORDER_SEQ = '#ORDER_SEQ#'
</query>
</queryMap>