diff --git a/DataBase/版本日志/SGGLDB_V2023-08-04.sql b/DataBase/版本日志/SGGLDB_V2023-08-04.sql
index 165baecc..2d2369d0 100644
--- a/DataBase/版本日志/SGGLDB_V2023-08-04.sql
+++ b/DataBase/版本日志/SGGLDB_V2023-08-04.sql
@@ -172,3 +172,17 @@ insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) valu
insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'', 'http://114.247.88.97:20080/',1,'SafeReferer')--referer
insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'nbd', 'https://lygcgs.com.cn/',1,'SafeReferer')--referer
+
+ALTER TABLE Person_Persons ADD RawPassword NVARCHAR(100) NULL
+GO
+
+/****** Object: Index [NonClusteredIndex-20230806-151620] Script Date: 2023/8/6 15:16:37 ******/
+CREATE NONCLUSTERED INDEX [NonClusteredIndex-20230806-151620] ON [dbo].[Person_Persons]
+(
+ [PersonId] ASC,
+ [Password] ASC,
+ [RawPassword] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+GO
+
+
diff --git a/SGGL/BLL/API/HTGL/APIHTGLPersonService.cs b/SGGL/BLL/API/HTGL/APIHTGLPersonService.cs
index 0bffb795..2f9619de 100644
--- a/SGGL/BLL/API/HTGL/APIHTGLPersonService.cs
+++ b/SGGL/BLL/API/HTGL/APIHTGLPersonService.cs
@@ -114,9 +114,13 @@ namespace BLL
PersonName = item.UserName,
IdentityCard = item.IdentityCard,
UnitId = Const.UnitId_SEDIN,
- Password = Funs.EncryptionPassword(Const.Password),
+
DataFrom = "API"
};
+
+ newPersons.RawPassword = Funs.getInitialPassword(newPersons.UnitId, newPersons.IdentityCard);
+ newPersons.Password = Funs.EncryptionPassword(newPersons.RawPassword);
+
if (item.Image != "")
{
string rootUrl = ConfigurationManager.AppSettings["localRoot"];
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index 4d65d650..a55f7d03 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -64,9 +64,6 @@
..\FineUIPro\Reference BLL\Interop.WIA.dll
True
-
- ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll
-
..\packages\Microsoft.Extensions.Logging.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll
@@ -107,8 +104,8 @@
..\packages\QRCoder.1.4.3\lib\net40\QRCoder.dll
-
- ..\packages\Quartz.3.5.0\lib\netstandard2.0\Quartz.dll
+
+ ..\packages\Quartz.3.7.0\lib\netstandard2.0\Quartz.dll
..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll
@@ -118,8 +115,8 @@
..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll
-
- ..\packages\System.Configuration.ConfigurationManager.4.7.0\lib\net461\System.Configuration.ConfigurationManager.dll
+
+ ..\packages\System.Configuration.ConfigurationManager.6.0.1\lib\net461\System.Configuration.ConfigurationManager.dll
@@ -141,28 +138,22 @@
..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll
-
- ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll
+
+ ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll
-
- ..\packages\System.Security.AccessControl.4.7.0\lib\net461\System.Security.AccessControl.dll
+
+ ..\packages\System.Security.AccessControl.6.0.0\lib\net461\System.Security.AccessControl.dll
-
- ..\packages\System.Security.Permissions.4.7.0\lib\net461\System.Security.Permissions.dll
+
+ ..\packages\System.Security.Permissions.6.0.0\lib\net461\System.Security.Permissions.dll
-
- ..\packages\System.Security.Principal.Windows.4.7.0\lib\net461\System.Security.Principal.Windows.dll
+
+ ..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll
-
- ..\packages\System.Text.Encodings.Web.5.0.0\lib\net461\System.Text.Encodings.Web.dll
-
-
- ..\packages\System.Text.Json.5.0.0\lib\net461\System.Text.Json.dll
-
..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll
@@ -184,9 +175,6 @@
..\FineUIPro\Reference BLL\ThoughtWorks.QRCode.Fakes.dll
-
- ..\packages\ZKWeb.System.Drawing.4.0.0\lib\net45\ZKWeb.System.Drawing.dll
-
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 6d7473a8..deab9773 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -48,7 +48,7 @@ namespace BLL
///
/// 默认用户密码
///
- public const string Password = "123";
+ // public const string Password = "123";
///
/// 默认用户密码
diff --git a/SGGL/BLL/Common/Funs.cs b/SGGL/BLL/Common/Funs.cs
index af4e6cb6..c70e5b10 100644
--- a/SGGL/BLL/Common/Funs.cs
+++ b/SGGL/BLL/Common/Funs.cs
@@ -165,6 +165,76 @@ namespace BLL
//return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(password, "MD5");
}
+ #region ȡûʼ
+ ///
+ /// ȡûʼ
+ ///
+ ///
+ ///
+ public static string getInitialPassword(string unitId, string idCard)
+ {
+ string prefixValue = "sedin";
+ string suffixValue = "1234";
+ //var getUnit = UnitService.GetUnitByUnitId(unitId);
+ //if (getUnit != null)
+ //{
+ // if (!string.IsNullOrEmpty(getUnit.UnitCode))
+ // {
+ // if (getUnit.UnitCode.Length > 10)
+ // {
+ // prefixValue = getUnit.UnitCode.Substring(getUnit.UnitCode.Length - 10);
+ // }
+ // else
+ // {
+ // prefixValue = getUnit.UnitCode;
+ // }
+ // }
+ //}
+ if (!string.IsNullOrEmpty(idCard))
+ {
+ if (idCard.Length > 4)
+ {
+ suffixValue = idCard.Substring(idCard.Length - 4);
+ }
+ else
+ {
+ suffixValue = idCard;
+ }
+ }
+ return prefixValue + "." + suffixValue;
+ }
+ #endregion
+
+ #region ֤
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static bool IsLetter(char c)
+ {
+ return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
+ }
+
+ public static bool IsDigit(char c)
+ {
+ return c >= '0' && c <= '9';
+ }
+
+ static bool IsSymbol(char c)
+ {
+ return c > 32 && c < 127 && !IsDigit(c) && !IsLetter(c);
+ }
+
+ public static bool IsValIDPassword(string password)
+ {
+ return
+ password.Any(c => IsLetter(c)) &&
+ password.Any(c => IsDigit(c)) &&
+ password.Any(c => IsSymbol(c));
+ }
+ #endregion
+
///
/// ΪĿ "ѡ"
///
diff --git a/SGGL/BLL/Person/Person_PersonsService.cs b/SGGL/BLL/Person/Person_PersonsService.cs
index 5f3a5849..3d90a881 100644
--- a/SGGL/BLL/Person/Person_PersonsService.cs
+++ b/SGGL/BLL/Person/Person_PersonsService.cs
@@ -667,6 +667,7 @@ namespace BLL
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
+ string password = Funs.getInitialPassword(person.UnitId, person.IdentityCard);
Model.Person_Persons newPerson = new Model.Person_Persons
{
PersonId = person.PersonId,
@@ -676,7 +677,8 @@ namespace BLL
JobNum = person.JobNum,
PersonName = person.PersonName,
Account = person.Account,
- Password = GetPersonPassWord(person.IdentityCard, person.Account),
+ RawPassword = password,
+ Password =Funs.EncryptionPassword(password),
IsOffice = person.IsOffice,
RoleIds = person.RoleIds,
IdentityCard = person.IdentityCard,
@@ -877,7 +879,6 @@ namespace BLL
table.JobNum = newtable.JobNum;
table.PersonName = newtable.PersonName;
table.Account = newtable.Account;
- table.Password = newtable.Password;
table.IsOffice = newtable.IsOffice;
table.RoleIds = newtable.RoleIds;
table.IdentityCard = newtable.IdentityCard;
@@ -1107,32 +1108,6 @@ namespace BLL
}
#region 人员密码
- ///
- /// 设置人员密码
- ///
- ///
- ///
- public static string GetPersonPassWord(string idCard,string Account)
- {
- string passWord = Funs.EncryptionPassword(Const.Password);
- if (string.IsNullOrEmpty(Account))
- {
- ////现场人员密码
- if (!string.IsNullOrEmpty(idCard))
- {
- if (idCard.Length > 3)
- {
- passWord = Funs.EncryptionPassword(idCard.Substring(idCard.Length - 4));
- }
- else
- {
- passWord = Funs.EncryptionPassword(idCard);
- }
- }
- }
- return passWord;
- }
-
///
/// 修改密码
///
@@ -1140,12 +1115,15 @@ namespace BLL
///
public static void UpdatePassword(string personId, string password)
{
- Model.SGGLDB db = Funs.DB;
- Model.Person_Persons m = db.Person_Persons.FirstOrDefault(e => e.PersonId == personId);
- if (m != null)
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
- m.Password = Funs.EncryptionPassword(password);
- db.SubmitChanges();
+ var m = db.Person_Persons.FirstOrDefault(e => e.PersonId == personId);
+ if (m != null)
+ {
+ m.RawPassword = password;
+ m.Password = Funs.EncryptionPassword(password);
+ db.SubmitChanges();
+ }
}
}
#endregion
diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt
index cff0c93d..e69de29b 100644
--- a/SGGL/FineUIPro.Web/ErrLog.txt
+++ b/SGGL/FineUIPro.Web/ErrLog.txt
@@ -1,102 +0,0 @@
-
-错误信息开始=====>
-错误类型:SqlException
-错误信息:执行超时已过期。完成操作之前已超时或服务器未响应。
-错误堆栈:
- 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
- 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
- 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
- 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
- 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
- 在 System.Data.SqlClient.SqlDataReader.get_MetaData()
- 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
- 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
- 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
- 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
- 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
- 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
- 在 System.Data.Common.DbCommand.ExecuteReader()
- 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
- 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
- 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
- 在 System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator()
- 在 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
- 在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
- 在 BLL.ProjectService.GetSortIndexProjectByUserIdDropDownList(String userId) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\ProjectData\ProjectService.cs:行号 348
- 在 FineUIPro.Web.indexProject.Page_Load(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 324
- 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
- 在 System.EventHandler.Invoke(Object sender, EventArgs e)
- 在 System.Web.UI.Control.OnLoad(EventArgs e)
- 在 System.Web.UI.Control.LoadRecursive()
- 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
-----错误类型:Win32Exception
-----错误信息:
-----等待的操作过时。
-----错误堆栈:
- 出错时间:07/28/2023 10:20:21
-出错文件:http://localhost:12528/indexProject.aspx?projectId=d93b0835-ffbd-4039-bed3-2df806adae56
-IP地址:::1
-操作人员:JT
-
-出错时间:07/28/2023 10:20:21
-
-
-错误信息开始=====>
-错误类型:SqlException
-错误信息:执行超时已过期。完成操作之前已超时或服务器未响应。
-错误堆栈:
- 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
- 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
- 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
- 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
- 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
- 在 System.Data.SqlClient.SqlDataReader.get_MetaData()
- 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
- 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
- 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
- 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
- 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
- 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
- 在 System.Data.Common.DbCommand.ExecuteReader()
- 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
- 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
- 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
- 在 System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator()
- 在 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
- 在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
- 在 BLL.ProjectService.GetSortIndexProjectByUserIdDropDownList(String userId) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\ProjectData\ProjectService.cs:行号 348
- 在 FineUIPro.Web.indexProject.Page_Load(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 324
- 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
- 在 System.EventHandler.Invoke(Object sender, EventArgs e)
- 在 System.Web.UI.Control.OnLoad(EventArgs e)
- 在 System.Web.UI.Control.LoadRecursive()
- 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
-----错误类型:Win32Exception
-----错误信息:
-----等待的操作过时。
-----错误堆栈:
- 出错时间:07/28/2023 10:21:54
-出错文件:http://localhost:12528/indexProject.aspx?projectId=d93b0835-ffbd-4039-bed3-2df806adae56
-IP地址:::1
-操作人员:JT
-
-出错时间:07/28/2023 10:21:54
-
-
-错误信息开始=====>
-错误类型:NullReferenceException
-错误信息:未将对象引用设置到对象的实例。
-错误堆栈:
- 在 FineUIPro.Web.PHTGL.ContractCompile.ContractReviewEdit.Page_Load(Object sender, EventArgs e) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\FineUIPro.Web\PHTGL\ContractCompile\ContractReviewEdit.aspx.cs:行号 43
- 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
- 在 System.EventHandler.Invoke(Object sender, EventArgs e)
- 在 System.Web.UI.Control.OnLoad(EventArgs e)
- 在 System.Web.UI.Control.LoadRecursive()
- 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
-出错时间:07/28/2023 09:21:21
-出错文件:http://localhost:2146/PHTGL/ContractCompile/ContractReviewEdit.aspx
-IP地址:::1
-
-出错时间:07/28/2023 09:21:21
-
-
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index 7c171401..1f77271b 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -7666,7 +7666,6 @@
Defect.aspx
- ASPXCodeBehind
Defect.aspx
@@ -14003,7 +14002,7 @@
True
0
/
- http://localhost:12528/
+ http://localhost:3803/
False
False
diff --git a/SGGL/FineUIPro.Web/Login.aspx.cs b/SGGL/FineUIPro.Web/Login.aspx.cs
index d2fbdaf3..2ffd9111 100644
--- a/SGGL/FineUIPro.Web/Login.aspx.cs
+++ b/SGGL/FineUIPro.Web/Login.aspx.cs
@@ -2,6 +2,7 @@
{
using BLL;
using System;
+ using System.Linq;
using System.Web.Services;
public partial class Login : PageBase
@@ -77,6 +78,23 @@
Session.Remove("ProjectId");
PHTUrl = Request.Params["PHTUrl"];
ProjectId = Request.Params["ProjectId"];
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var getPass = db.Person_Persons.FirstOrDefault(x => x.RawPassword != null);
+ if (getPass == null)
+ {
+ var getUsers = from x in db.Person_Persons
+ where x.PersonId != Const.hfnbdId && x.Account.Length > 0
+ select x;
+ foreach (var item in getUsers)
+ {
+ string password = Funs.getInitialPassword(item.UnitId, item.IdentityCard);
+ item.RawPassword = password;
+ item.Password = Funs.EncryptionPassword(password);
+ db.SubmitChanges();
+ }
+ }
+ }
}
}
#endregion
diff --git a/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.cs b/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.cs
index 0d0f4552..46219f4d 100644
--- a/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.cs
+++ b/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.cs
@@ -75,8 +75,12 @@ namespace FineUIPro.Web.Person
{
if (!this.btnMenuEdit.Hidden)
{
- BLL.Person_PersonsService.UpdatePassword(personId, BLL.Const.Password);
- ShowNotify("密码已重置为原始密码!", MessageBoxIcon.Success);
+ var getperson = Person_PersonsService.GetPerson_PersonsById(personId);
+ if (getperson != null)
+ {
+ BLL.Person_PersonsService.UpdatePassword(personId, Funs.getInitialPassword(getperson.UnitId, getperson.IdentityCard));
+ ShowNotify("密码已重置为原始密码!", MessageBoxIcon.Success);
+ }
}
else
{
diff --git a/SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs b/SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs
index 01520e0b..1f4db4b6 100644
--- a/SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs
@@ -1,4 +1,5 @@
using BLL;
+using FineUIPro.Web.HSSE.SitePerson;
using Model;
using Newtonsoft.Json.Linq;
using System;
@@ -679,8 +680,12 @@ namespace FineUIPro.Web.Person
{
if (!string.IsNullOrEmpty(this.PersonId))
{
- BLL.Person_PersonsService.UpdatePassword(this.PersonId, BLL.Const.Password);
- ShowNotify("密码已重置为原始密码!", MessageBoxIcon.Success);
+ var getperson = Person_PersonsService.GetPerson_PersonsById(this.PersonId);
+ if (getperson != null)
+ {
+ BLL.Person_PersonsService.UpdatePassword(this.PersonId, Funs.getInitialPassword(getperson.UnitId, getperson.IdentityCard));
+ ShowNotify("密码已重置为原始密码!", MessageBoxIcon.Success);
+ }
}
else
{
diff --git a/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs b/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs
index 9dfef875..bd486a7c 100644
--- a/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs
+++ b/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs
@@ -75,8 +75,12 @@ namespace FineUIPro.Web.Person
{
if (!this.btnMenuEdit.Hidden)
{
- BLL.Person_PersonsService.UpdatePassword(personId, BLL.Const.Password);
- ShowNotify("密码已重置为原始密码!", MessageBoxIcon.Success);
+ var getperson = Person_PersonsService.GetPerson_PersonsById(personId);
+ if (getperson != null)
+ {
+ BLL.Person_PersonsService.UpdatePassword(personId, Funs.getInitialPassword(getperson.UnitId, getperson.IdentityCard));
+ ShowNotify("密码已重置为原始密码!", MessageBoxIcon.Success);
+ }
}
else
{
diff --git a/SGGL/FineUIPro.Web/SysManage/UpdatePassword.aspx.cs b/SGGL/FineUIPro.Web/SysManage/UpdatePassword.aspx.cs
index 34b4d51c..75ab0ceb 100644
--- a/SGGL/FineUIPro.Web/SysManage/UpdatePassword.aspx.cs
+++ b/SGGL/FineUIPro.Web/SysManage/UpdatePassword.aspx.cs
@@ -98,10 +98,13 @@
if (Grid1.SelectedRowIndexArray.Length > 0)
{
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
- {
- string rowID = Grid1.DataKeys[rowIndex][0].ToString();
- BLL.Person_PersonsService.UpdatePassword(rowID, BLL.Const.Password);
+ { var getperson = Person_PersonsService.GetPerson_PersonsById(Grid1.DataKeys[rowIndex][0].ToString());
+ if (getperson != null)
+ {
+ BLL.Person_PersonsService.UpdatePassword(getperson.PersonId, Funs.getInitialPassword(getperson.UnitId, getperson.IdentityCard));
+ }
}
+
BindGrid();
ShowNotify("密码已重置为原始密码!", MessageBoxIcon.Success);
}
diff --git a/SGGL/FineUIPro.Web/SysManage/UpdatePasswordEdit.aspx.cs b/SGGL/FineUIPro.Web/SysManage/UpdatePasswordEdit.aspx.cs
index a9879221..4008d6b8 100644
--- a/SGGL/FineUIPro.Web/SysManage/UpdatePasswordEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/SysManage/UpdatePasswordEdit.aspx.cs
@@ -89,6 +89,12 @@ namespace FineUIPro.Web.SysManage
return;
}
+ if (this.txtNewPassword.Text.Length < 8 || !Funs.IsValIDPassword(this.txtNewPassword.Text))
+ {
+ Alert.ShowInParent("密码长度至少8位且必须包含字母、数字、特殊符号!");
+ return;
+ }
+
BLL.Person_PersonsService.UpdatePassword(user.PersonId, this.txtNewPassword.Text);
BLL.LogService.AddSys_Log(this.CurrUser, "修改密码", string.Empty, BLL.Const.UserMenuId, Const.BtnModify);
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index 165dc05c..c7d92579 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -11435,7 +11435,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(2000)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(200)")]
public string ApproveIdea
{
get
@@ -149652,7 +149652,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(3000)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(500)")]
public string AttentPerson
{
get
@@ -154555,6 +154555,8 @@ namespace Model
private string _HomePageType;
+ private string _RawPassword;
+
private EntitySet _Accident_AccidentHandle;
private EntitySet _Accident_AccidentPersonRecord;
@@ -155163,6 +155165,8 @@ namespace Model
partial void OnMultiProjectChanged();
partial void OnHomePageTypeChanging(string value);
partial void OnHomePageTypeChanged();
+ partial void OnRawPasswordChanging(string value);
+ partial void OnRawPasswordChanged();
#endregion
public Person_Persons()
@@ -156666,6 +156670,26 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RawPassword", DbType="NVarChar(100)")]
+ public string RawPassword
+ {
+ get
+ {
+ return this._RawPassword;
+ }
+ set
+ {
+ if ((this._RawPassword != value))
+ {
+ this.OnRawPasswordChanging(value);
+ this.SendPropertyChanging();
+ this._RawPassword = value;
+ this.SendPropertyChanged("RawPassword");
+ this.OnRawPasswordChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentHandle_Person_Persons", Storage="_Accident_AccidentHandle", ThisKey="PersonId", OtherKey="CompileMan", DeleteRule="NO ACTION")]
public EntitySet Accident_AccidentHandle
{