create or replace function SF_YS_ZJJSPARAMCZ(as_XTDM00 varchar2, as_MZZYBZ varchar2, ad_CZY000 number, ad_CZYKS0 number, ad_BRID00 number, ad_CZJE00 number, ad_ZJE000 number default 0, as_DKLSH0 varchar2 default '' ) return varchar2 is -- MODIFICATION HISTORY -- Person Date Comments -- dsm 2019.10.23 create for MZYS-20191018-002 -- dsm 2019.10.30 MZZJCZ_CZJE00-->MZZJCZ_CZJE for MZYS-20191030-002 -- dsm 2019.11.01 增加判断需不需要充值 YJ-20191101-001 -- dsm 2020.02.04 as_XTDM00=7时要判断停用金额 for MZYS-20191223-002 -- dsm 2020.04.14 增加as_DKLSH0 for MZYS-20200414-002 VRESULT varchar2(500); V_CZYXM0 BM_YGBM00.ZWXM00%type; V_BRID00 SF_BRXXB0.BRID00%type; V_ICKH00 IC_YHXX00.ICKH00%type; LS_DDCZYXM BM_YGBM00.ZWXM00%type; LS_DDCZY0 varchar2(10) ; LS_DDCZJE number(10,2); LS_ZYE000 SF_BRZHXX.ZYE000%type; begin if as_XTDM00='7' then select ZYE000+YXQFJE-TYJE00 into LS_ZYE000 from SF_BRZHXX where BRID00=ad_BRID00; if LS_ZYE000>=ad_ZJE000 then return '0'; end if; end if; select ZWXM00 into V_CZYXM0 from BM_YGBM00 where YGBH00=ad_CZY000; select trim(MC0000) into LS_DDCZY0 from BM_TYZD00 where ZDMC00='多点结算接口参数' and BH0000='MZZJCZ_CZY' and rownum=1; select to_number(trim(MC0000)) into LS_DDCZJE from BM_TYZD00 where ZDMC00='多点结算接口参数' and BH0000='MZZJCZ_CZJE' and rownum=1; select ZWXM00 into LS_DDCZYXM from BM_YGBM00 where YGBH00=LS_DDCZY0; select a.BRID00,a.ICKH00 into V_BRID00,V_ICKH00 from IC_YHXX00 a,BM_BRXXB0 b where b.BRID00=ad_BRID00 and a.BRID00=b.BRID00 and a.ZT0000='1'; VRESULT:='20016' ||'DD' ||''||as_MZZYBZ||'' ||''||LS_DDCZY0||'' ||''||LS_DDCZYXM||'' ||''||ad_CZYKS0||'' ||''||V_BRID00||'' ||''||0||'' ||''||V_ICKH00||'' ||'' ||'' ||'' ||''||ad_CZY000||'' ||''||V_CZYXM0||'' ||''||LS_DDCZJE||'' ||''||as_DKLSH0||'' ||'Y'; return VRESULT; exception when others then --PERRMSG:=substrb('执行多点结算充值SF_YS_ZJJSPARAMCZ错误!'||sqlerrm,1,200); VRESULT:=''; return VRESULT; end;