22,300
社区成员




create procedure Web_Login
(vcUserName varchar2(50),
vcPassword varchar2(20),
vcCustType varchar2(50)='普通用户')
is
begin
vcPasswordCheck varchar2(20);
vcCustNO varchar2(20);
if vcCustType='普通用户' then
begin
select vcCustNO into vcCustNO,
vcPsw into vcPasswordCheck
from Boss_Custom a
inner join BOSS_Associate b on a.vcCustNO=b.vcCustomNO and b.vcLink=vcUserName
if vcCustNO is null then
begin
select vcTel into vcCustNO,
vc170Psw into vcPasswordCheck
from Jfgl_UserInfo
where vcTel=vcUserName
if vcCustNO is null then
select vcUserID into vcCustNO,
vcPsw into vcPasswordCheck
from BBN_UserInfo
where vcUserID=vcUserName
end if;
if vcCustNO is null then
select vcDoorNo into vcCustNO,
vcPsw into vcPasswordCheck
from DTV_UserInfo
where vcDoorNo=vcUserName
end if;
end if;
end;
else
begin
if vcCustType='单位用户' then
begin
select a.vcCustNO into vcCustNO,
a.vcPsw into vcPasswordCheck
from BOSS_Custom a
inner join jfgl_custinfo b on a.vcCustNO=b.vcAccNo and a.vcCustType='单位用户' and b.vcDeptNo=vcUserName
end;
end if;
if vcUserName is not null and vcPassword is not null and vcPassword=vcPasswordCheck then
Begin
select '1' "nRes",vcCustNO "vcCustomNO" from dual
End;
Else
Begin
select '-1' "nRes",'' "vcCustomNO" from dual
End;
end if;
end;
end;
[/quote]
虽然还是不行,但是非常感谢[/quote]
还是报哪个错吗[/quote]
反正有不少的错误,我改改的话就好点,不过还是那错误[/quote]
试试这个:
create procedure Web_Login
(vcUserName varchar2(50),
vcPassword varchar2(20),
vcCustType varchar2(50)='普通用户')
is
begin
vcPasswordCheck varchar2(20);
vcCustNO varchar2(20);
if vcCustType='普通用户' then
select vcCustNO into vcCustNO,
vcPsw into vcPasswordCheck
from Boss_Custom a
inner join BOSS_Associate b on a.vcCustNO=b.vcCustomNO and b.vcLink=vcUserName
if vcCustNO is null then
select vcTel into vcCustNO,
vc170Psw into vcPasswordCheck
from Jfgl_UserInfo
where vcTel=vcUserName
if vcCustNO is null then
select vcUserID into vcCustNO,
vcPsw into vcPasswordCheck
from BBN_UserInfo
where vcUserID=vcUserName
end if;
if vcCustNO is null then
select vcDoorNo into vcCustNO,
vcPsw into vcPasswordCheck
from DTV_UserInfo
where vcDoorNo=vcUserName
end if;
end if;
else
if vcCustType='单位用户' then
select a.vcCustNO into vcCustNO,
a.vcPsw into vcPasswordCheck
from BOSS_Custom a
inner join jfgl_custinfo b on a.vcCustNO=b.vcAccNo and a.vcCustType='单位用户' and b.vcDeptNo=vcUserName
end if;
if vcUserName is not null and vcPassword is not null and vcPassword=vcPasswordCheck then
select '1' "nRes",vcCustNO "vcCustomNO" from dual
Else
select '-1' "nRes",'' "vcCustomNO" from dual
end if;
end if;
end;
create procedure Web_Login
(vcUserName varchar2(50),
vcPassword varchar2(20),
vcCustType varchar2(50)='普通用户')
is
begin
vcPasswordCheck varchar2(20);
vcCustNO varchar2(20);
if vcCustType='普通用户' then
begin
select vcCustNO into vcCustNO,
vcPsw into vcPasswordCheck
from Boss_Custom a
inner join BOSS_Associate b on a.vcCustNO=b.vcCustomNO and b.vcLink=vcUserName
if vcCustNO is null then
begin
select vcTel into vcCustNO,
vc170Psw into vcPasswordCheck
from Jfgl_UserInfo
where vcTel=vcUserName
if vcCustNO is null then
select vcUserID into vcCustNO,
vcPsw into vcPasswordCheck
from BBN_UserInfo
where vcUserID=vcUserName
end if;
if vcCustNO is null then
select vcDoorNo into vcCustNO,
vcPsw into vcPasswordCheck
from DTV_UserInfo
where vcDoorNo=vcUserName
end if;
end if;
end;
else
begin
if vcCustType='单位用户' then
begin
select a.vcCustNO into vcCustNO,
a.vcPsw into vcPasswordCheck
from BOSS_Custom a
inner join jfgl_custinfo b on a.vcCustNO=b.vcAccNo and a.vcCustType='单位用户' and b.vcDeptNo=vcUserName
end;
end if;
if vcUserName is not null and vcPassword is not null and vcPassword=vcPasswordCheck then
Begin
select '1' "nRes",vcCustNO "vcCustomNO" from dual
End;
Else
Begin
select '-1' "nRes",'' "vcCustomNO" from dual
End;
end if;
end;
end;
[/quote]
虽然还是不行,但是非常感谢[/quote]
还是报哪个错吗[/quote]
反正有不少的错误,我改改的话就好点,不过还是那错误create procedure Web_Login
(vcUserName varchar2(50),
vcPassword varchar2(20),
vcCustType varchar2(50)='普通用户')
is
begin
vcPasswordCheck varchar2(20);
vcCustNO varchar2(20);
if vcCustType='普通用户' then
begin
select vcCustNO into vcCustNO,
vcPsw into vcPasswordCheck
from Boss_Custom a
inner join BOSS_Associate b on a.vcCustNO=b.vcCustomNO and b.vcLink=vcUserName
if vcCustNO is null then
begin
select vcTel into vcCustNO,
vc170Psw into vcPasswordCheck
from Jfgl_UserInfo
where vcTel=vcUserName
if vcCustNO is null then
select vcUserID into vcCustNO,
vcPsw into vcPasswordCheck
from BBN_UserInfo
where vcUserID=vcUserName
end if;
if vcCustNO is null then
select vcDoorNo into vcCustNO,
vcPsw into vcPasswordCheck
from DTV_UserInfo
where vcDoorNo=vcUserName
end if;
end if;
end;
else
begin
if vcCustType='单位用户' then
begin
select a.vcCustNO into vcCustNO,
a.vcPsw into vcPasswordCheck
from BOSS_Custom a
inner join jfgl_custinfo b on a.vcCustNO=b.vcAccNo and a.vcCustType='单位用户' and b.vcDeptNo=vcUserName
end;
end if;
if vcUserName is not null and vcPassword is not null and vcPassword=vcPasswordCheck then
Begin
select '1' "nRes",vcCustNO "vcCustomNO" from dual
End;
Else
Begin
select '-1' "nRes",'' "vcCustomNO" from dual
End;
end if;
end;
end;
[/quote]
虽然还是不行,但是非常感谢[/quote]
还是报哪个错吗create procedure Web_Login
(vcUserName varchar2(50),
vcPassword varchar2(20),
vcCustType varchar2(50)='普通用户')
is
begin
vcPasswordCheck varchar2(20);
vcCustNO varchar2(20);
if vcCustType='普通用户' then
begin
select vcCustNO into vcCustNO,
vcPsw into vcPasswordCheck
from Boss_Custom a
inner join BOSS_Associate b on a.vcCustNO=b.vcCustomNO and b.vcLink=vcUserName
if vcCustNO is null then
begin
select vcTel into vcCustNO,
vc170Psw into vcPasswordCheck
from Jfgl_UserInfo
where vcTel=vcUserName
if vcCustNO is null then
select vcUserID into vcCustNO,
vcPsw into vcPasswordCheck
from BBN_UserInfo
where vcUserID=vcUserName
end if;
if vcCustNO is null then
select vcDoorNo into vcCustNO,
vcPsw into vcPasswordCheck
from DTV_UserInfo
where vcDoorNo=vcUserName
end if;
end if;
end;
else
begin
if vcCustType='单位用户' then
begin
select a.vcCustNO into vcCustNO,
a.vcPsw into vcPasswordCheck
from BOSS_Custom a
inner join jfgl_custinfo b on a.vcCustNO=b.vcAccNo and a.vcCustType='单位用户' and b.vcDeptNo=vcUserName
end;
end if;
if vcUserName is not null and vcPassword is not null and vcPassword=vcPasswordCheck then
Begin
select '1' "nRes",vcCustNO "vcCustomNO" from dual
End;
Else
Begin
select '-1' "nRes",'' "vcCustomNO" from dual
End;
end if;
end;
end;
[/quote]
虽然还是不行,但是非常感谢create procedure Web_Login
(vcUserName varchar2(50),
vcPassword varchar2(20),
vcCustType varchar2(50)='普通用户')
is
begin
vcPasswordCheck varchar2(20);
vcCustNO varchar2(20);
if vcCustType='普通用户' then
begin
select vcCustNO into vcCustNO,
vcPsw into vcPasswordCheck
from Boss_Custom a
inner join BOSS_Associate b on a.vcCustNO=b.vcCustomNO and b.vcLink=vcUserName
if vcCustNO is null then
begin
select vcTel into vcCustNO,
vc170Psw into vcPasswordCheck
from Jfgl_UserInfo
where vcTel=vcUserName
if vcCustNO is null then
select vcUserID into vcCustNO,
vcPsw into vcPasswordCheck
from BBN_UserInfo
where vcUserID=vcUserName
end if;
if vcCustNO is null then
select vcDoorNo into vcCustNO,
vcPsw into vcPasswordCheck
from DTV_UserInfo
where vcDoorNo=vcUserName
end if;
end if;
end;
else
begin
if vcCustType='单位用户' then
begin
select a.vcCustNO into vcCustNO,
a.vcPsw into vcPasswordCheck
from BOSS_Custom a
inner join jfgl_custinfo b on a.vcCustNO=b.vcAccNo and a.vcCustType='单位用户' and b.vcDeptNo=vcUserName
end;
end if;
if vcUserName is not null and vcPassword is not null and vcPassword=vcPasswordCheck then
Begin
select '1' "nRes",vcCustNO "vcCustomNO" from dual
End;
Else
Begin
select '-1' "nRes",'' "vcCustomNO" from dual
End;
end if;
end;
end;
create procedure Web_Login
(vcUserName varchar2(50),
vcPassword varchar2(20),
vcCustType varchar2(50)='普通用户')
is
begin
vcPasswordCheck varchar2(20);
vcCustNO varchar2(20);
if vcCustType='普通用户' then
begin
select vcCustNO into vcCustNO,
vcPsw into vcPasswordCheck
from Boss_Custom a
inner join BOSS_Associate b on a.vcCustNO=b.vcCustomNO and b.vcLink=vcUserName
if vcCustNO is null then
begin
select vcTel into vcCustNO,
vc170Psw into vcPasswordCheck
from Jfgl_UserInfo
where vcTel=vcUserName
if vcCustNO is null then
select vcUserID into vcCustNO,
vcPsw into vcPasswordCheck
from BBN_UserInfo
where vcUserID=vcUserName
end if;
if vcCustNO is null then
select vcDoorNo into vcCustNO,
vcPsw into vcPasswordCheck
from DTV_UserInfo
where vcDoorNo=@vcUserName
end if;
end if;
end;
else
begin
if vcCustType='单位用户' then
begin
select a.vcCustNO into vcCustNO,
a.vcPsw into vcPasswordCheck
from BOSS_Custom a
inner join jfgl_custinfo b on a.vcCustNO=b.vcAccNo and a.vcCustType='单位用户' and b.vcDeptNo=vcUserName
end;
end if;
if vcUserName is not null and vcPassword is not null and vcPassword=vcPasswordCheck then
Begin
select '1' "nRes",vcCustNO "vcCustomNO" from dual
End;
Else
Begin
select '-1' "nRes",'' "vcCustomNO" from dual
End;
end if;
end;
end;
create procedure Web_Login
(vcUserName varchar2(50),
vcPassword varchar2(20),
vcCustType varchar2(50)='普通用户')
is
begin
vcPasswordCheck varchar2(20);
vcCustNO varchar2(20);
if vcCustType='普通用户' then
begin
select vcCustNO into vcCustNO,
vcPsw into vcPasswordCheck
from Boss_Custom a
inner join BOSS_Associate b on a.vcCustNO=b.vcCustomNO and b.vcLink=vcUserName
if vcCustNO is null then
begin
select vcTel into vcCustNO,
vc170Psw into vcPasswordCheck
from Jfgl_UserInfo
where vcTel=vcUserName
if vcCustNO is null then
select vcUserID into vcCustNO,
vcPsw into vcPasswordCheck
from BBN_UserInfo
where vcUserID=vcUserName
end if;
if vcCustNO is null then
select vcDoorNo into vcCustNO,
vcPsw into vcPasswordCheck
from DTV_UserInfo
where vcDoorNo=@vcUserName
end if;
end;
end if;
end;
else
if vcCustType='单位用户' then
select a.vcCustNO into vcCustNO,
a.vcPsw into vcPasswordCheck
from BOSS_Custom a
inner join jfgl_custinfo b on a.vcCustNO=b.vcAccNo and a.vcCustType='单位用户' and b.vcDeptNo=vcUserName
end if;
if vcUserName is not null and vcPassword is not null and vcPassword=vcPasswordCheck then
Begin
select '1' "nRes",vcCustNO "vcCustomNO" from dual
End
Else
Begin
select '-1' "nRes",'' "vcCustomNO" from dual
End
end if;
end;