From 0fdbd4d2e99325be66fc5a029cad74cf6cd97e9f Mon Sep 17 00:00:00 2001 From: ddlucky Date: Mon, 29 May 2023 17:56:16 +0800 Subject: [PATCH] =?UTF-8?q?20230529=5F=E5=87=BA=E5=BA=93=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E9=92=88=E5=AF=B9app=E5=A2=9E=E5=8A=A0=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=9B=E5=AF=BC=E5=85=A5=E5=88=9D=E5=A7=8B=E5=8C=96=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E6=97=B6=E5=A2=9E=E5=8A=A0=E6=8C=89=E7=85=A7=E4=BB=93?= =?UTF-8?q?=E5=BA=93=E5=88=86=E5=BC=80=E5=85=A5=E5=BA=93=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E5=92=8C=E5=85=A5=E5=BA=93=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DomainModels/WMS/VW_OP_WMS_IMPORT.cs | 8 ++++ .../DomainModels/WMSOUT/VW_OP_WMS_OUT_PLAN.cs | 7 ++++ .../WMS/Partial/VW_OP_WMS_IMPORTService.cs | 37 ++++++++++++++----- .../WMSINDO/Partial/OP_WMS_IN_DOService.cs | 2 +- .../Partial/OP_WMS_IN_PLANService.cs | 15 ++++++++ .../WMSOUT/Partial/OP_WMS_OUT_DOService.cs | 4 +- 6 files changed, 60 insertions(+), 13 deletions(-) diff --git a/Vue.Net/VOL.Entity/DomainModels/WMS/VW_OP_WMS_IMPORT.cs b/Vue.Net/VOL.Entity/DomainModels/WMS/VW_OP_WMS_IMPORT.cs index 7e1cde93..27cb29d3 100644 --- a/Vue.Net/VOL.Entity/DomainModels/WMS/VW_OP_WMS_IMPORT.cs +++ b/Vue.Net/VOL.Entity/DomainModels/WMS/VW_OP_WMS_IMPORT.cs @@ -250,5 +250,13 @@ namespace VOL.Entity.DomainModels [Column(TypeName = "varchar(150)")] public string CORPNAME { get; set; } + /// + ///币别 + /// + [Display(Name = "币别")] + [MaxLength(20)] + [Column(TypeName = "varchar(20)")] + public string CURRENCY { get; set; } + } } \ No newline at end of file diff --git a/Vue.Net/VOL.Entity/DomainModels/WMSOUT/VW_OP_WMS_OUT_PLAN.cs b/Vue.Net/VOL.Entity/DomainModels/WMSOUT/VW_OP_WMS_OUT_PLAN.cs index d814b36e..65236c61 100644 --- a/Vue.Net/VOL.Entity/DomainModels/WMSOUT/VW_OP_WMS_OUT_PLAN.cs +++ b/Vue.Net/VOL.Entity/DomainModels/WMSOUT/VW_OP_WMS_OUT_PLAN.cs @@ -441,6 +441,13 @@ namespace VOL.Entity.DomainModels [Column(TypeName = "uniqueidentifier")] public Guid? SALE { get; set; } + [Display(Name = "库管")] + [Column(TypeName = "varchar(50)")] + public string OPNAME { get; set; } + + [Display(Name = "客户账期")] + [Column(TypeName = "varchar(50)")] + public string ACCTYPE { get; set; } public decimal? NETWEIGHT_TON { get { return NETWEIGHT == null ? null : NETWEIGHT / 1000; } } public decimal? KGS_TON { get { return KGS == null ? null : KGS / 1000; } } diff --git a/Vue.Net/VOL.WMS/Services/WMS/Partial/VW_OP_WMS_IMPORTService.cs b/Vue.Net/VOL.WMS/Services/WMS/Partial/VW_OP_WMS_IMPORTService.cs index 9dd49828..781e2036 100644 --- a/Vue.Net/VOL.WMS/Services/WMS/Partial/VW_OP_WMS_IMPORTService.cs +++ b/Vue.Net/VOL.WMS/Services/WMS/Partial/VW_OP_WMS_IMPORTService.cs @@ -276,7 +276,7 @@ namespace VOL.WMS.Services public override WebResponseContent Import(List files) { - DownLoadTemplateColumns = x => new { x.CUSTOMERNAME,x.GOODSOWNER,x.GOODSNAME,x.MBLNO,x.CNTRNO,x.CUSTOMNO,x.PKGS,x.KGS,x.CBM,x.NETWEIGHT,x.STORAGEUNIT,x.STORAGEUNITCOUNT,x.RULEUNIT,x.RULEUNITCOUNT,x.INDATE,x.OPNAME,x.ACCBOOKNO,x.STORAGENAME,x.AREANAME,x.GOODSMODEL,x.GOODSHSCODE,x.COUNTRY,x.RULEAMOUNT,x.REMARK,x.KINDPKGS,x.PALLET,x.SALENAME, x.CORPNAME }; + DownLoadTemplateColumns = x => new { x.CUSTOMERNAME,x.GOODSOWNER,x.GOODSNAME,x.MBLNO,x.CNTRNO,x.CUSTOMNO,x.PKGS,x.KGS,x.CBM,x.NETWEIGHT,x.STORAGEUNIT,x.STORAGEUNITCOUNT,x.RULEUNIT,x.RULEUNITCOUNT,x.INDATE,x.OPNAME,x.ACCBOOKNO,x.STORAGENAME,x.AREANAME,x.GOODSMODEL,x.GOODSHSCODE,x.COUNTRY,x.RULEAMOUNT,x.REMARK,x.KINDPKGS,x.PALLET,x.SALENAME, x.CORPNAME,x.CURRENCY }; var WmsImportList = base.GetListByExcel(files,out WebResponseContent _webResponseContent); @@ -366,6 +366,7 @@ namespace VOL.WMS.Services //每个提单号的每个入库日期 都只生成一条入库信息 + //20230529 增加一个限制 每个提单号的每个入库日期的 每个仓库的入库计划 foreach (var head in headList) { @@ -406,14 +407,14 @@ namespace VOL.WMS.Services var oldindoGoodsList = VW_OP_WMS_IN_DO_GOODSRepository.Instance.FindAsIQueryable(x => oldindoList.Contains((Guid)x.WMSDOID)).ToList(); - - if (oldindoGoodsList.Exists(x => x.CNTRNO == goods.CNTRNO && x.MBLNO == 入库执行.MBLNO)) + //20230529 增加一个限制 每个提单号的每个入库日期的 每个仓库的入库计划 + if (oldindoGoodsList.Exists(x => x.CNTRNO == goods.CNTRNO && x.MBLNO == 入库执行.MBLNO && x.STOREHOUSE == 入库执行.STOREHOUSE)) { continue; } - var 入库计划 = get入库计划(goods, 仓库List, 库管List); + var 入库计划 = get入库计划(goods, 仓库List, 库管List, CORPID); var 入库计划明细 = get入库计划明细(入库计划, goods); 入库计划明细List.Add(入库计划明细); @@ -428,7 +429,7 @@ namespace VOL.WMS.Services //根据入库执行生成一条入库计划和入库计划明细 - var 库存 = get库存头表(goods, 仓库List, 库位List, 库管List); + var 库存 = get库存头表(goods, 仓库List, 库位List, 库管List,CORPID); 库存List.Add(库存); var 库存base = AutoMapperHelper.MapTo(库存); @@ -436,6 +437,7 @@ namespace VOL.WMS.Services 库存base.RULEAMOUNT = goods.RULEAMOUNT; 库存base.KINDPKGS = goods.KINDPKGS; 库存base.PALLET= goods.PALLET; + 库存base.CORPID = CORPID; 库存BaseList.Add(库存base); var 物理库存 = get物理库存(入库执行明细, 库存); @@ -581,7 +583,7 @@ namespace VOL.WMS.Services return result; } - private OP_WMS_IN_PLAN get入库计划( VW_OP_WMS_IMPORT detail, List 仓库List, List userlist) + private OP_WMS_IN_PLAN get入库计划( VW_OP_WMS_IMPORT detail, List 仓库List, List userlist,string CORPID) { var result = new OP_WMS_IN_PLAN(); @@ -594,7 +596,7 @@ namespace VOL.WMS.Services result.ACCDATE = detail.INDATE; result.CUSTOMERNAME = detail.CUSTOMERNAME; - result.GOODSOWNER = detail.CUSTOMERNAME; + result.GOODSOWNER = detail.GOODSOWNER; result.ARCLIENTWMSOUT = detail.CUSTOMERNAME; if (string.IsNullOrWhiteSpace(detail.ACCBOOKNO)) @@ -628,6 +630,17 @@ namespace VOL.WMS.Services result.SALE = getuserid(detail.SALENAME, userlist); + result.CORPID = CORPID; + result.CURRENCY = detail.CURRENCY; + if (!string.IsNullOrWhiteSpace(detail.ACCBOOKNO)) + { + result.BILLTYPE = "1"; + } + else + { + result.BILLTYPE = "0"; + } + result.KINDPKGS=detail.KINDPKGS; return result; } @@ -676,7 +689,7 @@ namespace VOL.WMS.Services return result; } - private OP_WMS get库存头表(VW_OP_WMS_IMPORT detail, List 仓库List, List 库位List, List userlist) { + private OP_WMS get库存头表(VW_OP_WMS_IMPORT detail, List 仓库List, List 库位List, List userlist,string CORPID) { OP_WMS WMS = new OP_WMS(); var billno = base.GetBillNo("库存信息"); @@ -684,14 +697,18 @@ namespace VOL.WMS.Services WMS.WMSID = Guid.NewGuid(); WMS.WMSBASEID = WMS.WMSID; WMS.BSNO = billno; - WMS.CORPID = UserContext.Current.UserInfo.CompanyId; + //WMS.CORPID = UserContext.Current.UserInfo.CompanyId; + WMS.CORPID = CORPID; + WMS.CUSTOMERNAME = detail.CUSTOMERNAME; WMS.GOODSOWNER = detail.GOODSOWNER; WMS.GOODSNAME = detail.GOODSNAME; WMS.KGS = detail.KGS; WMS.CBM = detail.CBM; WMS.PKGS = detail.PKGS; - //WMS.KINDPKGS = detail.KINDPKGS; + + WMS.KINDPKGS = detail.KINDPKGS; + WMS.STORAGEUNIT = detail.STORAGEUNIT; WMS.STORAGEUNITCOUNT = detail.STORAGEUNITCOUNT; WMS.RULEUNIT = detail.RULEUNIT; diff --git a/Vue.Net/VOL.WMS/Services/WMSINDO/Partial/OP_WMS_IN_DOService.cs b/Vue.Net/VOL.WMS/Services/WMSINDO/Partial/OP_WMS_IN_DOService.cs index 3517efdf..85f70e6f 100644 --- a/Vue.Net/VOL.WMS/Services/WMSINDO/Partial/OP_WMS_IN_DOService.cs +++ b/Vue.Net/VOL.WMS/Services/WMSINDO/Partial/OP_WMS_IN_DOService.cs @@ -1005,7 +1005,7 @@ namespace VOL.WMS.Services WMS.ACCBOOKNO = 仓库列表.First(x => x.AREACODE == InDoGoods.AREACODE.Substring(0, 4)).ACCBOOKNO; - WMS.BILLTYPE = 入库执行.BILLTYPE; + WMS.BILLTYPE = inplan.BILLTYPE; WMS.GOODSOWNER = 入库执行.GOODSOWNER; var 入库计划明细 = 入库计划明细List.FirstOrDefault(x => x.GID == InDoGoods.WMSPLANDETAILID); diff --git a/Vue.Net/VOL.WMS/Services/WMSINPLAN/Partial/OP_WMS_IN_PLANService.cs b/Vue.Net/VOL.WMS/Services/WMSINPLAN/Partial/OP_WMS_IN_PLANService.cs index 117bcc21..501ff075 100644 --- a/Vue.Net/VOL.WMS/Services/WMSINPLAN/Partial/OP_WMS_IN_PLANService.cs +++ b/Vue.Net/VOL.WMS/Services/WMSINPLAN/Partial/OP_WMS_IN_PLANService.cs @@ -577,7 +577,22 @@ namespace VOL.WMS.Services head.NETWEIGHT = DetailList.Sum(x => x.NETWEIGHT); head.STORAGEUNITCOUNT = DetailList.Sum(x => x.STORAGEUNITCOUNT); head.RULEUNITCOUNT = DetailList.Sum(x => x.RULEUNITCOUNT); + + + head.CTNNUM = DetailList.Count(); + + + if (DetailList.Exists(x => x.OLD_CNTRNO != null && x.OLD_CNTRNO.Trim() != "")) { + var cntrlist = new List(); + head.CTNNUM = 0; + foreach (var item in DetailList) { + if (!cntrlist.Exists(x => x == item.OLD_CNTRNO)) { + head.CTNNUM++; + cntrlist.Add(item.OLD_CNTRNO); + } + } + } //OP_WMS_IN_DORepository.Instance.Update(head, true); } diff --git a/Vue.Net/VOL.WMS/Services/WMSOUT/Partial/OP_WMS_OUT_DOService.cs b/Vue.Net/VOL.WMS/Services/WMSOUT/Partial/OP_WMS_OUT_DOService.cs index 3cae8514..ccccf397 100644 --- a/Vue.Net/VOL.WMS/Services/WMSOUT/Partial/OP_WMS_OUT_DOService.cs +++ b/Vue.Net/VOL.WMS/Services/WMSOUT/Partial/OP_WMS_OUT_DOService.cs @@ -2687,7 +2687,7 @@ namespace VOL.WMS.Services /// private WebResponseContent DealClearWmsList(List _执行明细list, ref List 库存明细list, ref List 物理库存明细list, bool DetailDODATE = false) { - + var _出库库存明细wmsidList = 库存明细list.Select(s => s.WMSID).ToList(); var 执行明细list = _执行明细list.Where(x => x.CLEARWMS == true).ToList(); @@ -2762,7 +2762,7 @@ namespace VOL.WMS.Services - var 同票其它库存List = Vw_Op_WmsRepository.Instance.FindAsIQueryable(x => x.CORPID == 库存明细item.CORPID && x.MBLNO == 库存明细item.MBLNO && x.CUSTOMERNAME == 库存明细item.CUSTOMERNAME && x.GOODSOWNER == 库存明细item.GOODSOWNER && !_执行明细list.Select(s => s.WMSID).Contains(x.WMSID)).ToList(); + var 同票其它库存List = Vw_Op_WmsRepository.Instance.FindAsIQueryable(x => x.CORPID == 库存明细item.CORPID && x.MBLNO == 库存明细item.MBLNO && x.CUSTOMERNAME == 库存明细item.CUSTOMERNAME && x.GOODSOWNER == 库存明细item.GOODSOWNER && !_出库库存明细wmsidList.Contains(x.WMSID)).ToList(); var 同票物理库存List = Vw_Op_Wms_PhysicsRepository.Instance.FindAsIQueryable(x => 同票其它库存List.Select(s => s.WMSID).ToList().Contains((Guid)x.WMSID)).ToList();