yl
2022-11-21 b166c0f80252ab4e1af4136789cb976364b779b2
VueWebApi/DLL/DAL/LoginDAL.cs
@@ -1,6 +1,7 @@
using Dapper;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
@@ -19,6 +20,8 @@
        public static List<SqlParameter> listStr = new List<SqlParameter>(); //定义全局参数集合
        public static SqlParameter[] parameters; //定义全局SqlParameter参数数组
        public static string fileip = System.Configuration.ConfigurationManager.AppSettings["FileIP"];
        //获取企业配置Enterprise
        private static readonly string Enterprise = ConfigurationManager.AppSettings["Enterprise"];
        #region [登录查询]
        public static DataTable LoginSearch(string username, string password)
@@ -239,7 +242,7 @@
                cont = DapperHelper.SQL(sql, dynamicParams);
                if (cont > 0)
                {
                    redis.Remove("LoginUserID" + usertype + userid, 0); //删除redis
                    redis.Remove(Enterprise+"LoginUserID" + usertype + userid, 0); //删除redis
                    mes.code = "200";
                    mes.count = 0;
                    mes.Message = "登出成功!";
@@ -313,12 +316,12 @@
            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
                        left  join TAnDonType D on A.type=d.code
                        where A.resp_user=@username and B.status='START' and T.description='W'";
                dynamicParams.Add("@username", username);
                var data = DapperHelper.selectdata(sql, dynamicParams);