<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc = "轧管报表文件管理">

<query id = "FrmReportManage.queryReportManage" desc = "查询">
<![CDATA[
select T.PLINE_CODE,
	   T.REPORT_NO,
       T.REPORT_NO_NEW,
       to_date(t.report_no_time, 'yyyy-MM-dd') REPORT_NO_TIME,
       T.REPORT_NAME,
       T.COL_USER,
       T.COL_TIME,
       T.REMARK,
       T.GENERATE_STATION,
       T.RECEIVING_STATION,
       T.SAVE_STATION,
       T.STORAGE_LIFE,
       T.INTERMEDIARY
  from MIL_REPORT t
 WHERE 1 = 1

]]>
</query>

<query id = "FrmReportManage.selectPcodeReportName" desc = "根据产线、报表名称查询是否已有数据">
<![CDATA[
select count(1) acount
  from MIL_REPORT t
 WHERE t.pline_code = ?
   and t.report_name = ?
]]>
</query>

<query id = "FrmReportManage.addReportManage" desc = "新增轧管报表文件管理">
<![CDATA[
 INSERT INTO MIL_REPORT
  (PLINE_CODE,
   REPORT_NO,
   REPORT_NO_NEW,
   REPORT_NO_TIME,
   REPORT_NAME,
   COL_USER,
   COL_TIME,
   REMARK,
   GENERATE_STATION,
   RECEIVING_STATION,
   SAVE_STATION,
   STORAGE_LIFE,
   INTERMEDIARY)
VALUES
  (?, ?, ?, ?, ?, ?, SYSDATE, ?, ?, ?, ?, ?, ?)
]]>
</query>

<query id = "FrmReportManage.deleteReportManage" desc = "删除">
<![CDATA[
DELETE FROM MIL_REPORT T WHERE T.PLINE_CODE = ? AND T.REPORT_NAME = ?
]]>
</query>

<query id = "FrmReportManage.updateReportManage" desc = "修改">
<![CDATA[
UPDATE MIL_REPORT T
   SET T.REPORT_NO         = ?,
       T.REPORT_NO_NEW     = ?,
       T.REPORT_NO_TIME    = ?,
       T.COL_USER          = ?,
       T.COL_TIME          = SYSDATE,
       T.REMARK            = ?,
       T.GENERATE_STATION  = ?,
       T.RECEIVING_STATION = ?,
       T.SAVE_STATION      = ?,
       T.STORAGE_LIFE      = ?,
       T.INTERMEDIARY      = ?
 WHERE T.PLINE_CODE = ?
   AND T.REPORT_NAME = ?

]]>
</query>

</queryMap>
