<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="检验项">
      <query id="ComBasePhyRSizeDAL.queryPhy" desc="查询检验项">
        <![CDATA[
 SELECT 
       T.PHY_CODE,
       T.PHY_NAME,
       T.PHY_TYPE,
       T.PHY_TYPE_C,
       T.PHY_UNIT,
       T.HOUR_READY,
       T.HOUR_TEST,
       T.MEMO
 FROM COM_BASE_PHY T
	     ]]>
	  </query>
	  
       <query id="ComBasePhyRSizeDAL.queryPhySize" desc="查询检验项对应的尺寸">
        <![CDATA[
SELECT A.ITEM_CODE,
       A.ITEM_NAME,
       DECODE(T.PHY_CODE, NULL, 'False', 'True') CHK,
       T.CREATE_NAME,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME
  FROM COM_BASE_PHY_ITEM A
  LEFT JOIN COM_BASE_PHY_R_SIZE T
    ON T.ITEM_CODE = A.ITEM_CODE
   AND T.PHY_CODE = '#PHY_CODE#'
 WHERE A.ITEM_STYLE = 'C'
	     ]]>
	  </query>
	  
       <query id="ComBasePhyRSizeDAL.delete" desc="删除检验项和对应尺寸的关系">
        <![CDATA[
DELETE FROM COM_BASE_PHY_R_SIZE WHERE PHY_CODE = '#PHY_CODE#'
	     ]]>
	  </query>
       
       <query id="ComBasePhyRSizeDAL.save" desc="保存检验项和对应尺寸的关系">
        <![CDATA[
  INSERT INTO COM_BASE_PHY_R_SIZE
    (PHY_CODE, PHY_NAME, ITEM_CODE, ITEM_NAME, CREATE_NAME, CREATE_TIME)
  VALUES
    ('#PHY_CODE#',
     '#PHY_NAME#',
     '#ITEM_CODE#',
     '#ITEM_NAME#',
     '#CREATE_NAME#',
     SYSDATE)
	     ]]>
	  </query>
</queryMap>