CREATE OR REPLACE FUNCTION SF_YK_GETRKYPSL( PYPNM00 number ) -- MODIFICATION HISTORY -- Person Date Comments --chenwen 2024.12.06 create 集采药品入库数量 YK13-20241204-003 return number is vRKSL00 number; begin select nvl(SUM(round(SLSL00*ZHL000/B.K2J000,3)),0) into vRKSL00 from yf_ypmxz0 A,BM_YD0000 B where A.YPNM00 = PYPNM00 and jzxz00='R' and a.YPNM00=b.YPNM00 and jzrq00>= to_char(sysdate,'yyyyMM'); return vRKSL00; end;