This commit is contained in:
gongxh
2022-01-05 09:54:27 +08:00
parent a8edfef234
commit 64bd63a8d0
5 changed files with 27 additions and 7 deletions

View File

@@ -11,8 +11,9 @@ namespace NX.ERP.Model.Request
private string _UserName;
private string _mdPassword;
public string UserCode { get => _UserCode; set => _UserCode = value; }
public string UserName { get => _UserName; set => _UserName = value; }
public string Code { get => _UserCode; set => _UserCode = value; }
public string Name { get => _UserName; set => _UserName = value; }
[Newtonsoft.Json.JsonIgnore]
public string MdPassword { get => _mdPassword; set => _mdPassword = value; }
}
}

View File

@@ -234,7 +234,7 @@ namespace NX.ERP.U8.AP
if (user != null)
{
// headXml.setAttribute("cCheckMan", user.UserName);
headXml.setAttribute("cOperator", user.UserName);
headXml.setAttribute("cOperator", user.Name);
} else
{
// headXml.setAttribute("cCheckMan", ApVouch.UserCode);
@@ -251,7 +251,7 @@ namespace NX.ERP.U8.AP
headXml.setAttribute("cPerson", supplier.VenPPerson);
if (per != null)
{
headXml.setAttribute("cPersonName", per.UserName);
headXml.setAttribute("cPersonName", per.Name);
}
// headXml.setAttribute("cLink", "");
@@ -269,7 +269,7 @@ namespace NX.ERP.U8.AP
bodyXml.setAttribute("cPerson", supplier.VenPPerson);
if (per != null)
{
headXml.setAttribute("cPersonName", per.UserName);
headXml.setAttribute("cPersonName", per.Name);
}
bodyXml.setAttribute("cexch_name", "人民币");
bodyXml.setAttribute("iAmount", ApVouch.Amount);

View File

@@ -21,7 +21,7 @@ namespace NX.ERP.U8.User
{
using (var conn = U8LoginContext.Instance.Connection)
{
var sql = @" select cUser_Id as UserCode ,cUser_Name as UserName,cPassword as mdPassword from UFSystem..UA_User ";
var sql = @" select cUser_Id as Code ,cUser_Name as Name,cPassword as mdPassword from UFSystem..UA_User ";
if (!string.IsNullOrEmpty(strWhere))
{
sql += $" where {strWhere}";

View File

@@ -345,7 +345,7 @@ namespace NX.ERP.U8
}
else
{
if (!UiLogin.login("DP", this._userId, this._password, this._server, DateTime.Today.ToString("yyyy-MM-dd"), this._accid, Serial))
if (!UiLogin.login("DP", this._userId, this._password, this._server, DateTime.Today.AddDays(-20).ToString("yyyy-MM-dd"), this._accid, Serial))
{
throw new Exception(UiLogin.ErrDescript);
}

View File

@@ -26,7 +26,26 @@ namespace NX.ERP.WebAPi.Controllers.System
return _login.loginId;
}
/// <summary>
/// 获取用户
/// </summary>
/// <param name="UserId"></param>
/// <returns></returns>
[HttpGet]
[Route("api/System/GetUser")]
public Model.Request.User GetUser([FromUri] string UserId)
{
var userDal = new U8.User.UserDal();
return userDal.GetModel(UserId);
}
/// <summary>
///
/// </summary>
/// <param name="loginEntity"></param>
/// <returns></returns>
[HttpPost]
[Route("api/System/Login")]
public bool Login(LoginEntity loginEntity)