<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="Msc0">
	<query id="Msc0Dao.getMsc0" desc="查询Msc0">  
             <![CDATA[ 
                 SELECT A.MSC
     FROM COM_MSC A
     JOIN COM_PSC_R_MSC B
       ON A.MSC = B.MSC
    WHERE B.PSC = ?
      AND TRIM(A.MSC_SEQ) IS NULL
      AND A.VALIDFLAG != 'D'
               ]]>
	</query>

	<query id="Msc0Dao.getMscInfo" desc="查询Msc信息">  
             <![CDATA[ 
             SELECT MSC, MSC_DESC, USE_CODE, USE_DESC, DEPARTMENT_CODE, DEPARTMENT_DESC, UNIT_CODE, UNIT_DESC, MSC_STYLE, USER_COUNT, PRODUCCODE, 
       PRODUCNAME, STD_CODE, STD_NAME, STEELCODE, STEELNAME, STD_STYLE, STD_STYLE_DESC, NEW_PROC_CODE, NEW_PROC_DESC, ALLOW_NK, MSC_SEQ,
       MSC_DESC_SEQ, CREATE_NAME, CREATE_TIME, UPDATE_NAME, UPDATE_TIME, DELETE_NAME, DELETE_TIME, VALIDFLAG, MEMO, PRODUC_HEAD, FILE_JPEG,
       UNIT_CODE_PROCESS, UNIT_DESC_PROCESS, MSC_OLD, USE_CODE_OLD, REMARK, AUDIT_NAME, AUDIT_TIME, VALIDFLAG_NK, AUDIT_NAME_NK, 
       AUDIT_TIME_NK, REMARK_NK,JUDGEFLAG FROM COM_MSC T WHERE T.MSC=?
               ]]>
	</query>

	<query id="Msc0Dao.addCraftOrdDesignStd" desc="新增工艺评审标准号主表索引号">  
             <![CDATA[ 
             INSERT INTO CRAFT_ORD_DESIGN_STD
  (DESGIN_KEY, CIC, PIC, SIC, DIC, WIC, GIC)
VALUES
  (?, '', '', '', '', '', '')    
               ]]>
	</query>
	
	<query id="Msc0Dao.getCraftOrdDesignStd" desc="新增工艺评审标准号主表索引号">  
             <![CDATA[ 
SELECT * FROM CRAFT_ORD_DESIGN_STD T WHERE T.DESGIN_KEY = {0}
               ]]>
	</query>

	<query id="Msc0Dao.updateCraftDepement" desc="修改工艺评审记录的科室">  
             <![CDATA[ 
            UPDATE CRAFT_ORD_DESIGN_STS_TKLG_LST T
   SET T.UNIT_CODE = ?, T.UNIT_DESC = ?
 WHERE T.DESGIN_KEY = ?
               ]]>
	</query>

</queryMap>