From c975ff6253fef1e619daa8e82670a8f9e13f721d Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期五, 18 十一月 2022 09:23:56 +0800
Subject: [PATCH] 设备保养项目导入接口修改
---
VueWebApi/DLL/DAL/LoginDAL.cs | 37 ++++++++++++++++---------------------
1 files changed, 16 insertions(+), 21 deletions(-)
diff --git a/VueWebApi/DLL/DAL/LoginDAL.cs b/VueWebApi/DLL/DAL/LoginDAL.cs
index eec617d..30c3d97 100644
--- a/VueWebApi/DLL/DAL/LoginDAL.cs
+++ b/VueWebApi/DLL/DAL/LoginDAL.cs
@@ -163,7 +163,7 @@
}
#endregion
-
+
#region[淇敼瀵嗙爜]
public static ToMessage UpdateUserPassword(string usercode, string username, string password, string newpassword)
@@ -280,6 +280,7 @@
cont = DapperHelper.SQL(sql, dynamicParams);
if (cont > 0)
{
+ redis.Remove("LoginUserID" + usertype + userid, 1); //鍒犻櫎redis
mes.code = "200";
mes.count = 0;
mes.Message = "鐧诲嚭鎴愬姛!";
@@ -305,37 +306,30 @@
#endregion
#region[App鐧诲綍鏌ヨ瀹夌伅鍛煎彨淇℃伅]
- public static ToMessage LoginAppAnDonMessage(int userid, string usercode, string username, string usertype)
+ public static ToMessage LoginAppAnDonMessage(string rid, string usercode, string username, string usertype)
{
var sql = "";
var dynamicParams = new DynamicParameters();
- RedisHelper redis = new RedisHelper();
try
{
sql = @"select B.eqp_code,E.name as eqp_name,B.wkshp_code,T.org_name as wkshp_name,
- A.tpye as typecode,D.name as typename,B.start_user,B.start_date
+ A.type as typecode,D.name as typename,B.start_user,B.start_date
from TAnDnMessagePush A
inner join TAnDon_Task_Info B on A.m_id=B.id
left join TEqpInfo E on B.eqp_code=E.code
left join TOrganization T on B.wkshp_code=T.org_code
- left join TAnDonType D on A.tpye=d.code
- where A.resp_user=@username and B.status='START' and T.description='W'";
- dynamicParams.Add("@username", username);
+ left join TAnDonType D on A.type=d.code
+ left join TUser U on A.resp_user=U.usercode
+ where A.resp_user=@usercode and B.status='START' and U.rid=@rid and T.description='W'";
+ dynamicParams.Add("@usercode", usercode);
+ dynamicParams.Add("@rid", rid);
var data = DapperHelper.selectdata(sql, dynamicParams);
- if (data.Rows.Count > 0)
- {
- mes.code = "200";
- mes.count = 0;
- mes.Message = "鏌ヨ鎴愬姛!";
- mes.data = data;
- }
- else
- {
- mes.code = "300";
- mes.count = 0;
- mes.Message = "鏌ヨ澶辫触!";
- mes.data = null;
- }
+
+ mes.code = "200";
+ mes.count = 0;
+ mes.Message = "鏌ヨ鎴愬姛!";
+ mes.data = data;
+
}
catch (Exception e)
{
@@ -347,5 +341,6 @@
return mes;
}
#endregion
+
}
}
\ No newline at end of file
--
Gitblit v1.9.3