<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="冶金规范">
      <query id="ComMsc.query" desc="查询冶金规范">
        <![CDATA[      
SELECT T.MSC,
       T.MSC_DESC,
       T.USE_CODE,
       T.USE_DESC,
       T.DEPARTMENT_CODE,
       T.DEPARTMENT_DESC,
       T.UNIT_CODE,
       T.UNIT_DESC,
       T.MSC_STYLE,
       T.USER_COUNT,
       T.PRODUCCODE,
       T.PRODUCNAME,
       T.STD_CODE,
       T.STD_NAME,
       T.STEELCODE,
       T.STEELNAME,
       T.STD_STYLE,
       T.STD_STYLE_DESC,
       T.NEW_PROC_CODE,
       T.NEW_PROC_DESC,
       T.ALLOW_NK,
       T.MSC_SEQ,
       T.MSC_DESC_SEQ,
       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.DELETE_NAME,
       TO_CHAR(T.DELETE_TIME, 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME,
       T.VALIDFLAG,
       T.MEMO,
       T.PRODUC_HEAD,
       T.FILE_JPEG,
       T.UNIT_CODE_PROCESS,
       T.UNIT_DESC_PROCESS,
       T.MSC_OLD,
       T.USE_CODE_OLD,
       T.REMARK,
       T.AUDIT_NAME,
       TO_CHAR(T.AUDIT_TIME, 'YYYY-MM-DD HH24:MI:SS') AUDIT_TIME,
       T.VALIDFLAG_NK,
       T.AUDIT_NAME_NK,
       TO_CHAR(T.AUDIT_TIME_NK, 'YYYY-MM-DD HH24:MI:SS') AUDIT_TIME_NK,
       T.REMARK_NK
  FROM COM_MSC T
 WHERE T.MSC = '#MSC#'
	     ]]>
	  </query>
	  
      <query id="ComMsc.queryByPsc" desc="通过产品码查询冶金规范">
        <![CDATA[      
SELECT T.MSC,
       T.MSC_DESC,
       T.USE_CODE,
       T.USE_DESC,
       T.DEPARTMENT_CODE,
       T.DEPARTMENT_DESC,
       T.UNIT_CODE,
       T.UNIT_DESC,
       DECODE(T.MSC_STYLE, 'A', '钢管', 'B', '管坯', 'C', '其它', 'D', '钢锭') MSC_STYLE,
       T.USER_COUNT,
       T.PRODUCCODE,
       T.PRODUCNAME,
       T.STD_CODE,
       T.STD_NAME,
       T.STEELCODE,
       T.STEELNAME,
       T.STD_STYLE,
       T.STD_STYLE_DESC,
       T.NEW_PROC_CODE,
       T.NEW_PROC_DESC,
       T.ALLOW_NK,
       T.MSC_SEQ,
       T.MSC_DESC_SEQ,
       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.DELETE_NAME,
       TO_CHAR(T.DELETE_TIME, 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME,
       T.VALIDFLAG,
       T.MEMO,
       T.PRODUC_HEAD,
       T.FILE_JPEG,
       T.UNIT_CODE_PROCESS,
       T.UNIT_DESC_PROCESS,
       T.MSC_OLD,
       T.USE_CODE_OLD,
       T.REMARK,
       T.AUDIT_NAME,
       TO_CHAR(T.AUDIT_TIME, 'YYYY-MM-DD HH24:MI:SS') AUDIT_TIME,
       T.VALIDFLAG_NK,
       T.AUDIT_NAME_NK,
       TO_CHAR(T.AUDIT_TIME_NK, 'YYYY-MM-DD HH24:MI:SS') AUDIT_TIME_NK,
       T.REMARK_NK
  FROM COM_MSC T, COM_PSC_R_MSC A
 WHERE A.MSC = T.MSC
 AND A.PSC = '#PSC#'
	     ]]>
	  </query>
</queryMap>