diff --git a/NX.ERP.Model/Request/User.cs b/NX.ERP.Model/Request/User.cs
index 3c8a04f..2979a80 100644
--- a/NX.ERP.Model/Request/User.cs
+++ b/NX.ERP.Model/Request/User.cs
@@ -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; }
}
}
diff --git a/NX.ERP.U8/AP/APVouch.cs b/NX.ERP.U8/AP/APVouch.cs
index 9c0adc1..6d21863 100644
--- a/NX.ERP.U8/AP/APVouch.cs
+++ b/NX.ERP.U8/AP/APVouch.cs
@@ -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);
diff --git a/NX.ERP.U8/System/User.cs b/NX.ERP.U8/System/User.cs
index a48d4f5..fe1e2b1 100644
--- a/NX.ERP.U8/System/User.cs
+++ b/NX.ERP.U8/System/User.cs
@@ -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}";
diff --git a/NX.ERP.U8/U8LoginContext.cs b/NX.ERP.U8/U8LoginContext.cs
index 1ef58aa..35c1c2d 100644
--- a/NX.ERP.U8/U8LoginContext.cs
+++ b/NX.ERP.U8/U8LoginContext.cs
@@ -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);
}
diff --git a/NX.ERP.WebAPi/Controllers/System/SystemController.cs b/NX.ERP.WebAPi/Controllers/System/SystemController.cs
index 2e85604..107da91 100644
--- a/NX.ERP.WebAPi/Controllers/System/SystemController.cs
+++ b/NX.ERP.WebAPi/Controllers/System/SystemController.cs
@@ -26,7 +26,26 @@ namespace NX.ERP.WebAPi.Controllers.System
return _login.loginId;
}
+ ///
+ /// 获取用户
+ ///
+ ///
+ ///
+ [HttpGet]
+ [Route("api/System/GetUser")]
+ public Model.Request.User GetUser([FromUri] string UserId)
+ {
+ var userDal = new U8.User.UserDal();
+ return userDal.GetModel(UserId);
+ }
+
+
+ ///
+ ///
+ ///
+ ///
+ ///
[HttpPost]
[Route("api/System/Login")]
public bool Login(LoginEntity loginEntity)