| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920 |
- <?xml version="1.0" encoding="UTF-8"?>
- <queryMap desc="中钢炼钢报表">
-
-
- <query id="FrmTerminusTept.Query" desc="炼钢厂终点温度按月统计" fetchSize="10">
- <![CDATA[
- select decode(substr(t.o, 5, 1), '0', '', '1', '1') || substr(t.o, 6, 1) || '月' ||
- decode(substr(t.o, 7, 1), '0', '', '1', '1', '2', '2', '3', '3') ||
- substr(t.o, 8, 1) || '日' opdate,
- t1.sumcount "11",
- t2.sumcount "12",
- t3.sumcount "13",
- t4.sumcount "14",
- t5.sumcount "15",
- t6.sumcount "21",
- t7.sumcount "22",
- t8.sumcount "23",
- t9.sumcount "24",
- t10.sumcount "25",
- t11.sumcount "31",
- t12.sumcount "32",
- t13.sumcount "33",
- t14.sumcount "34",
- t15.sumcount "35",
- t16.sumcount "41",
- t17.sumcount "42",
- t18.sumcount "43",
- t19.sumcount "44",
- t20.sumcount "45",
- '冶炼炉数' YLLS,
- '高温炉数' GWLS
- from ((select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t
- --甲班
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '01'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t1
- on t.o = t1.o
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '02'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t2
- on t.o = t2.o
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '03'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t3
- on t.o = t3.o
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '04'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t4
- on t.o = t4.o
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '05'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t5
- on t.o = t5.o
- --乙班
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '01'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t6
- on t.o = t6.o
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '02'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t7
- on t.o = t7.o
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '03'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t8
- on t.o = t8.o
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '04'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t9
- on t.o = t9.o
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '05'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t10
- on t.o = t10.o
- --丙班
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '01'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t11
- on t.o = t11.o
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '02'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t12
- on t.o = t12.o
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '03'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t13
- on t.o = t13.o
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '04'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t14
- on t.o = t14.o
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '05'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t15
- on t.o = t15.o
- --丁班
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '01'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t16
- on t.o = t16.o
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '02'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t17
- on t.o = t17.o
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '03'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t18
- on t.o = t18.o
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '04'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t19
- on t.o = t19.o
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '05'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymmdd')) t20
- on t.o = t20.o )
- where substr(t.o,1,6)=?
- order by t.o
- ]]>
- </query>
- <query id="FrmTerminusTeptCount.Query" desc="炼钢厂终点温度按月统计冶炼总数" fetchSize="10">
- <![CDATA[
- select decode(substr(t.o, 5, 1), '0', '', '1', '1') || substr(t.o, 6, 1) || '月' ||
- decode(substr(t.o, 7, 1), '0', '', '1', '1', '2', '2', '3', '3') ||
- substr(t.o, 8, 1) || '日' opdate,
- t1.sumcount "T11",
- t2.sumcount "T12",
- t3.sumcount "T13",
- t4.sumcount "T14",
- t5.sumcount "T15",
- t6.sumcount "T21",
- t7.sumcount "T22",
- t8.sumcount "T23",
- t9.sumcount "T24",
- t10.sumcount "T25",
- t11.sumcount "T31",
- t12.sumcount "T32",
- t13.sumcount "T33",
- t14.sumcount "T34",
- t15.sumcount "T35",
- t16.sumcount "T41",
- t17.sumcount "T42",
- t18.sumcount "T43",
- t19.sumcount "T44",
- t20.sumcount "T45"
- from ((select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
-
- group by to_char(optdate, 'yyyymmdd')) t
- --甲班
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '01'
-
- group by to_char(optdate, 'yyyymmdd')) t1 on t.o = t1.o left join
- (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '02'
-
- group by to_char(optdate, 'yyyymmdd')) t2 on t.o = t2.o left join
- (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '03'
-
- group by to_char(optdate, 'yyyymmdd')) t3 on t.o = t3.o left join
- (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '04'
-
- group by to_char(optdate, 'yyyymmdd')) t4 on t.o = t4.o left join
- (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '05'
-
- group by to_char(optdate, 'yyyymmdd')) t5 on t.o = t5.o
- --乙班
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '01'
-
- group by to_char(optdate, 'yyyymmdd')) t6 on t.o = t6.o left join
- (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '02'
-
- group by to_char(optdate, 'yyyymmdd')) t7 on t.o = t7.o left join
- (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '03'
-
- group by to_char(optdate, 'yyyymmdd')) t8 on t.o = t8.o left join
- (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '04'
-
- group by to_char(optdate, 'yyyymmdd')) t9 on t.o = t9.o left join
- (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '05'
-
- group by to_char(optdate, 'yyyymmdd')) t10 on t.o = t10.o
- --丙班
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '01'
-
- group by to_char(optdate, 'yyyymmdd')) t11 on
- t.o = t11.o left join
- (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '02'
-
- group by to_char(optdate, 'yyyymmdd')) t12 on t.o = t12.o left join
- (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '03'
-
- group by to_char(optdate, 'yyyymmdd')) t13 on t.o = t13.o left join
- (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '04'
-
- group by to_char(optdate, 'yyyymmdd')) t14 on t.o = t14.o left join
- (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '05'
-
- group by to_char(optdate, 'yyyymmdd')) t15 on t.o = t15.o
- --丁班
- left join (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '01'
-
- group by to_char(optdate, 'yyyymmdd')) t16 on
- t.o = t16.o left join
- (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '02'
-
- group by to_char(optdate, 'yyyymmdd')) t17 on t.o = t17.o left join
- (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '03'
-
- group by to_char(optdate, 'yyyymmdd')) t18 on t.o = t18.o left join
- (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '04'
-
- group by to_char(optdate, 'yyyymmdd')) t19 on t.o = t19.o left join
- (select to_char(optdate, 'yyyymmdd') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '05'
-
- group by to_char(optdate, 'yyyymmdd')) t20 on t.o = t20.o)
- where substr(t.o, 1, 6) = ?
- order by t.o
- ]]>
- </query>
- <query id="FrmTerminusTept.YearQuery" desc="炼钢厂终点温度按年统计" fetchSize="10">
- <![CDATA[
- select decode(substr(t.o, 5, 1), '0', '', '1', '1') || substr(t.o, 6, 1) || '月' opdate,
- t1.sumcount "11",
- t2.sumcount "12",
- t3.sumcount "13",
- t4.sumcount "14",
- t5.sumcount "15",
- t6.sumcount "21",
- t7.sumcount "22",
- t8.sumcount "23",
- t9.sumcount "24",
- t10.sumcount "25",
- t11.sumcount "31",
- t12.sumcount "32",
- t13.sumcount "33",
- t14.sumcount "34",
- t15.sumcount "35",
- t16.sumcount "41",
- t17.sumcount "42",
- t18.sumcount "43",
- t19.sumcount "44",
- t20.sumcount "45",
- '冶炼炉数' YLLS,
- '高温炉数' GWLS
- from ((select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t
- --甲班
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '01'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t1
- on t.o = t1.o
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '02'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t2
- on t.o = t2.o
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '03'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t3
- on t.o = t3.o
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '04'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t4
- on t.o = t4.o
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '05'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t5
- on t.o = t5.o
- --乙班
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '01'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t6
- on t.o = t6.o
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '02'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t7
- on t.o = t7.o
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '03'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t8
- on t.o = t8.o
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '04'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t9
- on t.o = t9.o
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '05'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t10
- on t.o = t10.o
- --丙班
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '01'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t11
- on t.o = t11.o
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '02'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t12
- on t.o = t12.o
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '03'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t13
- on t.o = t13.o
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '04'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t14
- on t.o = t14.o
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '05'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t15
- on t.o = t15.o
- --丁班
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '01'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t16
- on t.o = t16.o
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '02'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t17
- on t.o = t17.o
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '03'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t18
- on t.o = t18.o
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '04'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t19
- on t.o = t19.o
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select * from stl_bof_optinfo union select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '05'
- and TERMINUSTEPT > ?
- group by to_char(optdate, 'yyyymm')) t20
- on t.o = t20.o )
- where t.o between ? and ?
- order by t.o
- ]]>
- </query>
- <query id="FrmTerminusTeptCount.YearQuery" desc="炼钢厂终点温度按年统计冶炼总数" fetchSize="10">
- <![CDATA[
- select decode(substr(t.o, 5, 1), '0', '', '1', '1') || substr(t.o, 6, 1) || '月' opdate,
- t1.sumcount "T11",
- t2.sumcount "T12",
- t3.sumcount "T13",
- t4.sumcount "T14",
- t5.sumcount "T15",
- t6.sumcount "T21",
- t7.sumcount "T22",
- t8.sumcount "T23",
- t9.sumcount "T24",
- t10.sumcount "T25",
- t11.sumcount "T31",
- t12.sumcount "T32",
- t13.sumcount "T33",
- t14.sumcount "T34",
- t15.sumcount "T35",
- t16.sumcount "T41",
- t17.sumcount "T42",
- t18.sumcount "T43",
- t19.sumcount "T44",
- t20.sumcount "T45"
- from ((select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
-
- group by to_char(optdate, 'yyyymm')) t
- --甲班
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '01'
-
- group by to_char(optdate, 'yyyymm')) t1 on t.o = t1.o left join
- (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '02'
-
- group by to_char(optdate, 'yyyymm')) t2 on t.o = t2.o left join
- (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '03'
-
- group by to_char(optdate, 'yyyymm')) t3 on t.o = t3.o left join
- (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '04'
-
- group by to_char(optdate, 'yyyymm')) t4 on t.o = t4.o left join
- (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '1'
- and stationcode = '05'
-
- group by to_char(optdate, 'yyyymm')) t5 on t.o = t5.o
- --乙班
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '01'
-
- group by to_char(optdate, 'yyyymm')) t6 on t.o = t6.o left join
- (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '02'
-
- group by to_char(optdate, 'yyyymm')) t7 on t.o = t7.o left join
- (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '03'
-
- group by to_char(optdate, 'yyyymm')) t8 on t.o = t8.o left join
- (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '04'
-
- group by to_char(optdate, 'yyyymm')) t9 on t.o = t9.o left join
- (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '2'
- and stationcode = '05'
-
- group by to_char(optdate, 'yyyymm')) t10 on t.o = t10.o
- --丙班
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '01'
-
- group by to_char(optdate, 'yyyymm')) t11 on
- t.o = t11.o left join
- (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '02'
-
- group by to_char(optdate, 'yyyymm')) t12 on t.o = t12.o left join
- (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '03'
-
- group by to_char(optdate, 'yyyymm')) t13 on t.o = t13.o left join
- (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '04'
-
- group by to_char(optdate, 'yyyymm')) t14 on t.o = t14.o left join
- (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '3'
- and stationcode = '05'
-
- group by to_char(optdate, 'yyyymm')) t15 on t.o = t15.o
- --丁班
- left join (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '01'
-
- group by to_char(optdate, 'yyyymm')) t16 on
- t.o = t16.o left join
- (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '02'
-
- group by to_char(optdate, 'yyyymm')) t17 on t.o = t17.o left join
- (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '03'
-
- group by to_char(optdate, 'yyyymm')) t18 on t.o = t18.o left join
- (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '04'
-
- group by to_char(optdate, 'yyyymm')) t19 on t.o = t19.o left join
- (select to_char(optdate, 'yyyymm') o, count(1) sumcount
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo)
- where substr(shiftcode, 2, 1) = '4'
- and stationcode = '05'
-
- group by to_char(optdate, 'yyyymm')) t20 on t.o = t20.o)
- where t.o between ? and ?
- order by t.o
- ]]>
- </query>
-
- <query id="reportProMonitor.Query" desc="炼钢厂工艺监督原始记录查询" fetchSize="10">
- <![CDATA[
- select t1.heatno,
- t2.steel plansteel,
- to_char(t1.optdate,'yyyy-MM-dd hh24:mi') optdate,
- decode(substr(t1.shiftcode, 1, 1),
- '1',
- '白班',
- '2',
- '小夜',
- '3',
- '大夜') shiftcode1,
- decode(substr(t1.shiftcode, 2, 1),
- '1',
- '甲班',
- '2',
- '乙班',
- '3',
- '丙班',
- '4',
- '丁班') shiftcode2,
- t1.sage,
- t1.gage,
- t1.ironpotwgt,
- t1.wsteelwgt,
- t1.emolstltime,
- t1.terminustept,
- t1.pottemp,
- t3.c B_C,
- t3.si B_SI,
- t3.mn B_MN,
- t3.p B_P,
- t3.s B_S,
- t4.c GP_C,
- t4.si GP_SI,
- t4.mn GP_MN,
- t4.p GP_P,
- t4.s GP_S,
- t4.v GP_V,
- t5.staytime,
- t6.balestaytime,
- t6.stlwgt
- from (select *
- from stl_bof_optinfo
- union
- select * from j#stl_bof_optinfo) t1
-
- left join (select m1.steelcode, m1.steel from com_steel m1) t2
- on t1.plansteel = t2.steelcode
-
- left join (select m3.heatno, m3.c, m3.si, m3.mn, m3.p, m3.s
- from (select row_number() over(partition by m2.heatno order by m2.assaytypecode desc) xh,
- count(1) over(partition by m2.heatno) cnt,
- m2.heatno,
- m2.stationcode,
- m2.assaytypecode,
- m2.c,
- m2.si,
- m2.mn,
- m2.p,
- m2.s
- from (select *
- from stl_chemelement
- union
- select * from j#stl_chemelement) m2
- where substr(m2.stationcode, 1, 1) = 'C') m3
- where m3.xh = m3.cnt) t3
- on t1.heatno = t3.heatno
-
- left join (select m5.heatno, m5.c, m5.si, m5.mn, m5.p, m5.s,m5.v
- from (select row_number() over(partition by m4.heatno order by m4.assaytypecode desc) xh,
- count(1) over(partition by m4.heatno) cnt,
- m4.heatno,
- m4.stationcode,
- m4.assaytypecode,
- m4.c,
- m4.si,
- m4.mn,
- m4.p,
- m4.s,
- m4.v
- from (select *
- from stl_chemelement
- union
- select * from j#stl_chemelement) m4
- where substr(m4.stationcode, 1, 1) = 'G') m5
- where m5.xh = m5.cnt) t4
- on t1.heatno = t4.heatno
-
- left join (select *
- from stl_cas_optinfo
- union
- select * from j#stl_cas_optinfo) t5
- on t1.heatno = t5.heatno
-
- left join (select m6.heatno,
- ceil((m6.balestarttime - m6.balepftime) * 24 * 60 * 60) BALESTAYTIME,
- ceil(m6.PFBALEWGT - m6.BALELEAVEWGT) STLWGT
- from (select *
- from stl_ccm_optinfo
- union
- select * from j#stl_ccm_optinfo) m6) t6
- on t1.heatno = t6.heatno
- where to_char(t1.optdate,'yyyymmdd') between ? and ?
- order by t1.optdate
- ]]>
- </query>
- </queryMap>
|