<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc = "质量目标维护">

<query id = "FrmQualityObjectives.doQueryData" desc = "查询">
<![CDATA[
SELECT T.QQ_YEAR,
       T.TYPE_CODE,
       T.DEPARTID,
       T.DEPARTNAME,
       T.TYPE_DESC,
       T.DEPARTMENT_CODE,
       T.DEPARTMENT_DESC,
       T.PROJECT_CODE,
       T.PROJECT_DESC,
       T.QQ_INDEX,
       T.QQ_UNIT,
       T.REMARKE,
       DECODE(T.VALIDFLAG, '1', '有效', '0', '无效') VALIDFLAG,
       T.CREATE_NAME,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       T.UPDATE_NAME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.DELETE_NAME,
       TO_CHAR(T.DELETE_TIME, 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME,
       T.SYS_GUID
  FROM COM_BASE_QUALITY_OBJECTIVES T
    ]]>
</query>

<query id = "FrmQualityObjectives.getComBaseInfo" desc = "查询">
<![CDATA[
select T.BASECODE,T.BASENAME from COM_BASE_INFO t WHERE T.SORTCODE = ?
    ]]>
</query>

<query id = "FrmQualityObjectives.doAdd" desc = "新增">
<![CDATA[
INSERT INTO COM_BASE_QUALITY_OBJECTIVES
  (QQ_YEAR,
   TYPE_CODE,
   DEPARTID,
   DEPARTNAME,
   TYPE_DESC,
   DEPARTMENT_CODE,
   DEPARTMENT_DESC,
   PROJECT_CODE,
   PROJECT_DESC,
   QQ_INDEX,
   QQ_UNIT,
   REMARKE,
   CREATE_NAME,
   CREATE_TIME)
VALUES
  ('#QQ_YEAR#',
   '#TYPE_CODE#',
   '#DEPARTID#',
   '#DEPARTNAME#',
   '#TYPE_DESC#',
   '#DEPARTMENT_CODE#',
   '#DEPARTMENT_DESC#',
   '#PROJECT_CODE#',
   '#PROJECT_DESC#',
   '#QQ_INDEX#',
   '#QQ_UNIT#',
   '#REMARKE#',
   '#CREATE_NAME#',
   SYSDATE)
    ]]>
</query>

<query id = "FrmQualityObjectives.doUpdate" desc = "修改">
<![CDATA[
UPDATE COM_BASE_QUALITY_OBJECTIVES T
   SET T.QQ_YEAR          = '#QQ_YEAR#',
       T.TYPE_CODE       = '#TYPE_CODE#',
       T.DEPARTID        = '#DEPARTID#',
       T.DEPARTNAME      = '#DEPARTNAME#',
       T.TYPE_DESC       = '#TYPE_DESC#',
       T.DEPARTMENT_CODE = '#DEPARTMENT_CODE#',
       T.DEPARTMENT_DESC = '#DEPARTMENT_DESC#',
       T.PROJECT_CODE    = '#PROJECT_CODE#',
       T.PROJECT_DESC    = '#PROJECT_DESC#',
       T.QQ_INDEX         = '#QQ_INDEX#',
       T.QQ_UNIT          = '#QQ_UNIT#',
       T.REMARKE         = '#REMARKE#',
       T.UPDATE_NAME     = '#UPDATE_NAME#',
       T.UPDATE_TIME     = SYSDATE
 WHERE T.SYS_GUID = '#SYS_GUID#'
    ]]>
</query>

<query id = "FrmQualityObjectives.doDelete" desc = "作废">
<![CDATA[
UPDATE COM_BASE_QUALITY_OBJECTIVES T
   SET T.VALIDFLAG = '0', T.DELETE_NAME = ?, T.DELETE_TIME = SYSDATE
 WHERE T.SYS_GUID = ?
    ]]>
</query>



</queryMap>