<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="质量设计 工序点 ">
        <query id="IOperationPointDao.getOperationPoint" desc="查询工序点">
         <![CDATA[
           SELECT T.INDEX_SEQ,
       T.MSC,
       T.MSC_PLINE,
       T.BACKLOG_SEQ,
       T.PROCESS_CODE,
       T.PROCESS_DESC,
       T.STATION_CODE,
       T.STATION_DESC,
       T.STATION_TYPE,
       T.STATION_ID,
       T.COST,
       T.CHOOSE,
       T.RETURN_RESULT,
       T.SEND_CHECKPLAN,
       T.GROUP_SEQ,
       T.MEMO,
       T.PROCESS_SEQ,
       T.PROCESS_CODE_C,
       T.PROCESS_DESC_C,
       q.BASENAME
  FROM COM_MSC_STATION T
  join (SELECT A.STATION_CODE, b.Basename
          FROM com_base_station a
          JOIN COM_BASE_INFO B
            ON A.STATION_TYPE = B.BASECODE
         WHERE B.SORTCODE = '4032') Q
    on t.station_code = q.station_code
 WHERE T.MSC = ?
   AND T.MSC_PLINE = ?
   AND PROCESS_CODE = ?
   AND T.VALIDFLAG = 1
             ]]>
          </query>   
          
          <query id="IOperationPointDao.saveOperationPoint" desc="保存工序点">
         <![CDATA[
          INSERT INTO SLM_ORD_DESIGN_MSC_PL_STI(
        DESGIN_KEY,
        MSC_PLINE,
        WHOLE_BACKLOG,
        WHOLE_BACKLOG_DESC,
        BACKLOG_SEQ,
        PROCESS_CODE,
        PROCESS_DESC,
        PROCESS_SEQ,
        PROCESS_CODE_C,
        PROCESS_DESC_C,
        STATION_ID,
        STATION_CODE,
        STATION_DESC,
        STATION_TYPE,
        CRAFTITEM_CODE,
        CRAFTITEM_DESC)
 VALUES( 
        '#DESGIN_KEY#',
        '#MSC_PLINE#',
        '#WHOLE_BACKLOG#',
        '#WHOLE_BACKLOG_DESC#',
        '#BACKLOG_SEQ#',
        '#PROCESS_CDOE#',
        '#PROCESS_DESC#',
        '#PROCESS_SEQ#',
        '#PROCESS_CODE_C#',
        '#PROCESS_DESC_C#',
        '#STATION_ID#',
        '#STATION_CODE#',
        '#STATION_DESC#',
        '#STATION_TYPE#',
        '#CRAFTITEM_CODE#',
        '#CRAFTITEM_DESC#')
             ]]>
         </query>  
         
         
          <query id="IOperationPointDao.getDesignPoint" desc="查询质量工序点">
         <![CDATA[
      SELECT T.MSC_PLINE,
       B.WHOLE_BACKLOG,
       B.WHOLE_BACKLOG_DESC,
       T.BACKLOG_SEQ,
       T.PROCESS_CODE,
       T.PROCESS_DESC,
       T.PROCESS_SEQ,
       T.STATION_CODE,
       T.STATION_DESC,
       C.PROCESS_CODE_C,
       C.PROCESS_DESC_C,
       T.STATION_ID,
       A.STATION_TYPE
  FROM COM_MSC_STATION T
  LEFT JOIN COM_BASE_STATION A
    ON T.STATION_CODE = A.STATION_CODE
  LEFT JOIN COM_MSC_BACKLOG B
    ON T.MSC_PLINE = B.MSC_PLINE
  JOIN COM_MSC_PROCESS C
    ON T.MSC = C.MSC
   AND T.MSC_PLINE = C.MSC_PLINE
   AND T.PROCESS_CODE = C.PROCESS_CODE
   AND T.MSC = B.MSC
 WHERE T.MSC = ?
   AND T.MSC_PLINE = ?
   AND T.PROCESS_CODE = ?
   AND T.VALIDFLAG = '1'
   AND A.VALIDFLAG = '1'
   AND B.VALIDFLAG != '0'
                 ]]>
         </query>
        	
</queryMap>