| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978 |
- <?xml version="1.0" encoding="UTF-8"?>
- <queryMap desc="炼钢报表">
- <query id="reportGBData.Query" desc="钢包使用记录原始台账" fetchSize="10">
- <![CDATA[
- select to_char(A.OPTDATE, 'yyyy-MM-dd hh24:mi:ss') OPTDATE,
- a.HEATNO,
- CVTPOS,
- A.LADLEID,
- AGE,
- LVL,
- INSTANCE,
- VDSMELTTIME VDSTIME,
- '' ARFLUX,
- A.CYCID,
- DECODE(SUBSTR(CLASS,1,1),'1','早','2','中','3','晚') BC,
- DECODE(SUBSTR(CLASS,2,1),'1','甲','2','乙','3','丙','4','丁') BB,
- b.XG,b.ZP,
- /*(select t.basename
- from scm_base_info t
- where t.basecode = a.skatefactory)*/b.HBCJ SKATEFACTORY,
- (select b.PLANSTEEL
- from stl_bof_optinfo b
- where b.heatno = a.heatno
- union
- select c.PLANSTEEL
- from j#stl_bof_optinfo c
- where c.heatno = a.heatno) PLANSTEEL,
- c.SELETIME LFSSMELTTIME,
- (select USETIMES from dev_gb_base_info b where b.ladleid = a.ladleid) USETIMES,
- b.BZ, b.SSKLS, b.HBLS, b.TQZLS, b.DCT, b.NCQRR, b.JGLS, b.BGH, b.REMARK, b.OPTMAN, b.OPTDATE OPTDATE1,b.ISGHHB,B.XSKLS,d.PLAN_LINES
- ,F_GB_GETLFSRATE(A.LADLEID,A.CYCID) LFSRATE
- from dev_gb_use_detail a
- left join dev_gb_use_detail_d b on a.LADLEID = b.LADLEID and a.CYCID = b.CYCID
- left join (select max(SELETIME) SELETIME,heatno from (select * from stl_lfs_optinfo union select * from j#stl_lfs_optinfo) group by heatno) c on a.heatno = c.heatno
- left join (select * from ppc_steel_heat union all select * from j#ppc_steel_heat) d on a.heatno = d.heatno
- $
- order by a.OPTDATE desc
- ]]>
- </query>
- <query id="LoadGBPno.Query" desc="初始化钢包号" fetchSize="10">
- <![CDATA[
- select t.ladleid from dev_gb_base_info t
- ]]>
- </query>
- <query id="LoadGetSteel.Query" desc="RH炉操作记录报表--加载钢种" fetchSize="10">
- <![CDATA[
- Select steel from scm_steel where LARGEFLAG='1' ORDER BY STEELCODE
- ]]>
- </query>
- <query id="LgRHReport.Query" desc="RH炉操作记录报表" fetchSize="10">
- <![CDATA[
- select distinct to_char(a.OPTDATE, 'yyyy-MM-dd hh24:mi') OPTDATE,
- a.HEATNO HEATNO,
- a.LMLTEMPT,
- decode(substr(a.shiftcode, 1, 1),
- '1',
- '白',
- '2',
- '中',
- '3',
- '晚') BC,
- decode(substr(a.shiftcode, 2, 1),
- '1',
- '甲',
- '2',
- '乙',
- '3',
- '丙',
- '4',
- '丁') BB,
- to_char(b.BALEPFTIME,'hh24:mi') DCCMTIME,
- e.MaxSPvalue,
- e.MinSPVALUE,
- e.AvgSPVALUE,
- a.PLANSTEEL PLANSTEEL,
- a.RHSNO RHSNO,
- I.POTNO POTNO,
- a.VACGROOVEID VACGROOVEID,
- a.ARRIVEO2,
- a.LEAVEO2,
- to_char(a.ARRIVETIME,'hh24:mi') ARRIVETIME,
- a.RESIDUETHICKNESS RESIDUETHICKNESS,
- to_char(a.REPOSEBEGINTIME, 'hh24:mi') STARTTIME,
- a.ARFTEMPT ARFTEMPT_A,
- case
- when a.REPOSECLOSETIME is not null then
- to_char(a.REPOSECLOSETIME, 'hh24:mi')
- when a.LD_DOWN_DTIME is not null then
- to_char(a.LD_DOWN_DTIME, 'hh24:mi')
- else
- to_char(a.LEAVETIME, 'hh24:mi')
- end ENDTIME,
- a.ARBTEMPT ARBTEMPT_B,
- a.O2USEDTOTALC O2USEDTOTALC,
- '' LANCE_A,
- a.O2USEDTOTALAL O2USEDTOTALAL,
- '' LANCE_B,
- '' OBFLOW,
- a.VAC_MIN VAC_MIN,
- a.VAC_TIME VAC_TIME,
- a.PURE_TIME PURE_TIME,
- a.N2_CONS_S N2_CONS_S,
- a.STEAMTEMPT STEAMTEMPT,
- a.STEAMPRESS STEAMPRESS,
- a.STEAMFLUX STEAMFLUX,
- round(u.JMWGT, 2) JMWGT,
- to_char(a.LEAVETIME,'hh24:mi') LEAVETIME,
- v.PLAN_LINES PLAN_LINES,
- a.ARBTEMPT ARBTEMPT,
- b.PFBALETEMPT,
- a.STATIONCODE STATIONCODE,
- a.DISPOSALTIME DISPOSALTIME,
-
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.C end) over(partition by a.HEATNO) Y_C,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.SI end) over(partition by a.HEATNO) Y_SI,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.MN end) over(partition by a.HEATNO) Y_MN,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.P end) over(partition by a.HEATNO) Y_P,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.S end) over(partition by a.HEATNO) Y_S,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.ALS end) over(partition by a.HEATNO) Y_ALS,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.Nb end) over(partition by a.HEATNO) Y_NB,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.V end) over(partition by a.HEATNO) Y_V,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.C end) over(partition by a.HEATNO) C_C,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.SI end) over(partition by a.HEATNO) C_SI,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.MN end) over(partition by a.HEATNO) C_MN,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.P end) over(partition by a.HEATNO) C_P,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.S end) over(partition by a.HEATNO) C_S,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.ALS end) over(partition by a.HEATNO) C_ALS,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then T4.NB end) over(partition by a.HEATNO) C_NB,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then T4.V end) over(partition by a.HEATNO) C_V,
-
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.NI end) over(partition by a.HEATNO) C_NI,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.MO end) over(partition by a.HEATNO) C_MO,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then T4.CR end) over(partition by a.HEATNO) C_CR,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then T4.CU end) over(partition by a.HEATNO) C_CU,
-
- GetStandardVaule(a.HEATNO,t4.MN,t4.NI,t4.MO,t4.NB,t4.V,t4.ALS,t4.CR,t4.CU) CFFC,
- "1#RISER",
- "1#Dow",
- "2#RISER",
- "2#Dow",
- "3#RISER",
- "3#Dow",
- "1#TOPTIMES",
- "1#MIDDLETIMES",
- "1#BOTTOMTIMES",
- "2#TOPTIMES",
- "2#MIDDLETIMES",
- "2#BOTTOMTIMES",
- "3#TOPTIMES",
- "3#MIDDLETIMES",
- "3#BOTTOMTIMES",
- "1#OBS",
- "1#OBZ",
- "1#OBX",
- "2#OBS",
- "2#OBZ",
- "2#OBX",
- "3#OBS",
- "3#OBZ",
- "3#OBX",
- "1#AGE",
- "2#AGE",
- "3#AGE",
- "1#JIAOB",
- "1#JIEB",
- "2#JIAOB",
- "2#JIEB"
- from (select *
- from STL_RHS_OPTINFO
- where $
- union
- select * from J#stl_RHS_OPTINFO where $) a,
-
- (select *
- from STL_CCM_OPTINFO
- where $
- union
- select * from J#stl_CCM_OPTINFO where $ ) b,
-
- (select *
- from stl_BOF_OPTINFO
- union
- select * from J#stl_BOF_OPTINFO ) I,
-
- (select HEATNO, sum(JMWGT) over(partition by HEATNO) JMWGT
- from stl_ADDITIVES
- where upper(substr(STATIONCODE, 1, 1)) = 'F'
- and MATERIELTYPE = 'WS'
- and $ ) u,
-
- (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE) xh
- from (select t.*
- from stl_CHEMELEMENT t
- where upper(SUBSTR(CHECKNO, 12, 1)) = 'F'
- and upper(SUBSTR(T.CHECKNO, -1)) = 'S'
- and $
- union
- select t.*
- from j#stl_CHEMELEMENT t
- where upper(SUBSTR(CHECKNO, 12, 1)) = 'F'
- and upper(SUBSTR(T.CHECKNO, -1)) = 'S'
- and $
- ) x) y
- where y.xh in (1, round(y.cnt / 2), y.cnt)) w,
-
- (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE desc) xh
- from (select *
- from stl_CHEMELEMENT
- where upper(SUBSTR(CHECKNO, -1)) = 'S'
- and upper(SUBSTR(CHECKNO, 12, 2)) = 'GP'
- and $
- union
- select t.*
- from j#stl_CHEMELEMENT t
- where upper(SUBSTR(T.CHECKNO, -1)) = 'S'
- and upper(SUBSTR(CHECKNO, 12, 2)) = 'GP'
- and $ ) x) y
- where y.xh = y.cnt) t4,
- (select HEATNO, maxSPvalue, MinSPVALUE, avgSPVALUE
- from (select max(SAMPLINGVALUE) maxSPvalue,
- min(SAMPLINGVALUE) MinSPVALUE,
- round(avg(SAMPLINGVALUE), 2) avgSPVALUE,
- HEATNO
- from stl_tempsampling where substr(samplingdepict,1,4)='中包温度'
- group by HEATNO
- union
- select max(SAMPLINGVALUE) maxSPvalue,
- min(SAMPLINGVALUE) MinSPVALUE,
- round(avg(SAMPLINGVALUE), 2) avgSPVALUE,
- HEATNO
- from J#stl_tempsampling where substr(samplingdepict,1,4)='中包温度'
- group by HEATNO)) e,
- (select *
- from ppc_steel_heat
- union
- select * from J#ppc_steel_heat) v,
- (select '' "1#RISER",
- '' "1#Dow",
- '' "2#RISER",
- '' "2#Dow",
- '' "3#RISER",
- '' "3#Dow",
- s.heatno HEATNO,
- u.TOPTIMES "1#TOPTIMES",
- u.MIDDLETIMES "1#MIDDLETIMES",
- u.BOTTOMTIMES "1#BOTTOMTIMES",
- '' "2#TOPTIMES",
- '' "2#MIDDLETIMES",
- '' "2#BOTTOMTIMES",
- '' "3#TOPTIMES",
- '' "3#MIDDLETIMES",
- '' "3#BOTTOMTIMES",
- '' "1#OBS",
- '' "1#OBZ",
- '' "1#OBX",
- '' "2#OBS",
- '' "2#OBZ",
- '' "2#OBX",
- '' "3#OBS",
- '' "3#OBZ",
- '' "3#OBX",
- u.AGE "1#AGE",
- '' "2#AGE",
- '' "3#AGE",
- '' "1#JIAOB",
- '' "1#JIEB",
- '' "2#JIAOB",
- '' "2#JIEB"
- from dev_zkc_base_info t, STL_RHS_OPTINFO s, DEV_ZKC_USE_DETAIL u
- where t.tankcarid = s.vacgrooveid
- and u.tankcarid = t.id) C
- where a.HEATNO = u.HEATNO(+)
- and a.HEATNO = w.HEATNO(+)
- and a.HEATNO = t4.HEATNO(+)
- and a.HEATNO = v.heatno(+)
- and a.HEATNO = b.HEATNO(+)
- and a.HEATNO = C.HEATNO(+)
- and a.HEATNO = e.HEATNO(+)
- and a.heatno = I.HEATNO(+)
- order by OPTDATE,
- to_char(a.REPOSEBEGINTIME, 'hh24:mi')
- ]]>
- </query>
- <query id="LoadGetSteel_bindFLHJ.Query" desc="RH炉操作记录报表--合金加入量" fetchSize="10">
- <![CDATA[
- select a.HEATNO HEATNO,
- substr(a.STATIONCODE, 2, 2) STATIONCODE,
- a.DISPOSALTIME DISPOSALTIME,
- a.MATERIELTYPE TYPE,
- a.MATERIELCODE CODE,
- t.MATERIELNAME NAME,
- round(sum(nvl(a.JMWGT, 0)) over(partition by a.HEATNO,
- a.STATIONCODE,
- a.DISPOSALTIME,
- a.MATERIELTYPE,
- a.MATERIELCODE),
- 2) WEIGHT
- from stl_ADDITIVES a, scm_MATERIEL t
- where substr(a.STATIONCODE, 1, 1) = 'F' and $
- and a.MATERIELCODE = t.MATERIELCODE(+)
- and a.MATERIELTYPE = t.MATERIELTYPE(+)
- ]]>
- </query>
- <query id="reportLFData.Query" desc="LF炉操作记录报表" fetchSize="10">
- <![CDATA[
- select distinct to_char(a.OPTDATE, 'yyyy-MM-dd hh24:mi') OPTDATE,
- a.HEATNO,
- decode(a.DESLAGGFLAG,'0','否','1','是') SFDZ,
- a.LMLTEMPT,
- substr(a.STATIONCODE,2,1) ||'LF'||'-'||a.WSID STATIONCODE,
- b.MaxSPvalue,
- b.MinSPVALUE,
- b.AvgSPVALUE,
- a.LFSNO,
- v.aim_grade_code PLANSTEEL,
- I.POTNO,
- I.POTWRAPSTATE,
- I.POTAGE,
- decode(substr(a.shiftcode, 1, 1),
- '1',
- '白',
- '2',
- '中',
- '3',
- '晚') BC,
- decode(substr(a.shiftcode, 2, 1),
- '1',
- '甲',
- '2',
- '乙',
- '3',
- '丙',
- '4',
- '丁') BB,
- nvl(u.PFBALEWGT,0)-nvl(u.BALELEAVEWGT,0) MOLSTLWGT,
- a.RESIDUETHICKNESS,
- to_char(a.ARRIVETIME, 'hh24:mi') ARRIVETIME,
- to_char(a.LEAVETIME, 'hh24:mi') LEAVETIME,
- a.ARRIVEWGT,
- a.LEAVEWGT,
- a.ARRIVEO2,
- a.LEAVEO2,
- '' WAL,
- '' WCA,
- '' SDDW,
- '' GLMB,
- to_char(a.SELESTARTTIME, 'hh24:mi') SELESTARTTIME,
- to_char(a.SELEENDTIME, 'hh24:mi') SELEENDTIME,
- a.SELETIME,
- a.ARRIVETEMPT LEAVETEMPT,
- '' "PPM",
- h.BLOWARPRESS,
- h.ARFLUX,
- '' WATERP,
- '' WATERFLOW,
- to_char(a.REPOSEBEGINTIME, 'hh24:mi') REPOSEBEGINTIME,
- a.REPOSETIME,
- a.FLEXIBLEBLOWTIME,
- v.PLAN_LINES,
- v.CAST_ID || '-' || v.cast_seq CAST_ID,
- a.LEAVETEMPT, PFBALETEMPT,
- decode(a.DESLAGGFLAG,'0','否','1','是') IFSLAG,
- I.POTDISTINCTION POTDISTINCTION,
- round((a.SELEENDTIME - a.SELESTARTTIME) * 24 * 60) YLZQ,
- to_char(a.REPOSECLOSETIME,'hh24:mi') QDTIME,
- a.DISPOSALTIME,
-
- max(case when a.HEATNO = w.HEATNO and w.xh = 1 then w.C end) over(partition by a.HEATNO) C_1,
- max(case when a.HEATNO = w.HEATNO and w.xh = 1 then w.SI end) over(partition by a.HEATNO) SI_1,
- max(case when a.HEATNO = w.HEATNO and w.xh = 1 then w.MN end) over(partition by a.HEATNO) MN_1,
- max(case when a.HEATNO = w.HEATNO and w.xh = 1 then w.P end) over(partition by a.HEATNO) P_1,
- max(case when a.HEATNO = w.HEATNO and w.xh = 1 then w.S end) over(partition by a.HEATNO) S_1,
- max(case when a.HEATNO = w.HEATNO and w.xh = 1 then w.ALS end) over(partition by a.HEATNO) ALS_1,
- max(case when a.HEATNO = w.HEATNO and w.xh = 1 then w.Alt end) over(partition by a.HEATNO) ALT_1,
- max(case when a.HEATNO = w.HEATNO and w.xh = 1 then w.Ca end) over(partition by a.HEATNO) CA_1,
- max(case when a.HEATNO = w.HEATNO and w.xh = round(w.cnt / 2) then w.C end) over(partition by a.HEATNO) C_2,
- max(case when a.HEATNO = w.HEATNO and w.xh = round(w.cnt / 2) then w.SI end) over(partition by a.HEATNO) SI_2,
- max(case when a.HEATNO = w.HEATNO and w.xh = round(w.cnt / 2) then w.MN end) over(partition by a.HEATNO) MN_2,
- max(case when a.HEATNO = w.HEATNO and w.xh = round(w.cnt / 2) then w.P end) over(partition by a.HEATNO) P_2,
- max(case when a.HEATNO = w.HEATNO and w.xh = round(w.cnt / 2) then w.S end) over(partition by a.HEATNO) S_2,
- max(case when a.HEATNO = w.HEATNO and w.xh = round(w.cnt / 2) then w.ALS end) over(partition by a.HEATNO) ALS_2,
- max(case When a.HEATNO = w.HEATNO and w.xh = round(w.cnt / 2) then w.Alt end) over(partition by a.HEATNO) ALT_2,
- max(case when a.HEATNO = w.HEATNO and w.xh = round(w.cnt / 2) then w.Ca end) over(partition by a.HEATNO) CA_2,
-
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.C end) over(partition by a.HEATNO) C_3,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.SI end) over(partition by a.HEATNO) SI_3,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.MN end) over(partition by a.HEATNO) MN_3,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.P end) over(partition by a.HEATNO) P_3,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.S end) over(partition by a.HEATNO) S_3,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.ALS end) over(partition by a.HEATNO) ALS_3,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.ALT end) over(partition by a.HEATNO) ALT_3,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.Ca end) over(partition by a.HEATNO) CA_3,
-
- max(case when a.heatno = t4.heatno and t4.xh = 1 then t4.c end) over(partition by a.heatno) C_4,
- max(case when a.heatno = t4.heatno and t4.xh = 1 then t4.SI end) over(partition by a.heatno) SI_4,
- max(case when a.heatno = t4.heatno and t4.xh = 1 then t4.MN end) over(partition by a.heatno) MN_4,
- max(case when a.heatno = t4.heatno and t4.xh = 1 then t4.P end) over(partition by a.heatno) P_4,
- max(case when a.heatno = t4.heatno and t4.xh = 1 then t4.S end) over(partition by a.heatno) S_4,
- max(case when a.heatno = t4.heatno and t4.xh = 1 then t4.ALS end) over(partition by a.heatno) ALS_4,
-
- max(case when a.heatno = t4.heatno and t4.xh = 1 then t4.NI end) over(partition by a.heatno) Ni_4,
- max(case when a.heatno = t4.heatno and t4.xh = 1 then t4.MO end) over(partition by a.heatno) Mo_4,
- max(case when a.heatno = t4.heatno and t4.xh = 1 then t4.NB end) over(partition by a.heatno) Nb_4,
- max(case when a.heatno = t4.heatno and t4.xh = 1 then t4.V end) over(partition by a.heatno) V_4,
- max(case when a.heatno = t4.heatno and t4.xh = 1 then t4.CR end) over(partition by a.heatno) Cr_4,
- max(case when a.heatno = t4.heatno and t4.xh = 1 then t4.CU end) over(partition by a.heatno) Cu_4,
- max(case when a.heatno = t4.heatno and t4.xh = 1 then t4.ALT end) over(partition by a.heatno) ALT_4,
- max(case when a.heatno = t4.heatno and t4.xh = 1 then t4.CA end) over(partition by a.heatno) CA_4,
-
- GetStandardVaule(a.HEATNO,t4.MN,t4.NI,t4.MO,t4.NB,t4.V,t4.ALS,t4.CR,t4.CU) CFFC
-
-
- from (select *
- from stl_LFS_OPTINFO
- where $
- union
- select * from J#stl_LFS_OPTINFO where $) a,
-
- (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE) xh
- from (select *
- from stl_CHEMELEMENT
- where upper(SUBSTR(CHECKNO, 12, 1)) = 'E'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
-
- and $
- union
- select *
- from J#stl_CHEMELEMENT
- where upper(SUBSTR(CHECKNO, 12, 1)) = 'E'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
-
- and $) x) y
- where y.xh in (1, round(y.cnt / 2), y.cnt)) w,
-
- (select y.*
- from (select x.*,
- row_number() over(partition by x.HEATNO, substr(assaytypecode, 1, 1) order by x.ASSAYTYPECODE desc) xh,
- substr(assaytypecode, 1, 1) typecode
- from (select *
- from stl_CHEMELEMENT
- where upper(SUBSTR(CHECKNO, -1)) = 'S'
- and upper(SUBSTR(CHECKNO, 12, 2)) = 'GP'
- and $
- union
- select *
- from J#stl_CHEMELEMENT
- where upper(SUBSTR(CHECKNO, -1)) = 'S'
- and upper(SUBSTR(CHECKNO, 12, 2)) = 'GP'
- and $) x) y
- where y.xh = 1) t4,
-
- (select *
- from stl_CCM_OPTINFO
- where $
- union
- select * from J#stl_CCM_OPTINFO where $) u,
-
- (select HEATNO, maxSPvalue, MinSPVALUE, avgSPVALUE
- from (select max(SAMPLINGVALUE) maxSPvalue,
- min(SAMPLINGVALUE) MinSPVALUE,
- round(avg(SAMPLINGVALUE), 2) avgSPVALUE,
- HEATNO
- from stl_tempsampling where substr(samplingdepict,1,4)='中包温度'
- group by HEATNO
- union
- select max(SAMPLINGVALUE) maxSPvalue,
- min(SAMPLINGVALUE) MinSPVALUE,
- round(avg(SAMPLINGVALUE), 2) avgSPVALUE,
- HEATNO
- from J#stl_tempsampling where substr(samplingdepict,1,4)='中包温度'
- group by HEATNO)) b,
-
- (select *
- from stl_CAS_OPTINFO
- where $
- union
- select * from J#stl_CAS_OPTINFO where $) h,
-
- (select *
- from stl_BOF_OPTINFO
- where $
- union
- select * from J#stl_BOF_OPTINFO where $) I,
-
- (select *
- from ppc_steel_heat
- union
- select * from J#ppc_steel_heat) v
- where a.HEATNO = u.HEATNO(+)
- and a.HEATNO = w.HEATNO(+)
- and a.HEATNO = v.HEATNo(+)
- and a.HEATNO = t4.HEATNO(+)
- and a.heatno = h.heatno(+)
- and a.heatno = b.HEATNO(+)
- and a.heatno = I.HEATNO(+)
- order by OPTDATE
- ]]>
- </query>
- <query id="queryLFData_FLHJ.Query" desc="LF炉操作记录报表--合金加入量" fetchSize="10">
- <![CDATA[
- Select t.heatno,
- t.STATIONCODE,
- t.DISPOSALTIME,
- t1.materielcode,
- decode(t1.materieltype, 'WS', t1.materieltype, 'WL') MATERIELTYPE,
- t2.materielname,
- round(sum(nvl(t1.JMWGT, 0)) over(partition by t1.HEATNO,
- t1.STATIONCODE,
- t1.DISPOSALTIME,
- t1.MATERIELTYPE,
- t1.MATERIELCODE)) materielWgt
- from (select *
- from stl_LFS_optinfo
- where 1 = 1 $
- union
- select * from J#stl_LFS_Optinfo where 1 = 1 $) t
- left join stl_additives t1 on t.heatno = t1.heatno
- and 'E' || t.stationcode = t1.stationcode
- and t.disposaltime = t1.disposaltime
- left join scm_materiel t2 on t1.materielcode = t2.materielcode and t1.materieltype=t2.materieltype
- order by t.STATIONCODE, t.HEATNO
- ]]>
- </query>
- <query id="queryVDData_STL.Query" desc="vd炉手头料加入量" fetchSize="10">
- <![CDATA[
- Select t.heatno,
- t.STATIONCODE,
- t.DISPOSALTIME,
- t1.materielcode,
- decode(t1.materieltype, 'WS', t1.materieltype, 'WL') MATERIELTYPE,
- t2.materielname,
- round(sum(nvl(t1.JMWGT, 0)) over(partition by t1.HEATNO,
- t1.STATIONCODE,
- t1.DISPOSALTIME,
- t1.MATERIELTYPE,
- t1.MATERIELCODE)) materielWgt
- from (select *
- from stl_VDS_optinfo
- where 1 = 1 $
- union
- select * from J#stl_VDS_Optinfo where 1 = 1 $) t
- left join stl_additives t1 on t.heatno = t1.heatno
- and 'I' || t.stationcode = t1.stationcode
- and t.disposaltime = t1.disposaltime
- left join scm_materiel t2 on t1.materielcode = t2.materielcode and t1.materieltype=t2.materieltype
- order by t.STATIONCODE, t.HEATNO
- ]]>
- </query>
- <query id="reportLFS_DPR.Query" desc="LF炉日生产统计报表--加载钢种" fetchSize="10">
- <![CDATA[
- Select steel from scm_steel where LARGEFLAG='1' ORDER BY steel
- ]]>
- </query>
- <query id="reportLFS.Query" desc="LF炉日生产统计报表" fetchSize="10">
- <![CDATA[
- select t.OPTDATE,
- t.SUMLUCOUNT DT1,
- sum(t.SUMLUCOUNT) over(order by t.OPTDATE) CM1,
- t.SUMPLANSTEEL DT2,
- sum(t.SUMPLANSTEEL) over(order by t.OPTDATE) CM2,
- round(t.DC, 2) DC,
- t.JIABANLS DT3,
- sum(t.JIABANLS) over(order by t.OPTDATE) CM3,
- round(t.JIABANYIELD, 2) DT4,
- round(sum(t.JIABANYIELD) over(order by t.OPTDATE), 2) CM4,
- t.YIBANLS DT5,
- sum(t.YIBANLS) over(order by t.OPTDATE) CM5,
- round(t.YIBANYIELD, 2) DT6,
- round(sum(t.YIBANYIELD) over(order by t.OPTDATE), 2) CM6,
- t.BINGBANLS DT7,
- sum(t.BINGBANLS) over(order by t.OPTDATE) CM7,
- round(t.BINGBANYIELD, 2) DT8,
- round(sum(t.BINGBANYIELD) over(order by t.OPTDATE), 2) CM8,
- t.DINGBANLS DT9,
- sum(t.DINGBANLS) over(order by t.OPTDATE) CM9,
- round(t.DINGBANYIELD, 2) DT10,
- round(sum(t.DINGBANYIELD) over(order by t.OPTDATE), 2) CM10
- from (select distinct x.OPTDATE,
- count(distinct x.heatno) over(partition by x.optdate) SUMLUCOUNT,
- sum(y.WEIGHT) over(partition by x.optdate) SUMPLANSTEEL,
- sum(y.WEIGHT) over(partition by x.optdate) / count(distinct x.heatno) over(partition by x.optdate) DC,
- sum(case x.shiftcode
- when '1' then
- 1
- end) over(partition by x.optdate) JIABANLS,
- sum(case x.shiftcode
- when '1' then
- y.WEIGHT
- end) over(partition by x.optdate) JIABANYIELD,
- sum(case x.shiftcode
- when '2' then
- 1
- end) over(partition by x.optdate) YIBANLS,
- sum(case x.shiftcode
- when '2' then
- y.WEIGHT
- end) over(partition by x.optdate) YIBANYIELD,
- sum(case x.shiftcode
- when '3' then
- 1
- end) over(partition by x.optdate) BINGBANLS,
- sum(case x.shiftcode
- when '3' then
- y.WEIGHT
- end) over(partition by x.optdate) BINGBANYIELD,
- sum(case x.shiftcode
- when '4' then
- 1
- end) over(partition by x.optdate) DINGBANLS,
- sum(case x.shiftcode
- when '4' then
- y.WEIGHT
- end) over(partition by x.optdate) DINGBANYIELD
- from (select a.heatno,
- a.plansteel,
- substr(a.shiftcode, 2, 1) shiftcode,
- to_char(a.optdate, 'yyyy-MM-dd') optdate
- from (select *
- from STL_LFS_OPTINFO
- where $
- union
- select * from J#STL_LFS_OPTINFO where $) a
- group by a.heatno,
- a.plansteel,
- to_char(a.optdate, 'yyyy-MM-dd'),
- a.shiftcode) x,
-
- (select heatno,
- nvl(PFBALEWGT, 0) - nvl(BALELEAVEWGT, 0) WEIGHT
- from (select row_number() over(partition by b.heatno order by b.disposaltime) xh,
- count(1) over(partition by b.heatno) cnt,
- b.*
- from (select *
- from STL_CCM_OPTINFO
- where $
- union
- select * from J#STL_CCM_OPTINFO where $) b)
- where xh = cnt) y
-
- where x.heatno = y.heatno(+)
- order by x.optdate) t
- ]]>
- </query>
- <query id="proc_GetHeatNo_All.Query" desc="生产日报表--所有炉号查询" fetchSize="10">
- <![CDATA[
- select A.HEATNO,
- A.STATIONCODE,
- nvl(round(B.CPL, 3), 0) CPL,
- case
- when (nvl(A.PFBALEWGT, 0) - nvl(A.BALELEAVEWGT, 0)) > 0 then
- round((nvl(A.PFBALEWGT, 0) - nvl(A.BALELEAVEWGT, 0)), 3)
- else
- 0
- end GSL,
- (select substr(mes_lg_common.getlgshift1(A.RecFlag), 2, 1) from dual) SHIFTCODE,
- case
- when to_char(A.RecFlag, 'yyyy-MM-dd HH24:mi') between ? and ? then
- '1'
- else
- '0'
- end BECURR
- from (select *
- from (select t.*,
- row_number() over(partition by HEATNO order by RecFlag) XH
- from (select t.recflag, t2.*
- from (select t.heatno,
- case
- when TAPPINGSTARTTIME is not null then
- TAPPINGSTARTTIME
- else
- OPTDATE
- end RecFlag
- from STL_bof_optinfo t
- where to_char(case when
- TAPPINGSTARTTIME is not null then
- TAPPINGSTARTTIME else OPTDATE end,
- 'yyyy-MM-dd') between ? and ?
- union all
- select t.heatno,
- case
- when TAPPINGSTARTTIME is not null then
- TAPPINGSTARTTIME
- else
- OPTDATE
- end RecFlag
- from J#STL_bof_optinfo t
- where to_char(case when
- TAPPINGSTARTTIME is not null then
- TAPPINGSTARTTIME else OPTDATE end,
- 'yyyy-MM-dd') between ? and ?) t,
- (select *
- from STL_ccm_optinfo
- union
- select * from J#STL_Ccm_Optinfo) t2
- where t.heatno = t2.heatno) t)
- where XH = 1) A,
- (select distinct substr(CHARGE_NO, 1, 9) CHARGE_NO,
- sum(nvl(SLAB_WGT, 0)) over(partition by substr(CHARGE_NO, 1, 9)) CPL
- from (select CHARGE_NO, (sum(SLAB_WGT)/1000) SLAB_WGT
- from stl_incision_view
- where to_char(SLAB_CUT_DTIME) between ? and
- ? Group by CHARGE_NO) t) B
- where SUBSTR(A.HEATNO,1,9) = B.CHARGE_NO(+)
- ]]>
- </query>
- <query id="proc_GetBOFInfo_CEF.Query" desc="生产日报表--BOF炉信息查询" fetchSize="10">
- <![CDATA[
- select HEATNO,
- STATIONCODE,
- substr(SHIFTCODE, 2, 1) SHIFTCODE,
- nvl(IRONPOTWGT, 0) TSL,
- nvl(PIGIRONWGT, 0) STL,
- nvl(WSTEELWGT, 0) FGL,
- case
- when to_char(RecFlag, 'yyyy-MM-dd HH24:mi') between ? and ? then
- '1'
- else
- '0'
- end BECURR
- from (select *
- from (select t.*,
- row_number() over(partition by t.HEATNO order by t.RecFlag) XH
- from (select t.*,
- case
- when TAPPINGSTARTTIME is not null then
- TAPPINGSTARTTIME
- else
- OPTDATE
- end RecFlag
- from STL_BOF_OPTINFO t
- where to_char(case when TAPPINGSTARTTIME is not null then
- TAPPINGSTARTTIME else OPTDATE end,
- 'yyyy-MM-dd') between ? and ?
- union all
- select t.*,
- case
- when TAPPINGSTARTTIME is not null then
- TAPPINGSTARTTIME
- else
- OPTDATE
- end RecFlag
- from J#STL_BOF_OPTINFO t
- where to_char(case when TAPPINGSTARTTIME is not null then
- TAPPINGSTARTTIME else OPTDATE end,
- 'yyyy-MM-dd') between ? and ? ) t)
- where XH = 1)
- ]]>
- </query>
- <query id="proc_GetLFSInfo_CEF.Query" desc="生产日报表--LF炉信息查询" fetchSize="10">
- <![CDATA[
- select HEATNO,
- STATIONCODE,
- substr(SHIFTCODE, 2, 1) SHIFTCODE,
- case
- when to_char(RecFlag, 'yyyy-MM-dd HH24:mi') between ? and ? then
- '1'
- else
- '0'
- end BECURR
- from (select *
- from (select t.*,
- row_number() over(partition by HEATNO order by RecFlag) XH
- from (select t.recflag, t2.*
- from (select t.heatno,
- case
- when TAPPINGSTARTTIME is not null then
- TAPPINGSTARTTIME
- else
- OPTDATE
- end RecFlag
- from stl_bof_optinfo t
- where to_char(case when
- TAPPINGSTARTTIME is not null then
- TAPPINGSTARTTIME else OPTDATE end,
- 'yyyy-MM-dd') between ? and ?
- union all
- select t.heatno,
- case
- when TAPPINGSTARTTIME is not null then
- TAPPINGSTARTTIME
- else
- OPTDATE
- end RecFlag
- from J#stl_bof_optinfo t
- where to_char(case when
- TAPPINGSTARTTIME is not null then
- TAPPINGSTARTTIME else OPTDATE end,
- 'yyyy-MM-dd') between ? and ? ) t,
- (select *
- from stl_LFS_optinfo
- union
- select * from J#stl_LFS_Optinfo) t2
- where t.heatno = t2.heatno) t)
- where XH = 1)
- ]]>
- </query>
- <query id="proc_GetRHSInfo_CEF.Query" desc="生产日报表--RH炉信息查询" fetchSize="10">
- <![CDATA[
- select HEATNO,
- STATIONCODE,
- substr(SHIFTCODE, 2, 1) SHIFTCODE,
- ?
- case
- when to_char(OPTDATE, 'yyyy-MM-dd HH24:mi') between ? and ? then
- '1'
- else
- '0'
- end BECURR
- from (select *
- from (select t.*,
- row_number() over(partition by t.HEATNO order by t.OPTDATE) XH
- from (select *
- from ?
- where to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- union all
- select *
- from J# ?
- where to_char(OPTDATE, 'yyyy-MM-dd') between ? and ? ) t)
- where XH = 1)
- ]]>
- </query>
- <query id="proc_GetCCMInfo_CEF.Query" desc="生产日报表--BOF炉信息查询" fetchSize="10">
- <![CDATA[
- select HEATNO,
- STATIONCODE,
- substr(SHIFTCODE, 2, 1) SHIFTCODE,
- case
- when to_char(RecFlag, 'yyyy-MM-dd HH24:mi') between ? and ? then
- '1'
- else
- '0'
- end BECURR
- from (select *
- from (select t.*,T.BALESTARTTIME RECFLAG,
- row_number() over(partition by t.HEATNO order by t.OPTDATE) XH
- from (select *
- from STL_CCM_OPTINFO
- where to_char(nvl(BALESTARTTIME,optdate), 'yyyy-MM-dd') between ? and ?
- union all
- select *
- from J#STL_CCM_OPTINFO
- where to_char(nvl(BALESTARTTIME,optdate), 'yyyy-MM-dd') between ? and ? ) t)
- where XH = 1)
- ]]>
- </query>
- <query id="reportBOFToCCMData.Query" desc="炼钢生产报表--加载钢种" fetchSize="10">
- <![CDATA[
- Select steel from scm_steel where LARGEFLAG='1' ORDER BY steel
- ]]>
- </query>
- <query id="BOFToCCMData.Query" desc="炼钢生产报表--炼钢生产报表数据查询" fetchSize="10">
- <![CDATA[
- SELECT DISTINCT T.HEATNO,
- T.STATIONCODE STATIONCODE,
- TO_CHAR(T.OPTDATE, 'YYYY-MM-DD') OPTDATE,
- T.SHIFTCODE,
- SUBSTR(T.SHIFTCODE, 1, 1) BC,
- SUBSTR(T.SHIFTCODE, 2, 1) BB,
- T4.AIM_GRADE_CODE PLANSTEEL,
- CASE
- WHEN SUBSTR(T4.FACT_ROUTE, 9, 2) != 'E0' THEN
- '是'
- ELSE
- '否'
- END FACT_ROUTE,
- '' MNFC,
- NVL((SELECT D.STDMIN
- FROM SCM_STANDARD_CHEM_VIEW D,
- (SELECT *
- FROM SCM_BASE_INFO D
- WHERE D.SORTCODE = '1006'
- ORDER BY D.BASECODE) H
- WHERE D.ITEMCODE = H.BASENAME
- AND STEEL = T4.AIM_GRADE_CODE
- AND STDSTYLE = '1'
- AND D.ITEMCODE = 'MN'
- GROUP BY STEEL,
- STDSTYLE,
- ITEMCODE,
- STD,
- STDMIN,
- STDMAX,
- BASENAME,
- BASECODE),
- 0) NKMN,
-
- CASE
- WHEN SUBSTR(T4.FACT_ROUTE, 9, 2) != 'E0' THEN
-
- NVL(MAX(CASE
- WHEN T.HEATNO = T10.HEATNO AND T10.XH = T10.CNT THEN
- T10.MN
- END) OVER(PARTITION BY T.HEATNO),
- 0) --精炼
- ELSE
- NVL(MAX(CASE
- WHEN T.HEATNO = T11.HEATNO AND T11.XH = T11.CNT THEN
- T11.MN
- END) OVER(PARTITION BY T.HEATNO),
- 0) --连铸
-
- END LFORCCM,
-
- T.SAGE,
- T.GAGE,
- T.OGGNUMID,
- T.EMOLSTLTIME,
- NVL(T.IRONPOTWGT, '0') IRONPOTWGT,
- T.WSTEELWGT,
- T.PIGIRONWGT,
- T.JOINMARLWGT,
- T.RSTEELWGT,
- T.RSWGT,
- T.IRONPOTID,
- T.N2CONSUME,
- T.ARCONSUME,
- T.POTDISTINCTION,
- T.POTWRAPSTATE,
- NVL(T.N2CONSUME, 0) + NVL(T.TOPN2CONSUME, 0) N2SUM,
- DECODE(SUBSTR(T.MOLIRNTYPE, 1, 1),
- '1',
- '半钢',
- DECODE(SUBSTR(T.MOLIRNTYPE, 1, 1),
- '2',
- '脱硫',
- DECODE(SUBSTR(T.MOLIRNTYPE, 1, 1),
- '3',
- '混铁炉',
- DECODE(SUBSTR(T.MOLIRNTYPE, 1, 1),
- '4',
- '直兑',
- '')))) MOLIRNTYPE,
- T.IRONTEMPERATURE,
- (SELECT CAST_ID || '-' || CAST_SEQ
- FROM PPC_STEEL_HEAT
- WHERE HEATNO = T.HEATNO) MOULDUMID,
- TO_CHAR(T.CHANGESTARTTIME, 'HH24:MI') CHANGESTARTTIME,
- TO_CHAR(T.OPENOXYGENTIME, 'HH24:MI') OPENOXYGENTIME,
- FLOOR(NVL(T.SUPPLYOXYGENTIME / 60, 0)) SUPPLYOXYGENTIME,
- --TO_CHAR(ROUND((NVL(T.SUPPLYOXYGENTIME, 0) / 60 -
- -- FLOOR(NVL(T.SUPPLYOXYGENTIME, 0) / 60)) * 60))
- T.SUPPLYOXYGENTIME SUPPLYOXYGENTIME_S,
- FLOOR(NVL(T.B1TIME / 60, 0)) B1TIME_M,
- --TO_CHAR(ROUND((NVL(T.B1TIME, 0) / 60 -
- -- FLOOR(NVL(T.B1TIME, 0) / 60)) * 60))
- T.B1TIME B1TIME_S,
- T.O2CONSUME,
- T.TERMINUSTEPT TAPPINGTEMPERATURE,
- T.POTNO,
- T.TAPPINGTIME,
- TO_CHAR(T.TAPPINGENDTIME, 'HH24:MI') TAPPINGENDTIME,
- TO_CHAR(T.TAPPINGSTARTTIME, 'HH24:MI') TAPPINGSTARTTIME,
- T.MOLSTLTEMPERATURE,
- T.CCMPLANTEMPT,
- TO_CHAR(T.CCMPLANTEMPTTIME, 'HH24:MI') CCMPLANTEMPTTIME,
- ROUND((T.PSENDTIME - T.CHANGESTARTTIME) * 24 * 60) CYCLE,
- DECODE(SUBSTR(T4.PLAN_ROUTE,
- INSTR(T4.PLAN_ROUTE, 'E') + 1,
- 1),
- '0',
- '',
- SUBSTR(T4.PLAN_ROUTE,
- INSTR(T4.PLAN_ROUTE, 'E') + 1,
- 1)) LFSNO,
- (T4.WIDTH || '*' || T4.THICK) ROLLING,
- T4.CAST_ID CCMNO,
- T5.SI I_SI,
- T5.MN I_MN,
- T5.P I_P,
- T5.S I_S,
- T5.C I_AS,
- T.BLOWO2TIMES DOWNHEATTIME,
- T6.PFBALEWGT GROSSWGT,
- T6.BALELEAVEWGT KONGWGT,
- T6.PFBALEWGT - T6.BALELEAVEWGT TAPPINGWGT,
- T7.ARFTEMPT CASBEFORETEMPERATURE,
- T7.ARBTEMPT CASAFTERTEMPERATURE,
- T.OPTDATE OPTDISP,
- T.GASRECOVERYTIME,
- DECODE(T8.ISRS,
- '1',
- '精炼回炉',
- DECODE(T6.ISRS, '1', '连铸回炉', '')) ISRS,
- DECODE(T8.ISRS,
- '1',
- DECODE(T6.ISRS,
- '1',
- (SELECT SUM(WEIGHTOFCVT)
- FROM (SELECT WEIGHTOFCVT, SMELTINGIDOFCVT
- FROM STL_ES_TAPHOLE
- UNION
- SELECT WEIGHTOFCVT, SMELTINGIDOFCVT
- FROM STL_MIS_TAPHOLE)
- WHERE SMELTINGIDOFCVT = T.HEATNO),
- ''),
- '') ISRSWGT,
- NVL(T.IRONPOTWGT, '0') + NVL(T.WSTEELWGT, '0') +
- NVL(T.PIGIRONWGT, '0') + NVL(T.JOINMARLWGT, '0') +
- NVL(T.RSTEELWGT, '0') + NVL(T.RSWGT, '0') JOINSTOVEWGT,
- DECODE((NVL(T.IRONPOTWGT, '0') + NVL(T.WSTEELWGT, '0') +
- NVL(T.PIGIRONWGT, '0') + NVL(T.JOINMARLWGT, '0') +
- NVL(T.RSTEELWGT, '0') + NVL(T.RSWGT, '0')),
- 0,
- 0,
- ROUND((T6.PFBALEWGT - T6.BALELEAVEWGT) /
- (NVL(T.IRONPOTWGT, '0') + NVL(T.WSTEELWGT, '0') +
- NVL(T.PIGIRONWGT, '0') +
- NVL(T.JOINMARLWGT, '0') +
- NVL(T.RSTEELWGT, '0') + NVL(T.RSWGT, '0')) * 100,
- 2)) STEELOUT,
- T8.LADLECOVERAGE,
- T6.MWRAPNO,
- T8.ELETRICITYCONSUME,
- T7.ARFTEMPT,
- ROUND(((T8.REPOSEBEGINTIME - T8.ARRIVETIME) * 24 * 60), 0) AWAITTIME,
- T8.REFINETIME,
- T8.FLEXIBLEBLOWTIME,
- T8.ARRIVETEMPT,
- T8.LEAVETEMPT,
- T7.BLOWARTIME,
- T6.BILLETFIXSIZE,
- T9.BILLETNUM,
- T9.BILLETWGT
- FROM (SELECT *
- FROM STL_BOF_OPTINFO
- WHERE 1 = 1 $
- UNION
- SELECT * FROM J#STL_BOF_OPTINFO WHERE 1 = 1 $) T
- LEFT JOIN (SELECT *
- FROM PPC_STEEL_HEAT
- UNION
- SELECT * FROM J#PPC_STEEL_HEAT) T4
- ON T.HEATNO = T4.HEATNO
- LEFT JOIN (SELECT *
- FROM STL_CHEMELEMENT
- UNION
- SELECT * FROM J#STL_CHEMELEMENT) T5
- ON T5.HEATNO = T.MOLIRNSOURCE
- LEFT JOIN (SELECT HEATNO,
- PFBALEWGT,
- BALELEAVEWGT,
- ISRS,
- MWRAPNO,
- BILLETFIXSIZE
- FROM STL_CCM_OPTINFO
- UNION
- SELECT HEATNO,
- PFBALEWGT,
- BALELEAVEWGT,
- ISRS,
- MWRAPNO,
- BILLETFIXSIZE
- FROM J#STL_CCM_OPTINFO) T6
- ON T.HEATNO = T6.HEATNO
- LEFT JOIN (SELECT HEATNO, ARFTEMPT, ARBTEMPT, BLOWARTIME
- FROM STL_CAS_OPTINFO
- UNION
- SELECT HEATNO, ARFTEMPT, ARBTEMPT, BLOWARTIME
- FROM J#STL_CAS_OPTINFO) T7
- ON T.HEATNO = T7.HEATNO
- LEFT JOIN (SELECT HEATNO,
- MAX(ISRS) ISRS,
- MAX(ELETRICITYCONSUME) ELETRICITYCONSUME,
- MAX(LADLECOVERAGE) LADLECOVERAGE,
- MAX(REPOSEBEGINTIME) REPOSEBEGINTIME,
- MAX(ARRIVETIME) ARRIVETIME,
- MAX(REFINETIME) REFINETIME,
- MAX(FLEXIBLEBLOWTIME) FLEXIBLEBLOWTIME,
- MAX(ARRIVETEMPT) ARRIVETEMPT,
- MAX(LEAVETEMPT) LEAVETEMPT
- FROM (SELECT HEATNO,
- ISRS,
- ELETRICITYCONSUME,
- LADLECOVERAGE,
- REPOSEBEGINTIME,
- ARRIVETIME,
- REFINETIME,
- FLEXIBLEBLOWTIME,
- ARRIVETEMPT,
- LEAVETEMPT
- FROM STL_LFS_OPTINFO
- UNION ALL
- SELECT HEATNO,
- ISRS,
- ELETRICITYCONSUME,
- LADLECOVERAGE,
- REPOSEBEGINTIME,
- ARRIVETIME,
- REFINETIME,
- FLEXIBLEBLOWTIME,
- ARRIVETEMPT,
- LEAVETEMPT
- FROM J#STL_LFS_OPTINFO)
- GROUP BY HEATNO) T8
- ON T.HEATNO = T8.HEATNO
- LEFT JOIN (SELECT S.HEATNO, S.BILLETNUM, S.BILLETWGT
- FROM (SELECT T.HEATNO,
- COUNT(1) BILLETNUM,
- SUM(NVL(T.WEIGHT, 0)) BILLETWGT
- FROM STL_INCISION T
- GROUP BY HEATNO, WEIGHT
- UNION
- SELECT T.HEATNO,
- COUNT(1) BILLETNUM,
- SUM(NVL(T.WEIGHT, 0)) BILLETWGT
- FROM Y#STL_INCISION T
- GROUP BY HEATNO, WEIGHT) S) T9
- ON T.HEATNO = T9.HEATNO
- LEFT JOIN (SELECT Y.* --LFS
- FROM (SELECT X.*,
- COUNT(1) OVER(PARTITION BY X.HEATNO) CNT,
- ROW_NUMBER() OVER(PARTITION BY X.HEATNO ORDER BY X.ASSAYTYPECODE DESC, X.ASSAYDATE DESC) XH,
- SUBSTR(X.ASSAYTYPECODE, 1, 1) GW
- FROM (SELECT *
- FROM STL_CHEMELEMENT
- WHERE UPPER(SUBSTR(CHECKNO, 12, 1)) = 'E'
- AND UPPER(SUBSTR(CHECKNO, -1)) = 'S'
- UNION
- SELECT *
- FROM J#STL_CHEMELEMENT
- WHERE UPPER(SUBSTR(CHECKNO, 12, 1)) = 'E'
- AND UPPER(SUBSTR(CHECKNO, -1)) = 'S') X) Y) T10
- ON T.HEATNO = T10.HEATNO
- LEFT JOIN (SELECT Y.* --CCM
- FROM (SELECT X.*,
- COUNT(1) OVER(PARTITION BY X.HEATNO) CNT,
- ROW_NUMBER() OVER(PARTITION BY X.HEATNO ORDER BY X.ASSAYTYPECODE DESC, X.ASSAYDATE DESC) XH,
- SUBSTR(X.ASSAYTYPECODE, 1, 1) GW
- FROM (SELECT *
- FROM STL_CHEMELEMENT
- WHERE UPPER(SUBSTR(CHECKNO, -1)) = 'S'
- AND UPPER(SUBSTR(CHECKNO, 12, 2)) = 'GP'
- UNION
- SELECT *
- FROM J#STL_CHEMELEMENT
- WHERE UPPER(SUBSTR(CHECKNO, -1)) = 'S'
- AND UPPER(SUBSTR(CHECKNO, 12, 2)) = 'GP') X) Y) T11
- ON T.HEATNO = T11.HEATNO
- ORDER BY T.OPTDATE
- ]]>
- </query>
- <query id="queryBofData_FLHJ.Query" desc="炼钢生产报表--取转炉辅料合金数据" fetchSize="10">
- <![CDATA[
- Select t.heatno,
- t.STATIONCODE,
- t.DISPOSALTIME,
- t1.materielcode,
- t1.materieltype,
- t2.materielname,
- round(sum(nvl(t1.JMWGT, 0)) over(partition by t1.HEATNO,
- t1.STATIONCODE,
- t1.DISPOSALTIME,
- t1.MATERIELTYPE,
- t1.MATERIELCODE)) materielWgt
- from (select *
- from stl_bof_optinfo
- where 1 = 1 $
- union
- select * from J#stl_Bof_Optinfo where 1 = 1 $ ) t
- left join stl_additives t1 on t.heatno = t1.heatno
- and 'C' || t.stationcode = t1.stationcode
- and t.disposaltime = t1.disposaltime
- left join scm_materiel t2 on t1.materielcode = t2.materielcode
- order by t.STATIONCODE, t.HEATNO
- ]]>
- </query>
- <query id="queryBofLfsData_FLHJ.Query" desc="炼钢生产报表--取精炼辅料合金数据" fetchSize="10">
- <![CDATA[
- Select t.heatno,
- t.STATIONCODE,
- t.DISPOSALTIME,
- t1.materielcode,
- decode(t1.materieltype, 'WS', t1.materieltype, 'WL') MATERIELTYPE,
- t2.materielname,
- round(sum(nvl(t1.JMWGT, 0)) over(partition by t1.HEATNO,
- t1.STATIONCODE,
- t1.DISPOSALTIME,
- t1.MATERIELTYPE,
- t1.MATERIELCODE)) materielWgt
- from (select *
- from stl_bof_optinfo
- where 1 = 1 $
- union
- select * from J#stl_Bof_Optinfo where 1 = 1 $ ) t
- left join stl_additives t1 on t.heatno = t1.heatno
- and 'C' || t.stationcode = t1.stationcode
- and t.disposaltime = t1.disposaltime
- left join scm_materiel t2 on t1.materielcode = t2.materielcode
- order by t.STATIONCODE, t.HEATNO
- ]]>
- </query>
- <query id="VDSTEEL.Query" desc="VD炉操作记录报表--加载钢种" fetchSize="10">
- <![CDATA[
- Select steel from scm_steel where LARGEFLAG='1' ORDER BY steel
- ]]>
- </query>
- <query id="VDData.Query" desc="VD炉操作记录报表" fetchSize="10">
- <![CDATA[
- select distinct to_char(a.OPTDATE, 'yyyy-MM-dd hh24:mi') OPTDATE,
- a.HEATNO,
- decode(substr(a.shiftcode, 1, 1),
- '1',
- '白',
- '2',
- '中',
- '3',
- '晚') BC,
- decode(substr(a.shiftcode, 2, 1),
- '1',
- '甲',
- '2',
- '乙',
- '3',
- '丙',
- '4',
- '丁') BB,
- a.LMLTEMPT,
- b.MaxSPvalue,
- b.MinSPVALUE,
- b.AvgSPVALUE,
- a.PLANSTEEL,
- a.HEATPROCESSNO,
- to_char(a.ARRIVETIME,'hh24:mi:ss')ARRIVETIME,
- I.POTNO,
- I.POTDISTINCTION,
- a.WSID,
- a.RESIDUETHICKNESS,
- a.CLEARENCELHEIGHT,
- a.ARFTEMPT,
- to_char(a.VACBEGINTIME,'hh24:mi')VACBEGINTIME,
- a.ARRIVEH,
- a.VACUUMPRESS VAC_MIN,
- to_char(a.HYDGENSTARTTIME,'hh24:mi')HYDGENSTARTTIME,
- a.ARBTEMPT ARBTEMPT_A,
- to_char(a.VACLOSETIME,'hh24:mi')VACLOSETIME,
- a.LEAVEH,
- to_char(a.HYDGENENDTIME,'hh24:mi')HYDGENENDTIME,
- '' PROPHASE,
- '' INTERIM,
- '' LATE,
- a.FLEXIBLEBLOWTIME,
- --a.VACUUMPRESS,
- FLOOR(nvl(a.VAC_KEEP_TIME / 60, 0)) VAC_KEEP_TIME,
- a.VAC_TIME VACUUMTIME,
- a.STEAM_TEM,
- a.STEAM_PRES,
- a.STEAM_FLUX,
- to_char(a.LEAVETIME,'hh24:mi') LEAVETIME,
- p.PLAN_LINES,
- u.PFBALETEMPT,
- a.ARBTEMPT,
- p.HEAT_NUM,
- a.MEMO,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.c end) over(partition by a.HEATNO) Y_C,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.si end) over(partition by a.HEATNO) Y_SI,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.MN end) over(partition by a.HEATNO) Y_MN,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.P end) over(partition by a.HEATNO) Y_P,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.S end) over(partition by a.HEATNO) Y_S,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.ALS end) over(partition by a.HEATNO) Y_ALS,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.NB end) over(partition by a.HEATNO) Y_NB,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.V end) over(partition by a.HEATNO) Y_V,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.TI end) over(partition by a.HEATNO) Y_TI,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.CU end) over(partition by a.HEATNO) Y_CU,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.N end) over(partition by a.HEATNO) Y_N,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.B end) over(partition by a.HEATNO) Y_B,
-
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.c end) over(partition by a.HEATNO) C_C,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.SI end) over(partition by a.HEATNO) C_SI,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.MN end) over(partition by a.HEATNO) C_MN,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.P end) over(partition by a.HEATNO) C_P,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.S end) over(partition by a.HEATNO) C_S,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.ALS end) over(partition by a.HEATNO) C_ALS,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.NB end) over(partition by a.HEATNO) C_NB,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.V end) over(partition by a.HEATNO) C_V,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.TI end) over(partition by a.HEATNO) C_TI,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.CU end) over(partition by a.HEATNO) C_CU,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.N end) over(partition by a.HEATNO) C_N,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.B end) over(partition by a.HEATNO) C_B,
-
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.N end) over(partition by a.HEATNO) C_NI,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.B end) over(partition by a.HEATNO) C_MO,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.N end) over(partition by a.HEATNO) C_CR,
- GetStandardVaule(a.HEATNO,t4.MN,t4.NI,t4.MO,t4.NB,t4.V,t4.ALS,t4.CR,t4.CU) CFFC,
- '' ETGYEXRECORD
- from (select *
- from stl_vds_optinfo $
- union
- select * from j#stl_vds_optinfo $ ) a,
- (select *
- from stl_BOF_OPTINFO
- union
- select * from J#stl_BOF_OPTINFO ) I,
- (select *
- from STL_CCM_OPTINFO
- $
- union
- select * from J#stl_CCM_OPTINFO $ ) u,
- (select HEATNO, maxSPvalue, MinSPVALUE, avgSPVALUE
- from (select max(SAMPLINGVALUE) maxSPvalue,
- min(SAMPLINGVALUE) MinSPVALUE,
- round(avg(SAMPLINGVALUE), 2) avgSPVALUE,
- HEATNO
- from stl_tempsampling where substr(samplingdepict,1,4)='中包温度'
- group by HEATNO
- union
- select max(SAMPLINGVALUE) maxSPvalue,
- min(SAMPLINGVALUE) MinSPVALUE,
- round(avg(SAMPLINGVALUE), 2) avgSPVALUE,
- HEATNO
- from J#stl_tempsampling where substr(samplingdepict,1,4)='中包温度'
- group by HEATNO)) b,
- (select *
- from ppc_steel_heat
- union
- select * from J#ppc_steel_heat) p,
- (select y.*
- from (select x.*,count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE) xh
- from (select t.*
- from stl_CHEMELEMENT t where upper(SUBSTR(CHECKNO, 12, 1)) = 'I'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- and $
- union
- select t.*
- from j#stl_CHEMELEMENT t where upper(SUBSTR(CHECKNO, 12, 1)) = 'I'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- and $
- ) x) y
- where y.xh in (1, round(y.cnt / 2), y.cnt)) w,
- (select y.*
- from (select x.*,count(1) over(partition by x.HEATNO) cnt,
- row_number() over (partition by x.HEATNO order by x.ASSAYTYPECODE) xh
- from (select t.*
- from stl_CHEMELEMENT t
- where upper(SUBSTR(CHECKNO, -1)) = 'S'
- and upper(SUBSTR(CHECKNO, 12, 2)) = 'GP'
- and $
- union
- select t.*
- from J#stl_CHEMELEMENT t
- where upper(SUBSTR(CHECKNO, -1)) = 'S'
- and upper(SUBSTR(CHECKNO, 12, 2)) = 'GP'
- and $
- ) x) y
- ) t4
- where a.HEATNO = p.HEATNO(+)
- and a.HEATNO = w.HEATNO(+)
- and a.HEATNO = t4.HEATNO(+)
- and a.HEATNO = u.HEATNO(+)
- and a.heatno = b.HEATNO(+)
- and a.heatno = I.HEATNO(+)
- order by OPTDATE
- ]]>
- </query>
- <query id="LgHMPReport.Query" desc="脱硫操作记录报表" fetchSize="10">
- <![CDATA[
- select distinct t.misid,
- t.stoveid,
- t.stovetime,
- t.tapholeno,
- to_char(b.CHANGESTARTTIME,'HH24:mi') CHANGESTARTTIME,
- to_char(t.HSTAPHOLETIME,'HH24:mi') HSTAPHOLETIME,
- to_char(a.DR_BEF_ENDTIME,'HH24:mi') DR_BEF_ENDTIME,
- to_char(a.DR_AFT_ENDTIME,'HH24:mi') DR_AFT_ENDTIME,
- case substr(t.SHIFTCODE, 1, 1)
- when '1' then
- '白'
- when '2' then
- '中'
- when '3' then
- '晚'
- end BC,
- case substr(t.SHIFTCODE, 2, 1)
- when '1' then
- '甲'
- when '2' then
- '乙'
- when '3' then
- '丙'
- when '4' then
- '丁'
- end BB,
- decode(substr(t.molirnsource,1,1),'J','转炉','脱硫') molirnsource,
- a.HUDWID,
- round(t.TFPOTWGT,2) ARRIVEWGT,
- CASE
- when nvl(a.LEAVEWGT, 0) > 0 and nvl(a.ARRIVEWGT, 0) > 0 and
- nvl(a.LEAVEWGT, 0) < nvl(a.ARRIVEWGT, 0) THEN
- round(t.TFPOTWGT -
- (nvl(a.ARRIVEWGT, 0) - nvl(a.LEAVEWGT, 0)),
- 2)
- ELSE
- t.TFPOTWGT
- END LEAVEWGT,
- round(t.TFPOTWGT-(t.TFPOTWGT -
- (nvl(a.ARRIVEWGT, 0) - nvl(a.LEAVEWGT, 0))),
- 2) DRQUANTITY,
- CASE
- WHEN nvl(a.LEAVEWGT, 0) > 0 THEN
- (nvl(a.LEAVEWGT, 0) - nvl(t4.TAREWEIGHT,0))
- ELSE
- 0
- END LEAVEWGT_OUT,
- CASE
- WHEN nvl(a.ARRIVEWGT, 0) > 0 THEN
- (nvl(a.ARRIVEWGT, 0) - nvl(t4.TAREWEIGHT,0))
- ELSE
- 0
- END ARRIVEWGT_OUT,
-
- t4.TAREWEIGHT IRONPOTBOFWGT,
- t.TFPOTID || '-' || t4.age IRONPWRAPNO,
- CASE
- WHEN a.HUDWID IS NOT NULL THEN
- a.PLANSTEEL
- ELSE
- t.PLANSTEEL
- END PLANSTEEL,
- to_char(a.ARRIVETIME, 'HH24:mi') ARRIVETIME,
- to_char(a.LEAVETIME, 'HH24:mi') LEAVETIME,
- a.DR_BEF_TIME,
- a.DR_AFT_TIME,
- a.SWBTEMPERATURE,
- a.SWFTEMPERATURE,
- a.DREGSSOLVENT,
- a.CHURNUPDATE,
- a.MOSTROTATESPEED,
- a.SGGAGE,
- a.DFRWGT,
- CASE
- WHEN a.HEATNO IS NOT NULL THEN
- a.HEATNO
- WHEN substr(t.MOLIRNSOURCE, 1, 1) = 'J' then
- t.MOLIRNSOURCE
- END HEATNO,
- t.SI SI_BF,
- t.MN MN_BF,
- t.P P_BF,
- t.S S_BF,
- t2.SI,
- t2.MN,
- t2.P,
- t2.S,
- t3.SI SI2,
- t3.MN MN2,
- t3.P P2,
- t3.S S2,
- a.MEMO
-
- from (select *
- from stl_mis_importiron
- where to_char(operationdate, 'yyyy-MM-dd hh24:mi:ss') between ? AND
- ?) t,
- (select *
- from STL_HMP_OPTINFO
- where to_char(OPTDATE, 'yyyy-MM-dd') between ? AND
- ?
- union
- select *
- from J#STL_HMP_OPTINFO
- where to_char(OPTDATE, 'yyyy-MM-dd') between ? AND
- ?
- ) a,
-
- (select *
- from STL_bof_OPTINFO
- where to_char(OPTDATE, 'yyyy-MM-dd') between ? AND
- ?
- union
- select *
- from J#STL_bof_OPTINFO
- where to_char(OPTDATE, 'yyyy-MM-dd') between ? AND
- ?
- ) b,
-
- (select HEATNO, SI, MN, P, S, ASSAYTYPECODE
- from stl_CHEMELEMENT
- WHERE upper(SUBSTR(ASSAYTYPECODE, 1, 1)) = 'B'
- and to_char(assaydate, 'yyyy-MM-dd') between ? AND
- ?
- union
- select HEATNO, SI, MN, P, S, ASSAYTYPECODE
- from J#stl_CHEMELEMENT
- WHERE upper(SUBSTR(ASSAYTYPECODE, 1, 1)) = 'B'
- and to_char(assaydate, 'yyyy-MM-dd') between ? AND
- ?) t2,
- (select y.*
- from (select x.*,
- row_number() over(partition by x.HEATNO, substr(assaytypecode, 1, 1) order by x.ASSAYTYPECODE desc) xh,
- substr(assaytypecode, 1, 1) typecode
- from (select *
- from stl_CHEMELEMENT
- where upper(SUBSTR(ASSAYTYPECODE, 1, 1)) = 'B'
- and to_char(assaydate, 'yyyy-MM-dd') between
- ? AND ?
- union
- select *
- from J#stl_CHEMELEMENT
- where upper(SUBSTR(ASSAYTYPECODE, 1, 1)) = 'B'
- and to_char(assaydate, 'yyyy-MM-dd') between
- ? AND ?) x) y
- where y.xh = 1) t3,
- dev_ib_base_info t4
- where t.MOLIRNSOURCE = a.hudwid(+) and t.MOLIRNSOURCE = b.heatno(+)
- and t.misid = t2.heatno(+)
- and a.HUDWID = t3.heatno(+) and t.TFPOTID =t4.ladleid (+)
- AND substr(T.MOLIRNSOURCE,3, 1) =
- decode(?, null, substr(T.MOLIRNSOURCE, 3, 1), ?)
- and substr(T.MOLIRNSOURCE,1, 1) =
- decode(?, null, substr(T.MOLIRNSOURCE, 1, 1), ?)
- and substr(T.SHIFTCODE, 1, 1) =
- decode(?, null, substr(T.SHIFTCODE, 1, 1), ?)
- and substr(T.SHIFTCODE, 2, 1) =
- decode(?, null, substr(T.SHIFTCODE, 2, 1), ?)
- order by t.misid
-
- ]]>
- </query>
- <query id="reportRHS_DPR.Query" desc="RH炉日生产统计报表--加载钢种" fetchSize="10">
- <![CDATA[
- Select steel from scm_steel where LARGEFLAG='1' ORDER BY steel
- ]]>
- </query>
- <query id="reportRHS.Query" desc="RH炉日生产统计报表" fetchSize="10">
- <![CDATA[
- select t.OPTDATE,
- t.SUMLUCOUNT DT1,
- sum(t.SUMLUCOUNT) over(order by t.OPTDATE) CM1,
- t.SUMPLANSTEEL DT2,
- sum(t.SUMPLANSTEEL) over(order by t.OPTDATE) CM2,
- round(t.DC, 2) DC,
- t.JIABANLS DT3,
- sum(t.JIABANLS) over(order by t.OPTDATE) CM3,
- round(t.JIABANYIELD, 2) DT4,
- round(sum(t.JIABANYIELD) over(order by t.OPTDATE), 2) CM4,
- t.YIBANLS DT5,
- sum(t.YIBANLS) over(order by t.OPTDATE) CM5,
- round(t.YIBANYIELD, 2) DT6,
- round(sum(t.YIBANYIELD) over(order by t.OPTDATE), 2) CM6,
- t.BINGBANLS DT7,
- sum(t.BINGBANLS) over(order by t.OPTDATE) CM7,
- round(t.BINGBANYIELD, 2) DT8,
- round(sum(t.BINGBANYIELD) over(order by t.OPTDATE), 2) CM8,
- t.DINGBANLS DT9,
- sum(t.DINGBANLS) over(order by t.OPTDATE) CM9,
- round(t.DINGBANYIELD, 2) DT10,
- round(sum(t.DINGBANYIELD) over(order by t.OPTDATE), 2) CM10
- from (select distinct x.OPTDATE,
- count(distinct x.heatno) over(partition by x.optdate) SUMLUCOUNT,
- sum(y.WEIGHT) over(partition by x.optdate) SUMPLANSTEEL,
- sum(y.WEIGHT) over(partition by x.optdate) / count(distinct x.heatno) over(partition by x.optdate) DC,
- sum(case x.shiftcode
- when '1' then
- 1
- end) over(partition by x.optdate) JIABANLS,
- sum(case x.shiftcode
- when '1' then
- y.WEIGHT
- end) over(partition by x.optdate) JIABANYIELD,
- sum(case x.shiftcode
- when '2' then
- 1
- end) over(partition by x.optdate) YIBANLS,
- sum(case x.shiftcode
- when '2' then
- y.WEIGHT
- end) over(partition by x.optdate) YIBANYIELD,
- sum(case x.shiftcode
- when '3' then
- 1
- end) over(partition by x.optdate) BINGBANLS,
- sum(case x.shiftcode
- when '3' then
- y.WEIGHT
- end) over(partition by x.optdate) BINGBANYIELD,
- sum(case x.shiftcode
- when '4' then
- 1
- end) over(partition by x.optdate) DINGBANLS,
- sum(case x.shiftcode
- when '4' then
- y.WEIGHT
- end) over(partition by x.optdate) DINGBANYIELD
- from (select a.heatno,
- a.plansteel,
- substr(a.shiftcode, 2, 1) shiftcode,
- to_char(a.optdate, 'yyyy-MM-dd') optdate
- from (select *
- from STL_RHS_OPTINFO
- where $
- union
- select * from J#STL_RHS_OPTINFO where $ ) a
- group by a.heatno,
- a.plansteel,
- to_char(a.optdate, 'yyyy-MM-dd'),
- a.shiftcode) x,
-
- (select heatno,
- nvl(PFBALEWGT, 0) - nvl(BALELEAVEWGT, 0) WEIGHT
- from (select row_number() over(partition by b.heatno order by b.disposaltime) xh,
- count(1) over(partition by b.heatno) cnt,
- b.*
- from (select *
- from STL_CCM_OPTINFO
- where $
- union
- select * from J#STL_CCM_OPTINFO where $ ) b)
- where xh = cnt) y
-
- where x.heatno = y.heatno(+)
- order by x.optdate) t
- ]]>
- </query>
- <query id="LgCASReport.Query" desc="吹氩操作记录报表" fetchSize="10">
- <![CDATA[
-
- select distinct a.HEATNO,
- v.aim_grade_code PLANSTEEL,
- a.SHIFTCODE,
- v.CAST_ID || '-' || v.cast_seq CAST_ID,
- a.POTWRAPSTATE,
- a.POTNO,
- decode(substr(a.shiftcode, 1, 1),
- '1',
- '白',
- '2',
- '中',
- '3',
- '晚') BC,
- decode(substr(a.shiftcode, 2, 1),
- '1',
- '甲',
- '2',
- '乙',
- '3',
- '丙',
- '4',
- '丁') BB,
- to_char(a.LEAVETIME, 'hh24:mi') ZZTIME,
- to_char(a.ARRIVETIME, 'HH24:mi') ARRIVETIME,
- to_char(a.OPTDATE, 'yyyy-MM-dd hh24:mi') OPTDATE,
- to_char(a.BLOWARSTARTTIME, 'HH24:mi') BLOWARSTARTTIME,
- to_char(a.BLOWARENDTIME, 'HH24:mi') BLOWARENDTIME,
- to_char(a.CASSTARTTIME, 'HH24:mi') CASSTARTTIME,
- to_char(a.CASENDTIME, 'HH24:mi') CASENDTIME,
- a.ARITEMPT,
- a.ARFTEMPT,
- a.ARBTEMPT,
- a.ARRIVEO2,
- a.LEAVEO2,
- a.TWSTEELWGT,
- a.MANTLENUM,
- a.RESIDUETHICKNESS,
- a.BLOWARPRESS,
- a.ARFLUX,
- a.STATIONCODE,
- a.DISPOSALTIME,
- v.PLAN_LINES,
- nvl(t.PFBALEWGT,0)-nvl(t.BALELEAVEWGT,0) MOLSTLWGT,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.C end) over(partition by a.HEATNO) C,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.MN end) over(partition by a.HEATNO) Mn,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.S end) over(partition by a.HEATNO) S,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.P end) over(partition by a.HEATNO) P,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.SI end) over(partition by a.HEATNO) Si,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.ALS end) over(partition by a.HEATNO) AIS,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then t4.ALt end) over(partition by a.HEATNO) AIt,
- max(case when a.HEATNO = t4.HEATNO and t4.xh = t4.cnt then T4.CA end) over(partition by a.HEATNO) Ca
- from (select *
- from STL_CAS_OPTINFO
- where to_char(OPTDATE, 'yyyy-MM-dd hh24:mi:ss') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)
- union
- select *
- from J#STL_CAS_OPTINFO
- where to_char(OPTDATE, 'yyyy-MM-dd hh24:mi:ss') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)) a,
- (select *
- from ppc_steel_heat
- union
- select * from J#ppc_steel_heat) v,
-
- (select *
- from STL_CCM_OPTINFO
- where to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- union
- select *
- from J#STL_CCM_OPTINFO
- where to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?) t,
- (select *
- from STL_LFS_OPTINFO
- where to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- union
- select *
- from J#STL_LFS_OPTINFO
- where to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?) w,
-
- (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE desc) xh
- from (select *
- from stl_CHEMELEMENT
- where upper(SUBSTR(CHECKNO, 12, 2)) = 'DQ'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
-
- union
- select t.*
- from j#stl_CHEMELEMENT t
- where upper(SUBSTR(CHECKNO, 12, 2)) = 'DQ'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- ) x) y
- where y.xh = y.cnt) t4
- where a.HEATNO = v.heatNo(+)
- and a.HEATNO = t.HEATNO(+)
- and a.heatno = w.heatno(+)
- and a.heatno = t4.heatno(+)
- order by OPTDATE
- ]]>
- </query>
- <query id="CASData_FLHJ.Query" desc="获取吹氩物料" fetchSize="10">
- <![CDATA[
-
- select a.HEATNO,
- substr(a.STATIONCODE, 2, 2) STATIONCODE,
- a.DISPOSALTIME,
- a.MATERIELTYPE,
- a.MATERIELCODE,
- t.MATERIELNAME,
- round(sum(nvl(a.JMWGT, 0)) over(partition by a.HEATNO,
- a.STATIONCODE,
- a.DISPOSALTIME,
- a.MATERIELTYPE,
- a.MATERIELCODE),
- 2) MaterielWgt
- from stl_ADDITIVES a, scm_MATERIEL t
- where substr(a.STATIONCODE, 1, 1) = 'D'
- and to_char(a.JMDATE, 'yyyy-MM-dd') between ? and ?
- and substr(a.STATIONCODE, 3, 1) =
- decode(?, null, substr(a.STATIONCODE, 3, 1), ?)
- and a.MATERIELCODE = t.MATERIELCODE(+)
- and a.MATERIELTYPE = t.MATERIELTYPE(+)
- ]]>
- </query>
- <query id="JobTime.Query" desc="获取各工序时间信息" fetchSize="10">
- <![CDATA[
-
- select to_char(a.OPTDATE, 'yyyy-MM-dd') OPTDATE,
- a.HEATNO,
- a.PLANSTEEL,
- x.FACT_ROUTE,
- e.STATIONCODE,
- case substr(a.SHIFTCODE, 1, 1)
- when '1' then
- '早'
- when '2' then
- '中'
- when '3' then
- '晚'
- end BC,
- case substr(a.SHIFTCODE, 2, 1)
- when '1' then
- '甲'
- when '2' then
- '乙'
- when '3' then
- '丙'
- when '4' then
- '丁'
- end BB,
- to_char(a.CHANGESTARTTIME, 'HH24:mi') CHANGESTARTTIME,
- to_char(a.CHANGEENDTIME, 'HH24:mi') CHANGEENDTIME,
- to_char(a.B1STARTTIME, 'HH24:mi') B1STARTTIME,
- to_char(greatest(nvl(a.B1ENDTIME, a.OPTDATE - 7),
- nvl(a.B2ENDTIME, a.OPTDATE - 7),
- nvl(a.B3ENDTIME, a.OPTDATE - 7),
- nvl(a.B4ENDTIME, a.OPTDATE - 7),
- nvl(a.B5ENDTIME, a.OPTDATE - 7)),
- 'HH24:mi') B1ENDTIME,
- to_char(a.TAPPINGSTARTTIME, 'HH24:mi') TAPPINGSTARTTIME,
- to_char(a.TAPPINGENDTIME, 'HH24:mi') TAPPINGENDTIME,
- round((greatest(nvl(a.PSENDTIME, a.TAPPINGENDTIME), a.TAPPINGENDTIME) -
- a.CHANGESTARTTIME) * 24 * 60) SCZQ_BOF,
- (select to_char(max(samplingdate),'HH24:mi') From stl_bof_subsampling where heatno=a.heatno and samplingtype='TSO') samplingdate,
-
- to_char(b.ARRIVETIME, 'HH24:mi') ARRIVETIME_CAS,
- to_char(b.LEAVETIME, 'HH24:mi') LEAVETIME_CAS,
- round((b.LEAVETIME - b.ARRIVETIME) * 24 * 60) SCZQ_CAS,
-
- to_char(c.ARRIVETIME, 'HH24:mi') ARRIVETIME_LFS,
- to_char(c.LEAVETIME, 'HH24:mi') LEAVETIME_LFS,
- round((c.LEAVETIME - c.ARRIVETIME) * 24 * 60) SCZQ_LFS,
- c.WAITTIME WAITTIMELF,
-
- to_char(g.ARRIVETIME, 'HH24:mi') ARRIVETIME_RHS,
- to_char(g.LEAVETIME, 'HH24:mi') LEAVETIME_RHS,
- round((g.LEAVETIME - g.ARRIVETIME) * 24 * 60) SCZQ_RHS,
- g.WAITTIME WAITTIMERH,
-
- to_char(h.ARRIVETIME, 'HH24:mi') ARRIVETIME_VDS,
- to_char(h.LEAVETIME, 'HH24:mi') LEAVETIME_VDS,
- round((h.LEAVETIME - h.ARRIVETIME) * 24 * 60) SCZQ_VDS,
-
- to_char(e.BALEPFTIME, 'HH24:mi') BALEPFTIME,
- to_char(e.BALESTARTTIME, 'HH24:mi') BALESTARTTIME,
- to_char(e.BALEENDTIME, 'HH24:mi') BALEENDTIME,
- round((e.BALEENDTIME - e.BALESTARTTIME) * 24 * 60) SCZQ_CCM,
- round((e.BALESTARTTIME - e.FRONTTIME) * 24 * 60) FRONTTIME,
-
- to_char(f.CUTBEGIN, 'HH24:mi') CUTBEGIN,
- to_char(f.CUTEND, 'HH24:mi') CUTEND,
- round((f.CUTEND - f.CUTBEGIN) * 24 * 60) SCZQ_CUT,
- decode(c.isrs, '1', '精炼炉', decode(e.isrs, '1', '连铸机', '')) isrs,
- decode(c.isrs,
- '1',
- decode(e.isrs,
- '1',
- (select sum(WEIGHTOFCVT)
- from (select WEIGHTOFCVT, SMELTINGIDOFCVT
- from STL_es_taphole
- union
- select WEIGHTOFCVT, SMELTINGIDOFCVT
- from STL_mis_taphole)
- where SMELTINGIDOFCVT = a.heatno),
- ''),
- '') isrswgt
- from (select *
- from (select t.*,
- row_number() over(partition by t.HEATNO order by t.OPTDATE) XH
- from (select *
- from STL_BOF_OPTINFO
- where $
- to_char(OPTDATE, 'yyyy-MM-dd hh24:mi:ss') between ? and ?
- and substr(STATIONCODE, 2, 1) = decode(?,null,substr(STATIONCODE, 2, 1),?)
- and UPPER(PLANSTEEL) in (decode(?,null,UPPER(PLANSTEEL),?))
- and substr(SHIFTCODE, 1, 1) = decode(?,null,substr(SHIFTCODE, 1, 1),?)
- and substr(SHIFTCODE, 2, 1) = decode(?,null,substr(SHIFTCODE, 2, 1),?)
- union
- select *
- from J#STL_BOF_OPTINFO
- where $
- to_char(OPTDATE, 'yyyy-MM-dd hh24:mi:ss') between ? and ?
- and substr(STATIONCODE, 2, 1) = decode(?,null,substr(STATIONCODE, 2, 1),?)
- and UPPER(PLANSTEEL) in (decode(?,null,UPPER(PLANSTEEL),?))
- and substr(SHIFTCODE, 1, 1) = decode(?,null,substr(SHIFTCODE, 1, 1),?)
- and substr(SHIFTCODE, 2, 1) = decode(?,null,substr(SHIFTCODE, 2, 1),?)
- ) t)
- where XH = 1) a,
-
- (select *
- from PPC_STEEL_HEAT
- union
- select * from J#PPC_steel_heat) x,
-
- (select *
- from (select t.*,
- row_number() over(partition by t.HEATNO order by t.OPTDATE) XH
- from (select *
- from STL_CAS_OPTINFO
- where $
- to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- union
- select *
- from J#STL_CAS_OPTINFO
- where $
- to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?) t)
- where XH = 1) b,
-
- (select *
- from (select t.*,
- row_number() over(partition by t.HEATNO order by t.OPTDATE) XH
- from (select *
- from STL_LFS_OPTINFO
- where $
- to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- union
- select *
- from J#STL_LFS_OPTINFO
- where $
- to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?) t)
- where XH = 1) c,
-
- (select *
- from (select t.*,
- row_number() over(partition by t.HEATNO order by t.OPTDATE) XH
- from (select *
- from STL_RHS_OPTINFO
- where $
- to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- union
- select *
- from J#STL_RHS_OPTINFO
- where $
- to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?) t)
- where XH = 1) g,
-
- (select *
- from (select t.*,
- row_number() over(partition by t.HEATNO order by t.OPTDATE) XH
- from (select *
- from STL_VDS_OPTINFO
- where $
- to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- union
- select *
- from J#STL_VDS_OPTINFO
- where $
- to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?) t)
- where XH = 1) h,
-
- (select *
- from (select t.*,
- row_number() over(partition by t.HEATNO order by t.OPTDATE) XH
- from (select *
- from STL_CCM_OPTINFO
- where $
- to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- union
- select *
- from J#STL_CCM_OPTINFO
- where $
- to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?) t)
- where XH = 1) e,
-
- (select substr(t.HEATNO, 1, 10) HEATNO,
- min(t.CUTTIME) CUTBEGIN,
- max(t.CUTTIME) CUTEND
- from (select *
- from STL_INCISION
- where $
- to_char(CUTTIME, 'yyyy-MM-dd') between ? and ?
- union
- select *
- from J#STL_INCISION
- where $
- to_char(CUTTIME, 'yyyy-MM-dd') between ? and ?) t
- group by substr(t.HEATNO, 1, 10)) f
-
- where a.HEATNO = b.HEATNO(+)
- and a.HEATNO = c.HEATNO(+)
- and a.HEATNO = e.HEATNO(+)
- and a.HEATNO = f.HEATNO(+)
- and a.HEATNO = x.HEATNO(+)
- and a.HEATNO = g.HEATNO(+)
- and a.HEATNO = h.HEATNO(+)
-
- order by a.STATIONCODE, a.OPTDATE
-
-
- ]]>
- </query>
- <query id="GetreportBOFOggData.Query" desc="获取转炉原始记录数据" fetchSize="10">
- <![CDATA[
-
- select distinct t.HEATNO,
- t4.aim_grade_code PLANSTEEL,
- t.STATIONCODE,
- t.SAGE,
- t.GAGE,
- t.O2CONSUME,
- nvl(t.IRONPOTWGT, '0') IRONPOTWGT,
- t.WSTEELWGT,
- t.PIGIRONWGT,
- t.BRPSTIME,
- t.POTWRAPSTATE,
- t6.pfbalewgt - t6.baleleavewgt TAPPINGWGT,
- decode(substr(t.shiftcode, 1, 1),
- '1',
- '白',
- '2',
- '中',
- '3',
- '晚') BC,
- decode(substr(t.shiftcode, 2, 1),
- '1',
- '甲',
- '2',
- '乙',
- '3',
- '丙',
- '4',
- '丁') BB,
- decode(BLKREDEFFECTS,
- '0',
- '失败',
- '1',
- '成功',
- '3',
- '一般') BLKREDEFFECTS,
- t.SUBAGE,
- t.IRONPOTWGT,
- t.WSTEELWGT,
- t.PIGIRONWGT,
- t.CHANGESTARTTIME,
- t.OPENOXYGENTIME,
- t.IRONTEMPERATURE,
- t.TERMINUSC,
- t.TERMINUSO2,
- t.B1TEMPERATURE,
- t.B2TEMPERATURE,
- nvl(t.N2CONSUME, 0) + nvl(t.TOPN2CONSUME, 0) N2SUM,
- t.IRONTEMPERATURE,
- '0.9' O2PRESS,
- nvl(t.B2TIME,0)+nvl(t.B3TIME,0)+nvl(t.B4TIME,0)+nvl(t.B5TIME,0) DCTIME,
- to_char(t.CHANGESTARTTIME, 'HH24:mi') CHANGESTARTTIME,
- to_char(t.OPENOXYGENTIME, 'HH24:mi') OPENOXYGENTIME,
- round(nvl(t.supplyoxygentime / 60, 0),1) SUPPLYOXYGENTIME,
- round(t.supplyoxygentime,1) SUPPLYOXYGENTIME_S,
- t4.PLAN_LINES PLAN_LINES,
- t.TERMINUSTEPT TAPPINGTEMPERATURE,
- t.TAPPINGTIME,
- to_char(t.TAPPINGSTARTTIME, 'HH24:mi') TAPPINGSTARTTIME,
-
- max(case
- when t.HEATNO = t2.HEATNO and t2.xh = t2.cnt then
- t2.C
- end) over(partition by t.HEATNO) F_C,
- max(case
- when t.HEATNO = t2.HEATNO and t2.xh = t2.cnt then
- t2.Mn
- end) over(partition by t.HEATNO) F_MN,
- max(case
- when t.HEATNO = t2.HEATNO and t2.xh = t2.cnt then
- t2.Si
- end) over(partition by t.HEATNO) F_SI,
- max(case
- when t.HEATNO = t2.HEATNO and t2.xh = t2.cnt then
- t2.S
- end) over(partition by t.HEATNO) F_S,
- max(case
- when t.HEATNO = t2.HEATNO and t2.xh = t2.cnt then
- t2.P
- end) over(partition by t.HEATNO) F_P,
-
- max(case
- when t.HEATNO = t2.HEATNO and t2.xh = t2.cnt then
- t2.Als
- end) over(partition by t.HEATNO) F_ALS,
-
- max(case
- when t.MOLIRNSOURCE = t10.HEATNO then
- t10.Mn
- end) over(partition by t.MOLIRNSOURCE) R_MN,
- max(case
- when t.MOLIRNSOURCE = t10.HEATNO then
- t10.C
- end) over(partition by t.MOLIRNSOURCE) R_C,
- max(case
- when t.MOLIRNSOURCE = t10.HEATNO then
- t10.P
- end) over(partition by t.MOLIRNSOURCE) R_P,
- max(case
- when t.MOLIRNSOURCE = t10.HEATNO then
- t10.S
- end) over(partition by t.MOLIRNSOURCE) R_S,
- max(case
- when t.MOLIRNSOURCE = t10.HEATNO then
- t10.si
- end) over(partition by t.MOLIRNSOURCE) R_SI,
-
- max(case
- when t.HEATNO = t9.HEATNO and t9.xh = t9.cnt then
- t9.Mn
- end) over(partition by t.HEATNO) Z_MN,
- max(case
- when t.HEATNO = t9.HEATNO and t9.xh = t9.cnt then
- t9.C
- end) over(partition by t.HEATNO) Z_C,
- max(case
- when t.HEATNO = t9.HEATNO and t9.xh = t9.cnt then
- t9.P
- end) over(partition by t.HEATNO) Z_P,
- max(case
- when t.HEATNO = t9.HEATNO and t9.xh = t9.cnt then
- t9.S
- end) over(partition by t.HEATNO) Z_S,
-
- max(case
- when t.HEATNO = t9.HEATNO and t9.xh = t9.cnt then
- t9.SI
- end) over(partition by t.HEATNO) Z_SI,
- t4.cast_id CCMNO,
- (t4.cast_id) || '-' || (t4.cast_seq) CCMNO,
- t.MEMO,
- to_char(t.optdate, 'yyyy-MM-dd hh24:mi') optDisp
- from (select *
- from STL_bof_optinfo
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd hh24:mi:ss') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)
- union
- select *
- from J#STL_bof_optinfo
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd hh24:mi:ss') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)) t
- left join (select y.*
- from (select x.*,
-
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE) xh
- from (select *
- from STL_CHEMELEMENT
- where upper(substr(ASSAYTYPECODE, 1, 1)) = 'C'
- and to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?
- union
- select *
- from J#STL_CHEMELEMENT
- where upper(substr(ASSAYTYPECODE, 1, 1)) = 'C'
- and to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?) x) y) t1 on t.heatno =
- t1.heatno
- left join (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE desc, x.assaydate desc) xh,
- substr(x.assaytypecode, 1, 1) gw
- from (select *
- from STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- and upper(SUBSTR(CHECKNO, 12, 2)) = 'GP'
- union
- select *
- from J#STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- and upper(SUBSTR(CHECKNO, 12, 2)) = 'GP') x) y) t2 on t2.heatno =
- t.heatno
- left join (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE desc, x.assaydate desc) xh,
- substr(x.assaytypecode, 1, 1) gw
- from (select *
- from STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?
- and upper(SUBSTR(CHECKNO, 12, 1)) = 'C'
- and upper(SUBSTR(CHECKNO, -1)) = 'I'
- and upper(SUBSTR(CHECKNO, 13, 1)) <> 'P'
- union
- select *
- from J#STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?
- and upper(SUBSTR(CHECKNO, 12, 1)) = 'C'
- and upper(SUBSTR(CHECKNO, -1)) = 'I'
- and upper(SUBSTR(CHECKNO, 13, 1)) <> 'P') x) y) t3 on t3.heatno =
- t.heatno
- left join (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE ) xh,
- substr(x.assaytypecode, 1, 1) gw
- from (select *
- from STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?
- and upper(SUBSTR(CHECKNO, 12, 1)) = 'C'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- union
- select *
- from J#STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?
- and upper(SUBSTR(CHECKNO, 12, 1)) = 'C'
- and upper(SUBSTR(CHECKNO, -1)) = 'S') x) y) t9 on t9.heatno =
- t.heatno
- left join (select *
- from stl_chemelement
- union
- select * from J#stl_chemelement) t10 on t10.heatno =
- t.MOLIRNSOURCE
- left join (select *
- from ppc_steel_heat
- union
- select * from J#ppc_steel_heat) t4 on t.heatno = t4.heatno
-
- left join (select *
- from ppc_steel_heat
- union
- select * from J#ppc_steel_heat) t5 on t.heatno = t5.heatno
- left join (select heatno,
- PFBALEWGT,
- BALELEAVEWGT,
- isrs,
- MWRAPNO,
- BILLETFIXSIZE
- from stl_ccm_optinfo
- union
- select heatno,
- PFBALEWGT,
- BALELEAVEWGT,
- isrs,
- MWRAPNO,
- BILLETFIXSIZE
- from J#stl_ccm_optinfo) t6 on t.heatno = t6.heatno
-
- order by optDisp
-
- ]]>
- </query>
- <query id="BofData_FLHJ.Query" desc="获取转炉物料" fetchSize="10">
- <![CDATA[
-
- Select t.heatno,
- t.STATIONCODE,
- t.DISPOSALTIME,
- t1.materielcode,
- t1.materieltype,
- t2.materielname,
- round(sum(nvl(t1.JMWGT, 0)) over(partition by t1.HEATNO,
- t1.STATIONCODE,
- t1.DISPOSALTIME,
- t1.MATERIELTYPE,
- t1.MATERIELCODE)) materielWgt
- from (select *
- from stl_bof_optinfo
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)
- union
- select *
- from J#stl_Bof_Optinfo
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)) t
- left join stl_ADDITIVES t1 on t.heatno = t1.heatno
- and 'C' || t.stationcode = t1.stationcode
- and t.disposaltime = t1.disposaltime
- left join scm_MATERIEL t2 on t1.materielcode = t2.materielcode
- order by t.STATIONCODE, t.HEATNO
- ]]>
- </query>
- <query id="CCMData_HEAT.Query" desc="获取连铸机炉次信息" fetchSize="10">
- <![CDATA[
-
-
- select a.HEATNO,
- a.MOULDNO,
- v.aim_grade_code PLANSTEEL,
- v.PLAN_LINES,
- a.BILLETSECTION,
- case a.BALEFLOWFLAG
- when 0 then
- '否'
- when 1 then
- '是'
- end BALEFLOWFLAG,
- a.MOULDSTOVENUM,
- a.PFBALETEMPT,
- to_char(a.BALEPFTIME, 'HH24:mi') BALEPFTIME,
- to_char(a.BALESTARTTIME, 'HH24:mi') BALESTARTTIME,
- to_char(a.BALEENDTIME, 'HH24:mi') BALEENDTIME,
- round((a.BALEENDTIME - a.BALESTARTTIME) * 24 * 60) 周期,
- a.PFBALEWGT,
- a.BALELEAVEWGT,
- nvl(a.PFBALEWGT,0)-nvl(a.BALELEAVEWGT,0) JGWGT,
- to_char(a.BALELEAVETIME,'HH24:mi') BALELEAVETIME,
- v.CAST_ID || '-' || v.cast_seq CAST_ID,
- a.S1BILLETLENGTH LEN_1,
- a.S2BILLETLENGTH LEN_2,
- a.CRYSTALLIZERTIMES CRYSTALLIZERTIMES1,
- a.CRYSTALLIZERTIMES2,
- to_char(a.OPTDATE, 'yyyy-MM-dd hh24:mi') Optdisp
- from (select *
- from STL_CCM_OPTINFO
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd hh24:mi:ss') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)
- union
- select *
- from J#STL_CCM_OPTINFO
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd hh24:mi:ss') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)) a,
-
- STL_CCM_MOULDINFO u,
- (select *
- from PPC_steel_heat
- union
- select * from J#PPC_steel_heat) v
-
- where a.MOULDNO = u.MOULDNO(+)
- and a.HEATNO = v.heatno(+)
-
- order by a.optdate
-
- ]]>
- </query>
- <query id="CCMDataHEAT_Speed.Query" desc="获取连铸中包温度对应的拉速" fetchSize="10">
- <![CDATA[
-
- select z.*
- from (select Distinct x.Heatno,
- x.STATIONCODE,
- x.DISPOSALTIME,
- x.MIDLADLETEMP,
- to_char(x.LASTFRESHTIME,'HH24:mi') LASTFRESHTIME,
- y.s1castspeed,
- y.s2castspeed,
- y.s3castspeed,
- y.s4castspeed,
- y.s5castspeed,
- row_number() over(partition by x.HEATNO order by x.LASTFRESHTIME) xh,
- count(*) over(partition by x.HEATNO order by x.HEATNO) intcount
- from (SELECT Heatno,
- STATIONCODE,
- DISPOSALTIME,
- MIDLADLETEMP,
- min(LASTFRESHTIME) LASTFRESHTIME
- FROM (select HEATNO,
- STATIONCODE,
- DISPOSALTIME,
- ROUND(greatest(midladletemp1, midladletemp2)) MIDLADLETEMP,
- LASTFRESHTIME from $ b
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- union
- select HEATNO,
- STATIONCODE,
- DISPOSALTIME,
- ROUND(greatest(midladletemp1, midladletemp2)) MIDLADLETEMP,
- LASTFRESHTIME
- from J#$
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)) a
- group by heatno,
- stationcode,
- disposaltime,
- MIDLADLETEMP
- order by heatno) x
- left join (select HEATNO,
- STATIONCODE,
- DISPOSALTIME,
- s1castspeed,
- s2castspeed,
- s3castspeed,
- s4castspeed,
- s5castspeed,
- LASTFRESHTIME,
- ROUND(greatest(midladletemp1, midladletemp2)) MIDLADLETEMP
- from $ b
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- union
- select HEATNO,
- STATIONCODE,
- DISPOSALTIME,
- s1castspeed,
- s2castspeed,
- s3castspeed,
- s4castspeed,
- s5castspeed,
- LASTFRESHTIME,
- ROUND(greatest(midladletemp1, midladletemp2)) MIDLADLETEMP
- from J#$
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)) y on x.heatno =
- y.heatno
- and x.stationcode =
- y.stationcode
- and x.disposaltime =
- y.disposaltime
- where x.LASTFRESHTIME = y.LASTFRESHTIME
- and x.MIDLADLETEMP = y.MIDLADLETEMP
- and x.MIDLADLETEMP > 1410
- order by heatno, LASTFRESHTIME) z
- where z.xh in (1, round(z.intcount / 4), round((z.intcount - 2) / 4) * 2,
- round((z.intcount - 2) / 4) * 3,
- round((z.intcount - 2) / 4) * 4, z.intcount)
-
- ]]>
- </query>
- <query id="CCMData_CAST.Query" desc="获取连铸机浇次信息" fetchSize="10">
- <![CDATA[
-
-
- select u.MOULDNO,
- u.S1CRYSTALCODE,
- u.S2CRYSTALCODE,
- u.S1PLANENDTIME,
- u.S2PLANENDTIME,
- u.MWRAPNO,
- u.STUFFSTICK,
- u.UPGAP,
- u.DIPGAP,
- u.PROTECTDTEGNAME,
- u.MWRAPBESTROWNAME,
- to_char(u.MINFIREBEGINTIME, 'HH24:mi') MINFIREBEGINTIME,
- to_char(u.MIDDLEFIREBEGINTIME, 'HH24:mi') MIDDLEFIREBEGINTIME,
- to_char(u.MAXBEGINTIME, 'HH24:mi') MAXBEGINTIME,
- u.MWRAPFIRINGENDTIME1,
- a.SWRAPENDCAUSE ,
- u.MWRAPREMAIN,
- a.PLANSTEEL,
- u.MEMO,
- to_char(a.OPTDATE, 'yyyy-MM-dd') Optdisp
- from (select *
- from STL_CCM_OPTINFO
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)
- union
- select *
- from J#STL_CCM_OPTINFO
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)) a,
-
- STL_CCM_MOULDINFO u,
- (select *
- from PPC_steel_heat
- union
- select * from J#PPC_steel_heat) v
-
- where a.MOULDNO = u.MOULDNO(+)
- and a.MOULDNO = v.cast_no(+)
-
- order by a.optdate
-
- ]]>
- </query>
- <query id="BOFLG.Query" desc="转炉生产调度——炼钢部分" fetchSize="10">
- <![CDATA[
-
- select distinct substr(t.STATIONCODE, 2, 1) || '#转炉' STATIONCODE,
- t.HEATNO,
- substr(B.FACT_ROUTE,9,2) LFSGX,
- t.PLANSTEEL,
- to_char(t.CHANGESTARTTIME, 'hh24:mi') CHANGESTARTTIME,
- to_char(t.TAPPINGENDTIME, 'hh24:mi') TAPPINGENDTIME,
- t.IRONPOTWGT,
- t.WSTEELWGT,
- t.PIGIRONWGT,
- t.POTNO,
- (B.cast_id) || '-' || (B.cast_seq) MOULDNO,
- t.POTAGE POAGE,
- t.POTDISTINCTION POLVL,
- t.MEMO,
- to_char(t.optdate, 'yyyy-MM-dd HH24:mi:ss') optDisp,
- nvl(d.tfpotid,e.ironpwrapno) tfpotid
- from (select *
- from STL_bof_optinfo
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
-
- union
- select *
- from J#STL_bof_optinfo
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and
- ? ) t
- left join (select *
- from STL_ccm_optinfo
- union
- select * from J#STL_ccm_optinfo) C on t.heatno = c.heatno
- left join (select *
- from ppc_steel_heat
- union
- select * from J#ppc_steel_heat) B on t.heatno = B.heatno
- left join stl_mis_importiron d on t.heatno = d.molirnsource
- left join (select * from stl_hmp_optinfo union select * from j#stl_hmp_optinfo) e on t.heatno = e.molirnleave
-
- order by STATIONCODE, optDisp
- ]]>
- </query>
- <query id="CCMSLG.Query" desc="转炉生产调度——连铸部分" fetchSize="10">
- <![CDATA[
-
- select distinct substr(t.STATIONCODE, 2, 1) || '#连铸' STATIONCODE,
- t.HEATNO,
- t.PLANSTEEL,
- t.BILLETSECTION,
- to_char(t.BALESTARTTIME,'hh24:mi') BALESTARTTIME,
- to_char(t.BALEENDTIME,'hh24:mi') BALEENDTIME,
- (t.PFBALEWGT-t.BALELEAVEWGT) PFBALEWGT,
- round(nvl(D.SLAB_WGT / 1000, 0), 1) BILLETWGT,
- t.MEMO,
- to_char(t.optdate, 'yyyy-MM-dd HH24:mi:ss') optDisp
- from (select *
- from STL_ccm_optinfo
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
-
- union
- select *
- from J#STL_ccm_optinfo
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and
- ? ) t
- left join (select *
- from ppc_steel_heat
- union
- select * from J#ppc_steel_heat) B on t.heatno = B.heatno
- left join (select t.CHARGE_NO, sum(NVL(T.WEIGHT_WGT*1000,t.SLAB_WGT)) SLAB_WGT from stl_incision_view t Group by t.CHARGE_NO ) D
- on t.heatno =D.CHARGE_NO
- order by STATIONCODE, optDisp
- ]]>
- </query>
- <query id="BOFCCM.Query" desc="转炉生产调度——连铸" fetchSize="10">
- <![CDATA[
-
- select distinct a.HEATNO,
- substr(a.STATIONCODE, 2, 1) || '#炉' STATIONCODE,
- a.BILLETSECTION,
- v.aim_grade_code PLANSTEEL,
- a.BALESTARTTIME,
- a.BALEENDTIME,
- a.BILLETWGT,
- a.PFBALEWGT,
- a.MEMO,
- to_char(a.OPTDATE, 'yyyy-MM-dd') Optdisp
- from (select *
- from STL_CCM_OPTINFO
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and
- ?
- and substr(STATIONCODE, 2, 1) = '1'
- or substr(STATIONCODE, 2, 2) = '2'
- union
- select *
- from J#STL_CCM_OPTINFO
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and
- ?
- and substr(STATIONCODE, 2, 1) = '1'
- or substr(STATIONCODE, 2, 2) = '2') a,
-
- STL_CCM_MOULDINFO u,
- (select *
- from PPC_steel_heat
- union
- select * from J#PPC_steel_heat) v
-
- where a.MOULDNO = u.MOULDNO(+)
- and a.HEATNO = v.heatno(+)
-
- order by STATIONCODE, optDisp
- ]]>
- </query>
- <query id="frmRTDCons.Query" desc="RTD" fetchSize="10">
- <![CDATA[
- SELECT row_number() over(order by USER_TAB_COLS.COLUMN_ID) ID, USER_TAB_COLS.COLUMN_NAME as FIELDS
- FROM USER_TAB_COLS
- where USER_TAB_COLS.TABLE_NAME = ?
- ]]>
- </query>
- <query id="RtdDataQuery.Query" desc="RTD" fetchSize="10">
- <![CDATA[
- select t.* from $ t
- ]]>
- </query>
- <query id="proc_RTDTable.Query" desc="加载RTD表" fetchSize="10">
- <![CDATA[
- select table_name from user_tables where table_name like 'RTD_POIN%'
- ]]>
- </query>
- <query id="reportRHElement.Query" desc="RH炉CP化学成分报表查询" fetchSize="10">
- <![CDATA[
- select distinct to_char(a.OPTDATE, 'yyyy-MM-dd') OPTDATE,--日期
- decode(a.SHIFTCODE,'11','甲白','12','乙白','13','丙白','14','丁白','21','甲中','22','乙中','23','丙中','24','丁中','31','甲夜','32','乙夜','33','丙夜','34','丁夜')SHIFTCODE ,--班组
- a.HEATNO HEATNO, --炉号
- a.PLANSTEEL PLANSTEEL,--钢种
- p.FLAG FLAG, --是否改判
- --CP化学成分
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.C end) over(partition by a.HEATNO) Y_C,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.MN end) over(partition by a.HEATNO) Y_MN,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.S end) over(partition by a.HEATNO) Y_S,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.P end) over(partition by a.HEATNO) Y_P,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.SI end) over(partition by a.HEATNO) Y_SI,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.V end) over(partition by a.HEATNO) Y_V,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.TI end) over(partition by a.HEATNO) Y_TI,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.NB end) over(partition by a.HEATNO) Y_NB,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.CR end) over(partition by a.HEATNO) Y_CR,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.NI end) over(partition by a.HEATNO) Y_NI,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.MO end) over(partition by a.HEATNO) Y_MO,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.CU end) over(partition by a.HEATNO) Y_CU,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.ALS end) over(partition by a.HEATNO) Y_ALS,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.ALT end) over(partition by a.HEATNO) Y_ALT,
- --内控下限化学成分
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'C',u.stdmin,'') end) over(partition by a.HEATNO) C_C,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Mn',u.stdmin,'') end) over(partition by a.HEATNO) C_MN,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'S',u.stdmin,'') end) over(partition by a.HEATNO) C_S,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'P',u.stdmin,'') end) over(partition by a.HEATNO) C_P,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Si',u.stdmin,'') end) over(partition by a.HEATNO) C_SI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'V',u.stdmin,'') end) over(partition by a.HEATNO) C_V,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Ti',u.stdmin,'') end) over(partition by a.HEATNO) C_TI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Nb',u.stdmin,'') end) over(partition by a.HEATNO) C_NB,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Cr',u.stdmin,'') end) over(partition by a.HEATNO) C_CR,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Ni',u.stdmin,'') end) over(partition by a.HEATNO) C_NI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Mo',u.stdmin,'') end) over(partition by a.HEATNO) C_MO,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Cu',u.stdmin,'') end) over(partition by a.HEATNO) C_CU,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Als',u.stdmin,'') end) over(partition by a.HEATNO) C_ALS,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Alt',u.stdmin,'') end) over(partition by a.HEATNO) C_ALT,
- --内控上限化学成分
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'C',u.stdmax,'') end) over(partition by a.HEATNO) S_C,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Mn',u.stdmax,'') end) over(partition by a.HEATNO) S_MN,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'S',u.stdmax,'') end) over(partition by a.HEATNO) S_S,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'P',u.stdmax,'') end) over(partition by a.HEATNO) S_P,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Si',u.stdmax,'') end) over(partition by a.HEATNO) S_SI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'V',u.stdmax,'') end) over(partition by a.HEATNO) S_V,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Ti',u.stdmax,'') end) over(partition by a.HEATNO) S_TI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Nb',u.stdmax,'') end) over(partition by a.HEATNO) S_NB,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Cr',u.stdmax,'') end) over(partition by a.HEATNO) S_CR,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Ni',u.stdmax,'') end) over(partition by a.HEATNO) S_NI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Mo',u.stdmax,'') end) over(partition by a.HEATNO) S_MO,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Cu',u.stdmax,'') end) over(partition by a.HEATNO) S_CU,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Als',u.stdmax,'') end) over(partition by a.HEATNO) S_ALS,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Alt',u.stdmax,'') end) over(partition by a.HEATNO) S_ALT
- from (select *
- from STL_RHS_OPTINFO
- where $
- union
- select * from J#stl_RHS_OPTINFO where $) a,
- (select t.charge_no,t.judge_stl_grd,decode(t.judge_stl_grd,'','否','是') FLAG from stl_judge_result t) p,
-
- (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE desc) xh
- from (select *
- from stl_CHEMELEMENT
- where (upper(SUBSTR(CHECKNO, 12, 1)) = 'F'
- or upper(SUBSTR(CHECKNO, 12, 2)) = 'GP')
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- and $
- union
- select t.*
- from j#stl_CHEMELEMENT t
- where (upper(SUBSTR(CHECKNO, 12, 1)) = 'F'
- or upper(SUBSTR(CHECKNO, 12, 2)) = 'GP')
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- and $ ) x) y
- where y.xh = y.cnt) w,
-
- (select t.itemcode,t.stdmin,t.stdmax,s.gycode from scm_standard_chem t,scm_sortcode_chem s where t.cic=s.cic and s.stdstyle='1') u
- where a.HEATNO = w.HEATNO(+)
- and a.HEATNO = p.charge_no(+)
- and a.HEATNO = u.GYCODE(+)
- order by to_char(a.OPTDATE, 'yyyy-MM-dd')
- ]]>
- </query>
- <query id="reportLFElement.Query" desc="LF炉成分报表查询" fetchSize="10">
- <![CDATA[
- select distinct to_char(a.OPTDATE, 'yyyy-MM-dd') OPTDATE,--日期
- decode(a.SHIFTCODE,'11','甲白','12','乙白','13','丙白','14','丁白','21','甲中','22','乙中','23','丙中','24','丁中','31','甲夜','32','乙夜','33','丙夜','34','丁夜')SHIFTCODE ,--班组
- a.HEATNO HEATNO, --炉号
- a.PLANSTEEL PLANSTEEL,--钢种
- w.CEQ, --碳当量
- p.FLAG FLAG, --是否改判
- --CP化学成分
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.C end) over(partition by a.HEATNO) Y_C,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.MN end) over(partition by a.HEATNO) Y_MN,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.S end) over(partition by a.HEATNO) Y_S,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.P end) over(partition by a.HEATNO) Y_P,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.SI end) over(partition by a.HEATNO) Y_SI,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.V end) over(partition by a.HEATNO) Y_V,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.TI end) over(partition by a.HEATNO) Y_TI,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.NB end) over(partition by a.HEATNO) Y_NB,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.CR end) over(partition by a.HEATNO) Y_CR,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.NI end) over(partition by a.HEATNO) Y_NI,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.MO end) over(partition by a.HEATNO) Y_MO,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.CU end) over(partition by a.HEATNO) Y_CU,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.ALS end) over(partition by a.HEATNO) Y_ALS,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.ALT end) over(partition by a.HEATNO) Y_ALT,
- --内控下限化学成分
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'C',u.stdmin,'') end) over(partition by a.HEATNO) C_C,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Mn',u.stdmin,'') end) over(partition by a.HEATNO) C_MN,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'S',u.stdmin,'') end) over(partition by a.HEATNO) C_S,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'P',u.stdmin,'') end) over(partition by a.HEATNO) C_P,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Si',u.stdmin,'') end) over(partition by a.HEATNO) C_SI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'V',u.stdmin,'') end) over(partition by a.HEATNO) C_V,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Ti',u.stdmin,'') end) over(partition by a.HEATNO) C_TI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Nb',u.stdmin,'') end) over(partition by a.HEATNO) C_NB,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Cr',u.stdmin,'') end) over(partition by a.HEATNO) C_CR,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Ni',u.stdmin,'') end) over(partition by a.HEATNO) C_NI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Mo',u.stdmin,'') end) over(partition by a.HEATNO) C_MO,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Cu',u.stdmin,'') end) over(partition by a.HEATNO) C_CU,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Als',u.stdmin,'') end) over(partition by a.HEATNO) C_ALS,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Alt',u.stdmin,'') end) over(partition by a.HEATNO) C_ALT,
- --内控上限化学成分
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'C',u.stdmax,'') end) over(partition by a.HEATNO) S_C,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Mn',u.stdmax,'') end) over(partition by a.HEATNO) S_MN,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'S',u.stdmax,'') end) over(partition by a.HEATNO) S_S,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'P',u.stdmax,'') end) over(partition by a.HEATNO) S_P,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Si',u.stdmax,'') end) over(partition by a.HEATNO) S_SI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'V',u.stdmax,'') end) over(partition by a.HEATNO) S_V,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Ti',u.stdmax,'') end) over(partition by a.HEATNO) S_TI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Nb',u.stdmax,'') end) over(partition by a.HEATNO) S_NB,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Cr',u.stdmax,'') end) over(partition by a.HEATNO) S_CR,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Ni',u.stdmax,'') end) over(partition by a.HEATNO) S_NI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Mo',u.stdmax,'') end) over(partition by a.HEATNO) S_MO,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Cu',u.stdmax,'') end) over(partition by a.HEATNO) S_CU,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Als',u.stdmax,'') end) over(partition by a.HEATNO) S_ALS,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Alt',u.stdmax,'') end) over(partition by a.HEATNO) S_ALT
- from (select *
- from stl_LFS_OPTINFO
- where $
- union
- select * from J#stl_LFS_OPTINFO where $) a,
-
- (select t.charge_no,t.judge_stl_grd,decode(t.judge_stl_grd,'','否','是') FLAG from stl_judge_result t) p,
-
- (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE desc) xh
- from (select *
- from stl_CHEMELEMENT
- where (upper(SUBSTR(CHECKNO, 12, 1)) = 'E'
- or upper(SUBSTR(CHECKNO, 12, 2)) = 'GP')
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- and $
- union
- select t.*
- from j#stl_CHEMELEMENT t
- where (upper(SUBSTR(CHECKNO, 12, 1)) = 'E'
- or upper(SUBSTR(CHECKNO, 12, 2)) = 'GP')
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- and $ ) x) y
- where y.xh = y.cnt) w,
-
- (select t.itemcode,t.stdmin,t.stdmax,s.gycode from scm_standard_chem t,scm_sortcode_chem s where t.cic=s.cic and s.stdstyle='1') u
-
- where a.HEATNO = w.HEATNO(+)
- and a.HEATNO = u.GYCODE(+)
- and a.HEATNO = p.charge_no(+)
- order by to_char(a.OPTDATE, 'yyyy-MM-dd')
- ]]>
- </query>
- <query id="reportVDElement.Query" desc="VD炉成分报表查询" fetchSize="10">
- <![CDATA[
- select distinct to_char(a.OPTDATE, 'yyyy-MM-dd') OPTDATE,--日期
- decode(a.SHIFTCODE,'11','甲白','12','乙白','13','丙白','14','丁白','21','甲中','22','乙中','23','丙中','24','丁中','31','甲夜','32','乙夜','33','丙夜','34','丁夜')SHIFTCODE ,--班组
- a.HEATNO HEATNO, --炉号
- a.PLANSTEEL PLANSTEEL,--钢种
- w.CEQ, --碳当量
- p.FLAG FLAG, --是否改判
- --CP化学成分
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.C end) over(partition by a.HEATNO) Y_C,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.MN end) over(partition by a.HEATNO) Y_MN,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.S end) over(partition by a.HEATNO) Y_S,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.P end) over(partition by a.HEATNO) Y_P,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.SI end) over(partition by a.HEATNO) Y_SI,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.V end) over(partition by a.HEATNO) Y_V,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.TI end) over(partition by a.HEATNO) Y_TI,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.NB end) over(partition by a.HEATNO) Y_NB,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.CR end) over(partition by a.HEATNO) Y_CR,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.NI end) over(partition by a.HEATNO) Y_NI,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.MO end) over(partition by a.HEATNO) Y_MO,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.CU end) over(partition by a.HEATNO) Y_CU,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.ALS end) over(partition by a.HEATNO) Y_ALS,
- max(case when a.HEATNO = w.HEATNO and w.xh = w.cnt then w.ALT end) over(partition by a.HEATNO) Y_ALT,
- --内控下限化学成分
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'C',u.stdmin,'') end) over(partition by a.HEATNO) C_C,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Mn',u.stdmin,'') end) over(partition by a.HEATNO) C_MN,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'S',u.stdmin,'') end) over(partition by a.HEATNO) C_S,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'P',u.stdmin,'') end) over(partition by a.HEATNO) C_P,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Si',u.stdmin,'') end) over(partition by a.HEATNO) C_SI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'V',u.stdmin,'') end) over(partition by a.HEATNO) C_V,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Ti',u.stdmin,'') end) over(partition by a.HEATNO) C_TI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Nb',u.stdmin,'') end) over(partition by a.HEATNO) C_NB,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Cr',u.stdmin,'') end) over(partition by a.HEATNO) C_CR,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Ni',u.stdmin,'') end) over(partition by a.HEATNO) C_NI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Mo',u.stdmin,'') end) over(partition by a.HEATNO) C_MO,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Cu',u.stdmin,'') end) over(partition by a.HEATNO) C_CU,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Als',u.stdmin,'') end) over(partition by a.HEATNO) C_ALS,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Alt',u.stdmin,'') end) over(partition by a.HEATNO) C_ALT,
- --内控上限化学成分
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'C',u.stdmax,'') end) over(partition by a.HEATNO) S_C,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Mn',u.stdmax,'') end) over(partition by a.HEATNO) S_MN,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'S',u.stdmax,'') end) over(partition by a.HEATNO) S_S,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'P',u.stdmax,'') end) over(partition by a.HEATNO) S_P,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Si',u.stdmax,'') end) over(partition by a.HEATNO) S_SI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'V',u.stdmax,'') end) over(partition by a.HEATNO) S_V,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Ti',u.stdmax,'') end) over(partition by a.HEATNO) S_TI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Nb',u.stdmax,'') end) over(partition by a.HEATNO) S_NB,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Cr',u.stdmax,'') end) over(partition by a.HEATNO) S_CR,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Ni',u.stdmax,'') end) over(partition by a.HEATNO) S_NI,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Mo',u.stdmax,'') end) over(partition by a.HEATNO) S_MO,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Cu',u.stdmax,'') end) over(partition by a.HEATNO) S_CU,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Als',u.stdmax,'') end) over(partition by a.HEATNO) S_ALS,
- max(case when a.HEATNO = u.GYCODE then decode(u.itemcode,'Alt',u.stdmax,'') end) over(partition by a.HEATNO) S_ALT
- from (select *
- from stl_vds_optinfo
- where $
- union
- select * from J#stl_vds_optinfo where $) a,
-
- (select t.charge_no,t.judge_stl_grd,decode(t.judge_stl_grd,'','否','是') FLAG from stl_judge_result t) p,
-
- (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE desc) xh
- from (select *
- from stl_CHEMELEMENT
- where (upper(SUBSTR(CHECKNO, 12, 1)) = 'I'
- or upper(SUBSTR(CHECKNO, 12, 2)) = 'GP')
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- and $
- union
- select t.*
- from j#stl_CHEMELEMENT t
- where (upper(SUBSTR(CHECKNO, 12, 1)) = 'I'
- or upper(SUBSTR(CHECKNO, 12, 2)) = 'GP')
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- and $ ) x) y
- where y.xh = y.cnt) w,
-
- (select t.itemcode,t.stdmin,t.stdmax,s.gycode from scm_standard_chem t,scm_sortcode_chem s where t.cic=s.cic and s.stdstyle='1') u
-
- where a.HEATNO = w.HEATNO(+)
- and a.HEATNO = u.GYCODE(+)
- and a.HEATNO = p.charge_no(+)
- order by to_char(a.OPTDATE, 'yyyy-MM-dd')
- ]]>
- </query>
- <query id="reportLFSMetal.Query" desc="LF炉合金加入报表查询" fetchSize="10">
- <![CDATA[
- select distinct v.heatprocessno, --加热处理号
- v.OPTDATE, --日期
- decode(v.SHIFTCODE,'11','甲白','12','乙白','13','丙白','14','丁白','21','甲中','22','乙中','23','丙中','24','丁中','31','甲夜','32','乙夜','33','丙夜','34','丁夜')SHIFTCODE ,--班组
- v.HEATNO, --炉号
- v.PLANSTEEL STEEL,--钢种
- v.STATIONCODE, --设备号
- substr(v.stationcode,3,1) ||'#'||
- decode(substr(v.STATIONCODE, 1, 1), 'C','转炉',
- decode(substr(v.STATIONCODE, 1, 1), 'D','吹氩站',
- decode(substr(v.STATIONCODE, 1, 1), 'E','精炼炉',
- decode(substr(v.STATIONCODE, 1, 1), 'F','RH炉',
- decode(substr(v.STATIONCODE, 1, 1), 'B','脱硫',''))))) wsid,
- d.materielname, --物料名
- v.MATERIELCODE vCODE, --LF物料编码
- v.MATERIELTYPE vTYPE, --LF物料类型
- round(v.JMWGT,2) vJMWGT,--LF加料重量(Kg)
- w.MATERIELCODE wCODE, --BF物料编码
- w.MATERIELTYPE wTYPE, --BF物料类型
- round(w.JMWGT,2) wJMWGT --BF加料重量(Kg)
- from
- (select * from scm_materiel) d,
- (select distinct a.heatprocessno,
- a.heatno,
- a.optdate,
- a.PLANSTEEL,
- b.STATIONCODE,
- a.wsid,
- a.SHIFTCODE,
- b.MATERIELCODE,
- b.MATERIELTYPE,
- round(sum(nvl(b.JMWGT,0)) over (partition by b.HEATNO, b.STATIONCODE, b.DISPOSALTIME, b.MATERIELTYPE, b.MATERIELCODE),2) JMWGT
- from (select * from STL_LFS_Optinfo union select * from J#STL_LFS_Optinfo ) a, stl_additives b where a.heatno =b.heatno and 'E'|| a.stationcode = b.stationcode and a.disposaltime = b.disposaltime $ and b.MATERIELTYPE='HJ'
- )v ,
- (select distinct a.heatprocessno,
- a.heatno,
- a.optdate,
- a.PLANSTEEL,
- b.STATIONCODE,
- a.wsid,
- a.SHIFTCODE,
- b.MATERIELCODE,
- b.MATERIELTYPE,
- round(sum(nvl(b.JMWGT,0)) over (partition by b.HEATNO, b.STATIONCODE, b.DISPOSALTIME, b.MATERIELTYPE, b.MATERIELCODE),2) JMWGT
- from (select * from STL_LFS_Optinfo union select * from J#STL_LFS_Optinfo) a,stl_additives b where a.heatno =b.heatno and substr(b.stationcode, 1, 1) = 'C' $ and b.materieltype='HJ') w
-
- where d.materielcode (+)= v.materielcode
- --and d.materielcode = w.materielcode (+)
- and v.heatno = w.heatno
- order by v.heatprocessno desc
- ]]>
- </query>
- <query id="reportLFS_Metal_Load.select" desc="获取LF炉合金 初始化物料信息列名" fetchSize="10">
- <![CDATA[
- select distinct (a.materielcode) materielcode,
- a.MATERIELTYPE,
- b.materielforshort
- from stl_additives a, scm_materiel b
- where a.materielcode = b.materielcode
- and b.MATERIELTYPE= ? and to_char(a.updatetime, 'yyyy-MM-dd')
- between ? and ?
- ]]>
- </query>
- <query id="reportVDSMetal.Query" desc="VD炉合金加入报表查询" fetchSize="10">
- <![CDATA[
- select v.heatprocessno, --加热处理号
- v.OPTDATE, --日期
- decode(v.SHIFTCODE,'11','甲白','12','乙白','13','丙白','14','丁白','21','甲中','22','乙中','23','丙中','24','丁中','31','甲夜','32','乙夜','33','丙夜','34','丁夜')SHIFTCODE ,--班组
- v.HEATNO, --炉号
- v.PLANSTEEL STEEL,--钢种
- v.STATIONCODE, --设备号
- substr(v.stationcode,3,1) ||'#'||
- decode(substr(v.STATIONCODE, 1, 1), 'C','转炉',
- decode(substr(v.STATIONCODE, 1, 1), 'D','吹氩站',
- decode(substr(v.STATIONCODE, 1, 1), 'E','精炼炉',
- decode(substr(v.STATIONCODE, 1, 1), 'F','RH炉',
- decode(substr(v.STATIONCODE, 1, 1), 'B','脱硫',''))))) wsid,
- v.MATERIELCODE, --物料编码
- d.materielname, --物料名
- v.MATERIELTYPE, --物料类型
- round(v.JMWGT,2) JMWGT --加料重量(Kg)
- from
- (select * from scm_materiel) d,
- (select distinct a.heatprocessno,
- a.heatno,
- a.optdate,
- a.PLANSTEEL,
- b.STATIONCODE,
- a.wsid,
- a.SHIFTCODE,
- b.MATERIELCODE,
- b.MATERIELTYPE,
- round(sum(nvl(b.JMWGT,0)) over (partition by b.HEATNO, b.STATIONCODE, b.DISPOSALTIME, b.MATERIELTYPE, b.MATERIELCODE),2) JMWGT
- from (select * from STL_VDS_Optinfo union select * from J#STL_VDS_Optinfo ) a, stl_additives b
- where a.heatno =b.heatno and 'I'|| a.stationcode = b.stationcode and a.disposaltime = b.disposaltime $ and b.MATERIELTYPE='HJ') v
- where d.materielcode (+)= v.materielcode order by v.heatprocessno desc
- ]]>
- </query>
- <query id="reportVDS_Metal_Load.select" desc="获取VD炉合金初始化物料信息列名" fetchSize="10">
- <![CDATA[
- select distinct (a.materielcode) materielcode,
- a.MATERIELTYPE,
- b.materielforshort
- from stl_additives a, scm_materiel b
- where a.materielcode = b.materielcode
- and b.MATERIELTYPE= ? and to_char(a.updatetime, 'yyyy-MM-dd')
- between ? and ?
- ]]>
- </query>
- <query id="reportBOF.Query" desc="转炉生产日报统计表--所有炉号查询" fetchSize="10">
- <![CDATA[
- select A.HEATNO, --炉号
- A.station STATIONCODE, --岗位编码
- nvl(round(B.CPL, 3), 0) CPL, --合格铸坯量(T)
- case
- when (nvl(A.PFBALEWGT, 0) - nvl(A.BALELEAVEWGT, 0)) > 0 then
- round((nvl(A.PFBALEWGT, 0) - nvl(A.BALELEAVEWGT, 0)), 3)
- else
- 0
- end GSL, --GSL(合格钢水量) = (上台大包重量-下台大包重量)
- (select substr(mes_lg_common.getlgshift1(A.RecFlag), 2, 1) from dual) SHIFTCODE,--班组
- case
- when to_char(A.RecFlag, 'yyyy-MM-dd HH24:mi') between ? and ? then
- '1'
- else
- '0'
- end BECURR --1#吹开始时刻(操作时间)
- from (select *
- from (select t.*,
- row_number() over(partition by HEATNO order by RecFlag) XH
- from (select t.recflag,station, t2.*
- from (select t.heatno,
- case
- when B1STARTTIME is not null then
- B1STARTTIME
- else
- OPTDATE
- end RecFlag,t.stationcode station
- from STL_bof_optinfo t
- where to_char(case when
- B1STARTTIME is not null then
- B1STARTTIME else OPTDATE end,
- 'yyyy-MM-dd') between ? and ?
- union all
- select t.heatno,
- case
- when B1STARTTIME is not null then
- B1STARTTIME
- else
- OPTDATE
- end RecFlag,t.stationcode station
- from J#STL_bof_optinfo t
- where to_char(case when
- B1STARTTIME is not null then
- B1STARTTIME else OPTDATE end,
- 'yyyy-MM-dd') between ? and ?) t,
- (select *
- from STL_ccm_optinfo
- union
- select * from J#STL_Ccm_Optinfo) t2
- where t.heatno = t2.heatno) t)
- where XH = 1) A,
- (select distinct substr(CHARGE_NO, 1, 10) HEATNO,
- sum(nvl(SLAB_WGT, 0)) over(partition by substr(CHARGE_NO, 1, 10)) CPL
- from (select CHARGE_NO, (SLAB_WGT/1000) SLAB_WGT --合格铸坯量(T)
- from stl_incision_view
- where to_char(to_date(substr(SLAB_CUT_DTIME,1,8),'yyyy-MM-dd hh24:mi:ss'),'yyyy-MM-dd') between ? and ?
- ) t) B
- where A.HEATNO = B.HEATNO(+)
- ]]>
- </query>
- <query id="proc_GetBOFInfo.Query" desc="转炉生产日报统计表--转炉信息查询" fetchSize="10">
- <![CDATA[
- select distinct b.HEATNO, --炉号
- b.STATIONCODE, --岗位编号
- substr(b.SHIFTCODE, 2, 1) SHIFTCODE,--班组(甲、乙、丙、丁)
- nvl(b.IRONPOTWGT, 0) TSL, --装入铁水量
- nvl(b.PIGIRONWGT, 0) STL, --装入生铁量(T)
- nvl(b.WSTEELWGT, 0) FGL, --装入废钢量(T)
- nvl(b.RSWGT, 0) HLL, --回炉重量(T)
- nvl(h.jmwgt,0) HJL, --加入合金量(Kg)
- to_char(b.CHANGESTARTTIME,'yyyy-mm-dd hh24:mi:ss') starttime, --兑铁开始时刻
- to_char(b.TAPPINGENDTIME,'yyyy-mm-dd hh24:mi:ss') endtime, --出钢结束时刻
- nvl((b.TAPPINGENDTIME-b.CHANGESTARTTIME )*24*60,0) time, --作业时间(min)
- case
- when to_char(RecFlag, 'yyyy-MM-dd HH24:mi') between ? and ? then
- '1'
- else
- '0'
- end BECURR --1#吹开始时刻(操作时间)
- from (select *
- from (select t.*,
- row_number() over(partition by t.HEATNO order by t.RecFlag) XH
- from (select t.*,
- case
- when B1STARTTIME is not null then
- B1STARTTIME
- else
- OPTDATE
- end RecFlag
- from STL_BOF_OPTINFO t
- where to_char(case when B1STARTTIME is not null then
- B1STARTTIME else OPTDATE end,
- 'yyyy-MM-dd') between ? and ?
- union all
- select t.*,
- case
- when B1STARTTIME is not null then
- B1STARTTIME
- else
- OPTDATE
- end RecFlag
- from J#STL_BOF_OPTINFO t
- where to_char(case when B1STARTTIME is not null then
- B1STARTTIME else OPTDATE end,
- 'yyyy-MM-dd') between ? and ?) t) v where XH = 1) b,
- (select distinct s.heatno,
- sum(s.jmwgt) over(partition by s.heatno order by s.heatno) jmwgt,
- s.materieltype,
- substr(s.stationcode, 2, 2) code
- from stl_additives s
- where s.materieltype = 'HJ'
- and substr(s.stationcode, 1, 1) = 'C'
- union
- select distinct s.heatno,
- sum(s.jmwgt) over(partition by s.heatno order by s.heatno) jmwgt,
- s.materieltype,
- substr(s.stationcode, 2, 2) code
- from j#stl_additives s
- where s.materieltype = 'HJ'
- and substr(s.stationcode, 1, 1) = 'C') h
- where b.heatno = h.heatno(+) order by b.heatno
- ]]>
- </query>
- <query id="proc_GetBOFInfo_RHS.Query" desc="转炉生产日报统计表--经过RH炉的转炉信息查询" fetchSize="10">
- <![CDATA[
- select distinct p.heatno, --炉号
- s.stationcode, --岗位编号
- substr(s.SHIFTCODE, 2, 1) SHIFTCODE, --班组(甲、乙、丙、丁)
- p.FACT_ROUTE, --实绩工艺路线
- case
- when to_char(RecFlag, 'yyyy-MM-dd HH24:mi') between ? and ? then
- '1'
- else
- '0'
- end BECURR --1#吹开始时刻(操作时间)
- from (select p.FACT_ROUTE,p.heatno
- from PPC_STEEL_HEAT p
- union
- select p.FACT_ROUTE,p.heatno
- from j#PPC_STEEL_HEAT p
- ) p,
- (select *
- from (select t.*,
- row_number() over(partition by t.HEATNO order by t.RecFlag) XH
- from (select t.*,
- case
- when B1STARTTIME is not null then
- B1STARTTIME
- else
- OPTDATE
- end RecFlag
- from STL_BOF_OPTINFO t
- where to_char(case when B1STARTTIME is not null then
- B1STARTTIME else OPTDATE end,
- 'yyyy-MM-dd') between ? and ?
- union all
- select t.*,
- case
- when B1STARTTIME is not null then
- B1STARTTIME
- else
- OPTDATE
- end RecFlag
- from J#STL_BOF_OPTINFO t
- where to_char(case when B1STARTTIME is not null then
- B1STARTTIME else OPTDATE end,
- 'yyyy-MM-dd') between ? and ?) t) v where XH = 1) s
- where substr(p.FACT_ROUTE, 11, 2) = 'F1'
- and s.HEATNO = p.HEATNO(+)
- order by heatno
- ]]>
- </query>
- <query id="GetreportEAFOggData.Query" desc="获取电炉原始记录数据" fetchSize="10">
- <![CDATA[
- select distinct t.HEATNO, --炉号
- t4.aim_grade_code PLANSTEEL, --目标钢号
- t.STATIONCODE, --岗位编号
- t.SAGE, --炉龄
- t.GAGE, --枪龄
- t.O2CONSUME, --供氧耗量
- t.PIGIRONWGT, --装入生铁量
- t.POTWRAPSTATE, --大包包况
- t.SCRAPWGT, --装入废钢量
- t.CHANGESTARTTIME,--兑铁兑钢开始时刻
- t.OPENOXYGENTIME, --开氧时刻
- t.MOLSTLTEMPERATURE,--钢水温度
- t.TERMINUSC, --终点定碳
- t.TERMINUSO2, --终点定氧
- t.MOLSTLTEMPERATURE,--钢水温度
- t.O2PRESS, --氧气压力
- to_char(t.CHANGESTARTTIME, 'HH24:mi') CHANGESTARTTIME, --兑铁兑钢开始时刻
- to_char(t.OPENOXYGENTIME, 'HH24:mi') OPENOXYGENTIME, --开氧时刻
- FLOOR(nvl(t.SUPPLYOXYGENTIME / 60, 0)) SUPPLYOXYGENTIME,--供氧时间
- t.supplyoxygentime SUPPLYOXYGENTIME_S,
- t.TERMINUSTEPT TAPPINGTEMPERATURE, --终点温度
- t.TAPPINGTIME, --出钢时间
- to_char(t.TAPPINGSTARTTIME, 'HH24:mi') TAPPINGSTARTTIME,--出钢开始时刻
- max(case
- when t.HEATNO = t2.HEATNO and t2.xh = t2.cnt then
- t2.C
- end) over(partition by t.HEATNO) F_C,
- max(case
- when t.HEATNO = t2.HEATNO and t2.xh = t2.cnt then
- t2.Mn
- end) over(partition by t.HEATNO) F_MN,
- max(case
- when t.HEATNO = t2.HEATNO and t2.xh = t2.cnt then
- t2.Si
- end) over(partition by t.HEATNO) F_SI,
- max(case
- when t.HEATNO = t2.HEATNO and t2.xh = t2.cnt then
- t2.S
- end) over(partition by t.HEATNO) F_S,
- max(case
- when t.HEATNO = t2.HEATNO and t2.xh = t2.cnt then
- t2.P
- end) over(partition by t.HEATNO) F_P,
-
- max(case
- when t.HEATNO = t2.HEATNO and t2.xh = t2.cnt then
- t2.Als
- end) over(partition by t.HEATNO) F_ALS,
-
- max(case
- when t.HEATNO = t3.HEATNO and t3.xh = t3.cnt then
- t3.Mn
- end) over(partition by t.HEATNO) R_MN,
- max(case
- when t.HEATNO = t3.HEATNO and t3.xh = t3.cnt then
- t3.C
- end) over(partition by t.HEATNO) R_C,
- max(case
- when t.HEATNO = t3.HEATNO and t3.xh = t3.cnt then
- t3.P
- end) over(partition by t.HEATNO) R_P,
- max(case
- when t.HEATNO = t3.HEATNO and t3.xh = t3.cnt then
- t3.S
- end) over(partition by t.HEATNO) R_S,
-
- max(case
- when t.HEATNO = t3.HEATNO and t3.xh = t3.cnt then
- t3.SI
- end) over(partition by t.HEATNO) R_SI,
-
- max(case
- when t.HEATNO = t9.HEATNO and t9.xh = t9.cnt then
- t9.Mn
- end) over(partition by t.HEATNO) Z_MN,
- max(case
- when t.HEATNO = t9.HEATNO and t9.xh = t9.cnt then
- t9.C
- end) over(partition by t.HEATNO) Z_C,
- max(case
- when t.HEATNO = t9.HEATNO and t9.xh = t9.cnt then
- t9.P
- end) over(partition by t.HEATNO) Z_P,
- max(case
- when t.HEATNO = t9.HEATNO and t9.xh = t9.cnt then
- t9.S
- end) over(partition by t.HEATNO) Z_S,
-
- max(case
- when t.HEATNO = t9.HEATNO and t9.xh = t9.cnt then
- t9.SI
- end) over(partition by t.HEATNO) Z_SI,
- t4.cast_id CCMNO, --连铸机号
- t.REMARK, --备注
- to_char(t.optdate, 'yyyy-MM-dd') optDisp --操作时间
- from (select * from stl_eaf_optinfo
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)
- union
- select * from J#stl_eaf_optinfo
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)
- ) t
- left join (select y.*
- from (select x.*,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE) xh
- from (select *
- from STL_CHEMELEMENT
- where upper(substr(ASSAYTYPECODE, 1, 1)) = 'A'
- and to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?
- union
- select *
- from J#STL_CHEMELEMENT
- where upper(substr(ASSAYTYPECODE, 1, 1)) = 'A'
- and to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?
- ) x) y) t1 on t.heatno = t1.heatno
- left join (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE desc, x.assaydate desc) xh,
- substr(x.assaytypecode, 1, 1) gw
- from (select *
- from STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?
- and upper(SUBSTR(CHECKNO, 12, 1)) = 'C'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- and upper(SUBSTR(CHECKNO, 13, 1)) = 'P'
- union
- select *
- from J#STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?
- and upper(SUBSTR(CHECKNO, 12, 1)) = 'C'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- and upper(SUBSTR(CHECKNO, 13, 1)) = 'P') x) y) t2 on t2.heatno = t.heatno
- left join (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE desc, x.assaydate desc) xh,
- substr(x.assaytypecode, 1, 1) gw
- from (select *
- from STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?
- and upper(SUBSTR(CHECKNO, 12, 1)) = 'C'
- and upper(SUBSTR(CHECKNO, -1)) = 'I'
- and upper(SUBSTR(CHECKNO, 13, 1)) <> 'P'
- union
- select *
- from J#STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?
- and upper(SUBSTR(CHECKNO, 12, 1)) = 'C'
- and upper(SUBSTR(CHECKNO, -1)) = 'I'
- and upper(SUBSTR(CHECKNO, 13, 1)) <> 'P') x) y) t3 on t3.heatno = t.heatno
- left join (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE desc, x.assaydate desc) xh,
- substr(x.assaytypecode, 1, 1) gw
- from (select *
- from STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?
- and upper(SUBSTR(CHECKNO, 12, 1)) = 'C'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- and upper(SUBSTR(CHECKNO, 13, 1)) = 'P'
- union
- select *
- from J#STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?
- and upper(SUBSTR(CHECKNO, 12, 1)) = 'C'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- and upper(SUBSTR(CHECKNO, 13, 1)) = 'P') x) y) t9 on t9.heatno = t.heatno
- left join (select * from ppc_steel_heat
- union
- select * from J#ppc_steel_heat) t4 on t.heatno = t4.heatno
- /**left join (select *
- from (select misid, C, Si, Mn, P, S, Asn, Cu, Sn, Sb
- from stl_es_taphole
- union
- select misid, C, Si, Mn, P, S, Asn, Cu, Sn, Sb
- from stl_mis_taphole)) t5 on t.MOLIRNSOURCE = t5.misid**/
- left join (select heatno, PFBALEWGT, BALELEAVEWGT, isrs from STL_ccm_optinfo
- union --PFBALEWGT上台大包重量 BALELEAVEWGT下台大包重量 isrs是否回炉
- select heatno, PFBALEWGT, BALELEAVEWGT, isrs from J#STL_ccm_optinfo) t6 on t.heatno = t6.heatno
- left join (select heatno, ARFTEMPT, ARBTEMPT from STL_cas_optinfo
- union --ARFTEMPT氩前温度 ARFTEMPT氩后温度
- select heatno, ARFTEMPT, ARBTEMPT from J#STL_cas_optinfo) t7 on t.heatno = t7.heatno
- left join (select heatno, isrs from STL_lfs_optinfo
- union --isrs是否回炉
- select heatno, isrs from J#STL_lfs_optinfo) t8 on t.heatno = t8.heatno
- order by optDisp
- ]]>
- </query>
- <query id="EafData_FLHJ.Query" desc="炼钢生产报表--取电炉辅料合金数据" fetchSize="10">
- <![CDATA[
- Select t.heatno,
- t.STATIONCODE,
- t.DISPOSALTIME,
- t1.materielcode,
- t1.materieltype,
- t2.materielname,
- round(sum(nvl(t1.JMWGT, 0)) over(partition by t1.HEATNO,
- t1.STATIONCODE,
- t1.DISPOSALTIME,
- t1.MATERIELTYPE,
- t1.MATERIELCODE)) materielWgt
- from (select *
- from stl_eaf_optinfo
- where 1 = 1 $
- union
- select * from J#stl_eaf_optinfo where 1 = 1 $ ) t
- left join stl_additives t1 on t.heatno = t1.heatno
- and 'A' || t.stationcode = t1.stationcode
- and t.disposaltime = t1.disposaltime
- left join scm_materiel t2 on t1.materielcode = t2.materielcode
- order by t.STATIONCODE, t.HEATNO
- ]]>
- </query>
- <query id="reportAll.Select" desc="各工序炉号、岗位、班次、钢种、日期记录查询" fetchSize="10">
- <![CDATA[
- select A.HEATNO,
- A.STATIONCODE,
- B.FACT_ROUTE,
- substr(A.SHIFTCODE, 2, 1) SHIFTCODE,
- case
- when B.AIM_GRADE_CODE is null then
- B.AIM_GRADE_CODE
- else
- B.AIM_GRADE_CODE
- end PLANSTEEL,
- case
- when $ then
- '1'
- else
- '0'
- end BECURR
-
- from (select *
- from (select t.*,
- row_number() over(partition by t.HEATNO order by t.OPTDATE) XH
- from (select *
- from $ t
- where $
- union all
- select * from J#$ t where $) t
- )
- where XH = 1) A,
-
- (select HEATNO, AIM_GRADE_CODE,FACT_ROUTE
- from (select t.*,
- row_number() over(partition by t.HEATNO order by V_HEAT_ID desc) XH
- from ppc_steel_heat t
- where t.HEATNO is not null
- and $)
- where XH = 1) B
- where A.HEATNO = B.HEATNO(+)
- ]]>
- </query>
- <query id="reportStl_Chemelement.Select" desc="查询对应炉号化学检验表值记录" fetchSize="10">
- <![CDATA[
- select *
- from (select t.*,
- row_number() over(partition by t.heatno order by t.assaydate desc) XH
- from (select *
- from stl_chemelement
- where 1=1 and $
- and (substr(stationcode, 1, 1) = 'G' or
- upper(substr(assaytypecode, 1, 2)) = 'GP')
- union
- select *
- from j#stl_chemelement
- where 1=1 and $
- and (substr(stationcode, 1, 1) = 'G' or
- upper(substr(assaytypecode, 1, 2)) = 'GP')
- ) t
- )
- where XH = 1
- ]]>
- </query>
- <query id="reportScm_Standard_Chem.Select" desc="查询对应炉号化学成份标准记录" fetchSize="10">
- <![CDATA[
- select distinct t1.steel STEELNAME, --牌号
- t.itemcode ELENAME, --描述
- trim(t.stdsign) STDSIGN, --范围符号
- trim(t.stdmin) STDMIN, --最小值
- trim(t.stdmax) STDMAX --最大值
-
- from scm_standard_chem t, scm_sortcode_chem t1
-
- where t.cic = t1.cic
- and t1.stdstyle = '1' --标准內型(1内控 2放行)
- and $ --and t1.STEEL in('','')
-
-
- ]]>
- </query>
- <query id="reportFXMZL_Standard_Chem.Select" desc="放行命中率查询对应炉号化学成份标准记录" fetchSize="10">
- <![CDATA[
- select t1.steel STEELNAME, --牌号
- t.itemcode ELENAME, --描述
- trim(t.stdsign) STDSIGN, --范围符号
- trim(t.stdmin) STDMIN, --最小值
- trim(t.stdmax) STDMAX --最大值
-
- from scm_standard_chem t, scm_sortcode_chem t1
-
- where t.cic = t1.cic
- and t1.stdstyle = '2' --标准內型(1内控 2放行)
- and $
-
- order by t.cic
- ]]>
- </query>
- <query id="reportBOF_Forward.Query" desc="查询转炉炉前铁水信息" fetchSize="10">
- <![CDATA[
- select distinct t.HEATNO, --炉次号
- t.IRONPOTID, --铁水编号
- t4.aim_grade_code PLANSTEEL, --钢种计划
- nvl(t.IRONPOTWGT, '0') IRONPOTWGT,--铁水重量
- t.IRONTEMPERATURE, --铁水温度
- case substr(t.SHIFTCODE, 2, 1) --班组
- when '1' then
- '甲'
- when '2' then
- '乙'
- when '3' then
- '丙'
- when '4' then
- '丁'
- end BB,
- case substr(t.SHIFTCODE, 1, 1) --班次
- when '1' then
- '白'
- when '2' then
- '中'
- when '3' then
- '夜'
- end BC,
- --入炉铁水信息
- max(case
- when t.MOLIRNSOURCE = t10.HEATNO then
- t10.Mn
- end) over(partition by t.MOLIRNSOURCE) R_MN,
- max(case
- when t.MOLIRNSOURCE = t10.HEATNO then
- t10.C
- end) over(partition by t.MOLIRNSOURCE) R_C,
- max(case
- when t.MOLIRNSOURCE = t10.HEATNO then
- t10.P
- end) over(partition by t.MOLIRNSOURCE) R_P,
- max(case
- when t.MOLIRNSOURCE = t10.HEATNO then
- t10.S
- end) over(partition by t.MOLIRNSOURCE) R_S,
- max(case
- when t.MOLIRNSOURCE = t10.HEATNO then
- t10.si
- end) over(partition by t.MOLIRNSOURCE) R_SI,
- --TSO试样
- max(case
- when t.HEATNO = t9.HEATNO and t9.xh = t9.cnt then
- t9.Mn
- end) over(partition by t.HEATNO) Z_MN,
- max(case
- when t.HEATNO = t9.HEATNO and t9.xh = t9.cnt then
- t9.C
- end) over(partition by t.HEATNO) Z_C,
- max(case
- when t.HEATNO = t9.HEATNO and t9.xh = t9.cnt then
- t9.P
- end) over(partition by t.HEATNO) Z_P,
-
- to_char(t.optdate, 'yyyy-MM-dd hh24:mi') OPTDISP --操作时间
- from (select *
- from STL_bof_optinfo
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd hh24:mi:ss') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)
- union
- select *
- from J#STL_bof_optinfo
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd hh24:mi:ss') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)
- ) t
- left join (select y.*
- from (select x.*,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE) xh
- from (select *
- from STL_CHEMELEMENT
- where upper(substr(ASSAYTYPECODE, 1, 1)) = 'C'
- and to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?
- union
- select *
- from J#STL_CHEMELEMENT
- where upper(substr(ASSAYTYPECODE, 1, 1)) = 'C'
- and to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ?
- ) x) y) t1 on t.heatno = t1.heatno
- left join (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE asc, x.assaydate asc) xh,
- substr(x.assaytypecode, 1, 1) gw
- from (select *
- from STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ? and
- upper(SUBSTR(CHECKNO, 12, 1)) = 'C'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- union
- select *
- from J#STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ? and
- upper(SUBSTR(CHECKNO, 12, 1)) = 'C'
- and upper(SUBSTR(CHECKNO, -1)) = 'S') x) y) t9 on t9.heatno = t.heatno
- left join (select *
- from stl_chemelement
- union
- select * from J#stl_chemelement) t10 on t10.heatno = t.MOLIRNSOURCE
- left join (select *
- from ppc_steel_heat
- union
- select * from J#ppc_steel_heat) t4 on t.heatno = t4.heatno
-
- order by OPTDISP
- ]]>
- </query>
- <query id="reportBOF_Tapp.Query" desc="查询转炉二次取样信息" fetchSize="10">
- <![CDATA[
- select distinct t.HEATNO, --炉号
- t4.aim_grade_code PLANSTEEL, --钢种
- case substr(t.SHIFTCODE, 2, 1)--班组
- when '1' then
- '甲'
- when '2' then
- '乙'
- when '3' then
- '丙'
- when '4' then
- '丁'
- end BB,
- case substr(t.SHIFTCODE, 1, 1)--班次
- when '1' then
- '白'
- when '2' then
- '中'
- when '3' then
- '夜'
- end BC,
- nvl(t.B2TIME,0) B2TIME, --2#吹时间(s)
- nvl(t.B3TIME,0) B3TIME, --3#吹时间(s)
- nvl(t.B4TIME,0) B4TIME, --4#吹时间(s)
- nvl(t.B5TIME,0) B5TIME, --5#吹时间(s)
- --LD2(第二次取样)
- max(case
- when t.HEATNO = t3.HEATNO and t3.xh = t3.cnt then
- t3.Mn
- end) over(partition by t.HEATNO) Z_MN,
- max(case
- when t.HEATNO = t3.HEATNO and t3.xh = t3.cnt then
- t3.C
- end) over(partition by t.HEATNO) Z_C,
- max(case
- when t.HEATNO = t3.HEATNO and t3.xh = t3.cnt then
- t3.P
- end) over(partition by t.HEATNO) Z_P,
- max(case
- when t.HEATNO = t3.HEATNO and t3.xh = t3.cnt then
- t3.S
- end) over(partition by t.HEATNO) Z_S,
-
- to_char(t.optdate, 'yyyy-MM-dd hh24:mi') OPTDISP --操作时间
- from (select *
- from STL_bof_optinfo
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)
- union
- select *
- from J#STL_bof_optinfo
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)
- ) t
- left join (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE asc, x.assaydate asc) xh,
- substr(x.assaytypecode, 1, 1) gw
- from (select *
- from STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ? and
- upper(SUBSTR(CHECKNO, 12, 1)) = 'C'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- union
- select *
- from J#STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and ? and
- upper(SUBSTR(CHECKNO, 12, 1)) = 'C'
- and upper(SUBSTR(CHECKNO, -1)) = 'S') x) y ) t3 on t.heatno = t3.heatno
- left join (select *
- from ppc_steel_heat
- union
- select * from J#ppc_steel_heat) t4 on t.heatno = t4.heatno
- order by OPTDISP
- ]]>
- </query>
- <query id="reportBOF_CheckEndMn.Query" desc="获取当月各岗位所有班次的终点MN考核记录" fetchSize="10">
- <![CDATA[
- select distinct t.HEATNO,--炉号
- t.STATIONCODE, --岗位编号
- substr(t.SHIFTCODE, 2, 1) SHIFTCODE, --班组(甲、乙、丙、丁)
- max(case
- when t.HEATNO = t1.HEATNO and t1.xh = t1.cnt then
- t1.Mn
- end) over(partition by t.HEATNO) Z_MN,
- t2.stdmin, --最小值(内控)
- t2.stdmax, --最大值(内控)
- to_char(t.optdate, 'yyyy-MM-dd') OPTDISP --日期
-
- from (select * from stl_bof_optinfo where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM') = ?
- union select * from j#stl_bof_optinfo where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM') = ?
- ) t
-
- left join (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE asc, x.assaydate asc) xh,
- substr(x.assaytypecode, 1, 1) gw
- from (select *
- from STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM') = ?
- and upper(SUBSTR(CHECKNO, 12, 1)) = 'C'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- union
- select *
- from J#STL_CHEMELEMENT
- where to_char(ASSAYDATE, 'yyyy-MM') = ?
- and upper(SUBSTR(CHECKNO, 12, 1)) = 'C'
- and upper(SUBSTR(CHECKNO, -1)) = 'S') x) y) t1 on t1.heatno = t.heatno
-
- left join ( select distinct t3.gycode,t4.itemcode,t4.stdmin,t4.stdmax --decode(t1.itemcode,'Mn',t1.stdmin,'') MN_Min, decode(t1.itemcode,'Mn',t1.stdmax,'') MN_Max
- from scm_sortcode_chem t3, scm_standard_chem t4
- where t3.cic = t4.cic
- and t3.stdstyle = '1'
- and t4.itemcode= 'Mn' ) t2 on t2.gycode = t.heatno
- order by substr(OPTDISP,9,2)
- ]]>
- </query>
- <query id="GetMonthDate.Select" desc="获取当月的生产日期_转炉" fetchSize="10">
- <![CDATA[
- select distinct to_char(OPTDATE, 'yyyy-MM-dd') ddate
- from j#stl_bof_optinfo
- where to_char(OPTDATE, 'yyyy-MM') = ?
- order by ddate
- ]]>
- </query>
- <query id="GetMnStandardElement.Select" desc="获取Mn元素内控标准信息" fetchSize="10">
- <![CDATA[
- select distinct t.gycode,t1.itemcode,t1.stdmin,t1.stdmax --decode(t1.itemcode,'Mn',t1.stdmin,'') MN_Min, decode(t1.itemcode,'Mn',t1.stdmax,'') MN_Max
- from scm_sortcode_chem t, scm_standard_chem t1
- where t.cic = t1.cic
- and t.stdstyle = '1'
- and t1.itemcode= 'Mn'
- order by gycode
- ]]>
- </query>
- <query id="reportBOF_AdditStat.Select" desc="查询转炉消耗统计信息-按班统计物料消耗重量" fetchSize="10">
- <![CDATA[
- select distinct t.MATERIELCODE,
- t.materielname,
- t.MATERIELTYPE,
- case substr(t.SHIFTCODE, 1, 1)
- when '1' then
- '白'
- when '2' then
- '中'
- when '3' then
- '夜'
- end BC,
- case substr(t.SHIFTCODE, 2, 1)
- when '1' then
- '甲'
- when '2' then
- '乙'
- when '3' then
- '丙'
- when '4' then
- '丁'
- end BB,
- t.SHIFTCODE,
- sum(nvl(t.JMWGT, 0)) over(partition by t.ddate, substr(t.SHIFTCODE, 2, 1), t.MATERIELCODE, t.MATERIELTYPE) JMWGT, --加料重量
- t.DDATE --日期
- from (select v.heatprocessno,
- v.heatno,
- v.PLANSTEEL STEEL,
- v.STATIONCODE,
- v.SHIFTCODE,
- v.MATERIELCODE,
- d.materielname,
- v.MATERIELTYPE,
- round(v.JMWGT, 2) JMWGT,
- to_char(v.optdate, 'yyyy-MM-dd') DDATE --日期
- from (select distinct a.heatprocessno,
- a.heatno,
- a.optdate,
- a.PLANSTEEL,
- b.STATIONCODE,
- a.SHIFTCODE,
- b.MATERIELCODE,
- b.MATERIELTYPE,
- round(sum(nvl(b.JMWGT, 0))
- over(partition by b.HEATNO,
- b.STATIONCODE,
- b.DISPOSALTIME,
- b.MATERIELTYPE,
- b.MATERIELCODE),
- 2) JMWGT
- from (select *
- from STL_bof_optinfo
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between
- ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?,
- null,
- UPPER(nvl(PLANSTEEL, 'null')),
- ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)
- union
- select *
- from J#STL_bof_optinfo
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between
- ? and ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?,
- null,
- UPPER(nvl(PLANSTEEL, 'null')),
- ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)) a,
- stl_additives b
- where a.heatno = b.heatno
- and 'C' || a.stationcode = b.stationcode
- and a.disposaltime = b.disposaltime
- and b.MATERIELTYPE in ('FL', 'HJ')) v
- left join (select * from scm_materiel) d on v.materielcode =
- d.materielcode
- order by to_char(v.optdate, 'yyyy-MM-dd HH24:ss') desc) t
- order by DDATE, MATERIELTYPE, substr(SHIFTCODE, 2, 1)
- ]]>
- </query>
- <query id="getProduction.Select" desc="统计每个班的产量" fetchSize="10">
- <![CDATA[
- select distinct to_char(a.optdate, 'yyyy-MM-dd') optdate,
- substr(a.shiftcode, 2, 1) shiftcode,
- sum(nvl(WEIGHT,0)) WEIGHT,
- count(a.heatno) intCount
- from (select *
- from stl_bof_optinfo
- where to_char(optdate, 'yyyy-MM-dd') between ? and
- ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)
- union
- select *
- from J#STL_bof_optinfo
- where to_char(optdate, 'yyyy-MM-dd') between ? and
- ?
- and substr(STATIONCODE, 2, 1) =
- decode(?, null, substr(STATIONCODE, 2, 1), ?)
- and UPPER(nvl(PLANSTEEL, 'null')) in
- (decode(?, null, UPPER(nvl(PLANSTEEL, 'null')), ?))
- and substr(SHIFTCODE, 1, 1) =
- decode(?, null, substr(SHIFTCODE, 1, 1), ?)
- and substr(SHIFTCODE, 2, 1) =
- decode(?, null, substr(SHIFTCODE, 2, 1), ?)) a,
- (select heatno,
- case
- when (nvl(PFBALEWGT, 0) - nvl(BALELEAVEWGT, 0)) > 0 then
- round((nvl(PFBALEWGT, 0) - nvl(BALELEAVEWGT, 0)), 1)
- else
- 0
- end WEIGHT
- from STL_CCM_OPTINFO
- union
- select heatno,
- case
- when (nvl(PFBALEWGT, 0) - nvl(BALELEAVEWGT, 0)) > 0 then
- round((nvl(PFBALEWGT, 0) - nvl(BALELEAVEWGT, 0)), 1)
- else
- 0
- end WEIGHT
- from J#STL_CCM_OPTINFO) b
- where a.heatno = b.heatno(+)
- group by to_char(a.optdate, 'yyyy-MM-dd'), substr(a.shiftcode, 2, 1)
- order by to_char(a.optdate, 'yyyy-MM-dd'), substr(a.shiftcode, 2, 1)
- ]]>
- </query>
- <query id="reportBOF_AdditStat_Load.Select" desc="获取转炉合金 、辅料初始化物料信息列名" fetchSize="10">
- <![CDATA[
- select distinct (a.materielcode) materielcode,
- a.MATERIELTYPE,
- b.materielforshort
- from (Select HEATNO, stationcode
- from stl_bof_optinfo t
- where to_char(t.optdate, 'yyyy-MM-dd') between ? and
- ?
- union
- Select HEATNO, stationcode
- from J#stl_bof_optinfo t
- where to_char(t.optdate, 'yyyy-MM-dd') between ? and
- ?) t,
- stl_additives a,
- scm_materiel b
- where t.heatno = a.heatno
- and 'C' || t.stationcode = a.stationcode
- and a.materielcode = b.materielcode
- and b.MATERIELTYPE IN ('HJ', 'FL') order by materieltype
- ]]>
- </query>
- <query id="getMaterieltype.Select" desc="判断物料信息是合金 还是辅料" fetchSize="10">
- <![CDATA[
- select a.materieltype from scm_materiel a where a.materielcode = ?
- ]]>
- </query>
- <query id="proc_GetBOFInfo.Select" desc="钢铁料消耗报表(设计)--转炉信息查询" fetchSize="10">
- <![CDATA[
- select distinct b.HEATNO, --炉号
- b.STATIONCODE, --岗位编号
- substr(b.SHIFTCODE, 2, 1) SHIFTCODE,--班组(甲、乙、丙、丁)
- nvl(b.IRONPOTWGT, 0) TSL, --装入铁水量
- nvl(b.PIGIRONWGT, 0) STL, --装入生铁量(T)
- nvl(b.WSTEELWGT, 0) FGL, --装入废钢量(T)
- round(nvl(h.jmwgt/1000,0),2) HJL, --加入合金量(Kg)
- round(nvl(d.jmwgt/1000,0),2) KSL, --加入矿石量(Kg)
- to_char(b.CHANGESTARTTIME,'yyyy-mm-dd hh24:mi:ss') starttime, --兑铁开始时刻
- to_char(b.TAPPINGENDTIME,'yyyy-mm-dd hh24:mi:ss') endtime, --出钢结束时刻
- case
- when to_char(RecFlag, 'yyyy-MM-dd HH24:mi') between ? and ? then
- '1'
- else
- '0'
- end BECURR --1#吹开始时刻(操作时间)
- from (select *
- from (select t.*,
- row_number() over(partition by t.HEATNO order by t.RecFlag) XH
- from (select t.*,
- case
- when B1STARTTIME is not null then
- B1STARTTIME
- else
- OPTDATE
- end RecFlag
- from STL_BOF_OPTINFO t
- where to_char(case when B1STARTTIME is not null then
- B1STARTTIME else OPTDATE end,
- 'yyyy-MM-dd') between ? and ?
- union all
- select t.*,
- case
- when B1STARTTIME is not null then
- B1STARTTIME
- else
- OPTDATE
- end RecFlag
- from J#STL_BOF_OPTINFO t
- where to_char(case when B1STARTTIME is not null then
- B1STARTTIME else OPTDATE end,
- 'yyyy-MM-dd') between ? and ?) t) v where XH = 1) b,
- (select distinct s.heatno,
- sum(s.jmwgt) over(partition by s.heatno order by s.heatno) jmwgt,
- s.materieltype,
- substr(s.stationcode, 2, 2) code
- from stl_additives s
- where s.materieltype = 'HJ'
- --and substr(s.stationcode, 1, 1) = 'C'
- union
- select distinct s.heatno,
- sum(s.jmwgt) over(partition by s.heatno order by s.heatno) jmwgt,
- s.materieltype,
- substr(s.stationcode, 2, 2) code
- from j#stl_additives s
- where s.materieltype = 'HJ'
- --and substr(s.stationcode, 1, 1) = 'C'
- ) h,
- (select distinct s.heatno,
- sum(s.jmwgt) over(partition by s.heatno order by s.heatno) jmwgt,
- s.materieltype,
- substr(s.stationcode, 2, 2) code
- from stl_additives s
- where s.materieltype = 'FL'
- and substr(s.stationcode, 1, 1) = 'C'
- and s.materielcode in ('10301010078','10301010084')--高磷矿石 + 球团
- union
- select distinct s.heatno,
- sum(s.jmwgt) over(partition by s.heatno order by s.heatno) jmwgt,
- s.materieltype,
- substr(s.stationcode, 2, 2) code
- from j#stl_additives s
- where s.materieltype = 'FL'
- and substr(s.stationcode, 1, 1) = 'C'
- and s.materielcode in ('10301010078','10301010084')--高磷矿石 + 球团
- ) d
- where b.heatno = h.heatno(+)
- and b.heatno = d.heatno(+)
- order by b.heatno
- ]]>
- </query>
- <query id="reportAll_Flow.Query" desc="自开率统计报表 --各工序炉号查询" fetchSize="10">
- <![CDATA[
- select HEATNO, --炉号
- STATIONCODE, --岗位
- substr((select max(t.class) from dev_gb_use_detail t where t.heatno = a.heatno), 2, 1) SHIFTCODE,--班次
- $ DEALTIME, --出钢结束时刻
- case
- when $ --to_char(OPTDATE, 'yyyy-MM-dd') between '2011-08-26' and '2011-08-29'
- then '1' else '0'
- end BECURR
- from (select t.*,
- row_number() over(partition by t.HEATNO order by t.OPTDATE) XH
- from (select *
- from $
- where $ --to_char(OPTDATE, 'yyyy-MM') = '2011-08'
- union all
- select *
- from J#$
- where $ --to_char(OPTDATE, 'yyyy-MM') = '2011-08'
- ) t) a
- where XH = 1
- ]]>
- </query>
- <query id="reportCCM_Flag.Query" desc="自开率统计报表 --连铸大包是否引流炉号查询" fetchSize="10">
- <![CDATA[
- select HEATNO,
- (select max(t.class) from dev_gb_use_detail t where t.heatno = a.heatno) SHIFTCODE,
- substr(STATIONCODE, 2, 1) STATIONCODE,
- to_char(BALESTARTTIME, 'yyyy-MM-dd HH24:mi:ss') BALESTARTTIME,--大包开浇时刻
- BALEFLOWTIEMS,--引流次数
- case nvl(BALEFLOWFLAG, 0)
- when 1 then
- '0'
- else
- '1'
- end FLOWFLAG --大包是否自动引流
- from (select t.*,
- row_number() over(partition by t.HEATNO order by t.OPTDATE) XH
- from (select *
- from STL_CCM_OPTINFO
- where $ --HEATNO in ()
- union
- select * from J#STL_CCM_OPTINFO
- where $ --HEATNO in ()
- ) t) a
- where XH = 1
- order by STATIONCODE, OPTDATE
- ]]>
- </query>
- <query id="reportCCM_DianLaBP_Query" desc="铸机典拉表" fetchSize="10">
- <![CDATA[
-
- select RQ "日期",
- BC "班次",
- BB "班别",
- HEATNO "炉号",
- PLANSTEEL "钢种",
- BJZCX "班浇注次序",
- ZBCX "中包次序",
- SUBSTR(STATIONCODE,2,1) CCM_ID,
- trim(to_char(JZDW, '990.0')) "浇注吨位",
- SFYL "是否引流",
- to_char(BALESTARTTIME, 'HH24:mi') "大包开浇时间",
- to_char(BALEENDTIME, 'HH24:mi') "大包关闭时间",
- trim(to_char(round((case
- when CAST_NO = CAST_NO_NEXT then
- BALESTARTTIME_NEXT
- else
- BALEENDTIME
- end - BALESTARTTIME) * 24 * 60,
- 1),
- '990.0')) "浇注周期",
- TEMP_MIN "最低_1",
- TEMP_MAX "最高_1",
- WC "温差",
- round(SPD_MIN, 2) "最低_2",
- round(SPD_MAX, 2) "最高_2",
- round(BD, 2) "波动",
- S "S",
- Als "Als",
- N "N",
- MEMO "备注"
- from (select to_char(case
- when a.BALESTARTTIME is not null then
- a.BALESTARTTIME
- else
- a.OPTDATE
- end,
- 'yyyy-MM-dd') RQ,
- case substr(a.SHIFTCODE, 1, 1)
- when '1' then
- '白'
- when '2' then
- '中'
- when '3' then
- '夜'
- end BC,
- case substr(a.SHIFTCODE, 2, 1)
- when '1' then
- '甲'
- when '2' then
- '乙'
- when '3' then
- '丙'
- when '4' then
- '丁'
- end BB,
- a.HEATNO,
- a.STATIONCODE,
- a.PLANSTEEL,
- row_number() over(partition by to_char(case
- when a.BALESTARTTIME is not null then
- a.BALESTARTTIME
- else
- a.OPTDATE
- end, 'yyyy-MM-dd'), a.SHIFTCODE order by a.BALESTARTTIME) BJZCX,
- row_number() over(partition by b.CAST_NO order by a.BALESTARTTIME) ZBCX,
- round(nvl(a.PFBALEWGT, 0) - nvl(a.BALELEAVEWGT, 0), 1) JZDW,
- case nvl(a.BALEFLOWFLAG, 0)
- when 1 then
- '×'
- end SFYL,
- a.BALESTARTTIME,
- a.BALEENDTIME,
- nvl(b.CAST_NO, a.MOULDNO) CAST_NO,
- lead(a.BALESTARTTIME, 1, a.BALEENDTIME) over(order by a.BALESTARTTIME) BALESTARTTIME_NEXT,
- lead(b.CAST_NO, 1, a.MOULDNO) over(order by a.BALESTARTTIME) CAST_NO_NEXT,
- round(c.TEMP_MIN) TEMP_MIN,
- round(c.TEMP_MAX) TEMP_MAX,
- round((c.TEMP_MAX - c.TEMP_MIN)) WC,
- c.SPD_MIN,
- c.SPD_MAX,
- (c.SPD_MAX - c.SPD_MIN) BD,
- trim(to_char(d.S, '0.000')) S,
- trim(to_char(d.Als, '0.000')) Als,
- trim(to_char(d.N, '0.0000')) N,
- a.MEMO
- from (select *
- from STL_CCM_OPTINFO
- where $
- union
- select *
- from J#STL_CCM_OPTINFO
- where $) a,
- (select *
- from ppc_STEEL_HEAT
- where $) b,
- (select distinct x.HEATNO,
- min(case
- when nvl(x.MIDLADLETEMP, 0) between ? and ? then
- nvl(x.MIDLADLETEMP, 0)
- end) over(partition by x.HEATNO) TEMP_MIN,
- max(case
- when nvl(x.MIDLADLETEMP, 0) between ? and ? then
- nvl(x.MIDLADLETEMP, 0)
- end) over(partition by x.HEATNO) TEMP_MAX,
- min(LEAST(x.S1CASTSPEED,X.S2CASTSPEED)) over(partition by x.HEATNO) SPD_MIN,
- max(GREATEST(x.S1CASTSPEED,x.S2CASTSPEED)) over(partition by x.HEATNO) SPD_MAX
- from (select *
- from $
- where $
- union
- select *
- from J#$
- where $) x) c,
- (select y.*
- from (select x.*,
- row_number() over(partition by x.HEATNO order by x.ASSAYDATE) xh
- from (select *
- from STL_CHEMELEMENT
- where (upper(substr(ASSAYTYPECODE, 1, 2)) = 'CP' or
- upper(substr(STATIONCODE, 1, 1)) = 'G')
- and $
- union
- select *
- from J#STL_CHEMELEMENT
- where (upper(substr(ASSAYTYPECODE, 1, 2)) = 'CP' or
- upper(substr(STATIONCODE, 1, 1)) = 'G')
- and $) x) y
- where y.xh = 1) d
- where a.HEATNO = b.HEATNO(+)
- and a.HEATNO = c.HEATNO(+)
- and a.HEATNO = d.HEATNO(+)
- order by a.BALESTARTTIME)
- where RQ between ? and ?
-
- ]]>
- </query>
-
- <query id="LFSDataHEAT_Speed.Query" desc="" fetchSize="10">
- <![CDATA[
- select z.*
- from (select Distinct x.Heatno,
- x.STATIONCODE,
- x.DISPOSALTIME,
- x.MIDLADLETEMP,
- to_char(x.LASTFRESHTIME, 'HH24:mi') LASTFRESHTIME,
- row_number() over(partition by x.HEATNO order by x.LASTFRESHTIME) xh,
- count(*) over(partition by x.HEATNO order by x.HEATNO) intcount
- from (SELECT Heatno,
- STATIONCODE,
- DISPOSALTIME,
- MIDLADLETEMP,
- min(LASTFRESHTIME) LASTFRESHTIME
- FROM (select HEATNO,
- STATIONCODE,
- DISPOSALTIME,
- ROUND(greatest(midladletemp1, midladletemp2)) MIDLADLETEMP,
- LASTFRESHTIME from stl_ccm_f1sampling b
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between
- ? and ?
- union
- select HEATNO,
- STATIONCODE,
- DISPOSALTIME,
- ROUND(greatest(midladletemp1, midladletemp2)) MIDLADLETEMP,
- LASTFRESHTIME from j#stl_ccm_f1sampling b
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between
- ? and ?
- union
- select HEATNO,
- STATIONCODE,
- DISPOSALTIME,
- ROUND(greatest(midladletemp1, midladletemp2)) MIDLADLETEMP,
- LASTFRESHTIME from stl_ccm_f2sampling b
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between
- ? and ?
- union
- select HEATNO,
- STATIONCODE,
- DISPOSALTIME,
- ROUND(greatest(midladletemp1, midladletemp2)) MIDLADLETEMP,
- LASTFRESHTIME from j#stl_ccm_f2sampling b
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between
- ? and ?
- union
- select HEATNO,
- STATIONCODE,
- DISPOSALTIME,
- ROUND(greatest(midladletemp1, midladletemp2)) MIDLADLETEMP,
- LASTFRESHTIME from stl_ccm_f3sampling b
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between
- ? and ?
- union
- select HEATNO,
- STATIONCODE,
- DISPOSALTIME,
- ROUND(greatest(midladletemp1, midladletemp2)) MIDLADLETEMP,
- LASTFRESHTIME
- from J#stl_ccm_f3sampling
- where 1 = 1
- and to_char(OPTDATE, 'yyyy-MM-dd') between
- ? and ?) a
- group by heatno, stationcode, disposaltime, MIDLADLETEMP
- order by heatno) x
-
- where x.MIDLADLETEMP > 1410
- order by heatno, LASTFRESHTIME) z
- where z.xh in (1, round(z.intcount / 4), round((z.intcount - 2) / 4) * 2,
- round((z.intcount - 2) / 4) * 3,
- round((z.intcount - 2) / 4) * 4, z.intcount)
- ]]>
- </query>
- <query id="reportCAS_All.Select" desc="吹氩炉号、岗位、班次、钢种、日期记录查询" fetchSize="10">
- <![CDATA[
- select A.HEATNO,
- A.STATIONCODE,
- V.FACT_ROUTE,
- substr(A.SHIFTCODE, 2, 1) SHIFTCODE,
- case
- when B.AIM_GRADE_CODE is null then
- B.AIM_GRADE_CODE
- else
- B.AIM_GRADE_CODE
- end PLANSTEEL,
- max(case when a.HEATNO = C.HEATNO and C.xh = C.cnt then C.MN end) over(partition by a.HEATNO) MN,
- max(case when a.HEATNO = C.HEATNO and C.xh = C.cnt then C.SI end) over(partition by a.HEATNO) SI,
- max(case
- when a.HEATNO = C.HEATNO and C.xh = C.cnt then
- C.ALS
- end) over(partition by a.HEATNO) ALS,
-
- NVL((select d.stdmin
- from scm_standard_chem_view d,
- ( select *
- from scm_base_info d
- where d.sortcode = '1006'
- order by d.basecode) h
- where d.ITEMCODE = h.basename
- and steel = B.AIM_GRADE_CODE
- and stdstyle = '2'
- and d.ITEMCODE = 'Als'
- group by steel, stdstyle, itemcode, std, stdmin, stdmax, basename,basecode
- ),0) FXALSBZ,
- case
- when $ then
- '1'
- else
- '0'
- end BECURR
-
- from (select *
- from (select t.*,
- row_number() over(partition by t.HEATNO order by t.OPTDATE) XH
- from (select *
- from $ t
- where $
- union all
- select * from J#$ t where $) t
- )
- where XH = 1) A,
-
- (select HEATNO, AIM_GRADE_CODE
- from (select t.*,
- row_number() over(partition by t.HEATNO order by V_HEAT_ID desc) XH
- from ppc_steel_heat t
- where t.HEATNO is not null
- and $)
- where XH = 1) B,
- (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE desc) xh
- from (select *
- from stl_CHEMELEMENT
- where upper(SUBSTR(CHECKNO, 12, 2)) = 'DQ'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
-
- union
- select t.*
- from j#stl_CHEMELEMENT t
- where upper(SUBSTR(CHECKNO, 12, 2)) = 'DQ'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- ) x) y
- where y.xh = y.cnt) C,
- (select *
- from ppc_steel_heat
- union
- select * from J#ppc_steel_heat) V
- where A.HEATNO = B.HEATNO(+)
- and A.HEATNO = C.HEATNO(+)
- and A.HEATNO = V.HEATNO(+)
- ]]>
- </query>
- <query id="reportCCM_AddN.Select" desc="连铸增N报表" fetchSize="10">
- <![CDATA[
- select distinct t.HEATNO,
- t.STATIONCODE,
- substr(t.SHIFTCODE, 2, 1) SHIFTCODE,
- t4.PLAN_ROUTE,
- max(case when t.HEATNO = t2.HEATNO and t2.xh = t2.cnt then t2.N end) over(partition by t.HEATNO) F_N,
- case
- when substr(t4.PLAN_ROUTE, 9, 2) = 'E0' and
- substr(t4.PLAN_ROUTE, 11, 2) = 'F0' and
- substr(t4.PLAN_ROUTE, 13, 2) = 'I0' then
- max(case when t.HEATNO = t3.HEATNO and t3.xh = t3.cnt then t3.N end) over(partition by t.HEATNO) --氩站
-
- when substr(t4.PLAN_ROUTE, 9, 2) != 'E0' and
- substr(t4.PLAN_ROUTE, 11, 2) = 'F0' and
- substr(t4.PLAN_ROUTE, 13, 2) = 'I0' then
- max(case when t.HEATNO = t7.HEATNO and t7.xh = t7.cnt then t7.N end) over(partition by t.HEATNO) --精炼
-
- when substr(t4.PLAN_ROUTE, 9, 2) = 'E0' and
- substr(t4.PLAN_ROUTE, 11, 2) != 'F0' and
- substr(t4.PLAN_ROUTE, 13, 2) = 'I0' then
- max(case when t.HEATNO = t6.HEATNO and t6.xh = t6.cnt then t6.N end) over(partition by t.HEATNO) --RH
-
- when substr(t4.PLAN_ROUTE, 9, 2) != 'E0' and
- substr(t4.PLAN_ROUTE, 11, 2) != 'F0' and
- substr(t4.PLAN_ROUTE, 13, 2) = 'I0' then
- max(case when t.HEATNO = t6.HEATNO and t6.xh = t6.cnt then t6.N end) over(partition by t.HEATNO) --RH
-
-
- when substr(t4.PLAN_ROUTE, 9, 2) != 'E0' and
- substr(t4.PLAN_ROUTE, 11, 2) = 'F0' and
- substr(t4.PLAN_ROUTE, 13, 2) != 'I0' then
- max(case when t.HEATNO = t5.HEATNO and t5.xh = t5.cnt then t5.N end) over(partition by t.HEATNO) --vd
-
- when substr(t4.PLAN_ROUTE, 9, 2) != 'E0' and
- substr(t4.PLAN_ROUTE, 11, 2) != 'F0' and
- substr(t4.PLAN_ROUTE, 13, 2) != 'I0' then
- max(case when t.HEATNO = t5.HEATNO and t5.xh = t5.cnt then t5.N end) over(partition by t.HEATNO) --vd
- else
- '0'
- end N,
- to_char(t.OPTDATE, 'yyyy-MM-dd hh24:mi') Optdisp
- from (select *
- from $
- where $
-
- union all
- select *
- from J#$
- where $ ) t
- left join (select y.*
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE desc, x.assaydate desc) xh,
- substr(x.assaytypecode, 1, 1) gw
- from (select *
- from STL_CHEMELEMENT
- where upper(SUBSTR(CHECKNO, -1)) = 'S'
- and upper(SUBSTR(CHECKNO, 12, 2)) = 'GP'
- union
- select *
- from J#STL_CHEMELEMENT
- where upper(SUBSTR(CHECKNO, -1)) = 'S'
- and upper(SUBSTR(CHECKNO, 12, 2)) = 'GP') x) y) t2 on t.heatno =
- t2.heatno
- left join (select y.*--氩站
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE desc, x.assaydate desc) xh,
- substr(x.assaytypecode, 1, 1) gw
- from (select *
- from STL_CHEMELEMENT
- where upper(SUBSTR(CHECKNO, -1)) = 'S'
- and upper(SUBSTR(CHECKNO, 12, 2)) = 'DH'
- union
- select *
- from J#STL_CHEMELEMENT
- where upper(SUBSTR(CHECKNO, -1)) = 'S'
- and upper(SUBSTR(CHECKNO, 12, 2)) = 'DH') x) y) t3 on t.heatno =
- t3.heatno
-
- left join (select y.*--vd
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE desc, x.assaydate desc) xh,
- substr(x.assaytypecode, 1, 1) gw
- from (select *
- from STL_CHEMELEMENT
- where upper(SUBSTR(CHECKNO, 12, 1)) = 'I'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- union
- select *
- from J#STL_CHEMELEMENT
- where upper(SUBSTR(CHECKNO, 12, 1)) = 'I'
- and upper(SUBSTR(CHECKNO, -1)) = 'S') x) y) t5 on t.heatno =
- t5.heatno
- left join (select y.*--RH
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE desc, x.assaydate desc) xh,
- substr(x.assaytypecode, 1, 1) gw
- from (select *
- from STL_CHEMELEMENT
- where upper(SUBSTR(CHECKNO, 12, 1)) = 'F'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- union
- select *
- from J#STL_CHEMELEMENT
- where upper(SUBSTR(CHECKNO, 12, 1)) = 'F'
- and upper(SUBSTR(CHECKNO, -1)) = 'S') x) y) t6 on t.heatno =
- t6.heatno
-
- left join (select y.*--LFS
- from (select x.*,
- count(1) over(partition by x.HEATNO) cnt,
- row_number() over(partition by x.HEATNO order by x.ASSAYTYPECODE desc, x.assaydate desc) xh,
- substr(x.assaytypecode, 1, 1) gw
- from (select *
- from STL_CHEMELEMENT
- where upper(SUBSTR(CHECKNO, 12, 1)) = 'E'
- and upper(SUBSTR(CHECKNO, -1)) = 'S'
- union
- select *
- from J#STL_CHEMELEMENT
- where upper(SUBSTR(CHECKNO, 12, 1)) = 'E'
- and upper(SUBSTR(CHECKNO, -1)) = 'S') x) y) t7 on t.heatno =
- t7.heatno
- left join (select *
- from ppc_steel_heat
- union
- select * from J#ppc_steel_heat) t4 on t.heatno = t4.heatno
-
- order by Optdisp
- ]]>
- </query>
- <query id="reportBof_LZZB.Select" desc="连铸增N报表" fetchSize="10">
- <![CDATA[
-
- select * from ( select distinct to_char(a.OPTDATE, 'yyyy-MM-dd') ,
- a.HEATNO ,
- a.PLANSTEEL ,
- a.SUPPLYOXYGENTIME ,
-
- --f.SAMPLINGDEPICT,
- --f.SAMPLINGVALUE,
- substr(a.SHIFTCODE,2,1) SHIFTCODE,
- a.STATIONCODE,
- case a.BLKREDEFFECTS when '0' then '失败' when '1' then '成功' when '3' then '一般' end BLKREDEFFECTS,
- trim(to_char(c.C, '0.00')) 倒炉C,
- '' 终点出钢合格, '' 双渣, case when a.B2TIME is null then '1' end YDHG,
- '' 到站温度合格,
- case when count(case when f.HeatNo = a.HeatNo
- and f.SAMPLINGNAME = 'GUN' || a.OGGNUMID || 'HIGH' and f.SAMPLINGVALUE < 1350
- and f.SAMPLINGDATE <= a.B1ENDTIME + (1/24/60/60)*60 then 1 end) over(partition by f.HeatNo) >= 2 then '1' end ZDYY,
- case when count(case when f.HeatNo = a.HeatNo and f.SAMPLINGNAME = 'BOFANGLE'
- and f.SAMPLINGVALUE <= -2 and f.SAMPLINGDATE >=
- case when a.PSSTARTTIME is null then a.TAPPINGENDTIME + 1.5/24/60
- else a.PSSTARTTIME - 3/24/60 end then 1 end) over(partition by f.HeatNo) >= 1 then '1' end JZJD,
- case when count(case when f.HeatNo = a.HeatNo and f.SAMPLINGNAME = 'BOFANGLE' and f.SAMPLINGVALUE >= 115
- and f.SAMPLINGDATE >= a.PSENDTIME then 1 end) over(partition by f.HeatNo) >= 1 then '1' end ZZJD,
- case when sum(case when g.HeatNo = a.HeatNo and g.MATERIELCODE = '10301010039'
- and g.JMDATE >= a.B1STARTTIME + (750/24/60/60)
- then nvl(g.JMWGT, 0) end) over(partition by g.HeatNo) > 0 then '1' end JKS,
- case when count(case when f.HeatNo = a.HeatNo and f.SAMPLINGNAME = 'GUN' || a.OGGNUMID || 'HIGH'
- and f.SAMPLINGVALUE > 1500 and f.SAMPLINGDATE <= a.B1ENDTIME - (10/24/60/60)
- and f.SAMPLINGDATE > a.B1STARTTIME + (750/24/60/60) then 1 end) over(partition by f.HeatNo) <= 0 then '1' end QWS,
- '' 溅渣未加料, '' 到站化学成分未命中
- from
- (select *
- from STL_BOF_OPTINFO
- where to_char(OPTDATE,'yyyy-mm-dd') between ? and
- ?
- union
- select *
- from J#STL_BOF_OPTINFO
- where to_char(OPTDATE,'yyyy-mm-dd') between ? and
- ?) a,
- (select y.* from (select x.*,
- row_number() over(partition by x.HEATNO order by x.ASSAYDATE) xh
- from (select *
- from STL_CHEMELEMENT
- where (upper(substr(ASSAYTYPECODE, 1, 2)) = 'LD' or
- upper(substr(STATIONCODE, 1, 1)) = 'C')
- and to_char(ASSAYDATE,'yyyy-mm-dd') between ? and
- ?
- union
- select *
- from J#STL_CHEMELEMENT
- where (upper(substr(ASSAYTYPECODE, 1, 2)) = 'LD' or
- upper(substr(STATIONCODE, 1, 1)) = 'C')
- and to_char(ASSAYDATE,'yyyy-mm-dd') between ? and
- ? ) x) y
- where y.xh = 1) c,
- (select HeatNo,SAMPLINGNAME,SAMPLINGVALUE,max(SAMPLINGDATE) SAMPLINGDATE
- from STL_BOF_SAMPLING
- where (SAMPLINGNAME = 'GUNAHIGH' or SAMPLINGNAME = 'GUNBHIGH' or
- SAMPLINGNAME = 'BOFANGLE')
- and to_char(SAMPLINGDATE,'yyyy-mm-dd') between ? and
- ? group by HEATNO,SAMPLINGNAME,SAMPLINGVALUE
- union
- select HeatNo,SAMPLINGNAME,SAMPLINGVALUE,max(SAMPLINGDATE) SAMPLINGDATE
- from J#STL_BOF_SAMPLING
- where (SAMPLINGNAME = 'GUNAHIGH' or SAMPLINGNAME = 'GUNBHIGH' or
- SAMPLINGNAME = 'BOFANGLE')
- and to_char(SAMPLINGDATE,'yyyy-mm-dd') between ? and
- ? group by HEATNO,SAMPLINGNAME,SAMPLINGVALUE ) f,
-
- (select HeatNo,MATERIELCODE,JMDATE,JMWGT
- from STL_BOF_ADDITIVES
- where to_char(JMDATE,'yyyy-mm-dd') between ? and
- ?
- union
- select HeatNo,MATERIELCODE,JMDATE,JMWGT
- from J#STL_BOF_ADDITIVES
- where to_char(JMDATE,'yyyy-mm-dd') between ? and
- ? ) g
- where a.HEATNO = c.HEATNO(+)
- and a.HEATNO = f.HEATNO(+)
- and a.HEATNO = g.HEATNO) order by STATIONCODE, HEATNO desc
-
-
- ]]>
- </query>
- <query id="reportBOF_TSCTSO.Query" desc="转炉小指标 TSC/TSO" fetchSize="10">
- <![CDATA[
- select a.HEATNO,
- a.STATIONCODE,
- substr(a.SHIFTCODE,2,1) SHIFTCODE,
- b.SAMPLINGTYPE,
- b.TEMPERATURE,
- b.TERMINUSC_O2C,
- b.TERMINUSO2
- from (select HEATNO,STATIONCODE, SHIFTCODE,OPTDATE
- from STL_BOF_OPTINFO
- where to_char(OPTDATE, 'yyyy-mm-dd') between ? and
- ?
- union
- select HEATNO,STATIONCODE, SHIFTCODE,OPTDATE
- from J#STL_BOF_OPTINFO
- where to_char(OPTDATE, 'yyyy-mm-dd') between ? and
- ?) a,
- (select SAMPLINGTYPE,
- TEMPERATURE,
- HEATNO,
- TERMINUSC_O2C,
- TERMINUSO2,
- SAMPLINGDATE
- from STL_BOF_SUBSAMPLING t
- where to_char(t.samplingdate, 'yyyy-mm-dd') between ? and
- ?
- union
- select SAMPLINGTYPE,
- TEMPERATURE,
- HEATNO,
- TERMINUSC_O2C,
- TERMINUSO2,
- SAMPLINGDATE
- from j#STL_BOF_SUBSAMPLING g
- where to_char(g.samplingdate, 'yyyy-mm-dd') between ? and
- ?) b
- where a.HEATNO = b.HEATNO(+) order by a.HEATNO
-
- ]]>
- </query>
-
- <query id="reportBOF_CountHeaTNO.Query" desc="统计转炉生产总炉数" fetchSize="10">
- <![CDATA[
- select DISTINCT a.HEATNO,
- a.STATIONCODE,
- substr(a.SHIFTCODE,2,1) SHIFTCODE
- from (select HEATNO,STATIONCODE, SHIFTCODE,OPTDATE
- from STL_BOF_OPTINFO
- where to_char(OPTDATE, 'yyyy-mm-dd') between ? and
- ?
- union
- select HEATNO,STATIONCODE, SHIFTCODE,OPTDATE
- from J#STL_BOF_OPTINFO
- where to_char(OPTDATE, 'yyyy-mm-dd') between ? and
- ?) a
- ]]>
- </query>
- <query id="LoadGetYQ.Query" desc="氧枪喷头厂家信息加载" fetchSize="10">
- <![CDATA[
- select basename,basecode
- from scm_base_info
- where sortcode = '40030401'
- order by basecode
- ]]>
- </query>
- <query id="LoadGetYQBy_ID.Query" desc="根据ID获取基础信息" fetchSize="10">
- <![CDATA[
- select basename,basecode,MEMO
- from scm_base_info
- where basecode = ?
- order by basecode
- ]]>
- </query>
- <query id="report_BoF_Target.Select" desc="转炉炉长指示统计" fetchSize="10">
- <![CDATA[
-
- select * from ( select distinct to_char(a.OPTDATE, 'yyyy-MM-dd') 日期,
- a.HEATNO 炉号,
- a.PLANSTEEL 钢种,
- case substr(a.SHIFTCODE,1,1) when '1' then '白' when '2' then '中' when '3' then '夜' end 班次,
- case substr(a.SHIFTCODE,2,1) when '1' then '甲' when '2' then '乙' when '3' then '丙' when '4' then '丁' end 班别,
- substr(a.STATIONCODE, 2, 1) 炉座, case a.BLKREDEFFECTS when '0' then '失败' when '1' then '成功' when '3' then '一般' end 挡渣成功,
- trim(to_char(c.C, '0.00')) 倒炉C,
- nvl(a.B2TIME, 0) + nvl(a.B3TIME, 0) + nvl(a.B4TIME, 0) + nvl(a.B5TIME, 0) 补吹时间 ,
- '' 终点出钢合格, '' 双渣, case when a.B2TIME is null then '1' else '0' end 一倒合格,
- '' 到站温度合格,
- case when count(case when f.HeatNo = a.HeatNo
- and (substr((h.FACT_ROUTE),9,2) ='E1' OR substr((h.FACT_ROUTE),9,2) = 'E2')
- and f.SAMPLINGNAME = 'GUN' || a.OGGNUMID || 'HIGH' and f.SAMPLINGVALUE <= 1400
- and f.SAMPLINGDATE <= a.STOPOXYGENTIME + (1/24/60/60)*50 then 1 end) over(partition by f.HeatNo) >= 2 then '1' end YQLF,
- case when count(case when f.HeatNo = a.HeatNo
- and substr((h.FACT_ROUTE),9,2) = 'E0'
- and f.SAMPLINGNAME = 'GUN' || a.OGGNUMID || 'HIGH' and f.SAMPLINGVALUE <= 1460
- and f.SAMPLINGDATE <= a.STOPOXYGENTIME + (1/24/60/60)*50 then 1 end) over(partition by f.HeatNo) >= 2 then '1' end YQFLF,
-
- case when count(case when f.HeatNo = a.HeatNo and f.SAMPLINGNAME = 'BOFANGLE'
- and f.SAMPLINGVALUE <= -3 and f.SAMPLINGDATE >=
- case when a.PSSTARTTIME is null then a.TAPPINGENDTIME + 1.5/24/60
- else a.PSSTARTTIME - 1/24/60 end then 1 end) over(partition by f.HeatNo) >= 1 then '1' else '0' end 溅渣角度合格,
-
- case when count(case when f.HeatNo = a.HeatNo and f.SAMPLINGNAME = 'BOFANGLE' and f.SAMPLINGVALUE >= 105
- and f.SAMPLINGDATE >= a.PSENDTIME then 1 end) over(partition by f.HeatNo) >= 1 then '1' else '0' end 粘渣角度合格,
-
- case when sum(case when g.HeatNo = a.HeatNo and g.MATERIELCODE = '10301010078'
- and g.JMDATE >= a.OPENOXYGENTIME + (700/24/60/60)
- then nvl(g.JMWGT, 0) end) over(partition by g.HeatNo) > 0 then '1' else '0' end 加矿石,
- case when substr((select FACT_ROUTE from ppc_steel_heat t where t.heatno=a.HEATNO),9,2) ='E0' then
- '是'
- else
- '否'
- end FACT_ROUTE,
- case when count(case when f.HeatNo = a.HeatNo and f.SAMPLINGNAME = 'GUN' || a.OGGNUMID || 'HIGH'
- and (substr((h.FACT_ROUTE),9,2) ='E1' OR substr((h.FACT_ROUTE),9,2) = 'E2')
- and f.SAMPLINGVALUE <= 1460 and f.SAMPLINGDATE <= a.STOPOXYGENTIME - (10/24/60/60)
- and f.SAMPLINGDATE > a.OPENOXYGENTIME + (700/24/60/60) then 1 end) over(partition by f.HeatNo) <= 0 then '1' end QWLF,
- case when count(case when f.HeatNo = a.HeatNo and f.SAMPLINGNAME = 'GUN' || a.OGGNUMID || 'HIGH'
- and substr((h.FACT_ROUTE),9,2) = 'E0'
- and f.SAMPLINGVALUE <= 1500 and f.SAMPLINGDATE <= a.STOPOXYGENTIME - (10/24/60/60)
- and f.SAMPLINGDATE > a.OPENOXYGENTIME + (700/24/60/60) then 1 end) over(partition by f.HeatNo) <= 0 then '1' end QWFLF,
- '' 溅渣未加料, '' 到站化学成分未命中
- from
- (select *
- from STL_BOF_OPTINFO
- where $
- union
- select *
- from J#STL_BOF_OPTINFO
- where $ ) a,
- (select y.* from (select x.*,
- row_number() over(partition by x.HEATNO order by x.ASSAYDATE desc) xh
- from (select *
- from STL_CHEMELEMENT
- where (upper(substr(ASSAYTYPECODE, 1, 2)) = 'LD' or
- upper(substr(STATIONCODE, 1, 1)) = 'C')
- and to_char(ASSAYDATE,'yyyy-mm-dd') between ? and
- ?
- union
- select *
- from J#STL_CHEMELEMENT
- where (upper(substr(ASSAYTYPECODE, 1, 2)) = 'LD' or
- upper(substr(STATIONCODE, 1, 1)) = 'C')
- and to_char(ASSAYDATE,'yyyy-mm-dd') between ? and
- ? ) x) y
- where y.xh = 1) c,
- (select HeatNo,SAMPLINGNAME,SAMPLINGVALUE,max(SAMPLINGDATE) SAMPLINGDATE
- from STL_BOF_SAMPLING
- where (SAMPLINGNAME = 'GUNAHIGH' or SAMPLINGNAME = 'GUNBHIGH' or
- SAMPLINGNAME = 'BOFANGLE')
- and to_char(SAMPLINGDATE,'yyyy-mm-dd') between ? and
- ? group by HEATNO,SAMPLINGNAME,SAMPLINGVALUE
- union
- select HeatNo,SAMPLINGNAME,SAMPLINGVALUE,max(SAMPLINGDATE) SAMPLINGDATE
- from J#STL_BOF_SAMPLING
- where (SAMPLINGNAME = 'GUNAHIGH' or SAMPLINGNAME = 'GUNBHIGH' or
- SAMPLINGNAME = 'BOFANGLE')
- and to_char(SAMPLINGDATE,'yyyy-mm-dd') between ? and
- ? group by HEATNO,SAMPLINGNAME,SAMPLINGVALUE ) f,
-
- (select HeatNo,MATERIELCODE,JMDATE,JMWGT
- from STL_BOF_ADDITIVES
- where to_char(JMDATE,'yyyy-mm-dd') between ? and
- ?
- union
- select HeatNo,MATERIELCODE,JMDATE,JMWGT
- from J#STL_BOF_ADDITIVES
- where to_char(JMDATE,'yyyy-mm-dd') between ? and
- ? ) g ,
- (select HEATNO,FACT_ROUTE,PLAN_MAKING_TIME
- from ppc_steel_heat a
- where to_char(PLAN_MAKING_TIME,'yyyy-mm-dd') between ? and
- ?
- union
- select HEATNO,FACT_ROUTE,PLAN_MAKING_TIME
- from J#ppc_steel_heat b
- where to_char(PLAN_MAKING_TIME,'yyyy-mm-dd') between ? and
- ? ) h
- where a.HEATNO = c.HEATNO(+)
- and a.HEATNO = f.HEATNO(+)
- and a.HEATNO = g.HEATNO(+)
- and a.HEATNO = h.HEATNO(+) ) order by 炉座, 炉号 desc
-
-
- ]]>
- </query>
- <query id="GetSlagSplashInfo_EG.select" desc="获取在二炼钢服务器的二炼渣样信息" fetchSize="10">
- <![CDATA[
- select A.HEATNO,
- case substr(a.SHIFTCODE, 1, 1)
- when '1' then
- '白'
- when '2' then
- '中'
- when '3' then
- '夜'
- end BC,
- case substr(a.SHIFTCODE, 2, 1)
- when '1' then
- '甲'
- when '2' then
- '乙'
- when '3' then
- '丙'
- when '4' then
- '丁'
- end BB,
- A.CaO,
- A.SiO2,
- A.Al2O3,
- A.TFe,
- A.MnO,
- A.S,
- A.MgO,
- A.P2O5,
- A.JIANDU,
- to_char(A.ASSAYDATE, 'yyyy-MM-dd HH24:mi:ss') ASSAYDATE,
- decode(substr(STATIONCODE,1,1),'C','转炉','E','LF','F','RH','I','VD') STATIONCODE,
- SUBSTR(ASSAYTYPECODE,LENGTH(ASSAYTYPECODE)) EXAMINE_SEQ
- from (select t.*,
- case
- when nvl(SiO2, 0) <> 0 then
- trim(to_char(round(CaO / (SiO2), 3), '9990.000'))
- else
- ''
- end JIANDU
- from STL_CHEMELEMENT t
- where substr(t.checkno, length(t.checkno) - 1, 2) = '-4'
- and to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and
- ?
- union
- select t.*,
- case
- when nvl(SiO2, 0) <> 0 then
- trim(to_char(round(CaO / (SiO2), 3), '9990.000'))
- else
- ''
- end JIANDU
- from J#STL_CHEMELEMENT t
- where substr(t.checkno, length(t.checkno) - 1, 2) = '-4'
- and to_char(ASSAYDATE, 'yyyy-MM-dd') between ? and
- ? ) A
- order by A.ASSAYDATE
- ]]>
- </query>
-
- </queryMap>
|