合并
This commit is contained in:
@@ -66,7 +66,9 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="BaseBill.cs" />
|
||||
<Compile Include="BaseModel.cs" />
|
||||
<Compile Include="Request\ApVouch.cs" />
|
||||
<Compile Include="Request\BinChange.cs" />
|
||||
<Compile Include="Request\Bom.cs" />
|
||||
<Compile Include="Request\Inventorybu.cs" />
|
||||
<Compile Include="Request\Inventoryall.cs" />
|
||||
<Compile Include="Request\MaterialAppProvide.cs" />
|
||||
@@ -74,7 +76,7 @@
|
||||
<Compile Include="Request\PoOrderRequest.cs" />
|
||||
<Compile Include="Request\SnOrderRequest.cs" />
|
||||
<Compile Include="Request\SaleOrderRequest.cs" />
|
||||
<Compile Include="Request\Userrequest.cs" />
|
||||
<Compile Include="Request\Stock.cs" />
|
||||
<Compile Include="Response\MOM\Bom.cs" />
|
||||
<Compile Include="Response\Pmc\PmcInventoryallRes.cs" />
|
||||
<Compile Include="Response\Pmc\PmcInventorymomRes.cs" />
|
||||
|
||||
21
NX.ERP.Model/Request/ApVouch.cs
Normal file
21
NX.ERP.Model/Request/ApVouch.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace NX.ERP.Model.Request
|
||||
{
|
||||
public class ApVouch
|
||||
{
|
||||
public string DeptCode { get; set; }
|
||||
public string DeptName { get; set; }
|
||||
public string supplierCode { get; set; }
|
||||
|
||||
public string Amount { get; set; }
|
||||
|
||||
public string Digest { get; set; }
|
||||
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
24
NX.ERP.Model/Request/Bom.cs
Normal file
24
NX.ERP.Model/Request/Bom.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace NX.ERP.Model.Request
|
||||
{
|
||||
public class Bom
|
||||
{
|
||||
// bom_type
|
||||
//version
|
||||
//version_desc
|
||||
//parent_code
|
||||
|
||||
|
||||
public int? BomType { get; set; }
|
||||
public int? Version { get; set; }
|
||||
|
||||
public string VersionDesc { get; set; }
|
||||
|
||||
public string ParentCode { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -29,12 +29,12 @@ namespace NX.ERP.Model.Request
|
||||
private string workCenter;
|
||||
private DateTime dueDate;
|
||||
|
||||
private IEnumerable<MaterialAppProvideDetail> Detail = new List<MaterialAppProvideDetail>();
|
||||
private IEnumerable<MaterialAppProvideDetail> detail = new List<MaterialAppProvideDetail>();
|
||||
|
||||
public string OrderCode { get => orderCode; set => orderCode = value; }
|
||||
public int OrderDetailId { get => orderDetailId; set => orderDetailId = value; }
|
||||
|
||||
public IEnumerable<MaterialAppProvideDetail> Detail1 { get => Detail; set => Detail = value; }
|
||||
public IEnumerable<MaterialAppProvideDetail> Detail { get => detail; set => detail = value; }
|
||||
public string WorkCenter { get => workCenter; set => workCenter = value; }
|
||||
public DateTime DueDate { get => dueDate; set => dueDate = value; }
|
||||
}
|
||||
|
||||
@@ -18,7 +18,9 @@ namespace NX.ERP.Model.Request
|
||||
|
||||
public string SpecsModel { get; set; }
|
||||
|
||||
|
||||
public DateTime? ModifyDate { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -14,5 +14,8 @@ namespace NX.ERP.Model.Request
|
||||
|
||||
public string ProductOrderendID { get; set; }
|
||||
|
||||
|
||||
public DateTime? ModifyDate { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
16
NX.ERP.Model/Request/Stock.cs
Normal file
16
NX.ERP.Model/Request/Stock.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 Stock
|
||||
{
|
||||
private string _code;
|
||||
private string _name;
|
||||
|
||||
public string MaterialCode { get => _code; set => _code = value; }
|
||||
public string MaterialName { get => _name; set => _name = value; }
|
||||
}
|
||||
}
|
||||
@@ -90,12 +90,46 @@ namespace NX.ERP.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public DateTime? ModifyDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否采购
|
||||
/// </summary>
|
||||
public bool IsPurchase { get; set; }
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public bool IsSelf { get; set; }
|
||||
|
||||
|
||||
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public bool ProxyForeign { get; set; }
|
||||
|
||||
//bPurchase,bSelf,IsSub
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 供应类型
|
||||
/// 0-自制 1-外购 2-虚拟件 3-委外
|
||||
/// </summary>
|
||||
public int PlanProperty
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.IsPurchase && this.ProxyForeign) return 3;
|
||||
if (this.IsSelf) return 0;
|
||||
if (this.IsPurchase) return 1;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public bool IsSale { get; set; }
|
||||
|
||||
public bool IsProducing { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@ namespace NX.ERP.Model.MOM
|
||||
public ICollection<MoAllocate> Allocates { get; set; } = new List<MoAllocate>();
|
||||
|
||||
|
||||
public DateTime? ModifyDate { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -143,6 +143,10 @@ namespace NX.ERP.Model.Response.Store
|
||||
|
||||
private ICollection<MaterialAppDetail> materialAppVouchsLst = new List<MaterialAppDetail>();
|
||||
|
||||
|
||||
public DateTime? ModifyDate { get; set; }
|
||||
|
||||
|
||||
public int Id { get => id; set => id = value; }
|
||||
public string Code { get => code; set => code = value; }
|
||||
public DateTime Date { get => date; set => date = value; }
|
||||
|
||||
@@ -13,9 +13,13 @@ namespace NX.ERP.Model.Response.Store
|
||||
private string binName;
|
||||
private string _Qty;
|
||||
|
||||
private string materialName;
|
||||
|
||||
|
||||
public string MaterialCode { get => materialCode; set => materialCode = value; }
|
||||
public string BinCode { get => binName; set => binName = value; }
|
||||
public string Qty { get => _Qty; set => _Qty = value; }
|
||||
public string MaterialName { get => materialName; set => materialName = value; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace NX.ERP.U8.AP
|
||||
public APVouch() : base("应付单", "U8API/APVouch")
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected override string AddUrl
|
||||
@@ -56,10 +56,10 @@ namespace NX.ERP.U8.AP
|
||||
u8EnvContext.U8Login = U8LoginContext.Instance.ClsLogin;
|
||||
U8ApiAddress apiAddress = new U8ApiAddress(this.LoadUrl);
|
||||
U8ApiBroker u8ApiBroker = new U8ApiBroker(apiAddress, u8EnvContext);
|
||||
u8EnvContext.SetApiContext("VouchType",this.VoucherID);
|
||||
u8EnvContext.SetApiContext("VouchType", this.VoucherID);
|
||||
|
||||
u8ApiBroker.AssignNormalValue("linkid", "");
|
||||
|
||||
u8ApiBroker.AssignNormalValue("linkid", "0");
|
||||
|
||||
if (!u8ApiBroker.Invoke())
|
||||
{
|
||||
Exception exception = u8ApiBroker.GetException();
|
||||
@@ -95,7 +95,7 @@ namespace NX.ERP.U8.AP
|
||||
para.DomBody = new DOMDocumentClass();
|
||||
para.DomBody.loadXML(dOMDocument2.xml);
|
||||
}
|
||||
|
||||
|
||||
para.ReturnValue = Convert.ToBoolean(u8ApiBroker.GetReturnValue());
|
||||
para.ErrMsg = u8ApiBroker.GetResult("xmlmsg") as string;
|
||||
u8ApiBroker.Release();
|
||||
@@ -122,7 +122,7 @@ namespace NX.ERP.U8.AP
|
||||
u8ApiBroker.AssignNormalValue("ohead", para.DomHead);
|
||||
u8ApiBroker.AssignNormalValue("obody", para.DomBody);
|
||||
//给普通参数isadd赋值。此参数的数据类型为System.Boolean,此参数按值传递,表示true新增,false修改
|
||||
u8ApiBroker.AssignNormalValue("isadd",true);
|
||||
u8ApiBroker.AssignNormalValue("isadd", true);
|
||||
|
||||
|
||||
if (para.DOMMsg != null)
|
||||
@@ -133,7 +133,7 @@ namespace NX.ERP.U8.AP
|
||||
{
|
||||
u8ApiBroker.AssignNormalValue("xmlmsg", new DOMDocumentClass());
|
||||
}
|
||||
|
||||
|
||||
|
||||
// u8ApiBroker.AssignNormalValue("bReMote", para.IsReMote);
|
||||
if (!u8ApiBroker.Invoke())
|
||||
@@ -163,11 +163,20 @@ namespace NX.ERP.U8.AP
|
||||
|
||||
}
|
||||
para.ReturnValue = Convert.ToBoolean(u8ApiBroker.GetReturnValue());
|
||||
|
||||
|
||||
|
||||
para.ErrMsg = u8ApiBroker.GetResult("xmlmsg") as string;
|
||||
|
||||
|
||||
|
||||
|
||||
u8ApiBroker.Release();
|
||||
|
||||
if (!para.ReturnValue)
|
||||
{
|
||||
throw new Exception(para.ErrMsg);
|
||||
}
|
||||
|
||||
|
||||
return "";
|
||||
}
|
||||
catch (Exception err)
|
||||
@@ -183,7 +192,7 @@ namespace NX.ERP.U8.AP
|
||||
|
||||
|
||||
|
||||
public string AddVocher()
|
||||
public string AddVocher(NX.ERP.Model.Request.ApVouch ApVouch)
|
||||
{
|
||||
|
||||
VoucherParameter voucherParameter = new VoucherParameter
|
||||
@@ -197,15 +206,43 @@ namespace NX.ERP.U8.AP
|
||||
voucherParameter.DomHead.loadXML(HeadTemplate);
|
||||
voucherParameter.DomBody.loadXML(BodyTemplate);
|
||||
IXMLDOMElement headXml = domHead.createElement("z:row");
|
||||
|
||||
|
||||
|
||||
// headXml.setAttribute("cVenAbbName", "无锡市鑫奥");
|
||||
headXml.setAttribute("cDwCode", ApVouch.supplierCode);
|
||||
headXml.setAttribute("dVouchDate",ApVouch.Date);
|
||||
headXml.setAttribute("iExchRate", 1);
|
||||
headXml.setAttribute("iAmount_f",ApVouch.Amount);
|
||||
headXml.setAttribute("iRAmount", ApVouch.Amount);
|
||||
headXml.setAttribute("cVouchType", "P0");
|
||||
headXml.setAttribute("cTypeName", "其他应付单");
|
||||
headXml.setAttribute("cCode", "220201");
|
||||
headXml.setAttribute("cexch_name", "人民币");
|
||||
headXml.setAttribute("VT_ID", 8056);
|
||||
headXml.setAttribute("bd_c", false);
|
||||
headXml.setAttribute("bStartFlag", false);
|
||||
headXml.setAttribute("cVouchID", "");
|
||||
headXml.setAttribute("cFlag", "AP");
|
||||
headXml.setAttribute("cDeptCode", ApVouch.DeptCode);
|
||||
headXml.setAttribute("cDigest", ApVouch.Digest);
|
||||
headXml.setAttribute("cLink", "");
|
||||
IXMLDOMElement bodyXml;
|
||||
|
||||
//for (var n = 0; n < storeIn.details.Count(); n++)
|
||||
//{
|
||||
//var detail = storeIn.details[n];
|
||||
bodyXml = domBody.createElement("z:row");
|
||||
|
||||
//var detail = storeIn.details[n];
|
||||
bodyXml = domBody.createElement("z:row");
|
||||
|
||||
bodyXml.setAttribute("cDeptCode", ApVouch.DeptCode);
|
||||
bodyXml.setAttribute("cCode", "");
|
||||
bodyXml.setAttribute("iExchRate", 1);
|
||||
bodyXml.setAttribute("cexch_name", "人民币");
|
||||
bodyXml.setAttribute("iAmount", ApVouch.Amount);
|
||||
bodyXml.setAttribute("iAmount_f", ApVouch.Amount);
|
||||
bodyXml.setAttribute("iAmt_s", 0);
|
||||
bodyXml.setAttribute("cLink", "");
|
||||
headXml.setAttribute("cDwCode", ApVouch.supplierCode);
|
||||
bodyXml.setAttribute("bd_c", true);
|
||||
|
||||
domBody.selectSingleNode("//rs:data").appendChild(bodyXml);
|
||||
//}
|
||||
domHead.selectSingleNode("//rs:data").appendChild(headXml);
|
||||
var str = voucherParameter.DomBody.xml;
|
||||
@@ -216,7 +253,6 @@ namespace NX.ERP.U8.AP
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
|
||||
throw err;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,11 +53,11 @@ namespace NX.ERP.U8
|
||||
cInvCCode AS MaterialTypeCode,
|
||||
cReplaceItem AS 替换件,
|
||||
cPosition AS 货位编码,
|
||||
bSale AS 是否销售,
|
||||
bPurchase AS 是否外购,
|
||||
bSelf AS 是否自制,
|
||||
bSale AS IsSale,
|
||||
bPurchase AS IsPurchase,
|
||||
bSelf AS IsSelf,
|
||||
bComsume AS 是否生产耗用,
|
||||
bProducing AS 是否在制,
|
||||
bProducing AS IsProducing,
|
||||
bService AS 是否应税劳务,
|
||||
bAccessary AS 是否成套件,
|
||||
iTaxRate AS TaxRate,
|
||||
@@ -176,7 +176,7 @@ namespace NX.ERP.U8
|
||||
iQTMethod AS 质量检验方案,
|
||||
PictureGUID AS 图片GUID,
|
||||
bPlanInv AS 是否计划品,
|
||||
bProxyForeign AS 是否委外,
|
||||
bProxyForeign AS ProxyForeign,
|
||||
bATOModel AS 是否ATO模型,
|
||||
bCheckItem AS 是否选项类,
|
||||
bPTOModel AS 是否PTO模型,
|
||||
@@ -325,13 +325,18 @@ namespace NX.ERP.U8
|
||||
where.Add(" cInvCCode = @MaterialTypeCode ");
|
||||
}
|
||||
|
||||
if (Material.ModifyDate != null)
|
||||
{
|
||||
where.Add(" dModifyDate >= @ModifyDate ");
|
||||
}
|
||||
|
||||
return this.GetList(string.Join(" and ", where.ToArray()), new
|
||||
{
|
||||
MaterialCode = Material.MaterialCode,
|
||||
MaterialName = $"%{Material.MaterialName}%",
|
||||
SpecsModel = Material.SpecsModel,
|
||||
MaterialTypeCode = Material.MaterialTypeCode
|
||||
MaterialTypeCode = Material.MaterialTypeCode,
|
||||
ModifyDate = Material.ModifyDate
|
||||
|
||||
}); ;
|
||||
|
||||
|
||||
@@ -54,5 +54,47 @@ namespace NX.ERP.U8.Mom
|
||||
}
|
||||
|
||||
|
||||
public IEnumerable<NX.ERP.Model.Response.MOM.Bom> GetList(NX.ERP.Model.Request.Bom bom)
|
||||
{
|
||||
|
||||
List<string> where = new List<string>();
|
||||
if (!string.IsNullOrEmpty(bom.ParentCode))
|
||||
{
|
||||
where.Add(" c.InvCode = @ParentCode ");
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(bom.VersionDesc))
|
||||
{
|
||||
where.Add(" a.VersionDesc like @VersionDesc ");
|
||||
}
|
||||
|
||||
if (bom.BomType.HasValue)
|
||||
{
|
||||
where.Add(" a.BomType = @BomType ");
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (bom.Version.HasValue)
|
||||
{
|
||||
where.Add(" a.Version = @Version ");
|
||||
}
|
||||
|
||||
|
||||
return this.GetList(string.Join(" and ", where.ToArray()), new
|
||||
{
|
||||
ParentCode = bom.ParentCode,
|
||||
VersionDesc =$"%{bom.VersionDesc}%",
|
||||
BomType = bom.BomType,
|
||||
Version =bom.Version,
|
||||
|
||||
|
||||
}); ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace NX.ERP.U8.Mom
|
||||
using (var conn = U8LoginContext.Instance.Connection)
|
||||
{
|
||||
string strSQL = @"select
|
||||
a.MoId as ProductOrderId,a.moCode as ProductOrderNo,a.CreateDate as ProductDate,a.CreateUser as PreparedBy,
|
||||
a.MoId as ProductOrderId,a.moCode as ProductOrderNo,ISNULL( ModifyDate,createDate) as ModifyDate,a.CreateDate as ProductDate,a.CreateUser as PreparedBy,
|
||||
b.MoId as id ,b.MoDId as ProductOrderDtlId,b.MoId as ProductOrderId,b.MoTypeId,d.DueDate,ISNULL( b.MDeptCode,'53') as MDeptCode,a.MoCode as ProductOrderNo,
|
||||
a.CreateDate as ProductOrderDate,b.InvCode as ProductCode,b.Qty as Qty,b.SortSeq,b.SoCode,
|
||||
c.AllocateId as id ,c.AllocateId as AllocateId,c.MoDId as ProductOrderDtlId,c.InvCode as MaterialCode,b.MoId as ProductOrderId, c.IssQty as IssQty,c.Qty,
|
||||
@@ -95,11 +95,19 @@ namespace NX.ERP.U8.Mom
|
||||
{
|
||||
where.Add(" a.MoId >= @ProductOrderendID ");
|
||||
}
|
||||
|
||||
if (Params.ModifyDate!=null)
|
||||
{
|
||||
where.Add(" ISNULL( a.ModifyDate,createDate) >= @ModifyDate ");
|
||||
}
|
||||
|
||||
|
||||
return this.GetList(string.Join(" and ", where.ToArray()), new
|
||||
{
|
||||
ProductCode = $"%{Params.ProductCode}%",
|
||||
ProductOrderNo = $"{Params.ProductOrderNo}",
|
||||
ProductOrderendID = $"{Params.ProductOrderendID}"
|
||||
Params.ProductOrderendID,
|
||||
Params.ModifyDate
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -33,10 +33,7 @@ namespace NX.ERP.U8.Finance
|
||||
left join Inventory e WITH(NOLOCK) on a.cInvCode=e.cInvCode
|
||||
left join ST_SNDetail_SaleOut f WITH(NOLOCK) on a.cInvSN= f.cInvSN
|
||||
left join rdrecord32 g WITH(NOLOCK) on f.iVouchID=g.id
|
||||
left join Customer h WITH(NOLOCK) on g.cCusCode=h.cCusCode
|
||||
|
||||
|
||||
";
|
||||
left join Customer h WITH(NOLOCK) on g.cCusCode=h.cCusCode";
|
||||
|
||||
|
||||
List<string> where = new List<string>();
|
||||
|
||||
@@ -141,18 +141,14 @@ FROM MaterialAppVouch a
|
||||
public void Provide(NX.ERP.Model.Request.MaterialAppProvide provide)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
using (var conn = U8LoginContext.Instance.Connection)
|
||||
{
|
||||
|
||||
var strSql = @"update MaterialAppVouchs set dDueDate=@DueDate,cDefine22='是',cDefine23=@SN,cDefine24=@WorkCenter";
|
||||
if (provide.Detail1.Count() != 0)
|
||||
if (provide.Detail.Count() != 0)
|
||||
{
|
||||
var mappDetails = this.GetDetailByMoCode(provide.OrderCode, provide.OrderDetailId).ToDictionary(m => m.AllocateId);
|
||||
foreach (var item in provide.Detail1)
|
||||
foreach (var item in provide.Detail)
|
||||
{
|
||||
if (mappDetails.TryGetValue(item.AllocateId, out var _mappDetails))
|
||||
{
|
||||
|
||||
@@ -18,7 +18,8 @@ namespace NX.ERP.U8.Store
|
||||
{
|
||||
using (var conn = U8LoginContext.Instance.Connection)
|
||||
{
|
||||
var sql = @"select cInvCode as MaterialCode ,cPosCode as BinCode,iQuantity as Qty from InvPositionSum where ISNULL(iQuantity,0)<>0";
|
||||
var sql = @" select a.cInvCode as MaterialCode ,cPosCode as BinCode,iQuantity as Qty,b.cInvName as MaterialName from InvPositionSum as a
|
||||
left join Inventory as b on a.cInvCode=b.cInvCode where ISNULL(iQuantity,0)<>0";
|
||||
if (!string.IsNullOrEmpty(strwhere))
|
||||
{
|
||||
sql += $" and {strwhere}";
|
||||
@@ -38,6 +39,34 @@ namespace NX.ERP.U8.Store
|
||||
}
|
||||
|
||||
|
||||
public IEnumerable<Model.Response.Store.Stock> GetList(NX.ERP.Model.Request.Stock stock)
|
||||
{
|
||||
List<string> where = new List<string>();
|
||||
if (!string.IsNullOrEmpty(stock.MaterialCode))
|
||||
{
|
||||
where.Add(" a.cInvCode = @MaterialCode ");
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(stock.MaterialName))
|
||||
{
|
||||
where.Add(" b.cInvName like @MaterialName ");
|
||||
}
|
||||
|
||||
|
||||
return this.GetList(string.Join(" and ", where.ToArray()), new
|
||||
{
|
||||
MaterialCode = stock.MaterialCode,
|
||||
MaterialName = $"%{stock.MaterialName}%",
|
||||
|
||||
|
||||
}); ;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace NX.ERP.WebAPi
|
||||
// });
|
||||
|
||||
// Set this flag to omit descriptions for any actions decorated with the Obsolete attribute
|
||||
c.IgnoreObsoleteActions();
|
||||
c.IgnoreObsoleteActions();
|
||||
|
||||
// Each operation be assigned one or more tags which are then used by consumers for various reasons.
|
||||
// For example, the swagger-ui groups operations according to the first tag of each operation.
|
||||
|
||||
22
NX.ERP.WebAPi/Controllers/AP/APController.cs
Normal file
22
NX.ERP.WebAPi/Controllers/AP/APController.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace NX.ERP.WebAPi.Controllers.AP
|
||||
{
|
||||
public class APController : ApiController
|
||||
{
|
||||
|
||||
[Route("api/ap/add")]
|
||||
[HttpPost]
|
||||
public string AddVoucher(NX.ERP.Model.Request.ApVouch ApVouch)
|
||||
{
|
||||
var dal = new NX.ERP.U8.AP.APVouch();
|
||||
return dal.AddVocher(ApVouch);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ namespace NX.ERP.WebAPi.Controllers.MOM
|
||||
{
|
||||
public class BomController : ApiController
|
||||
{
|
||||
[Obsolete]
|
||||
[Route("api/Bom/List")]
|
||||
[HttpGet]
|
||||
|
||||
@@ -15,5 +16,16 @@ namespace NX.ERP.WebAPi.Controllers.MOM
|
||||
{
|
||||
return new NX.ERP.U8.Mom.BomDAL().GetList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
[Route("api/Bom/Query")]
|
||||
[HttpPost]
|
||||
|
||||
public IEnumerable<Model.Response.MOM.Bom> GetList(NX.ERP.Model.Request.Bom bom)
|
||||
{
|
||||
return new NX.ERP.U8.Mom.BomDAL().GetList(bom);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ namespace NX.ERP.WebAPi.Controllers.MOM
|
||||
public class MomOrderController : ApiController
|
||||
{
|
||||
|
||||
[Obsolete]
|
||||
[Route("api/MomOrder/List")]
|
||||
[HttpGet]
|
||||
public IEnumerable<Model.MOM.MomOrder> List()
|
||||
@@ -19,7 +20,7 @@ namespace NX.ERP.WebAPi.Controllers.MOM
|
||||
}
|
||||
|
||||
|
||||
[Route("api/MomOrder/List")]
|
||||
[Route("api/MomOrder/Query")]
|
||||
[HttpPost]
|
||||
public IEnumerable<Model.MOM.MomOrder> List(NX.ERP.Model.Request.MomOrder momOrder)
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace NX.ERP.WebAPi.Controllers
|
||||
{
|
||||
public class FinanceController : ApiController
|
||||
{
|
||||
[Obsolete]
|
||||
[HttpPost]
|
||||
[Route("api/Finance/InventorySNDetail")]
|
||||
public IEnumerable<object> Inventorysocode(NX.ERP.Model.Request.SnOrderRequest info)
|
||||
|
||||
@@ -7,9 +7,11 @@ using System.Web;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace NX.ERP.WebAPi.Controllers
|
||||
{
|
||||
{
|
||||
|
||||
public class PmcController : ApiController
|
||||
{
|
||||
[Obsolete]
|
||||
[HttpPost]
|
||||
[Route("api/Pmc/Inventoryall")]
|
||||
public IEnumerable<NX.ERP.Model.PmcInventoryallRes> Inventoryall(NX.ERP.Model.Request.Inventoryall info)
|
||||
@@ -18,7 +20,7 @@ namespace NX.ERP.WebAPi.Controllers
|
||||
return dal.GetPmcInventoryallRes(info);
|
||||
}
|
||||
|
||||
|
||||
[Obsolete]
|
||||
[HttpPost]
|
||||
[Route("api/Pmc/Inventorymom")]
|
||||
public IEnumerable<NX.ERP.Model.PmcInventorymomRes> Inventorymom(NX.ERP.Model.Request.MomOrderRequest info)
|
||||
@@ -26,7 +28,7 @@ namespace NX.ERP.WebAPi.Controllers
|
||||
var PmcQuery = new NX.ERP.U8.Pmc.PmcQuery();
|
||||
return PmcQuery.Inventorymom(info).OrderByDescending(m=> m.Mocode).ThenBy(m => m.SortSeq).ThenBy(m => m.Invcode1);
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
[HttpPost]
|
||||
[Route("api/Pmc/Inventorymonth")]
|
||||
public IEnumerable<object> Inventorymonth(NX.ERP.Model.Request.Inventoryall info)
|
||||
@@ -34,7 +36,7 @@ namespace NX.ERP.WebAPi.Controllers
|
||||
var PmcQuery = new NX.ERP.U8.Pmc.PmcQuery();
|
||||
return PmcQuery.Inventorymonth(info);
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
[HttpPost]
|
||||
[Route("api/Pmc/Inventorysocode")]
|
||||
public IEnumerable<object> Inventorysocode(NX.ERP.Model.Request.SaleOrderRequest info)
|
||||
@@ -42,7 +44,7 @@ namespace NX.ERP.WebAPi.Controllers
|
||||
var PmcQuery = new NX.ERP.U8.Pmc.PmcQuery();
|
||||
return PmcQuery.Inventorysocode(info);
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
[HttpPost]
|
||||
[Route("api/Pmc/InventoryPocode")]
|
||||
public IEnumerable<object> InventoryPo(NX.ERP.Model.Request.PoOrderRequest info)
|
||||
@@ -51,7 +53,7 @@ namespace NX.ERP.WebAPi.Controllers
|
||||
return PmcQuery.InventoryPo(info);
|
||||
}
|
||||
|
||||
|
||||
[Obsolete]
|
||||
[HttpPost]
|
||||
[Route("api/Pmc/Inventorybu")]
|
||||
public IEnumerable<object> Inventorybu(NX.ERP.Model.Request.Inventorybu info)
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
/// </summary>
|
||||
public class BinChangeController : ApiController
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
///添加货位调整单
|
||||
@@ -19,7 +20,7 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
/// <returns></returns>
|
||||
[Route("api/BinChange/Add")]
|
||||
[HttpPost]
|
||||
|
||||
[Obsolete]
|
||||
public string AddVoucher([FromBody] Model.Request.BinChange storeIn)
|
||||
{
|
||||
var dal = new NX.ERP.U8.Store.BinChangeDAL();
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
{
|
||||
public class MaterialAppController : ApiController
|
||||
{
|
||||
[Obsolete]
|
||||
[Route("api/MaterialApp/List")]
|
||||
[HttpPost]
|
||||
|
||||
@@ -17,10 +18,13 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
return dal.GetList();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Route("api/MaterialApp/PendingList")]
|
||||
[HttpPost]
|
||||
|
||||
|
||||
public IEnumerable<Model.Response.Store.MaterialApp> GetPendingList()
|
||||
{
|
||||
var dal = new NX.ERP.U8.Store.MaterialAppDAL();
|
||||
@@ -30,7 +34,7 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
|
||||
|
||||
|
||||
|
||||
[Obsolete]
|
||||
[Route("api/MaterialApp/Model")]
|
||||
[HttpGet]
|
||||
|
||||
@@ -41,7 +45,7 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
}
|
||||
|
||||
|
||||
|
||||
[Obsolete]
|
||||
[Route("api/MaterialApp/ListByMoCode")]
|
||||
[HttpGet]
|
||||
|
||||
@@ -51,7 +55,7 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
return dal.GetListByMoCode(MoCode, MoDetailId);
|
||||
}
|
||||
|
||||
|
||||
[Obsolete]
|
||||
[Route("api/MaterialApp/DetailByMoCode")]
|
||||
[HttpGet]
|
||||
|
||||
@@ -61,7 +65,7 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
return dal.GetDetailByMoCode(MoCode, MoDetailId);
|
||||
}
|
||||
|
||||
[Route("api/MaterialApp/Provide")]
|
||||
[Route("api/MaterialApp/Plan")]
|
||||
[HttpPost]
|
||||
|
||||
public bool Provide([FromBody]NX.ERP.Model.Request.MaterialAppProvide provide)
|
||||
|
||||
@@ -6,10 +6,11 @@ using System.Web.Http;
|
||||
|
||||
namespace NX.ERP.WebAPi.Controllers.Store
|
||||
{
|
||||
|
||||
public class MaterialStoreOutController:ApiController
|
||||
{
|
||||
|
||||
|
||||
|
||||
[Obsolete]
|
||||
[Route("api/MaterialOut/Add")]
|
||||
[HttpPost]
|
||||
|
||||
@@ -21,6 +22,7 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
|
||||
|
||||
|
||||
[Obsolete]
|
||||
[Route("api/MaterialOut/Update")]
|
||||
[HttpPost]
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Web.Http;
|
||||
|
||||
namespace NX.ERP.WebAPi.Controllers.Store
|
||||
{
|
||||
|
||||
|
||||
public class OtherStoreInController : ApiController
|
||||
{
|
||||
[Obsolete]
|
||||
@@ -17,6 +17,7 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
var dal = new NX.ERP.U8.Store.OtherStoreInDAL();
|
||||
return dal.AddVocher(storeIn);
|
||||
}
|
||||
[Obsolete]
|
||||
[Route("api/OtherIn/Update")]
|
||||
[HttpPost]
|
||||
public bool UpdteVoucher([FromBody] Model.Request.OtherStoreInOut storeIn)
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Web.Http;
|
||||
|
||||
namespace NX.ERP.WebAPi.Controllers.Store
|
||||
{
|
||||
|
||||
|
||||
public class OtherStoreOutController : ApiController
|
||||
{
|
||||
[Obsolete]
|
||||
@@ -18,7 +18,7 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
return dal.AddVocher(storeIn);
|
||||
}
|
||||
|
||||
|
||||
[Obsolete]
|
||||
[Route("api/OtherOut/Update")]
|
||||
[HttpPost]
|
||||
public bool UpdateVoucher([FromBody] Model.Request.OtherStoreInOut storeIn)
|
||||
|
||||
@@ -6,10 +6,10 @@ using System.Web.Http;
|
||||
|
||||
namespace NX.ERP.WebAPi.Controllers.Store
|
||||
{
|
||||
|
||||
|
||||
public class PuStoreInController : ApiController
|
||||
{
|
||||
|
||||
[Obsolete]
|
||||
[Route("api/PuStoreIn/Add")]
|
||||
[HttpPost]
|
||||
public object AddVoucher([FromBody] Model.Request.PuStoreIn storeIn)
|
||||
@@ -18,7 +18,7 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
return new { Id = dal.AddVocher(storeIn) };
|
||||
}
|
||||
|
||||
|
||||
[Obsolete]
|
||||
[Route("api/PuStoreIn/Update")]
|
||||
[HttpPost]
|
||||
public object UpdateVoucher([FromBody] Model.Request.PuStoreIn storeIn)
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Web.Http;
|
||||
|
||||
namespace NX.ERP.WebAPi.Controllers.Store
|
||||
{
|
||||
|
||||
|
||||
public class SaleStoreOutController : ApiController
|
||||
{
|
||||
[Obsolete]
|
||||
@@ -18,7 +18,7 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
return new { Id = dal.AddVoucher(storeIn) };
|
||||
}
|
||||
|
||||
|
||||
[Obsolete]
|
||||
[Route("api/SaleStoreOut/Update")]
|
||||
[HttpPost]
|
||||
public bool UpdateVoucher([FromBody] Model.Request.SaleStoreOut storeIn)
|
||||
|
||||
@@ -16,11 +16,28 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
/// </summary>
|
||||
/// <param name="Code"></param>
|
||||
/// <returns></returns>
|
||||
[Obsolete]
|
||||
[HttpGet]
|
||||
[Route("api/Stock/GetStock")]
|
||||
public IEnumerable<Model.Response.Store.Stock> GetList([FromUri]string Code)
|
||||
{
|
||||
return new U8.Store.StockDAL().GetListByMaterialCode(Code);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询库存
|
||||
/// </summary>
|
||||
/// <param name="Code"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/Stock/Query")]
|
||||
public IEnumerable<Model.Response.Store.Stock> GetList([FromBody] NX.ERP.Model.Request.Stock stock )
|
||||
{
|
||||
return new U8.Store.StockDAL().GetList(stock);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -10,21 +10,18 @@ namespace NX.ERP.WebAPi.Controllers.System
|
||||
|
||||
public class SystemController:ApiController
|
||||
{
|
||||
[Obsolete]
|
||||
[HttpPost]
|
||||
[Route("api/System/Login")]
|
||||
public string Login(LoginEntity loginEntity)
|
||||
{
|
||||
var AccID = ConfigurationManager.AppSettings["AccId"];
|
||||
//NX.ERP.U8.U8LoginContext.Instance.PassWord = System.Configuration.ConfigurationManager.AppSettings["Password"];
|
||||
|
||||
//NX.ERP.U8.U8LoginContext.Instance.UserId = System.Configuration.ConfigurationManager.AppSettings["UserId"];
|
||||
|
||||
var Server =ConfigurationManager.AppSettings["Server"];
|
||||
var _login = new NX.ERP.U8.U8LoginContext(Server, AccID);
|
||||
_login.Login(loginEntity.UserId, loginEntity.Password);
|
||||
return _login.loginId;
|
||||
|
||||
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
|
||||
@@ -52,6 +52,11 @@
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
<HintPath>..\NX.ERP.U8\lib\ADODB.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Owin, Version=4.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.4.1.1\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||
@@ -152,6 +157,7 @@
|
||||
<Compile Include="App_Start\RouteConfig.cs" />
|
||||
<Compile Include="App_Start\SwaggerConfig.cs" />
|
||||
<Compile Include="App_Start\WebApiConfig.cs" />
|
||||
<Compile Include="Controllers\AP\APController.cs" />
|
||||
<Compile Include="Controllers\MOM\BomController.cs" />
|
||||
<Compile Include="Controllers\MOM\MomOrderController.cs" />
|
||||
<Compile Include="Controllers\Pmc\FinanceController.cs" />
|
||||
|
||||
@@ -17,3 +17,4 @@ export const getInventorybu=(info)=>{
|
||||
export const getInventorypo=(info)=>{
|
||||
return axios.post('/api/Pmc/InventoryPocode',info)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user