| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504 |
- <?xml version="1.0" encoding="UTF-8"?>
- <queryMap desc="工器具-钢包">
- <query id="frmsendpot_Query1" desc="钢包发送界面--加载转炉信息" fetchSize="10">
- <![CDATA[
- select t.objectpos objectpos, t.objectid objectid
- from tpm_trackobjectinfor t
- where (t.objectpos like upper('bof0%_DEVICE') or
- t.objectpos like upper('bof0%_BACK'))
- and t.objectid is not null
- ]]>
- </query>
- <query id="frmsendpot_Query2" desc="钢包发送界面--发送时查询状态" fetchSize="10">
- <![CDATA[
- select STATUS, nvl(SLEEKTIMES,0) SLEEKTIMES from DEV_GB_BASE_INFO where LADLEID = ?
- ]]>
- </query>
- <query id="frmpotrepaire_Query1" desc="钢包烘烤界面--加载信息" fetchSize="10">
- <![CDATA[
- select b.REPAIRPART, b.REASON, b.REPAIRTYPE, b.REPAIRTIME, round((sysdate-b.REPAIRTIME)*24*60) duration,
- b.MATERIALREPLACING,b.REPAIRID from DEV_GB_BASE_INFO a, DEV_TOOL_REPAIR b
- where a.STATUS = '维修' and a.REPAIRENO = b.REPAIRID and b.TOOLTYPEID='0'
- and a.LADLEID = ?
- ]]>
- </query>
- <query id="GetPotRandHis_Query" desc="钢包等级历史记录查询" fetchSize="10">
- <![CDATA[
- select SENDTOOLID, SENDOVENID, SENDGRADE, SHIFTCODE, to_char(SENDTIME,'yyyy-mm-dd HH24:mi:ss')SENDTIME
- from (select x.*,row_number() over(partition by x.SENDOVENID order by x.sendtime desc) xh
- from (select a.SENDTOOLID,a.SENDOVENID,a.SENDGRADE,b.SHIFTCODE,a.sendtime
- from (select * from DEV_TOOLSENDDETAIL $ ) a,
- (select x.HEATNO,max(x.SHIFTCODE) over(partition by x.HEATNO) SHIFTCODE
- from (select HEATNO,decode(substr(SHIFTCODE, 2, 1),'1','甲','2','乙','3','丙','4','丁') SHIFTCODE
- from STL_BOF_OPTINFO $ ) x) b
- where a.SENDOVENID = b.HEATNO(+)) x) where xh = 1
- ]]>
- </query>
- <query id="LadLeidStatus.Query" desc="在用钢包信息查询" fetchSize="10">
- <![CDATA[
- select '0' flag,t.ladleid, t.status, t.nowposition
- from DEV_GB_BASE_INFO t
- where t.status = '在用'
- ]]>
- </query>
- <query id="UpdatePort.Query" desc="在用钢包等级、包况修改" fetchSize="10">
- <![CDATA[
- update DEV_GB_BASE_INFO t
- set
- t.POTSTATUS=?
- where t.ladleid=?
- ]]>
- </query>
- <query id="ISBofOneTwoPro.Query" desc="判断1#、2#炉是否在生产" fetchSize="10">
- <![CDATA[
- select count(*)
- from tpm_trackobjectinfor t
- where (t.objectpos = 'BOF01_DEVICE' or t.objectpos = 'BOF01_BACK' or
- t.objectpos = 'BOF02_DEVICE' or t.objectpos = 'BOF02_BACK')
- and objectid is not null and potno is null
- ]]>
- </query>
- <query id="LoadGetBK.Query" desc="钢包包况加载" fetchSize="10">
- <![CDATA[
- select basename
- from scm_base_info
- where sortcode = '400305'
- order by basecode
- ]]>
- </query>
- <query id="LoadGetLVL.Query" desc="钢包等级加载" fetchSize="10">
- <![CDATA[
- select basename
- from scm_base_info
- where sortcode = '400306'
- order by basecode
- ]]>
- </query>
- <query id="LoadGetBKDZ.Query" desc="钢包包口掉转加载" fetchSize="10">
- <![CDATA[
- select basename,basecode
- from scm_base_info
- where sortcode = '400307'
- order by basecode
- ]]>
- </query>
- <query id="LoadGetHBFT.Query" desc="钢包滑板厂家加载" fetchSize="10">
- <![CDATA[
- select basename,basecode
- from scm_base_info
- where sortcode = '40030407'
- order by basecode
- ]]>
- </query>
- <query id="GBYCComfirmHeaNo_Load" desc="钢包异常确认炉号信息获取" fetchSize="10">
- <![CDATA[
- select substr(t.objectid, 3, 1) || '#' || case substr(t.objectid, 1, 1)
- when 'D' then
- '氩站'
- when 'E' then
- '精炼'
- when 'F' then
- 'RH'
- when 'G' then
- '连铸'
- end 所处位置,
- substr(t.objectid, 6, 10) 炉号,
- t.potno ,
- t.objectpos 岗位
- from tpm_trackobjectinfor t
- where substr(t.objectpos, 1, 3) in ('CAS', 'LFS', 'RHS', 'CCM','VDS')
- and substr(t.objectpos, 7, 4) <> 'OVER'
- and t.objectid is not null
- order by substr(t.objectid, 1, 3),
- substr(t.objectid, 9, 1),
- substr(t.objectid, 6, 10)
- ]]>
- </query>
- <query id="GBYCComfirmPot_Load" desc="钢包异常确认钢包信息获取" fetchSize="10">
- <![CDATA[
- select t1.ladleid 钢包号,
- t1.LVL 等级,
- t1.POTSTATUS 包况,
- t1.USETIMES 使用次数,
- to_char(t2.sendtime, 'yyyy-MM-dd HH24:mi:ss') 发送时间,
- t1.SENDID 发送编号
- from dev_gb_base_info t1, DEV_TOOLSENDDETAIL t2
- where t1.SENDID = t2.SENDID
- and t1.casaffirmflag = '1'
- and t2.RECEIVETIME is null
- ]]>
- </query>
-
- <query id="CasGBComfirmPot_Load" desc="氩站钢包确认-钢包信息获取" fetchSize="10">
- <![CDATA[
- select a.CVTPOS,
- a.LADLEID,
- a.LVL,
- a.POTSTATUS,
- a.USETIMES,
- b.sendtime,
- a.SENDID
- from dev_gb_base_info a, DEV_TOOLSENDDETAIL b
- where a.SENDID = b.SENDID
- and CASAFFIRMFLAG = '1'
- order by a.CVTPOS, b.sendtime desc
- ]]>
- </query>
- <query id="YCComfirm_Pot" desc="钢包异常确认存储过程" fetchSize="10">
- <![CDATA[
- RES_LG_TOOLMANAGE.Pot_Abnormal_Confirm
- ]]>
- </query>
-
-
- <query id="GetCvtCurrHeaNoID" desc="获取转炉炉次信息-氩站钢包确认" fetchSize="10">
- <![CDATA[
- select 1 devpos, substr(objectid, 6, 10) smeltingid
- from tpm_trackobjectinfor t
- where objectpos = 'BOF01_DEVICE'
- or objectpos = 'BOF01_BACK'
- union all
- select 2 devpos, substr(objectid, 6, 10) smeltingid
- from tpm_trackobjectinfor t
- where objectpos = 'BOF02_DEVICE'
- or objectpos = 'BOF02_BACK'
- ]]>
- </query>
-
- <query id="GBSendInfo_Update" desc="根据发送编号修改钢包发送信息" fetchSize="10">
- <![CDATA[
- update DEV_TOOLSENDDETAIL
- set SENDOVENSEATID = ?,
- RECEIVETIME = sysdate,
- SENDGRADE = ?,
- INSTANCE = ?,
- SENDOVENID = ?
- where SENDID = ?
- ]]>
- </query>
-
- DEV_GB_USE_DETAIL
- <query id="GBBaseInfo_Update" desc="根据钢包号修改钢包基础信息" fetchSize="10">
- <![CDATA[
- update dev_gb_base_info
- set CASAFFIRMFLAG = '0',
- HEATNO = ?,
- PLANSTEEL = (select a.plansteel
- from stl_bof_optinfo a
- where a.heatno = ?
- union
- select b.plansteel
- from j#stl_bof_optinfo b
- where b.heatno = ?),
- USETIMES = nvl(USETIMES, 0) + 1,
- UPNOZZLEUSETIMES = nvl(UPNOZZLEUSETIMES, 0) + 1,
- BRICKUSETIMES = nvl(BRICKUSETIMES, 0) + 1,
- NOZZLEOUTFITUSETIMES = nvl(NOZZLEOUTFITUSETIMES, 0) + 1,
- NOWPOSITION = '等待位置'
- where LADLEID = ?
- ]]>
- </query>
-
- <query id="GBUserDetail" desc="修改钢包使用信息信息" fetchSize="10">
- <![CDATA[
-
- Update DEV_GB_USE_DETAIL
- set HEATNO = ?,
- STOPPOTTIME=?,
- CASOKTIME=sysdate,
- LVL = ?
- where LADLEID = ?
- AND CYCID = (select max(T.CYCID) CYCID
- from dev_gb_use_detail t
- where t.ladleid = ?)
-
- ]]>
- </query>
-
- <query id="GetPotLeaveCcmTime" desc="获取钢包离开铸机时间" fetchSize="10">
- <![CDATA[
-
- select f_getpotleaveccmtime(?) from dual
-
- ]]>
- </query>
-
- <query id="PotLvl_Update" desc="根据钢包号更新钢包等级" fetchSize="10">
- <![CDATA[
-
- update dev_gb_base_info set LVL = ? where LADLEID = ?
-
- ]]>
- </query>
-
- <query id="SendGrade_Update" desc="根据发送编号更新钢包发送记录表等级" fetchSize="10">
- <![CDATA[
-
- update DEV_TOOLSENDDETAIL
- set SENDGRADE = ?, MSGINFO = ?
- where SENDID = ?
-
- ]]>
- </query>
-
- <query id="BofPOTInfo_Update" desc="根据炉号修改转炉钢包信息" fetchSize="10">
- <![CDATA[
-
- update stl_bof_optinfo
- set POTNO = ?,
- POTAGE = (select nvl(USETIMES, 0)
- from dev_gb_base_info
- where LADLEID = ?
- and rownum = 1),
- POTDISTINCTION = ?,
- POTWRAPSTATE = ?,
- POTTEMP = ?
- where HEATNO = ?
-
- ]]>
- </query>
-
- <query id="GetLastPlanSteel.Query" desc="根据钢包号查询最后一次使用牌号信息" fetchSize="10">
- <![CDATA[
-
- select t.plansteel
- from (select *
- from stl_ccm_optinfo a
- where a.POTNO = ?
-
- union
- select * from j#stl_ccm_optinfo b where b.POTNO = ?) t
-
- order by t.optdate desc
-
- ]]>
- </query>
-
- <query id="PotBaseInfoByLED_Update" desc="钢包异常确认-修改钢包基础信息炉号、牌号" fetchSize="10">
- <![CDATA[
-
- update dev_gb_base_info
- set HEATNO = ?,
- PLANSTEEL = (select a.plansteel
- from stl_bof_optinfo a
- where a.heatno = ?
- union
- select b.plansteel
- from j#stl_bof_optinfo b
- where b.heatno = ?)
- where LADLEID = ?
-
- ]]>
- </query>
-
- <query id="GetDETAIL_LFVDTIME.Query" desc="根据钢包号获取钢包基础信息及钢包使用信息最大精炼值" fetchSize="10">
- <![CDATA[
-
- select a.ladleid,
- a.PARAID,
- a.CREATIVEDATE,
- a.BUYDATE,
- a.LADLETYPE,
- a.LVL,
- a.AGE,
- a.WEIGHT,
- a.POTSTATUS,
- a.STATUS,
- a.STEELACCOUNT,
- a.USETIMES,
- a.BRICKUSETIMES,
- a.BRICKCOREUSETIMES,
- a.UPNOZZLEUSETIMES,
- a.NOZZLEOUTFITUSETIMES,
- a.HEATNO,
- a.NOWPOSITION,
- a.CVTPOS,
- a.CURRSTEELWEIGHT,
- a.CURBREATHEBRICKUSETIMES,
- a.DREGSUSETIMES,
- a.LFSTIMETOTAL,
- a.CASTIMETOTAL,
- a.RHSTIMETOTAL,
- a.VDSTIMETOTAL,
- a.HBMANUFACTURER,
- a.NCMANUFACTURER,
- a.TOOLID,
- a.PLANID,
- a.SENDID,
- a.HOTNO,
- a.REPAIRENO,
- a.SLEEKTIMES,
- a.BRICKFACTORY,
- a.CURRARRIVETIME,
- a.MEMO,
- a.PLANSTEEL,
- a.VDTIMES,
- a.LFTIMES,
- a.BKDZ,
- '' REPAIRTYPE,
- '' CASTIME,
- '' HOTTIME,
- a.CASAFFIRMFLAG,
- (select max(b.LFSSMELTTIME) from DEV_GB_USE_DETAIL b where b.ladleid = ?) LFTIME,
- (select max(b.VDSMELTTIME) from DEV_GB_USE_DETAIL b where b.ladleid = ?) VDTIME,
- (select max(b.ARGONBEGINTIME) from DEV_GB_USE_DETAIL b where b.ladleid = '5') CASBEGINTIME,
- (select max(b.ARGONENDTIME) from DEV_GB_USE_DETAIL b where b.ladleid = '5') CASENDTIME
- from dev_gb_base_info a
- WHERE a.ladleid = ?
-
- ]]>
- </query>
-
- <query id="GetRepairTypeByToolid.Query" desc="根据钢包查询钢包类型" fetchSize="10">
- <![CDATA[
-
- select t.repairtype
- from dev_tool_repair t
- where t.repairtoolid = ?
- and TOOLTYPEID = '0'
- order by t.REPAIRTIME desc
-
- ]]>
- </query>
-
- <query id="GetTOOLFIRINGByToolid.Query" desc="根据钢包查询钢包烘烤时间" fetchSize="10">
- <![CDATA[
-
- SELECT FIRINGTOOLID,
- OVENID,
- to_char(BEGINTIME, 'yyyy-mm-dd hh24:mi:ss') WORKBEGINTIME,
- to_char(ENDTIME, 'yyyy-mm-dd hh24:mi:ss') WORKENDTIME,
- round((case
- when ENDTIME is null then
- sysdate
- else
- ENDTIME
- end - BEGINTIME) * 24 * 60) HOTTIME
- FROM DEV_TOOLFIRINGDETAIL
- where TOOLTYPE = '0'
- and FIRINGTOOLID = ?
- order by length(FIRINGTOOLID), FIRINGTOOLID, WORKBEGINTIME desc
-
- ]]>
- </query>
-
- <query id="GetLFSArfluxbyHeaNo.Query" desc="根据炉号获取精炼炉氩气流量" fetchSize="10">
- <![CDATA[
-
- select a.arflux
- from stl_LFS_OPTINFO a
- where a.heatno = ?
- union
- select b.arflux from J#stl_LFS_OPTINFO b where b.heatno = ?
-
- ]]>
- </query>
- <query id="GetLFSBlowTimeByHeaNo.Query" desc="根据炉号获取精炼炉吹氩时间" fetchSize="10">
- <![CDATA[
-
- select a.BLOWARTIME
- from stl_LFS_OPTINFO a
- where a.heatno = ?
- union
- select b.BLOWARTIME from J#stl_LFS_OPTINFO b where b.heatno = ?
-
- ]]>
- </query>
-
- <query id="GetCCMSFLOWFLAGByHeaNo.Query" desc="根据炉号获取连铸是否引流信息" fetchSize="10">
- <![CDATA[
-
- SELECT decode(a.BALEFLOWFLAG, '0', '否', '1', '是', '', '否') BALEFLOWFLAG
- FROM STL_CCM_OPTINFO a
- WHERE a.HEATNO =
- (select y.HEATNO
- from (select a.*, row_number() over(order by a.optdate desc) xh
- from dev_gb_use_detail a
- where a.ladleid = ?) y
- where y.xh = 1)
- union
- SELECT decode(b.BALEFLOWFLAG, '0', '否', '1', '是', '', '否') BALEFLOWFLAG
- FROM j#STL_CCM_OPTINFO b
- WHERE b.HEATNO =
- (select y.HEATNO
- from (select a.*, row_number() over(order by a.optdate desc) xh
- from dev_gb_use_detail a
- where a.ladleid = ?) y
- where y.xh = 1)
- ]]>
- </query>
-
- <query id="GetPOTHotTime.Query" desc="根据炉号获取精炼炉吹氩时间" fetchSize="10">
- <![CDATA[
-
- select round((t1.endtime - t1.begintime) * 1440 / 3)
- from dev_gb_base_info t, dev_toolfiringdetail t1
- where t.hotno = t1.firingid
- and ladleid = '3';
-
- ]]>
- </query>
- <query id="GBJiangLVL" desc="钢包等级计算" fetchSize="10">
- <![CDATA[
- select GetPOTLVL(?) from dual
- ]]>
- </query>
-
- <query id="CasISConfirm.Query" desc="查询钢包使用信息表是否为空" fetchSize="10">
- <![CDATA[
- select CYCID,CASOKTIME,STOPPOTTIME
- from (select a.*, row_number() over(order by a.Cycid desc) xh
- from DEV_GB_USE_DETAIL a
- where a.Ladleid = ?) y
- where y.xh = 1
- ]]>
- </query>
-
- <query id="CasIsToolSendConfrim.Query" desc="查询钢包发送记录表信息是否为空" fetchSize="10">
- <![CDATA[
- select SENDID,SENDOVENID,RECEIVETIME
- from (select a.*, row_number() over(order by a.Sendid desc) xh
- from DEV_TOOLSENDDETAIL a
- where a.Sendtoolid = ?) y
- where y.xh =1
- ]]>
- </query>
-
- <query id="GBUserDeTail_Del" desc="钢包使用信息删除" fetchSize="10">
- <![CDATA[
- DELETE DEV_GB_USE_DETAIL T WHERE LADLEID=? and T.CYCID=?
- ]]>
- </query>
- <query id="GBToolSendDTeail_Del" desc="钢包发送信息删除" fetchSize="10">
- <![CDATA[
- DELETE DEV_TOOLSENDDETAIL T WHERE SENDTOOLID=? and T.SENDID=?
- ]]>
- </query>
-
- <query id="UpdateGBStatus" desc="修改钢包使用状态" fetchSize="10">
- <![CDATA[
- update DEV_GB_BASE_INFO
- set STATUS = '待用',
- AGE = nvl(AGE, 0) - 1,
- UPNOZZLEUSETIMES = nvl(UPNOZZLEUSETIMES, 0) - 1,
- DREGSUSETIMES = nvl(DREGSUSETIMES, 0) - 1,
- NOZZLEOUTFITUSETIMES = nvl(NOZZLEOUTFITUSETIMES, 0) - 1,
- BRICKUSETIMES = nvl(BRICKUSETIMES, 0) - 1,
- BRICKCOREUSETIMES = nvl(BRICKCOREUSETIMES, 0) - 1,
- CASAFFIRMFLAG = '0'
- where LADLEID = ?
- ]]>
- </query>
- </queryMap>
|