diff --git a/NX.ERP.BLL/Model/Inbound.cs b/NX.ERP.BLL/Model/Inbound.cs new file mode 100644 index 0000000..39198a8 --- /dev/null +++ b/NX.ERP.BLL/Model/Inbound.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.BLL.Model +{ + public class Inbound:NX.ERP.Model.BaseModel + { + public string InboundNo { get; set; } + public DateTime InboundDate { get; set; } + + public InboundType InboundType { get; set; } + + public string WarehouseCode { get; set; } + + public string SourceNo { get; set; } + + public string SourceName { get; set; } + public IEnumerable InboundDtlLst { get; set; } + public string Maker { get; set; } + + + } +} diff --git a/NX.ERP.BLL/Model/InboundDetail.cs b/NX.ERP.BLL/Model/InboundDetail.cs new file mode 100644 index 0000000..4b0bb3f --- /dev/null +++ b/NX.ERP.BLL/Model/InboundDetail.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.BLL.Model +{ + public class InboundDetail + { + public string MaterialCode { get; set; } + public double Qty { get; set; } + public int SourceDtlId { get; set; } + public string BinCode { get; set; } + + } +} diff --git a/NX.ERP.BLL/Model/InboundType.cs b/NX.ERP.BLL/Model/InboundType.cs new file mode 100644 index 0000000..e5dd0eb --- /dev/null +++ b/NX.ERP.BLL/Model/InboundType.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.BLL.Model +{ + public enum InboundType + { + PurchaseIn = 1, + productIn = 2, + OtherIn = 3 + } +} diff --git a/NX.ERP.BLL/Model/OutBound.cs b/NX.ERP.BLL/Model/OutBound.cs new file mode 100644 index 0000000..11e6be8 --- /dev/null +++ b/NX.ERP.BLL/Model/OutBound.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.BLL.Model +{ + public class OutBound + { + public string OutboundNo { get; set; } + public DateTime OutboundDate { get; set; } + public OutBoundType OutBoundType { get; set; } + + public string WarehouseCode { get; set; } + + + public string SourceNo { get; set; } + public string SourceName { get; set; } + public string Maker { get; set; } + public List OutboundDtlLst { get; set; } + // outbound_no + //outbound_date + //outbound_type + //warehouse_code + //source_no + //source_name + //maker + + } +} diff --git a/NX.ERP.BLL/Model/OutBoundDetail.cs b/NX.ERP.BLL/Model/OutBoundDetail.cs new file mode 100644 index 0000000..a811034 --- /dev/null +++ b/NX.ERP.BLL/Model/OutBoundDetail.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.BLL.Model +{ + public class OutBoundDetail + { + public string MaterialCode { get; set; } + public double Qty { get; set; } + public string BinCode { get; set; } + public int SourceDtlId { get; set; } + + +// material_code +//qty +//source_dtl_id +//bin_code + + } +} diff --git a/NX.ERP.BLL/Model/OutBoundType.cs b/NX.ERP.BLL/Model/OutBoundType.cs new file mode 100644 index 0000000..2840c41 --- /dev/null +++ b/NX.ERP.BLL/Model/OutBoundType.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.BLL.Model +{ + public enum OutBoundType + { + SaleOut=1, + MaterielOut=2, + OtherOut=3 + + //1:销售出库;2:原材料出库;3:其它出库 + } +} diff --git a/NX.ERP.BLL/Model/StoreResult.cs b/NX.ERP.BLL/Model/StoreResult.cs new file mode 100644 index 0000000..222a0ac --- /dev/null +++ b/NX.ERP.BLL/Model/StoreResult.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.BLL.Model +{ + public class StoreResult + { + public int ID { get; set; } + } +} diff --git a/NX.ERP.BLL/NX.ERP.BLL.csproj b/NX.ERP.BLL/NX.ERP.BLL.csproj new file mode 100644 index 0000000..af74560 --- /dev/null +++ b/NX.ERP.BLL/NX.ERP.BLL.csproj @@ -0,0 +1,64 @@ + + + + + Debug + AnyCPU + {C1FFE393-1879-4FC1-A99E-695F2882553D} + Library + Properties + NX.ERP.BLL + NX.ERP.BLL + v3.5 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + {5d012e0a-afed-474e-81a9-5820890b1b29} + NX.ERP.Model + + + {bd673da9-0606-4bcf-a016-fb5c4e7b5d59} + NX.ERP.U8 + + + + \ No newline at end of file diff --git a/NX.ERP.BLL/Properties/AssemblyInfo.cs b/NX.ERP.BLL/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..eb79d70 --- /dev/null +++ b/NX.ERP.BLL/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("NX.ERP.BLL")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NX.ERP.BLL")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("c1ffe393-1879-4fc1-a99e-695f2882553d")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/NX.ERP.BLL/Store/SotreIn.cs b/NX.ERP.BLL/Store/SotreIn.cs new file mode 100644 index 0000000..3e8b5c5 --- /dev/null +++ b/NX.ERP.BLL/Store/SotreIn.cs @@ -0,0 +1,92 @@ +using NX.ERP.BLL.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.BLL.Store +{ + public class SotreIn + { + public StoreResult AddVoucher(Model.Inbound inbound) + { + var deptCode = "52"; + string ID = ""; + + if (inbound.InboundType == Model.InboundType.productIn) + { + var dal = new NX.ERP.U8.Store.PuStoreInDAL(); + ID = dal.AddVocher(new ERP.Model.Request.PuStoreIn() + { + Date = inbound.InboundDate, + Source = inbound.SourceName, + SourceCode = inbound.SourceNo, + Whcode = inbound.WarehouseCode, + Deptcode = deptCode, + Maker = inbound.Maker, + Details = inbound.InboundDtlLst.ToList().ConvertAll(m => + { + return new ERP.Model.Request.PuStoreInDetail() + { + Invcode = m.MaterialCode, + SorceDetailId = m.SourceDtlId, + Position = m.BinCode, + Quantity = m.Qty + }; + + }) + + }); + } + + if (inbound.InboundType == Model.InboundType.PurchaseIn) + { + var dal = new NX.ERP.U8.Store.ProductInDAL(); + ID = dal.AddVoucher(new ERP.Model.Request.ProductStoreIn() + { + Date = inbound.InboundDate, + Source = inbound.SourceName, + SourceCode = inbound.SourceNo, + WhCode = inbound.WarehouseCode, + Deptcode = deptCode, + Maker = inbound.Maker, + Details = inbound.InboundDtlLst.ToList().ConvertAll(m => + { + return new ERP.Model.Request.ProductStoreInDetail() + { + Batch = "", + InvCode = m.MaterialCode, + SourceDetailId = m.SourceDtlId, + Position = m.BinCode, + Quantity = m.Qty + }; + }) + }); + } + if (inbound.InboundType == Model.InboundType.OtherIn) + { + var dal = new NX.ERP.U8.Store.OtherStoreInDAL(); + ID = dal.AddVocher(new ERP.Model.Request.OtherStoreInOut() + { + Date = inbound.InboundDate, + WhCode = inbound.WarehouseCode, + Maker = inbound.Maker, + details = inbound.InboundDtlLst.ToList().ConvertAll(m => + { + return new ERP.Model.Request.OtherStoreInOutDetail() + { + InvCode = m.MaterialCode, + Position = m.BinCode, + Quantity = m.Qty + }; + + }) + + }); + + } + return new StoreResult() { ID = int.Parse( ID) }; + + } + } +} diff --git a/NX.ERP.BLL/Store/SotreOut.cs b/NX.ERP.BLL/Store/SotreOut.cs new file mode 100644 index 0000000..29f17c0 --- /dev/null +++ b/NX.ERP.BLL/Store/SotreOut.cs @@ -0,0 +1,90 @@ +using NX.ERP.BLL.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.BLL.Store +{ + public class SotreOut + { + public StoreResult AddVoucher(Model.OutBound outBound) + { + string ID = ""; + + if (outBound.OutBoundType == Model.OutBoundType.MaterielOut) + { + var dal = new U8.Store.MaterielStoreOutDAL(); + ID = dal.AddVocher(new ERP.Model.Request.MaterielStoreOut() + { + Date = outBound.OutboundDate, + Maker = outBound.Maker, + Source = outBound.SourceName, + SourceCode = outBound.SourceNo, + Whcode = outBound.WarehouseCode, + + Details = outBound.OutboundDtlLst.ConvertAll(m => + { + return new ERP.Model.Request.MaterielStoreOutDetail() + { + + InvCode = m.MaterialCode, + Position = m.BinCode, + Quantity = m.Qty, + SorceDetailId = m.SourceDtlId + }; + + }) + }); + + } + if (outBound.OutBoundType == Model.OutBoundType.SaleOut) + { + var dal = new U8.Store.SaleOutDAL(); + ID = dal.AddVoucher(new ERP.Model.Request.SaleStoreOut() + { + Date = outBound.OutboundDate, + WhCode = outBound.Maker, + Source = outBound.SourceName, + SourceCode = outBound.SourceNo, + Maker = outBound.Maker, + Details = outBound.OutboundDtlLst.ConvertAll(m => + { + return new ERP.Model.Request.SaleStoreOutDetail() + { + InvCode = m.MaterialCode, + Position = m.BinCode, + Quantity = m.Qty, + SourceDetailId = m.SourceDtlId + }; + }) + }); + + } + if (outBound.OutBoundType == Model.OutBoundType.OtherOut) + { + var dal = new U8.Store.OtherStoreOutDAL(); + ID = dal.AddVocher(new ERP.Model.Request.OtherStoreInOut() + { + Date = outBound.OutboundDate, + WhCode = outBound.Maker, + + Maker = outBound.Maker, + details = outBound.OutboundDtlLst.ConvertAll(m => + { + return new ERP.Model.Request.OtherStoreInOutDetail() + { + InvCode = m.MaterialCode, + Position = m.BinCode, + Quantity = m.Qty, + + }; + }) + }); + + } + return new StoreResult() { ID = int.Parse(ID) }; + + } + } +} diff --git a/NX.ERP.Model/Request/OtherStoreIn.cs b/NX.ERP.Model/Request/OtherStoreIn.cs index fb4f8fa..fb30372 100644 --- a/NX.ERP.Model/Request/OtherStoreIn.cs +++ b/NX.ERP.Model/Request/OtherStoreIn.cs @@ -10,6 +10,7 @@ namespace NX.ERP.Model.Request public string Code { get; set; } public DateTime Date { get; set; } public string WhCode { get; set; } + public string Maker { get; set; } public IList details = new List(); } } diff --git a/NX.ERP.Model/Request/ProductStoreIn.cs b/NX.ERP.Model/Request/ProductStoreIn.cs index 2f42b9e..8394fc0 100644 --- a/NX.ERP.Model/Request/ProductStoreIn.cs +++ b/NX.ERP.Model/Request/ProductStoreIn.cs @@ -7,6 +7,8 @@ namespace NX.ERP.Model.Request { public class ProductStoreIn { + public string Maker { get; set; } + public string Deptcode { get; set; } public DateTime Date { get; set; } public string Source { get; set; } public string SourceCode { get; set; } diff --git a/NX.ERP.Model/Request/ProductStoreInDetail.cs b/NX.ERP.Model/Request/ProductStoreInDetail.cs index 9bec114..ff3673f 100644 --- a/NX.ERP.Model/Request/ProductStoreInDetail.cs +++ b/NX.ERP.Model/Request/ProductStoreInDetail.cs @@ -8,7 +8,7 @@ namespace NX.ERP.Model.Request public class ProductStoreInDetail { public string InvCode { get; set; } - public int Quantity { get; set; } + public double Quantity { get; set; } public string Batch { get; set; } public string Position { get; set; } public int SourceDetailId { get; set; } diff --git a/NX.ERP.Model/Request/PuStoreIn.cs b/NX.ERP.Model/Request/PuStoreIn.cs index 6877f85..3b26541 100644 --- a/NX.ERP.Model/Request/PuStoreIn.cs +++ b/NX.ERP.Model/Request/PuStoreIn.cs @@ -20,7 +20,7 @@ namespace NX.ERP.Model.Request 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 Deptcode { 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; } diff --git a/NX.ERP.Model/Request/SaleStoreOut.cs b/NX.ERP.Model/Request/SaleStoreOut.cs index 118a8ac..362eba5 100644 --- a/NX.ERP.Model/Request/SaleStoreOut.cs +++ b/NX.ERP.Model/Request/SaleStoreOut.cs @@ -12,6 +12,7 @@ namespace NX.ERP.Model.Request public string SourceCode { get; set; } public DateTime Date { get; set; } public string WhCode { get; set; } + public string Maker { get; set; } public IList Details { get; set; } = new List(); } } diff --git a/NX.ERP.Model/Response/MOM/MoAllocate.cs b/NX.ERP.Model/Response/MOM/MoAllocate.cs index 3caf117..b3c3fce 100644 --- a/NX.ERP.Model/Response/MOM/MoAllocate.cs +++ b/NX.ERP.Model/Response/MOM/MoAllocate.cs @@ -9,12 +9,12 @@ namespace NX.ERP.Model.MOM { private int id; private string invCode; - private int qty; + private double qty; private int modid; public int Id { get => id; set => id = value; } public string InvCode { get => invCode; set => invCode = value; } - public int Qty { get => qty; set => qty = value; } + public double Qty { get => qty; set => qty = value; } public int ModId { get => modid; set => modid = value; } } } diff --git a/NX.ERP.Model/Response/MOM/MomOrder.cs b/NX.ERP.Model/Response/MOM/MomOrder.cs index 2b6315f..1e50ff6 100644 --- a/NX.ERP.Model/Response/MOM/MomOrder.cs +++ b/NX.ERP.Model/Response/MOM/MomOrder.cs @@ -9,15 +9,16 @@ namespace NX.ERP.Model.MOM { private int id; private string code; + public DateTime Date { get; set; } /// /// /// - + public ICollection Details { get; set; } = new List(); public int Id { get => id; set => id = value; } public string Code { get => code; set => code = value; } public ICollection Allocates { get; set; } = new List(); - + } } diff --git a/NX.ERP.U8.App/FrmMain.cs b/NX.ERP.U8.App/FrmMain.cs index 969c004..f25d909 100644 --- a/NX.ERP.U8.App/FrmMain.cs +++ b/NX.ERP.U8.App/FrmMain.cs @@ -320,7 +320,7 @@ namespace U8AppMain Code = "0001", Date = DateTime.Today, - Depcode = "24", + Deptcode = "24", Whcode = "1", Source = "采购到货单", SourceCode = "CGDH210100187", diff --git a/NX.ERP.U8/Mom/MomOrderDAL.cs b/NX.ERP.U8/Mom/MomOrderDAL.cs index dfc33a3..2bfda29 100644 --- a/NX.ERP.U8/Mom/MomOrderDAL.cs +++ b/NX.ERP.U8/Mom/MomOrderDAL.cs @@ -11,7 +11,7 @@ namespace NX.ERP.U8.Mom { using (var conn = new System.Data.SqlClient.SqlConnection(U8LoginContext.Instance.Constr4Net)) { - string strSQL = @"select a.MoId as id,a.moCode as Code,a.*,b.MoDId as id ,b.*,c.AllocateId as id ,c.* from mom_order as a + string strSQL = @"select a.MoId as id,a.moCode as Code,a.CreateDate as date,a.*,b.MoDId as id ,b.*,c.AllocateId as id ,c.* from mom_order as a left join mom_orderdetail as b on a.MoId=b.MoId left join mom_moallocate as c on b.MoDId=c.MoDId"; if (!string.IsNullOrEmpty(strWhere)) diff --git a/NX.ERP.U8/Store/OtherStoreInDAL.cs b/NX.ERP.U8/Store/OtherStoreInDAL.cs index b47c627..23bc44e 100644 --- a/NX.ERP.U8/Store/OtherStoreInDAL.cs +++ b/NX.ERP.U8/Store/OtherStoreInDAL.cs @@ -37,7 +37,7 @@ namespace NX.ERP.U8.Store headXml.setAttribute("brdflag", 1); headXml.setAttribute("ccode", storeIn.Code); headXml.setAttribute("ddate", storeIn.Date); - headXml.setAttribute("cmaker", "/"); + headXml.setAttribute("cmaker",storeIn.Maker); headXml.setAttribute("cvouchtype", this.VoucherID); headXml.setAttribute("vt_id",new VT().GetDefaltVTID("0301")); headXml.setAttribute("editprop", "A"); diff --git a/NX.ERP.U8/Store/ProductInDAL.cs b/NX.ERP.U8/Store/ProductInDAL.cs index 175cb27..8b4d27d 100644 --- a/NX.ERP.U8/Store/ProductInDAL.cs +++ b/NX.ERP.U8/Store/ProductInDAL.cs @@ -35,7 +35,7 @@ namespace NX.ERP.U8.Store headXml.setAttribute("brdflag", 1); headXml.setAttribute("ccode", "11"); headXml.setAttribute("ddate", storeIn.Date); - headXml.setAttribute("cmaker", ""); + headXml.setAttribute("cmaker", storeIn.Maker); headXml.setAttribute("vt_id", new VT().GetDefaltVTID("0411")); headXml.setAttribute("editprop", "A"); diff --git a/NX.ERP.U8/Store/PuStoreInDAL.cs b/NX.ERP.U8/Store/PuStoreInDAL.cs index fa0bcd0..254b48c 100644 --- a/NX.ERP.U8/Store/PuStoreInDAL.cs +++ b/NX.ERP.U8/Store/PuStoreInDAL.cs @@ -46,7 +46,7 @@ namespace NX.ERP.U8.Store headXml.setAttribute("cmaker", puStoreIn.Maker);//DomHead[0]["cmaker"] = ""; //制单人,string类型 headXml.setAttribute("vt_id", new VT().GetDefaltVTID("24")); headXml.setAttribute("editprop", "A"); - headXml.setAttribute("cdepcode", puStoreIn.Depcode); + headXml.setAttribute("cdepcode", puStoreIn.Deptcode); headXml.setAttribute("cpersoncode", puStoreIn.PersonCode); headXml.setAttribute("crdcode", "101" /*puStoreIn.RdCode*/); headXml.setAttribute("cwhcode", puStoreIn.Whcode); diff --git a/NX.ERP.U8/Store/SaleOutDAL.cs b/NX.ERP.U8/Store/SaleOutDAL.cs index 530e215..4141b8c 100644 --- a/NX.ERP.U8/Store/SaleOutDAL.cs +++ b/NX.ERP.U8/Store/SaleOutDAL.cs @@ -38,7 +38,7 @@ namespace NX.ERP.U8.Store headXml.setAttribute("brdflag", 0); headXml.setAttribute("ccode", storeOut.Code); headXml.setAttribute("ddate", storeOut.Date); - headXml.setAttribute("cmaker", ""); + headXml.setAttribute("cmaker", storeOut.Maker); headXml.setAttribute("vt_id", new VT().GetDefaltVTID("0303")); headXml.setAttribute("editprop", "A"); diff --git a/NX.ERP.U8/Store/VoucherBase.cs b/NX.ERP.U8/Store/VoucherBase.cs index dec0011..2f8efd4 100644 --- a/NX.ERP.U8/Store/VoucherBase.cs +++ b/NX.ERP.U8/Store/VoucherBase.cs @@ -19,7 +19,7 @@ namespace NX.ERP.U8.Store { get { - return $"{AppDomain.CurrentDomain.BaseDirectory}XMLDOM\\XMLDomBody{this.voucherID}.xml"; + return $"{AppDomain.CurrentDomain.BaseDirectory}\\XMLDOM\\XMLDomBody{this.voucherID}.xml"; } } @@ -28,7 +28,7 @@ namespace NX.ERP.U8.Store get { - return $"{AppDomain.CurrentDomain.BaseDirectory}XMLDOM\\XMLDomHead{this.voucherID}.xml"; + return $"{AppDomain.CurrentDomain.BaseDirectory}\\XMLDOM\\XMLDomHead{this.voucherID}.xml"; } } protected string LoadUrl @@ -265,7 +265,7 @@ namespace NX.ERP.U8.Store { if (!Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + "XMLDOM")) { - Directory.CreateDirectory(AppDomain.CurrentDomain.RelativeSearchPath + "XMLDOM"); + Directory.CreateDirectory(AppDomain.CurrentDomain.BaseDirectory + "XMLDOM"); } rdVoucherParameter = new VoucherParameter { diff --git a/NX.ERP.WMS/BLL/ArrivalAndProductPlanBLL.cs b/NX.ERP.WMS/BLL/ArrivalAndProductPlanBLL.cs new file mode 100644 index 0000000..3718e57 --- /dev/null +++ b/NX.ERP.WMS/BLL/ArrivalAndProductPlanBLL.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.WMS.BLL +{ + public class ArrivalAndProductPlanBLL + { + //public IEnumerable GetArrivalAndProductPlanBills(Request.ArrivalAndProductPlan Params) + //{ + //var result = new List(); + //if (Params.BillType == 0 || Params.BillType==1) + //{ + // var dal = new NX.ERP.U8.Purchase.ArrivalDAL(); + // var model = dal.GetList(); + + // foreach (var item in model) + // { + + // var dec = new Model.ArrivalAndProductPlanBill(); + // dec.ArrivalNo = item.ArrivalCode; + // dec.BillDate = item.Date; + // dec.BillID = item.Id; + // dec.ExchRate = item.ExchRate; + // dec.BillType = "采购到货单"; + // foreach (var dtl in item.Details) + // { + // var detal = new Model.ArrivalAndProductPlanBillDetail(); + // detal.BillDtlId = dtl.Id; + // detal.BillId = item.Id; + // detal.MaterialCode = dtl.MaterielCode; + // detal.Qty = dtl.Quantity; + // detal.UnitCode = dtl.UnitCode; + // dec.ArrivalDtlLst.Add(detal); + // } + // result.Add(dec); + // } + //} + + //if (Params.BillType==0||Params.BillType==2) + //{ + + // var momOrderDal = new NX.ERP.U8.Mom.MomOrderDAL(); + // var momOrders = momOrderDal.GetList(); + // foreach (var item in momOrders) + // { + // var dec = new Model.ArrivalAndProductPlanBill(); + // dec.ArrivalNo = item.Code; + + // dec.BillDate = item.Date; + // dec.BillID = item.Id; + + // dec.BillType = "生产订单"; + // foreach (var dtl in item.Allocates) + // { + // var detal = new Model.ArrivalAndProductPlanBillDetail(); + // detal.BillDtlId = dtl.Id; + // detal.BillId = item.Id; + // detal.MaterialCode = dtl.InvCode; + // detal.OrderCode= + // //detal.Qty = dtl.Qty; + // dec.ArrivalDtlLst.Add(detal); + // } + // result.Add(dec); + + // } + + + //} + + + + //} + + } +} diff --git a/NX.ERP.WMS/Model/ArrivalAndProductPlanBill.cs b/NX.ERP.WMS/Model/ArrivalAndProductPlanBill.cs new file mode 100644 index 0000000..f923db0 --- /dev/null +++ b/NX.ERP.WMS/Model/ArrivalAndProductPlanBill.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.WMS.Model +{ + public class ArrivalAndProductPlanBill : NX.ERP.Model.BaseModel + { + + public int BillID { get; set; } + public string ArrivalNo { get; set; } + + public string ArrivalName { get; set; } + public string BillType { get; set; } + public DateTime BillDate { get; set; } + + public double ExchRate { get; set; } + + public List ArrivalDtlLst { get; set; } = new List(); + + + } +} diff --git a/NX.ERP.WMS/Model/ArrivalAndProductPlanBillDetail.cs b/NX.ERP.WMS/Model/ArrivalAndProductPlanBillDetail.cs new file mode 100644 index 0000000..abdac8f --- /dev/null +++ b/NX.ERP.WMS/Model/ArrivalAndProductPlanBillDetail.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.WMS.Model +{ + public class ArrivalAndProductPlanBillDetail + { + public int BillDtlId { get; set; } + public int BillId { get; set; } + public string MaterialCode { get; set; } + + public string BatchNo { get; set; } + + public string UnitCode { get; set; } + + public double Qty { get; set; } + public string SupplierCode { get; set; } + public string OrderCode { get; set; } + + } +} diff --git a/NX.ERP.WMS/NX.ERP.WMS.csproj b/NX.ERP.WMS/NX.ERP.WMS.csproj new file mode 100644 index 0000000..37bba6f --- /dev/null +++ b/NX.ERP.WMS/NX.ERP.WMS.csproj @@ -0,0 +1,60 @@ + + + + + Debug + AnyCPU + {98ED37D6-32AA-47B1-AA36-944964D1F683} + Library + Properties + NX.ERP.WMS + NX.ERP.WMS + v3.5 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + {5d012e0a-afed-474e-81a9-5820890b1b29} + NX.ERP.Model + + + {bd673da9-0606-4bcf-a016-fb5c4e7b5d59} + NX.ERP.U8 + + + + + \ No newline at end of file diff --git a/NX.ERP.WMS/Properties/AssemblyInfo.cs b/NX.ERP.WMS/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..47699f2 --- /dev/null +++ b/NX.ERP.WMS/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("NX.ERP.WMS")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NX.ERP.WMS")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("98ed37d6-32aa-47b1-aa36-944964d1f683")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/NX.ERP.WMS/Request/ArrivalAndProductPlan.cs b/NX.ERP.WMS/Request/ArrivalAndProductPlan.cs new file mode 100644 index 0000000..aebc45d --- /dev/null +++ b/NX.ERP.WMS/Request/ArrivalAndProductPlan.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.WMS.Request +{ + public class ArrivalAndProductPlan : NX.ERP.Model.BaseModel + { + public string ArrivalNo { get; set; } + public int BillType { get; set; } + // arrival_no + //bill_type + + + } +} diff --git a/NX.ERP.WebAPi/Controllers/Store/StoreController.cs b/NX.ERP.WebAPi/Controllers/Store/StoreController.cs new file mode 100644 index 0000000..8fecbc6 --- /dev/null +++ b/NX.ERP.WebAPi/Controllers/Store/StoreController.cs @@ -0,0 +1,29 @@ +using NX.ERP.BLL.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Http; + +namespace NX.ERP.WebAPi.Controllers.Store +{ + public class StoreController : ApiController + { + [Route("api/Store/StoreIn")] + [HttpPost] + public StoreResult StoreIn(NX.ERP.BLL.Model.Inbound Params) + { + var bll = new NX.ERP.BLL.Store.SotreIn(); + return bll.AddVoucher(Params); + } + + + [Route("api/Store/StoreOut")] + [HttpPost] + public StoreResult StoreOut(NX.ERP.BLL.Model.OutBound Params) + { + var bll = new NX.ERP.BLL.Store.SotreOut(); + return bll.AddVoucher(Params); + } + } +} \ No newline at end of file diff --git a/NX.ERP.WebAPi/NX.ERP.WebAPi.csproj b/NX.ERP.WebAPi/NX.ERP.WebAPi.csproj index 86a5b0b..2b9fcea 100644 --- a/NX.ERP.WebAPi/NX.ERP.WebAPi.csproj +++ b/NX.ERP.WebAPi/NX.ERP.WebAPi.csproj @@ -164,6 +164,7 @@ + @@ -190,6 +191,10 @@ + + {c1ffe393-1879-4fc1-a99e-695f2882553d} + NX.ERP.BLL + {5d012e0a-afed-474e-81a9-5820890b1b29} NX.ERP.Model diff --git a/U8App.sln b/U8App.sln index 7854191..60fd8c1 100644 --- a/U8App.sln +++ b/U8App.sln @@ -11,6 +11,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NX.ERP.U8", "NX.ERP.U8\NX.E EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NX.ERP.U8.App", "NX.ERP.U8.App\NX.ERP.U8.App.csproj", "{8A6603B0-444A-49C7-80C9-195638129068}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NX.ERP.BLL", "NX.ERP.BLL\NX.ERP.BLL.csproj", "{C1FFE393-1879-4FC1-A99E-695F2882553D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -67,6 +69,18 @@ Global {8A6603B0-444A-49C7-80C9-195638129068}.Release|x64.Build.0 = Release|Any CPU {8A6603B0-444A-49C7-80C9-195638129068}.Release|x86.ActiveCfg = Release|Any CPU {8A6603B0-444A-49C7-80C9-195638129068}.Release|x86.Build.0 = Release|Any CPU + {C1FFE393-1879-4FC1-A99E-695F2882553D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1FFE393-1879-4FC1-A99E-695F2882553D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1FFE393-1879-4FC1-A99E-695F2882553D}.Debug|x64.ActiveCfg = Debug|Any CPU + {C1FFE393-1879-4FC1-A99E-695F2882553D}.Debug|x64.Build.0 = Debug|Any CPU + {C1FFE393-1879-4FC1-A99E-695F2882553D}.Debug|x86.ActiveCfg = Debug|Any CPU + {C1FFE393-1879-4FC1-A99E-695F2882553D}.Debug|x86.Build.0 = Debug|Any CPU + {C1FFE393-1879-4FC1-A99E-695F2882553D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1FFE393-1879-4FC1-A99E-695F2882553D}.Release|Any CPU.Build.0 = Release|Any CPU + {C1FFE393-1879-4FC1-A99E-695F2882553D}.Release|x64.ActiveCfg = Release|Any CPU + {C1FFE393-1879-4FC1-A99E-695F2882553D}.Release|x64.Build.0 = Release|Any CPU + {C1FFE393-1879-4FC1-A99E-695F2882553D}.Release|x86.ActiveCfg = Release|Any CPU + {C1FFE393-1879-4FC1-A99E-695F2882553D}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE