修正项目结构
This commit is contained in:
@@ -49,6 +49,9 @@
|
|||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
@@ -57,33 +60,40 @@
|
|||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="MOM\MoAllocate.cs" />
|
<Compile Include="Response\Store\MaterielStoreOut.cs" />
|
||||||
<Compile Include="MOM\MomDetail.cs" />
|
<Compile Include="Response\Store\MaterielStoreOutDetail.cs" />
|
||||||
<Compile Include="MOM\MomOrder.cs" />
|
<Compile Include="Request\PuStoreIn.cs" />
|
||||||
<Compile Include="Purchase\Arrival.cs" />
|
<Compile Include="Request\PuStoreInDetail.cs" />
|
||||||
<Compile Include="Purchase\ArrivalDetail.cs" />
|
<Compile Include="Response\MOM\MoAllocate.cs" />
|
||||||
<Compile Include="Base\Bin.cs" />
|
<Compile Include="Response\MOM\MomDetail.cs" />
|
||||||
<Compile Include="Base\Customer.cs" />
|
<Compile Include="Response\MOM\MomOrder.cs" />
|
||||||
<Compile Include="Base\Materiel.cs" />
|
<Compile Include="Response\Purchase\Arrival.cs" />
|
||||||
<Compile Include="Base\MaterielType.cs" />
|
<Compile Include="Response\Purchase\ArrivalDetail.cs" />
|
||||||
<Compile Include="Base\Supplier.cs" />
|
<Compile Include="Response\Base\Bin.cs" />
|
||||||
<Compile Include="Base\Unit.cs" />
|
<Compile Include="Response\Base\Customer.cs" />
|
||||||
<Compile Include="Base\Warehouse.cs" />
|
<Compile Include="Response\Base\Materiel.cs" />
|
||||||
|
<Compile Include="Response\Base\MaterielType.cs" />
|
||||||
|
<Compile Include="Response\Base\Supplier.cs" />
|
||||||
|
<Compile Include="Response\Base\Unit.cs" />
|
||||||
|
<Compile Include="Response\Base\Warehouse.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Sale\DispatchList.cs" />
|
<Compile Include="Response\Sale\DispatchList.cs" />
|
||||||
<Compile Include="Sale\DispatchListDetail.cs" />
|
<Compile Include="Response\Sale\DispatchListDetail.cs" />
|
||||||
<Compile Include="Store\MaterielStoreOut.cs" />
|
<Compile Include="Request\MaterielStoreOut.cs" />
|
||||||
<Compile Include="Store\MaterielStoreOutDetail.cs" />
|
<Compile Include="Request\MaterielStoreOutDetail.cs" />
|
||||||
<Compile Include="Store\OtherStoreIn.cs" />
|
<Compile Include="Response\Store\OtherStoreIn.cs" />
|
||||||
<Compile Include="Store\OtherStoreInDetail.cs" />
|
<Compile Include="Response\Store\OtherStoreInDetail.cs" />
|
||||||
<Compile Include="Store\OtherStoreOut.cs" />
|
<Compile Include="Response\Store\OtherStoreOut.cs" />
|
||||||
<Compile Include="Store\OtherStoreOutDetail.cs" />
|
<Compile Include="Response\Store\OtherStoreOutDetail.cs" />
|
||||||
<Compile Include="Store\ProductStoreIn.cs" />
|
<Compile Include="Response\Store\ProductStoreIn.cs" />
|
||||||
<Compile Include="Store\ProductStoreInDetail.cs" />
|
<Compile Include="Response\Store\ProductStoreInDetail.cs" />
|
||||||
<Compile Include="Store\PuStoreIn.cs" />
|
<Compile Include="Response\Store\PuStoreIn.cs" />
|
||||||
<Compile Include="Store\PuStoreInDetail.cs" />
|
<Compile Include="Response\Store\PuStoreInDetail.cs" />
|
||||||
<Compile Include="Store\SaleStoreOut.cs" />
|
<Compile Include="Response\Store\SaleStoreOut.cs" />
|
||||||
<Compile Include="Store\SaleStoreOutDetail.cs" />
|
<Compile Include="Response\Store\SaleStoreOutDetail.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
29
NX.ERP.Model/Request/MaterielStoreOut.cs
Normal file
29
NX.ERP.Model/Request/MaterielStoreOut.cs
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace NX.ERP.Model.Request
|
||||||
|
{
|
||||||
|
public class MaterielStoreOut
|
||||||
|
{
|
||||||
|
private int id;
|
||||||
|
private string code;
|
||||||
|
private string whcode;
|
||||||
|
|
||||||
|
private DateTime date;
|
||||||
|
private string sourceCode;
|
||||||
|
private string source;
|
||||||
|
private string maker;
|
||||||
|
private IList<MaterielStoreOutDetail> details;
|
||||||
|
|
||||||
|
public int Id { get => id; set => id = value; }
|
||||||
|
public string Code { get => code; set => code = value; }
|
||||||
|
public string Whcode { get => whcode; set => whcode = value; }
|
||||||
|
public string SourceCode { get => sourceCode; set => sourceCode = value; }
|
||||||
|
public string Source { get => source; set => source = value; }
|
||||||
|
public DateTime Date { get => date; set => date = value; }
|
||||||
|
public IList<MaterielStoreOutDetail> Details { get => details; set => details = value; }
|
||||||
|
public string Maker { get => maker; set => maker = value; }
|
||||||
|
}
|
||||||
|
}
|
||||||
41
NX.ERP.Model/Request/PuStoreIn.cs
Normal file
41
NX.ERP.Model/Request/PuStoreIn.cs
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace NX.ERP.Model.Request
|
||||||
|
{
|
||||||
|
public class PuStoreIn
|
||||||
|
{
|
||||||
|
private int id;
|
||||||
|
private string code;
|
||||||
|
private DateTime date;
|
||||||
|
private string depcode;
|
||||||
|
private string whcode;
|
||||||
|
private IList<PuStoreInDetail> puStoreInDetails = new List<PuStoreInDetail>();
|
||||||
|
private string _puCode;
|
||||||
|
private string maker;
|
||||||
|
private string personCode;
|
||||||
|
public IList<PuStoreInDetail> Details { get => puStoreInDetails; set => puStoreInDetails = value; }
|
||||||
|
public int Id { get => id; set => id = value; }
|
||||||
|
public string Code { get => code; set => code = value; }
|
||||||
|
public DateTime Date { get => date; set => date = value; }
|
||||||
|
public string Depcode { get => depcode; set => depcode = value; }
|
||||||
|
public string Whcode { get => whcode; set => whcode = value; }
|
||||||
|
public string Maker { get => maker; set => maker = value; }
|
||||||
|
public string PersonCode { get => personCode; set => personCode = value; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 源单类别
|
||||||
|
/// </summary>
|
||||||
|
public string Source { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 源单编号
|
||||||
|
/// </summary>
|
||||||
|
public string SourceCode { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
27
NX.ERP.Model/Request/PuStoreInDetail.cs
Normal file
27
NX.ERP.Model/Request/PuStoreInDetail.cs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace NX.ERP.Model.Request
|
||||||
|
{
|
||||||
|
public class PuStoreInDetail
|
||||||
|
{
|
||||||
|
private int id;
|
||||||
|
private int puStoreInId;
|
||||||
|
private string invcode;
|
||||||
|
private string unit;
|
||||||
|
private double quantity;
|
||||||
|
public string Batch { get; set; }
|
||||||
|
|
||||||
|
public int Id { get => id; set => id = value; }
|
||||||
|
|
||||||
|
public string Invcode { get => invcode; set => invcode = value; }
|
||||||
|
|
||||||
|
public double Quantity { get => quantity; set => quantity = value; }
|
||||||
|
|
||||||
|
public string Position { get; set; }
|
||||||
|
|
||||||
|
public int SorceDetailId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -10,6 +11,7 @@ namespace NX.ERP.Model.MOM
|
|||||||
private int id;
|
private int id;
|
||||||
private double qty;
|
private double qty;
|
||||||
private int modid;
|
private int modid;
|
||||||
|
[JsonIgnore]
|
||||||
public ICollection<MoAllocate> moAllocates { get; set; } = new List<MoAllocate>();
|
public ICollection<MoAllocate> moAllocates { get; set; } = new List<MoAllocate>();
|
||||||
public int Id { get => id; set => id = value; }
|
public int Id { get => id; set => id = value; }
|
||||||
public double Qty { get => qty; set => qty = value; }
|
public double Qty { get => qty; set => qty = value; }
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using Newtonsoft.Json;
|
||||||
namespace NX.ERP.Model.MOM
|
namespace NX.ERP.Model.MOM
|
||||||
{
|
{
|
||||||
public class MomOrder
|
public class MomOrder
|
||||||
@@ -12,10 +12,11 @@ namespace NX.ERP.Model.MOM
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ICollection<MomDetail> momDetails { get; set; } = new List<MomDetail>();
|
|
||||||
|
public ICollection<MomDetail> Details { get; set; } = new List<MomDetail>();
|
||||||
public int Id { get => id; set => id = value; }
|
public int Id { get => id; set => id = value; }
|
||||||
public string Code { get => code; set => code = value; }
|
public string Code { get => code; set => code = value; }
|
||||||
public ICollection<MoAllocate> moAllocates { get; set; } = new List<MoAllocate>();
|
public ICollection<MoAllocate> Allocates { get; set; } = new List<MoAllocate>();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
21
NX.ERP.Model/Response/Store/MaterielStoreOutDetail.cs
Normal file
21
NX.ERP.Model/Response/Store/MaterielStoreOutDetail.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 MaterielStoreOutDetail
|
||||||
|
{
|
||||||
|
|
||||||
|
private double quantity;
|
||||||
|
private string binCode;
|
||||||
|
private string cinvcode;
|
||||||
|
public int sorceDetailId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public double Quantity { get => quantity; set => quantity = value; }
|
||||||
|
public string Position { get => binCode; set => binCode = value; }
|
||||||
|
public string Cinvcode { get => cinvcode; set => cinvcode = value; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,6 +20,7 @@ namespace NX.ERP.Model.Store
|
|||||||
public string Unit { get => unit; set => unit = value; }
|
public string Unit { get => unit; set => unit = value; }
|
||||||
public double Quantity { get => quantity; set => quantity = value; }
|
public double Quantity { get => quantity; set => quantity = value; }
|
||||||
|
|
||||||
|
public string Position { get; set; }
|
||||||
|
|
||||||
public int SorceDetailId { get; set; }
|
public int SorceDetailId { get; set; }
|
||||||
}
|
}
|
||||||
4
NX.ERP.Model/packages.config
Normal file
4
NX.ERP.Model/packages.config
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net35" />
|
||||||
|
</packages>
|
||||||
@@ -298,22 +298,22 @@ namespace U8AppMain
|
|||||||
private void toolStripMenuItem2_Click(object sender, EventArgs e)
|
private void toolStripMenuItem2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var a = new NX.ERP.U8.Store.PuStoreInDAL();
|
var a = new NX.ERP.U8.Store.PuStoreInDAL();
|
||||||
var id = a.AddVocher(new NX.ERP.Model.Store.PuStoreIn()
|
var id = a.AddVocher(new NX.ERP.Model.Request.PuStoreIn()
|
||||||
{
|
{
|
||||||
Code = "0001",
|
Code = "0001",
|
||||||
Date = DateTime.Today,
|
Date = DateTime.Today,
|
||||||
RdCode = "101",
|
|
||||||
Depcode = "24",
|
Depcode = "24",
|
||||||
Whcode = "1",
|
Whcode = "1",
|
||||||
Source = "采购到货单",
|
Source = "采购到货单",
|
||||||
SourceCode = "CGDH210100187",
|
SourceCode = "CGDH210100187",
|
||||||
Details = new List<NX.ERP.Model.Store.PuStoreInDetail>() {
|
Details = new List<NX.ERP.Model.Request.PuStoreInDetail>() {
|
||||||
new NX.ERP.Model.Store.PuStoreInDetail(){
|
new NX.ERP.Model.Request.PuStoreInDetail(){
|
||||||
|
|
||||||
Quantity=1,
|
Quantity=1,
|
||||||
|
|
||||||
Invcode="201763",
|
Invcode="201763",
|
||||||
SorceDetailId=1000023624,
|
SorceDetailId=1000023624,
|
||||||
|
Position=""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -327,7 +327,7 @@ namespace U8AppMain
|
|||||||
//var a = new STVocher();
|
//var a = new STVocher();
|
||||||
//a.AddVocher();
|
//a.AddVocher();
|
||||||
var a = new NX.ERP.U8.Store.MaterielStoreOutDAL();
|
var a = new NX.ERP.U8.Store.MaterielStoreOutDAL();
|
||||||
a.AddVocher(new NX.ERP.Model.Store.MaterielStoreOut()
|
a.AddVocher(new NX.ERP.Model.Request.MaterielStoreOut()
|
||||||
{
|
{
|
||||||
Id = 1111,
|
Id = 1111,
|
||||||
Code = "2222",
|
Code = "2222",
|
||||||
@@ -336,13 +336,12 @@ namespace U8AppMain
|
|||||||
Whcode = "2",
|
Whcode = "2",
|
||||||
|
|
||||||
Date = DateTime.Now,
|
Date = DateTime.Now,
|
||||||
Details = new List<NX.ERP.Model.Store.MaterielStoreOutDetail>()
|
Details = new List<NX.ERP.Model.Request.MaterielStoreOutDetail>()
|
||||||
{
|
{
|
||||||
new NX.ERP.Model.Store.MaterielStoreOutDetail()
|
new NX.ERP.Model.Request.MaterielStoreOutDetail()
|
||||||
{
|
{
|
||||||
BinCode="002070206",
|
Position="002070206",
|
||||||
Cinvcode="218174",
|
Cinvcode="218174",
|
||||||
|
|
||||||
sorceDetailId=1000200145,
|
sorceDetailId=1000200145,
|
||||||
Quantity=1,
|
Quantity=1,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,13 +38,13 @@ namespace NX.ERP.U8.Mom
|
|||||||
if (!lookupDetail.TryGetValue(OrderDetail.Id, out var momDetail))
|
if (!lookupDetail.TryGetValue(OrderDetail.Id, out var momDetail))
|
||||||
{
|
{
|
||||||
lookupDetail.Add(OrderDetail.Id, OrderDetail);
|
lookupDetail.Add(OrderDetail.Id, OrderDetail);
|
||||||
Order.momDetails.Add(OrderDetail);
|
Order.Details.Add(OrderDetail);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OrderDetail = momDetail;
|
OrderDetail = momDetail;
|
||||||
}
|
}
|
||||||
Order.moAllocates.Add(MoAllocate);
|
Order.Allocates.Add(MoAllocate);
|
||||||
OrderDetail.moAllocates.Add(MoAllocate);
|
OrderDetail.moAllocates.Add(MoAllocate);
|
||||||
return Order;
|
return Order;
|
||||||
}, param, null, true, "id", 10, System.Data.CommandType.Text);
|
}, param, null, true, "id", 10, System.Data.CommandType.Text);
|
||||||
|
|||||||
@@ -14,6 +14,11 @@ namespace NX.ERP.U8.Sale
|
|||||||
from DispatchList as a
|
from DispatchList as a
|
||||||
left join DispatchLists as b on a.DLID = b.DLID";
|
left join DispatchLists as b on a.DLID = b.DLID";
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(strWhere))
|
||||||
|
{
|
||||||
|
strSql += $" where {strWhere} ";
|
||||||
|
}
|
||||||
|
|
||||||
using (var conn = new System.Data.SqlClient.SqlConnection(U8LoginContext.Instance.Constr4Net))
|
using (var conn = new System.Data.SqlClient.SqlConnection(U8LoginContext.Instance.Constr4Net))
|
||||||
{
|
{
|
||||||
var lookup = new Dictionary<int, Model.Sale.DispatchList>();
|
var lookup = new Dictionary<int, Model.Sale.DispatchList>();
|
||||||
@@ -43,7 +48,7 @@ namespace NX.ERP.U8.Sale
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Model.Sale.DispatchList GetModel(int id)
|
public Model.Sale.DispatchList GetModel(int id)
|
||||||
{
|
{
|
||||||
return this.GetList(" a.cDLCode=@id", new { id }).FirstOrDefault();
|
return this.GetList(" a.DLID=@id", new { id }).FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -53,9 +58,9 @@ namespace NX.ERP.U8.Sale
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Model.Sale.DispatchList GetModel(string Code)
|
public Model.Sale.DispatchList GetModel(string Code)
|
||||||
{
|
{
|
||||||
return this.GetList(" a.DLID=@Code", new { Code }).FirstOrDefault();
|
return this.GetList(" a.cDLCode=@Code", new { Code }).FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace NX.ERP.U8.Store
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public string AddVocher(MaterielStoreOut storeOut)
|
public string AddVocher(Model.Request.MaterielStoreOut storeOut)
|
||||||
{
|
{
|
||||||
VoucherParameter voucherParameter = new VoucherParameter
|
VoucherParameter voucherParameter = new VoucherParameter
|
||||||
{
|
{
|
||||||
@@ -65,8 +65,8 @@ namespace NX.ERP.U8.Store
|
|||||||
for (var n = 0; n < storeOut.Details.Count(); n++)
|
for (var n = 0; n < storeOut.Details.Count(); n++)
|
||||||
{
|
{
|
||||||
var detail = storeOut.Details[n];
|
var detail = storeOut.Details[n];
|
||||||
var alllocate = Order.moAllocates.First(m => { return m.Id == detail.sorceDetailId; });
|
var alllocate = Order.Allocates.First(m => { return m.Id == detail.sorceDetailId; });
|
||||||
var moomDetail = Order.momDetails.First(m => { return m.Id == alllocate.ModId; });
|
var moomDetail = Order.Details.First(m => { return m.Id == alllocate.ModId; });
|
||||||
bodyXml = domBody.createElement("z:row");
|
bodyXml = domBody.createElement("z:row");
|
||||||
bodyXml.setAttribute("autoid", n);
|
bodyXml.setAttribute("autoid", n);
|
||||||
bodyXml.setAttribute("cinvcode", detail.Cinvcode);
|
bodyXml.setAttribute("cinvcode", detail.Cinvcode);
|
||||||
@@ -74,7 +74,7 @@ namespace NX.ERP.U8.Store
|
|||||||
bodyXml.setAttribute("irowno", n + 1);
|
bodyXml.setAttribute("irowno", n + 1);
|
||||||
bodyXml.setAttribute("cbatch", "");
|
bodyXml.setAttribute("cbatch", "");
|
||||||
bodyXml.setAttribute("cvmivencode", "");
|
bodyXml.setAttribute("cvmivencode", "");
|
||||||
bodyXml.setAttribute("cposition", detail.BinCode);
|
bodyXml.setAttribute("cposition", detail.Position);
|
||||||
bodyXml.setAttribute("editprop", "A");
|
bodyXml.setAttribute("editprop", "A");
|
||||||
bodyXml.setAttribute("innum", 10);
|
bodyXml.setAttribute("innum", 10);
|
||||||
bodyXml.setAttribute("autoid", storeOut.Id);
|
bodyXml.setAttribute("autoid", storeOut.Id);
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ namespace NX.ERP.U8.Store
|
|||||||
bodyXml.setAttribute("editprop", "A");
|
bodyXml.setAttribute("editprop", "A");
|
||||||
bodyXml.setAttribute("cbatch", detail.Batch);
|
bodyXml.setAttribute("cbatch", detail.Batch);
|
||||||
bodyXml.setAttribute("cposition", detail.Position);
|
bodyXml.setAttribute("cposition", detail.Position);
|
||||||
var momOrderDetail = momOrder.momDetails.First(m => { return m.Id == detail.SourceDetailId; });
|
var momOrderDetail = momOrder.Details.First(m => { return m.Id == detail.SourceDetailId; });
|
||||||
headXml.setAttribute("cmpocode", momOrder.Code);
|
headXml.setAttribute("cmpocode", momOrder.Code);
|
||||||
headXml.setAttribute("iproorderid", momOrder.Id);
|
headXml.setAttribute("iproorderid", momOrder.Id);
|
||||||
domBody.selectSingleNode("//rs:data").appendChild(bodyXml);
|
domBody.selectSingleNode("//rs:data").appendChild(bodyXml);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace NX.ERP.U8.Store
|
|||||||
/// 保存一个采购到货单
|
/// 保存一个采购到货单
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="puStoreIn"></param>
|
/// <param name="puStoreIn"></param>
|
||||||
public string AddVocher(Model.Store.PuStoreIn puStoreIn)
|
public string AddVocher(Model.Request.PuStoreIn puStoreIn)
|
||||||
{
|
{
|
||||||
|
|
||||||
VoucherParameter voucherParameter = new VoucherParameter
|
VoucherParameter voucherParameter = new VoucherParameter
|
||||||
@@ -43,13 +43,13 @@ namespace NX.ERP.U8.Store
|
|||||||
headXml.setAttribute("bpufirst", "0"); //DomHead[0]["bpufirst"] = ""; //采购期初标志,string类型
|
headXml.setAttribute("bpufirst", "0"); //DomHead[0]["bpufirst"] = ""; //采购期初标志,string类型
|
||||||
headXml.setAttribute("brdflag", 1); //DomHead[0]["brdflag"] = ""; //收发标志,int类型
|
headXml.setAttribute("brdflag", 1); //DomHead[0]["brdflag"] = ""; //收发标志,int类型
|
||||||
headXml.setAttribute("csource", puStoreIn.Source); //DomHead[0]["csource"] = ""; //单据来源,int类型
|
headXml.setAttribute("csource", puStoreIn.Source); //DomHead[0]["csource"] = ""; //单据来源,int类型
|
||||||
headXml.setAttribute("cmaker", U8LoginContext.Instance.LoginUserName);//DomHead[0]["cmaker"] = ""; //制单人,string类型
|
headXml.setAttribute("cmaker", puStoreIn.Maker);//DomHead[0]["cmaker"] = ""; //制单人,string类型
|
||||||
headXml.setAttribute("vt_id", "27");
|
headXml.setAttribute("vt_id", "27");
|
||||||
headXml.setAttribute("editprop", "A");
|
headXml.setAttribute("editprop", "A");
|
||||||
headXml.setAttribute("cdepcode", puStoreIn.Depcode);
|
headXml.setAttribute("cdepcode", puStoreIn.Depcode);
|
||||||
headXml.setAttribute("cpersoncode", puStoreIn.PersonCode);
|
headXml.setAttribute("cpersoncode", puStoreIn.PersonCode);
|
||||||
headXml.setAttribute("crdcode", puStoreIn.RdCode);
|
headXml.setAttribute("crdcode", "101" /*puStoreIn.RdCode*/);
|
||||||
headXml.setAttribute("cwhcode", "1");
|
headXml.setAttribute("cwhcode", puStoreIn.Whcode);
|
||||||
headXml.setAttribute("bisstqc", "0");
|
headXml.setAttribute("bisstqc", "0");
|
||||||
if (puStoreIn.Source == "采购到货单")
|
if (puStoreIn.Source == "采购到货单")
|
||||||
{
|
{
|
||||||
@@ -74,11 +74,13 @@ namespace NX.ERP.U8.Store
|
|||||||
bodyXml = domBody.createElement("z:row");
|
bodyXml = domBody.createElement("z:row");
|
||||||
bodyXml.setAttribute("cinvcode", detail.Invcode);
|
bodyXml.setAttribute("cinvcode", detail.Invcode);
|
||||||
bodyXml.setAttribute("iquantity", detail.Quantity);
|
bodyXml.setAttribute("iquantity", detail.Quantity);
|
||||||
bodyXml.setAttribute("irowno", n+1);
|
bodyXml.setAttribute("irowno", n + 1);
|
||||||
bodyXml.setAttribute("cbvencode", "10001");
|
bodyXml.setAttribute("cbvencode", "10001");
|
||||||
bodyXml.setAttribute("inquantity", detail.Quantity); //应收数量,double类型
|
bodyXml.setAttribute("inquantity", detail.Quantity); //应收数量,double类型
|
||||||
bodyXml.setAttribute("cbatch", detail.Batch);
|
bodyXml.setAttribute("cbatch", detail.Batch);
|
||||||
bodyXml.setAttribute("innum", 0);
|
bodyXml.setAttribute("innum", 0);
|
||||||
|
bodyXml.setAttribute("cposition", detail.Position);
|
||||||
|
// bodyXml.setAttribute("cposname", "B1Y1H001"); //货位,string类型
|
||||||
//iXMLDOMElement.setAttribute("carvcode", Arrival.ArrivalCode);
|
//iXMLDOMElement.setAttribute("carvcode", Arrival.ArrivalCode);
|
||||||
bodyXml.setAttribute("cbarvcode", Arrival.ArrivalCode);
|
bodyXml.setAttribute("cbarvcode", Arrival.ArrivalCode);
|
||||||
bodyXml.setAttribute("ipurarriveid", Arrival.Id);
|
bodyXml.setAttribute("ipurarriveid", Arrival.Id);
|
||||||
|
|||||||
@@ -90,11 +90,11 @@ namespace NX.ERP.WebAPi
|
|||||||
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
|
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
|
||||||
Formatting = Newtonsoft.Json.Formatting.Indented,
|
Formatting = Newtonsoft.Json.Formatting.Indented,
|
||||||
//小驼峰命名法
|
//小驼峰命名法
|
||||||
ContractResolver = new DefaultContractResolver()
|
//ContractResolver = new DefaultContractResolver()
|
||||||
{
|
//{
|
||||||
|
|
||||||
NamingStrategy = new SnakeCaseNamingStrategy()
|
// NamingStrategy = new SnakeCaseNamingStrategy()
|
||||||
}
|
//}
|
||||||
//格式化日期时间
|
//格式化日期时间
|
||||||
|
|
||||||
//空值处理
|
//空值处理
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ namespace NX.ERP.WebAPi.Controllers.MOM
|
|||||||
{
|
{
|
||||||
public class MomOrderController : ApiController
|
public class MomOrderController : ApiController
|
||||||
{
|
{
|
||||||
|
[Route("api/MomOrder/List")]
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<Model.MOM.MomOrder> List()
|
public IEnumerable<Model.MOM.MomOrder> List()
|
||||||
{
|
{
|
||||||
@@ -15,14 +16,21 @@ namespace NX.ERP.WebAPi.Controllers.MOM
|
|||||||
return customerDAL.GetList();
|
return customerDAL.GetList();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
[Route("api/MomOrder/list/{id}")]
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<Model.MOM.MomOrder> GetListByLastID(int Code)
|
public IEnumerable<Model.MOM.MomOrder> GetListByLastID(int id)
|
||||||
{
|
{
|
||||||
var customerDAL = new NX.ERP.U8.Mom.MomOrderDAL();
|
var customerDAL = new NX.ERP.U8.Mom.MomOrderDAL();
|
||||||
return customerDAL.GetListByLastID(Code);
|
return customerDAL.GetListByLastID(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Route("api/MomOrder/{Code}")]
|
||||||
|
[HttpGet]
|
||||||
|
public Model.MOM.MomOrder GetModel(string Code)
|
||||||
|
{
|
||||||
|
var customerDAL = new NX.ERP.U8.Mom.MomOrderDAL();
|
||||||
|
return customerDAL.GetModel(Code);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,7 +9,7 @@ namespace NX.ERP.WebAPi.Controllers
|
|||||||
{
|
{
|
||||||
public class ArrivalController : ApiController
|
public class ArrivalController : ApiController
|
||||||
{
|
{
|
||||||
|
[Route("api/Arrival/List")]
|
||||||
// GET api/values
|
// GET api/values
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<Model.Purchase.Arrival> List()
|
public IEnumerable<Model.Purchase.Arrival> List()
|
||||||
@@ -18,18 +18,20 @@ namespace NX.ERP.WebAPi.Controllers
|
|||||||
return customerDAL.GetList();
|
return customerDAL.GetList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Route("api/Arrival/{Code}")]
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public Model.Purchase.Arrival Model(string Code)
|
public Model.Purchase.Arrival Model(string Code)
|
||||||
{
|
{
|
||||||
var customerDAL = new ArrivalDAL();
|
var customerDAL = new ArrivalDAL();
|
||||||
return customerDAL.GetModel(Code);
|
return customerDAL.GetModel(Code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Route("api/Arrival/list/{id}")]
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<Model.Purchase.Arrival> GetListByLastID(int Code)
|
public IEnumerable<Model.Purchase.Arrival> GetListByLastID(int id)
|
||||||
{
|
{
|
||||||
var customerDAL = new ArrivalDAL();
|
var customerDAL = new ArrivalDAL();
|
||||||
return customerDAL.GetListByLastId(Code);
|
return customerDAL.GetListByLastId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ namespace NX.ERP.WebAPi.Controllers.Sale
|
|||||||
{
|
{
|
||||||
public class DispatchController : ApiController
|
public class DispatchController : ApiController
|
||||||
{
|
{
|
||||||
|
[Route("api/Dispatch/List")]
|
||||||
// GET api/values
|
// GET api/values
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<Model.Sale.DispatchList> List()
|
public IEnumerable<Model.Sale.DispatchList> List()
|
||||||
@@ -24,18 +25,19 @@ namespace NX.ERP.WebAPi.Controllers.Sale
|
|||||||
var customerDAL = new DispatchListDAL();
|
var customerDAL = new DispatchListDAL();
|
||||||
return customerDAL.GetModel(id);
|
return customerDAL.GetModel(id);
|
||||||
}
|
}
|
||||||
|
[Route("api/Dispatch/{Code}")]
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public Model.Sale.DispatchList ModelByCode(string Code)
|
public Model.Sale.DispatchList ModelByCode(string Code)
|
||||||
{
|
{
|
||||||
var customerDAL = new DispatchListDAL();
|
var customerDAL = new DispatchListDAL();
|
||||||
return customerDAL.GetModel(Code);
|
return customerDAL.GetModel(Code);
|
||||||
}
|
}
|
||||||
|
[Route("api/Dispatch/List/{id}")]
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<Model.Sale.DispatchList> GetListByLastID(int Code)
|
public IEnumerable<Model.Sale.DispatchList> GetListByLastID(int id)
|
||||||
{
|
{
|
||||||
var customerDAL = new DispatchListDAL();
|
var customerDAL = new DispatchListDAL();
|
||||||
return customerDAL.GetListByLastID(Code);
|
return customerDAL.GetListByLastID(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,10 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
|||||||
{
|
{
|
||||||
public class MaterielStoreOutController:ApiController
|
public class MaterielStoreOutController:ApiController
|
||||||
{
|
{
|
||||||
|
[Route("api/MaterialOut/Add")]
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public string AddVoucher([FromBody] Model.Store.MaterielStoreOut storeIn)
|
|
||||||
|
public string AddVoucher([FromBody] Model.Request.MaterielStoreOut storeIn)
|
||||||
{
|
{
|
||||||
var dal = new NX.ERP.U8.Store.MaterielStoreOutDAL();
|
var dal = new NX.ERP.U8.Store.MaterielStoreOutDAL();
|
||||||
return dal.AddVocher(storeIn);
|
return dal.AddVocher(storeIn);
|
||||||
|
|||||||
@@ -8,11 +8,12 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
|||||||
{
|
{
|
||||||
public class PuStoreInController : ApiController
|
public class PuStoreInController : ApiController
|
||||||
{
|
{
|
||||||
|
[Route("api/PuStoreIn/Add")]
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public string AddVoucher([FromBody] Model.Store.PuStoreIn storeIn)
|
public object AddVoucher([FromBody] Model.Request.PuStoreIn storeIn)
|
||||||
{
|
{
|
||||||
var dal = new NX.ERP.U8.Store.PuStoreInDAL();
|
var dal = new NX.ERP.U8.Store.PuStoreInDAL();
|
||||||
return dal.AddVocher(storeIn);
|
return new { Id = dal.AddVocher(storeIn) };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user