<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="明细状态">
	<query id="StatusDao.addCraftOrdDesignStsTklgLst" desc="新增明细状态">  
             <![CDATA[ 
              INSERT INTO CRAFT_ORD_DESIGN_STS_TKLG_LST(
        DESGIN_KEY,
        ORD_LN_PK,
        SEQ_INDEX,
        LST_ITEM,
        DESIGN_STS,
        DESIGN_STS_RS,
        DESIGN_STS_DESC,
        PSC,
        MSC,
        USE_CODE,
        FINAL_USER,
        GRADECODE,
        DESIGN_OBJ_KEY,
        UNIT_CODE,
        UNIT_DESC,
        VALIDFLAG,
        CREATE_NAME,
        CREATE_TIME,
        UPDATE_NAME,
        UPDATE_TIME,
        DELETE_NAME,
        DELETE_TIME)
 VALUES( 
        '#DESGIN_KEY#',
        '#ORD_LN_PK#',
        '#SEQ_INDEX#',
        '#LST_ITEM#',
        '#DESIGN_STS#',
        '#DESIGN_STS_RS#',
        '#DESIGN_STS_DESC#',
        '#PSC#',
        '#MSC#',
        '#USE_CODE#',
        '#FINAL_USER#',
        '#GRADECODE#',
        '#DESIGN_OBJ_KEY#',
        '#UNIT_CODE#',
        '#UNIT_DESC#',
        '1',
        '#CREATE_NAME#',
        SYSDATE,
        NULL,
        NULL,
        NULL,
        NULL)
               ]]>
	</query>

	<query id="StatusDao.updateCraftOrdDesignStsTklgLst" desc="修改明细状态">  
             <![CDATA[ 
UPDATE CRAFT_ORD_DESIGN_STS_TKLG_LST T
   SET MSC             =?,
       DESIGN_STS      = ?,
       DESIGN_STS_RS   = ?,
       DESIGN_STS_DESC = ?,
       DESIGN_OBJ_KEY  = ?
 WHERE T.DESGIN_KEY = ?
   AND T.LST_ITEM = ?
               ]]>
	</query>
	
	<query id="StatusDao.updateCraftOrdDesignStsTklgLst3" desc="修改明细状态3">  
             <![CDATA[ 
UPDATE CRAFT_ORD_DESIGN_STS_TKLG_LST T
   SET MSC             =?,
       DESIGN_STS      = ?,
       DESIGN_STS_RS   = ?,
       DESIGN_STS_DESC = ?
 WHERE T.DESGIN_KEY = ?
   AND T.LST_ITEM = ?
               ]]>
	</query>
	
	<query id="StatusDao.updateCraftOrdDesignStsTklgLst2" desc="修改明细状态2">  
             <![CDATA[ 
UPDATE CRAFT_ORD_DESIGN_STS_TKLG_LST T
   SET MSC             = ?,
       DESIGN_STS      = ?,
       DESIGN_STS_RS   = ?,
       DESIGN_STS_DESC = ?,
       DESIGN_OBJ_KEY  = ?,
       T.UNIT_CODE     = ?,
       T.UNIT_DESC     = ?
 WHERE T.DESGIN_KEY = ?
   AND T.LST_ITEM = ?
               ]]>
	</query>

	<query id="StatusDao.addCraftOrdDesignStsTklg" desc="新增明细主记录">  
             <![CDATA[ 
                    INSERT INTO CRAFT_ORD_DESIGN_STS_TKLG
  (DESGIN_KEY,
   ORD_LN_PK,
   DESIGN_STS,
   PRDCYC_MEET,
   VALIDFLAG,
   CREATE_NAME,
   CREATE_TIME,
   UPDATE_NAME,
   UPDATE_TIME,
   DELETE_NAME,
   DELETE_TIME)
VALUES
  (?, ?, 'W', 'W', '1', ?, SYSDATE, NULL, NULL, NULL, NULL)
               ]]>
	</query>


	<query id="StatusDao.updateDesignStsTklg" desc="修改工艺评审主信息">
         <![CDATA[
         UPDATE CRAFT_ORD_DESIGN_STS_TKLG
   SET DESIGN_STS  = ?,
       PRDCYC_MEET = ?,
       UPDATE_NAME = ?,
       UPDATE_TIME = SYSDATE
 WHERE DESGIN_KEY = ?       
         ]]>
	</query>


</queryMap>