SVN r1124

SVN-Revision: r1124
This commit is contained in:
cyf
2026-02-25 06:51:07 +00:00
parent fcf7cf8d16
commit c7b4bbb05f
2 changed files with 55 additions and 23 deletions
+7 -23
View File
@@ -113,6 +113,10 @@ namespace Lskj.Util
/// </summary>
private static readonly string _userCode_key = "{lserpUserCode}";
/// <summary>
/// P_EmployeeTab表LoginAccount 固定字段(UserCode)
/// </summary>
private static readonly string _loginaccount_key = "{loginaccount}";
/// <summary>
/// 账套 固定字段
/// </summary>
private static readonly string _accountBook = "{lserpAccountBook}";
@@ -234,10 +238,11 @@ namespace Lskj.Util
.Replace(_className_key, ERPInfo.Instance.ClassName + "", true)
.Replace(_logintype, "0", true)
.Replace(_userCode_key, ERPInfo.Instance.LoginAccount + "", true)
.Replace(_loginaccount_key, ERPInfo.Instance.LoginAccount + "", true)
.Replace(_accountBook, ERPInfo.Instance.AccountBook + "", true)
.Replace(_loginUserLinkPhone_key, ERPInfo.Instance.UserLinkPhone + "", true)
.Replace(_mrpTag_key, ERPInfo.Instance.MrpTag + "", true)
.Replace(_macAddressy, ERPInfo.Instance.MacAddress + "", true); ;
.Replace(_macAddressy, ERPInfo.Instance.MacAddress + "", true);
}
/// <summary>
@@ -797,25 +802,4 @@ namespace Lskj.Util
/// <param name="iPersonnelCustomerId">客户标识</param>
/// <param name="iPersonnelPrivateKey">私钥</param>
/// <returns>System.String.</returns>
public static string ReplaceIPersonnel(string defaultValue, string iPersonnelAllowInformation, string iPersonnelCustomerId, string iPersonnelPrivateKey)
{
if (defaultValue.Contains(_iPersonnelAllowInformation) || defaultValue.Contains(_iPersonnelEncryptedMessage))
{
//替换许可
defaultValue = defaultValue.Replace(_iPersonnelAllowInformation, iPersonnelAllowInformation);
//替换加密的签名信息
TimeSpan ts = DateTime.Now.ToUniversalTime() - new DateTime(1970, 1, 1);
long time = (long)ts.TotalMilliseconds;//当前时间的时间戳
string EncryptedMessage = string.Format("company_id={0}&mobile_no={1}&timestamp={2}", iPersonnelCustomerId, ERPInfo.Instance.UserLinkPhone, time);
string value = Lskj.Util.EncryptByPrivateKey.encryptByPrivateKey(EncryptedMessage, iPersonnelPrivateKey);
defaultValue = defaultValue.Replace(_iPersonnelEncryptedMessage, value);
}
return defaultValue;
}
}
}
public static string ReplaceIPersonnel(string defaultValue, string iPersonnelAllowInformation, stri