1 create or replace procedure bb_quxzbmjdqzxfqk_ces(kssj in date, 2 jssj 3 wtsd2 varchar2,128);"> 4 tjjg out sys_refcursor) as 5 6 begin 7 delete from A_TJBB_quxzbmjdqzxfqk; 8 commit; 9 insert into A_TJBB_quxzbmjdqzxfqk 10 select jj.iidd,jj.isedit,jj.djjgbh,jj.cfxfjbz,jj.lmbz,jj.xfrs,jj.xfxs from visit_xfj jj,128);">11 hr_organization n where n.jglb='1200' and n.region_dm=wtsd2 and n.bh=jj.djjgbh and jj.djsj between kssj and jssj; 12 13 open tjjg for 14 15 16 select l.mc as mc,128);">17 count(1) as jianci,128);">18 sum(case when xf.xfxs100' then 1 else 19 200then xf.xfrs 20 when xf.xfxs in (300',303') 1 21 else 0 end end) as rci,128);">22 and xf.lmbz0'and xf.cfxfjbzend)as grlx,128);">23 1as lmx,128);">24 as cfgrlx,128);">25 as cflmx,128);">26 as xiaojie,128);">27 and xf.xfrs<=4 as c1lfcjjc,128);">28 as c1lfcjrc,128);">29 and( xf.xfrs>=5 49) as c5lfcjjc,128);">30 as c5lfcjrc,128);">31 50 499) as c50lfcjjc,128);">32 then xf.xfrs as c50lfcjrc,128);">33 500 as c500lfcjjc,128);">34 as c500lfcjrc,128);">35 as cf1lfcjjc,128);">36 as cf1lfcjrc,128);">37 as cf5lfcjjc,128);">38 as cf5lfcjrc,128);">39 as cf50lfcjjc,128);">40 as cf50lfcjrc,128);">41 as cf500lfcjjc,128);">42 as cf500lfcjrc,128);">43 as lxxiaojjc,128);">44 as lxxiaojrc,128);">45 in(') as grts,128);">46 as lmts,128);">47 48 as cfgrts,128);">49 50 as cflmts,128);">51 as xiaoji 52 53 from hr_organization l,A_TJBB_quxzbmjdqzxfqk xf where l.jglband l.region_dm500101and l.bh=xf.djjgbh group by l.mc; 54 55 end bb_quxzbmjdqzxfqk_ces;
————————————————————————————————————————————————————————————————————
4 isquxian 5 tjjg out GLOBALPKG.RCT1) 6 7 8 v_kssj1 :=kssj; 9 v_jssj1 :=jssj; 10 11 12 13 14 15 16 18 19 20 21 44 46 47 50 where l.region_dmand ((v_kssj1 is not null and j.adddatetime between v_kssj1 and v_jssj1) 51 or (v_kssj1 not nulll and 1=1)) and((isquxian and ion.dm = isquxian ) or (isquxian is 1 = 1)) and l.jglband 53 l.bhend bb_quxzbmjdqzxfqk_ces;