SVN-Revision: r822
This commit is contained in:
cyf
2025-07-01 09:36:35 +00:00
parent 6e3e683317
commit 6d619955c6
4 changed files with 28 additions and 39 deletions
+16 -13
View File
@@ -206,19 +206,19 @@ namespace Lskj.Business.Impl
beforePass = SHAHelper.EncryptPassword(beforePass);
afterPass = SHAHelper.EncryptPassword(afterPass);
// 检查旧密码是否一致
if (!password.Equals(beforePass)) return 2;
sqlValue = string.Format("update P_EmployeeTab set password='{0}' where EmployeeId='{1}' select @@ROWCOUNT", afterPass, userId);
if (BaseImpl.HasExistsColumn("P_EmployeeTab", "p_emp_password"))
if (BaseImpl.HasExistsColumn("P_EmployeeTab", "p_emp_password"))
{
sqlValue = string.Format("update P_EmployeeTab set password='{0}',p_emp_password='{1}' where EmployeeId='{2}' select @@ROWCOUNT", afterPass, mdpassword, userId);
}
DataTable dt = SqlHelper.ExecuteDataTable(sqlValue);
int numberOfAffectedRows = dt != null && dt.Rows.Count > 0 ? int.Parse(dt.Rows[0][0] + "") : 0;
return numberOfAffectedRows;
@@ -447,7 +447,7 @@ namespace Lskj.Business.Impl
{
conditions = "and mestig=1";
}
string sqlValue = string.Format("select EmployeeId UserId,LoginAccount UserCode,EmployeeName UserName {1} from P_EmployeeTab WHERE sign=0 and UseFlag=1 {0} order by loginaccount", conditions, fields);
return SqlHelper.ExecuteDataTable(sqlValue);
@@ -612,14 +612,14 @@ namespace Lskj.Business.Impl
string countSql = string.Empty;
if (SystemInfo.Instance.BillCornerMark && HasExistsColumn("P_systemdlltab", "countSql") && HasExistsColumn("p_systembilltype", "countSql"))
{
countSqlconditions = string.Format(@"left join P_systemdlltab e on a.PurviewId=e.DllCoid
left join (
select a.menuid as mkid , e.typecode ,countSql
from p_formmenuconfigtab a
left join p_systembilltype e on a.PurviewId=e.typecode
where 1=1 {0}
)x on a.menuid=x.mkid ", string.IsNullOrWhiteSpace(SystemInfo.Instance.DocumentQuantityLimit) ? "and DllFileName in ('Lskj.PubBill.dll')": SystemInfo.Instance.DocumentQuantityLimit);
)x on a.menuid=x.mkid ", string.IsNullOrWhiteSpace(SystemInfo.Instance.DocumentQuantityLimit) ? "and DllFileName in ('Lskj.PubBill.dll')" : SystemInfo.Instance.DocumentQuantityLimit);
countSql = "(select (CASE isnull(e.countSql,'') WHEN '' THEN (x.countSql) ELSE(e.countSql)END )) as'countSql',";//如果e.countSql为空,就用x.countSql,否则还是e.countSql
}
else if (HasExistsColumn("P_systemdlltab", "countSql"))
@@ -1040,7 +1040,7 @@ namespace Lskj.Business.Impl
where LinkModeTag=1
order by grouptagid,ItemTagId ", ERPInfo.Instance.UserId);
}
return SqlHelper.ExecuteDataTable(sqlValue);
}
catch (Exception)
@@ -1174,11 +1174,14 @@ namespace Lskj.Business.Impl
{
try
{
if (HasExistsTable("P_MacAddressTable"))
if (SystemInfo.Instance.MacMandatoryJudgment)
{
DataTable table = SqlHelper.ExecuteDataTable(string.Format("select MacAddress from P_MacAddressTable where userid='{0}'", userId));
DataRow dataRow = table != null && table.Rows.Count > 0 ? table.Rows[0] : null;
if(SystemInfo.Instance.MacMandatoryJudgment&& dataRow==null) return false;
if (dataRow != null&&!string.IsNullOrWhiteSpace(dataRow["MacAddress"] + ""))
if (HasExistsTable("P_MacAddressTable"))
{
List<string> MacAddress = ((dataRow["MacAddress"] + "").Split(
DataTable table = SqlHelper.ExecuteDataTable(string.Format("select MacAddress from P_MacAddressTable where userid='{0}'", userId));
DataRow dataRow = table != null && table.Rows.Count > 0 ? table.Rows[0] : null;
if (dataRow == null) return false;
if (dataRow != null && !string.IsNullOrWhiteSpace(dataRow["MacAddress"] + ""))
{
List<string> MacAddress = ((dataRow["MacAddress"] + "").Split(',')).ToList();