修改AP
This commit is contained in:
@@ -80,6 +80,7 @@
|
|||||||
<Compile Include="Request\PurchasesumRequest.cs" />
|
<Compile Include="Request\PurchasesumRequest.cs" />
|
||||||
<Compile Include="Request\PoOrderRequest.cs" />
|
<Compile Include="Request\PoOrderRequest.cs" />
|
||||||
<Compile Include="Request\SaleinvRequest.cs" />
|
<Compile Include="Request\SaleinvRequest.cs" />
|
||||||
|
<Compile Include="Request\User.cs" />
|
||||||
<Compile Include="Request\VouchererrorRequest.cs" />
|
<Compile Include="Request\VouchererrorRequest.cs" />
|
||||||
<Compile Include="Request\SnOrderRequest.cs" />
|
<Compile Include="Request\SnOrderRequest.cs" />
|
||||||
<Compile Include="Request\SaleOrderRequest.cs" />
|
<Compile Include="Request\SaleOrderRequest.cs" />
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ namespace NX.ERP.Model.Request
|
|||||||
public string Digest { get; set; }
|
public string Digest { get; set; }
|
||||||
|
|
||||||
public DateTime Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
|
public string UserCode { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
16
NX.ERP.Model/Request/User.cs
Normal file
16
NX.ERP.Model/Request/User.cs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace NX.ERP.Model.Request
|
||||||
|
{
|
||||||
|
public class User
|
||||||
|
{
|
||||||
|
private string _UserCode;
|
||||||
|
private string _UserName;
|
||||||
|
|
||||||
|
public string UserCode { get => _UserCode; set => _UserCode = value; }
|
||||||
|
public string UserName { get => _UserName; set => _UserName = value; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,5 +28,10 @@ namespace NX.ERP.Model
|
|||||||
public bool ProxyForeign { get; set; }
|
public bool ProxyForeign { get; set; }
|
||||||
public long Pubufts { get; set; }
|
public long Pubufts { get; set; }
|
||||||
|
|
||||||
|
public string VenPerson { get; set; }
|
||||||
|
|
||||||
|
public string VenPPerson { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -230,7 +230,25 @@ namespace NX.ERP.U8.AP
|
|||||||
headXml.setAttribute("cFlag", "AP");
|
headXml.setAttribute("cFlag", "AP");
|
||||||
headXml.setAttribute("cDeptCode", ApVouch.DeptCode);
|
headXml.setAttribute("cDeptCode", ApVouch.DeptCode);
|
||||||
headXml.setAttribute("cDigest", ApVouch.Digest);
|
headXml.setAttribute("cDigest", ApVouch.Digest);
|
||||||
|
var user = new NX.ERP.U8.User.UserDal().GetModel(ApVouch.UserCode);
|
||||||
|
if (user != null)
|
||||||
|
{
|
||||||
|
headXml.setAttribute("cCheckMan", user.UserName);
|
||||||
|
headXml.setAttribute("cOperator", user.UserName);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
headXml.setAttribute("cCheckMan", ApVouch.UserCode);
|
||||||
|
headXml.setAttribute("cOperator", ApVouch.UserCode);
|
||||||
|
}
|
||||||
headXml.setAttribute("cDefine10", id);
|
headXml.setAttribute("cDefine10", id);
|
||||||
|
var supplier = new SupplierDAL().GetModel(ApVouch.supplierCode);
|
||||||
|
var per = new NX.ERP.U8.User.UserDal().GetModel(supplier.VenPPerson);
|
||||||
|
headXml.setAttribute("cPerson", supplier.VenPPerson);
|
||||||
|
if (per != null)
|
||||||
|
{
|
||||||
|
headXml.setAttribute("cPersonName", per.UserName);
|
||||||
|
}
|
||||||
|
|
||||||
// headXml.setAttribute("cLink", "");
|
// headXml.setAttribute("cLink", "");
|
||||||
IXMLDOMElement bodyXml;
|
IXMLDOMElement bodyXml;
|
||||||
|
|
||||||
@@ -242,6 +260,7 @@ namespace NX.ERP.U8.AP
|
|||||||
bodyXml.setAttribute("cDeptCode", ApVouch.DeptCode);
|
bodyXml.setAttribute("cDeptCode", ApVouch.DeptCode);
|
||||||
bodyXml.setAttribute("cCode", "");
|
bodyXml.setAttribute("cCode", "");
|
||||||
bodyXml.setAttribute("iExchRate", 1);
|
bodyXml.setAttribute("iExchRate", 1);
|
||||||
|
|
||||||
bodyXml.setAttribute("cexch_name", "人民币");
|
bodyXml.setAttribute("cexch_name", "人民币");
|
||||||
bodyXml.setAttribute("iAmount", ApVouch.Amount);
|
bodyXml.setAttribute("iAmount", ApVouch.Amount);
|
||||||
bodyXml.setAttribute("iAmount_f", ApVouch.Amount);
|
bodyXml.setAttribute("iAmount_f", ApVouch.Amount);
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ namespace NX.ERP.U8
|
|||||||
ISNULL(dModifyDate,dVenCreateDatetime) as ModifyDate,
|
ISNULL(dModifyDate,dVenCreateDatetime) as ModifyDate,
|
||||||
bProxyForeign as ProxyForeign,
|
bProxyForeign as ProxyForeign,
|
||||||
CONVERT(BIGINT,pubufts) as pubufts,
|
CONVERT(BIGINT,pubufts) as pubufts,
|
||||||
|
cVenPPerson AS VenPPerson,
|
||||||
cVenPerson AS Contract from Vendor ";
|
cVenPerson AS Contract from Vendor ";
|
||||||
if (!string.IsNullOrEmpty(strWhere))
|
if (!string.IsNullOrEmpty(strWhere))
|
||||||
{
|
{
|
||||||
@@ -40,11 +41,16 @@ namespace NX.ERP.U8
|
|||||||
return this.GetList("CONVERT(BIGINT,pubufts) > @Pubufts", new { Pubufts });
|
return this.GetList("CONVERT(BIGINT,pubufts) > @Pubufts", new { Pubufts });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Supplier GetModel(string SupplierCode)
|
||||||
|
{
|
||||||
|
return this.GetList("cVenCode like @SupplierCode", new { SupplierCode }).FirstOrDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public IEnumerable<Supplier> GetList(NX.ERP.Model.Request.Supplier Params)
|
public IEnumerable<Supplier> GetList(NX.ERP.Model.Request.Supplier Params)
|
||||||
{
|
{
|
||||||
IList<string> where = new List<string>();
|
IList<string> where = new List<string>();
|
||||||
@@ -65,7 +71,7 @@ namespace NX.ERP.U8
|
|||||||
where.Add(" ISNULL(dModifyDate,dVenCreateDatetime) >= @ModifyDate ");
|
where.Add(" ISNULL(dModifyDate,dVenCreateDatetime) >= @ModifyDate ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Params.ProxyForeign !=null)
|
if (Params.ProxyForeign != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
where.Add(" bProxyForeign=@ProxyForeign ");
|
where.Add(" bProxyForeign=@ProxyForeign ");
|
||||||
|
|||||||
@@ -5,19 +5,45 @@ using System.Configuration;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
using Dapper;
|
using Dapper;
|
||||||
|
|
||||||
|
|
||||||
namespace NX.ERP.U8.User
|
namespace NX.ERP.U8.User
|
||||||
|
|
||||||
{
|
{
|
||||||
public class User
|
public class UserDal
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public IEnumerable<Model.Request.User> GetList(string strWhere = "", object Param = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
using (var conn = U8LoginContext.Instance.Connection)
|
||||||
|
{
|
||||||
|
var sql = @" select cUser_Id as UserCode ,cUser_Name as UserName from UFSystem..UA_User ";
|
||||||
|
if (!string.IsNullOrEmpty(strWhere))
|
||||||
|
{
|
||||||
|
sql += $" where {strWhere}";
|
||||||
|
}
|
||||||
|
return conn.Query<Model.Request.User>(sql, Param);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Model.Request.User GetModel(string UserCode)
|
||||||
|
{
|
||||||
|
return this.GetList(" cUser_Id =@UserCode", new { UserCode }).FirstOrDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public string Userrole(string Opnanme, string Pasd)
|
public string Userrole(string Opnanme, string Pasd)
|
||||||
@@ -35,9 +61,9 @@ namespace NX.ERP.U8.User
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
using (var conn =_login.Connection)
|
using (var conn = _login.Connection)
|
||||||
{
|
{
|
||||||
return conn.ExecuteScalar<string>(sql, new {Opnanme},null,30,System.Data.CommandType.Text);
|
return conn.ExecuteScalar<string>(sql, new { Opnanme }, null, 30, System.Data.CommandType.Text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace NX.ERP.WebAPi.Controllers.System
|
|||||||
[Route("api/System/Userrole")]
|
[Route("api/System/Userrole")]
|
||||||
public string Userrole(LoginEntity loginEntity)
|
public string Userrole(LoginEntity loginEntity)
|
||||||
{
|
{
|
||||||
var Userrole = new NX.ERP.U8.User.User();
|
var Userrole = new NX.ERP.U8.User.UserDal();
|
||||||
return Userrole.Userrole(loginEntity.UserId, loginEntity.Password);
|
return Userrole.Userrole(loginEntity.UserId, loginEntity.Password);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user