<?xml version="1.0" encoding="UTF-8"?>
 <queryMap desc="监制信息管理维护">  
    <query id="CoreBasePrdcrDept.baseDeptMainQuery" desc="监制信息管理维护主数据查询">
        <![CDATA[
              select 'false' XZ,PDEPT_NO,PDEPT_NAME,PHONE,PDEPT_FILE,MEMO FROM SLM_BASE_PRDCR_DEPT
        ]]>
    </query>
    <query id="CoreBasePrdcrDept.baseDeptTailQuery" desc="监制信息管理维护从数据查询">
        <![CDATA[
               select 'false' XZ,PDEPT_NO,NAME_,SEX_,AGE_,PHONE,MEMO ,PDEPT_NO_SQE FROM SLM_BASE_PRDCR_DEPT_MAN
        ]]>
    </query>
    <query id="CoreBasePrdcrDept.baseDeptMailAdd" desc="监制信息管理维护主表数据的新增">
        <![CDATA[
               INSERT INTO SLM_BASE_PRDCR_DEPT
            (PDEPT_NAME, PHONE, PDEPT_FILE, MEMO, 
             CREATE_TIME,PDEPT_NO
            )
             VALUES (?, ?, ?, ?, SYSDATE,?
                    ) 
        ]]>
    </query>
    <query id="CoreBasePrdcrDept.baseDeptMailUpdate" desc="监制信息管理维护主表数据的修改">
        <![CDATA[
               UPDATE SLM_BASE_PRDCR_DEPT SET 
                PDEPT_NAME = ?
               , PHONE = ? 
               , PDEPT_FILE = ?
               , MEMO = ? WHERE PDEPT_NO = ?
        ]]>
    </query>
    <query id="CoreBasePrdcrDept.baseDeptTailUpdateName" desc="监制信息管理维护从表数据名称修改">
        <![CDATA[
               UPDATE SLM_BASE_PRDCR_DEPT_MAN SET 
                PDEPT_NAME = ? WHERE PDEPT_NO = ?
        ]]>
    </query>
     <query id="CoreBasePrdcrDept.baseDeptMainDelete" desc="监制信息管理维护主表数据的删除">
        <![CDATA[
               DELETE SLM_BASE_PRDCR_DEPT WHERE PDEPT_NO = ?
        ]]>
    </query>
     
     <query id="CoreBasePrdcrDept.baseDeptMainGetPetNo" desc="读取PETNO">
        <![CDATA[
                SELECT 'D'||LPAD(MAX(TO_NUMBER(SUBSTR(PDEPT_NO,2)))+1,4,0) PETNO  FROM  SLM_BASE_PRDCR_DEPT
        ]]>
    </query>

    <query id="CoreBasePrdcrDept.baseDeptailAdd" desc="监制信息管理维护从表数据的新增">
        <![CDATA[
               INSERT INTO SLM_BASE_PRDCR_DEPT_MAN
            (PDEPT_NO,PDEPT_NAME, NAME_, SEX_, AGE_, 
             PHONE,MEMO,CREATE_TIME
            )
             VALUES (?, ?, ?, ?, ?,?,?,SYSDATE
                    ) 
        ]]>
    </query>
    
    <query id="CoreBasePrdcrDept.baseDeptailUpdate" desc="监制信息管理维护从表数据的修改">
        <![CDATA[
               UPDATE SLM_BASE_PRDCR_DEPT_MAN SET 
                PDEPT_NAME = ?
               , NAME_ = ? 
               , SEX_ = ?
               , AGE_ = ? 
               , PHONE = ? 
               , MEMO = ? 
               WHERE PDEPT_NO = ?
               AND  PDEPT_NO_SQE = ?
        ]]>
    </query>
     <query id="CoreBasePrdcrDept.baseDeptTainDelete" desc="监制信息管理维护主表数据的删除">
        <![CDATA[
               DELETE SLM_BASE_PRDCR_DEPT_MAN WHERE PDEPT_NO = ? AND PDEPT_NO_SQE = ?
        ]]>
    </query>
    
    
       <query id="CoreBasePrdcrDept.baseAdd" desc="监制信息管理维护主表数据的新增">
        <![CDATA[
               INSERT INTO SLM_BASE_PRDCR_DEPT
            (PDEPT_NO,PDEPT_NAME, PHONE, PDEPT_FILE, MEMO, 
             CREATE_TIME,CREATE_NAME
            )
             VALUES (?,?, ?, ?, ?, SYSDATE,?
                    ) 
        ]]>
    </query>
    
     <query id="CoreBasePrdcrDept.childAdd" desc="监制信息管理维护从表数据的新增">
        <![CDATA[
               INSERT INTO SLM_BASE_PRDCR_DEPT_MAN
            (PDEPT_NO,PDEPT_NAME, NAME_, SEX_, AGE_, 
             PHONE,MEMO,CREATE_TIME,CREATE_NAME
            )
             VALUES (?, ?, ?, ?,?,?,?,SYSDATE,?) 
        ]]>
    </query>
    
    <query id="CoreBasePrdcrDept.baseUpdate" desc="监制信息管理维护主表数据的修改">
        <![CDATA[
               UPDATE SLM_BASE_PRDCR_DEPT SET 
                PDEPT_NAME = ?,
                PHONE = ? ,
                PDEPT_FILE = ?,
                MEMO = ?,
                UPDATE_NAME = ?,
                UPDATE_TIME = SYSDATE
				WHERE PDEPT_NO = ?
        ]]>
    </query>
    
     <query id="CoreBasePrdcrDept.childUpdate" desc="监制信息管理维护从表数据的修改">
        <![CDATA[
               UPDATE SLM_BASE_PRDCR_DEPT_MAN SET 
                PDEPT_NAME = ?,
                 NAME_ = ? ,
                SEX_ = ?,
                AGE_ = ? ,
                PHONE = ? ,
                MEMO = ? ,
               UPDATE_NAME = ?,
               UPDATE_TIME = SYSDATE
               
               WHERE PDEPT_NO_SQE = ?  
              
        ]]>
    </query>
    
     <query id="CoreBasePrdcrDept.deleteParent" desc="监制信息管理维护从表数据的修改">
        <![CDATA[
              DELETE FROM  SLM_BASE_PRDCR_DEPT T
              WHERE T.PDEPT_NO = ?
              
        ]]>
    </query>
    
     <query id="CoreBasePrdcrDept.deleteChildAll" desc="监制信息管理维护从表数据的修改">
        <![CDATA[
            DELETE FROM SLM_BASE_PRDCR_DEPT_MAN T
            WHERE T.PDEPT_NO = ?
        ]]>
    </query>
    
     <query id="CoreBasePrdcrDept.deleteChildOnly" desc="监制信息管理维护从表数据的修改">
        <![CDATA[
              DELETE FROM SLM_BASE_PRDCR_DEPT_MAN T
            WHERE T.PDEPT_NO = ? AND PDEPT_NO_SQE = ?
              
        ]]>
    </query>
    
    </queryMap>
