From 925394b1b7f61a2c2a15fdaa0ecd0763214ccda1 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期二, 30 五月 2023 18:01:29 +0800
Subject: [PATCH] 增加App报工、工序检验功能
---
VueWebApi/DLL/DAL/LoginDAL.cs | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/VueWebApi/DLL/DAL/LoginDAL.cs b/VueWebApi/DLL/DAL/LoginDAL.cs
index 234f067..3696164 100644
--- a/VueWebApi/DLL/DAL/LoginDAL.cs
+++ b/VueWebApi/DLL/DAL/LoginDAL.cs
@@ -28,7 +28,9 @@
{
//鎵цsql
- strProcName = "select * from [dbo].[TUser] where usercode=@username and password=@password and is_delete='0'";
+ strProcName = @"select * from [dbo].[TUser] U
+ left join TGroup G on U.usergroup_code = G.group_code
+ where U.usercode=@username and U.password=@password and U.is_delete='0'";
//鍒涘缓鍙傛暟
listStr.Add(new SqlParameter("@username", username));
listStr.Add(new SqlParameter("@password", password));
@@ -134,12 +136,13 @@
}).ToList();
for (int i = 0; i < data.Count; i++)
{
- sql = @"select distinct mu.right_code as code,mu.right_name as name,mu.right_seq,mu.is_delete as flag,imgurl
+ sql = @"select * from(
+ select distinct mu.right_code as code,mu.right_name as name,mu.right_seq,mu.is_delete as flag,imgurl
from TRight mu
inner join TRoleRightRelation rl on mu.right_code=rl.right_code
inner join TUserRoleRelation ro on rl.role_code=ro.role_code
where mu.type=@usertype and ro.user_code=@usercode and mu.parent_id=@paent_id
- order by mu.right_seq, mu.right_code";
+ ) as AA order by CAST(AA.right_seq AS DECIMAL) ASC,AA.code";
dynamicParams.Add("@usercode", usercode);
dynamicParams.Add("@usertype", usertype);
dynamicParams.Add("@paent_id", data[i].code);
--
Gitblit v1.9.3