diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportTestService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportTestService.cs index d5591971..47cd08e7 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportTestService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportTestService.cs @@ -67,6 +67,9 @@ namespace DS.WMS.Core.Op.Method public string 客户编号 { get; set; } public string 货源 { get; set; } public string 入货通知备注 { get; set; } + + public string 内部备注 { get; set; } + public string 订单备注 { get; set; } public string 客户联系人 { get; set; } public string 客户电话 { get; set; } @@ -85,6 +88,7 @@ namespace DS.WMS.Core.Op.Method public string 更新者 { get; set; } public DateTime? 更新时间 { get; set; } public int 是否删除 { get; set; } + public string 销售 { get; set; } public string 商务 { get; set; } public string 操作 { get; set; } @@ -107,8 +111,8 @@ namespace DS.WMS.Core.Op.Method public string 起运港 { get; set; } public string 目的港 { get; set; } - - + public string 国内发货人 { get; set; } + public string 约号 { get; set; } } @@ -135,6 +139,9 @@ namespace DS.WMS.Core.Op.Method public string 唛头 { get; set; } public string 货物中文名 { get; set; } + public string 英文品名 { get; set; } + + public string 提单号 { get; set; } public int? 货物件数 { get; set; } public string 包装类型 { get; set; } @@ -231,6 +238,7 @@ namespace DS.WMS.Core.Op.Method public string 订舱代理联人 { get; set; } + public string 订舱代理联系方式 { get; set; } public string 海外代理联系人 { get; set; } public string 海外代理联系方式 { get; set; } @@ -318,6 +326,7 @@ namespace DS.WMS.Core.Op.Method string savePath = Path.Combine(hostEnvironment.WebRootPath, "templates", "海运出口主单" + NumUtil.GetNo() + ".xlsx"); var ctnpriceList = await tenantDb.Queryable().Filter(null, true).ToListAsync(); var contactList = await tenantDb.Queryable().Filter(null, true).Where(x => x.CustomerType == "controller").ToListAsync(); + var remarkList = await tenantDb.Queryable().Filter(null, true).ToListAsync(); var data = await tenantDb.Queryable().Filter(null, true).Where(x => !x.Deleted && x.IsRefund == false && x.IsChangeETD == false) .LeftJoin((x, y) => x.Id == y.BusinessId) @@ -325,11 +334,11 @@ namespace DS.WMS.Core.Op.Method { Id =x.Id, 订单类别 = x.BLType, - 订单code = x.MBLNO, - 客户编号 = x.CustomerNo, + 订单code = x.CustomerNo, + 客户编号 = x.CustomerNum, 货源 = x.SourceCode, - 入货通知备注 = "", - 订单备注 = x.Remark, + //入货通知备注 = "", + //订单备注 = x.Remark, 客户qq = "", @@ -343,7 +352,8 @@ namespace DS.WMS.Core.Op.Method 更新者 = x.UpdateUserName, 更新时间 = x.UpdateTime, 是否删除 = 0, - 商务 = x.Sale, + 销售 = x.Sale, + 商务 = x.Laner, 操作 = x.OperatorName, 客服 = x.CustomerServiceName, 委托状态 = 2, @@ -357,7 +367,8 @@ namespace DS.WMS.Core.Op.Method ATA = x.ATA, 起运港 = x.LoadPortCode, 目的港 = x.DischargePortCode, - + 国内发货人 =x.ShipperCn, + 约号 = x.ContractNo }).ToListAsync(); foreach (var item in data) @@ -368,7 +379,23 @@ namespace DS.WMS.Core.Op.Method item.底单价 = ctnprice.FloorPrice; item.卖单价 = ctnprice.QuotePrice; } - + + var remark1 = remarkList.FirstOrDefault(a => a.Pid == item.Id && a.RemarkType =="1" ); + if (remark1.IsNotNull()) + { + item.内部备注 = remark1.Remark; + } + var remark2 = remarkList.FirstOrDefault(a => a.Pid == item.Id && a.RemarkType == "2"); + if (remark2.IsNotNull()) + { + item.入货通知备注 = remark2.Remark; + } + var remark3 = remarkList.FirstOrDefault(a => a.Pid == item.Id && a.RemarkType == "3"); + if (remark3.IsNotNull()) + { + item.订单备注 = remark3.Remark; + } + var contact = contactList.FirstOrDefault(a => a.BusinessId == item.Id); if (contact.IsNotNull()) { @@ -413,7 +440,7 @@ namespace DS.WMS.Core.Op.Method Id = x.Id, 品名 = x.GoodsName, 海关编码 = x.HSCode, - 订单编号 = y.MBLNO, + 订单编号 = y.CustomerNo, 创建者 = x.CreateUserName, 创建时间 = x.CreateTime, 更新时间 = x.UpdateTime, @@ -447,12 +474,13 @@ namespace DS.WMS.Core.Op.Method .Select(x => new ZySeaExportGoodsInfo { Id = x.Id, - 订单编号 = x.MBLNO, + 订单编号 = x.CustomerNo, 唛头 = x.Marks, 货物中文名 = x.GoodsName, + 英文品名 = x.Description, 货物件数 = x.PKGS, 包装类型 = x.KindPkgsName, - + 货物类别 = "海运整箱", 毛重 = x.KGS, 体积 = x.CBM, @@ -474,6 +502,7 @@ namespace DS.WMS.Core.Op.Method 最低温度 = x.TemperatureMin, 设置单位 = x.TemperatureUnit, 通风设置 = x.ReeferQuantity, + 提单号 = x.MBLNO, }).ToListAsync(); @@ -510,7 +539,7 @@ namespace DS.WMS.Core.Op.Method .Select((x, y) => new ZySeaExportCtnInfo { Id = x.Id, - 订单编号 = y.MBLNO, + 订单编号 = y.CustomerNo, 箱型 = x.Ctn, 箱号 = x.CntrNo, 箱量 = x.CtnNum, @@ -552,17 +581,18 @@ namespace DS.WMS.Core.Op.Method string savePath = Path.Combine(hostEnvironment.WebRootPath, "templates", "订单订舱信息" + NumUtil.GetNo() + ".xlsx"); var ctnpriceList = await tenantDb.Queryable().Filter(null, true).ToListAsync(); - var contactList = await tenantDb.Queryable().Filter(null, true).Where(x => x.CustomerType == "controller").ToListAsync(); + var contactList = await tenantDb.Queryable().Filter(null, true).ToListAsync(); var data = await tenantDb.Queryable().Filter(null, true).Where(x => !x.Deleted && x.IsRefund == false && x.IsChangeETD == false) .Select(x => new ZySeaExportBookInfo { Id = x.Id, - 订单编号 = x.MBLNO, + 订单编号 = x.CustomerNo, 订舱号 = x.BookingNo, 船名 = x.Vessel, - 航次 = x.Voyno, + 航次 = string.IsNullOrEmpty(x.Voyno)?x.InnerVoyno: x.Voyno, 运输条款 = x.Service, + 运费条款 = x.MBLFrt, 船公司 = x.Carrier, 约号 = x.ContractNo, 签单方式 = x.IssueType, @@ -575,11 +605,11 @@ namespace DS.WMS.Core.Op.Method 截港时间 = x.ClosingDate, 截单时间 = x.CloseDocDate, 船代 = x.ShipAgency, - 场站联系人 = x.YardATTN, - 场站联系电话 = x.YardTel, + //场站联系人 = x.YardATTN, + //场站联系电话 = x.YardTel, 场站 = x.Yard, 箱使需求 = x.ApplyCtnRemark, - + 提单号 = x.MBLNO, 创建者 = x.CreateUserName, 创建时间 = x.CreateTime, @@ -589,7 +619,29 @@ namespace DS.WMS.Core.Op.Method }).ToListAsync(); - + foreach (var item in data) + { + var yard = contactList.FirstOrDefault(a => a.BusinessId == item.Id && a.CustomerType == "yard"); + if (yard.IsNotNull()) + { + item.场站联系人 = yard.Name; + item.场站联系电话 = yard.Tel; + } + var booking = contactList.FirstOrDefault(a => a.BusinessId == item.Id && a.CustomerType == "booking"); + if (booking.IsNotNull()) + { + item.订舱代理联人 = booking.Name; + item.订舱代理联系方式 = booking.Tel; + item.订舱邮箱 = booking.Email; + //item.订舱电话 = + } + var agent = contactList.FirstOrDefault(a => a.BusinessId == item.Id && a.CustomerType == "agent"); + if (agent.IsNotNull()) + { + item.海外代理联系人 = agent.Name; + item.海外代理联系方式 = agent.Tel; + } + } model.List = data; //MemoryStream ms = new(); await MiniExcel.SaveAsByTemplateAsync(savePath, path, model); @@ -622,7 +674,7 @@ namespace DS.WMS.Core.Op.Method .Select((x, y) => new ZySeaExportFeeInfo { Id = x.Id, - 订单编号 = y.MBLNO, + 订单编号 = y.CustomerNo, 费用名称 = x.FeeName, 结算单位= x.CustomerName, 费用类型 = x.FeeType == FeeType.Receivable ? 215 : 214, @@ -667,6 +719,7 @@ namespace DS.WMS.Core.Op.Method string savePath = Path.Combine(hostEnvironment.WebRootPath, "templates", "海运出口-分单 " + NumUtil.GetNo() + ".xlsx"); var ctnpriceList = await tenantDb.Queryable().Filter(null, true).ToListAsync(); var contactList = await tenantDb.Queryable().Filter(null, true).Where(x => x.CustomerType == "controller").ToListAsync(); + var remarkList = await tenantDb.Queryable().Filter(null, true).ToListAsync(); var data = await tenantDb.Queryable().Filter(null, true).Where(x => !x.Deleted) .InnerJoin((x, y) => x.BusinessId == y.Id) @@ -675,11 +728,11 @@ namespace DS.WMS.Core.Op.Method { Id = x.Id, 订单类别 = "分单", - 订单code = x.MBLNO, - 客户编号 = y.CustomerNo, + 订单code = y.CustomerNo, + 客户编号 = y.CustomerNum, 货源 = y.SourceCode, - 入货通知备注 = "", - 订单备注 = x.Remark, + //入货通知备注 = "", + //订单备注 = x.Remark, 客户qq = "", @@ -693,7 +746,8 @@ namespace DS.WMS.Core.Op.Method 更新者 = x.UpdateUserName, 更新时间 = x.UpdateTime, 是否删除 = 0, - 商务 = y.Sale, + 销售 = y.Sale, + 商务 = y.Laner, 操作 = y.OperatorName, 客服 = y.CustomerServiceName, 委托状态 = 2, @@ -707,6 +761,10 @@ namespace DS.WMS.Core.Op.Method ATA = y.ATA, 起运港 = y.LoadPortCode, 目的港 = y.DischargePortCode, + 国内发货人 = x.ShipperCn, + 约号 = y.ContractNo, + 分单编号 = x.HBLNO + }).ToListAsync(); @@ -718,7 +776,21 @@ namespace DS.WMS.Core.Op.Method item.底单价 = ctnprice.FloorPrice; item.卖单价 = ctnprice.QuotePrice; } - + var remark1 = remarkList.FirstOrDefault(a => a.Pid == item.Id && a.RemarkType == "1"); + if (remark1.IsNotNull()) + { + item.内部备注 = remark1.Remark; + } + var remark2 = remarkList.FirstOrDefault(a => a.Pid == item.Id && a.RemarkType == "2"); + if (remark2.IsNotNull()) + { + item.入货通知备注 = remark2.Remark; + } + var remark3 = remarkList.FirstOrDefault(a => a.Pid == item.Id && a.RemarkType == "3"); + if (remark3.IsNotNull()) + { + item.订单备注 = remark3.Remark; + } var contact = contactList.FirstOrDefault(a => a.BusinessId == item.Id); if (contact.IsNotNull()) { @@ -857,10 +929,11 @@ namespace DS.WMS.Core.Op.Method var data = await tenantDb.Queryable().Filter(null, true).Where(x => !x.Deleted) .InnerJoin((x, y) => x.Pid == y.Id ) - .Select((x, y) => new ZySeaExportCtnInfo + .LeftJoin((x, y,z) => z.Id == y.BusinessId) + .Select((x, y,z) => new ZySeaExportCtnInfo { Id = x.Id, - 订单编号 = y.MBLNO, + 订单编号 = z.CustomerNo, 箱型 = x.Ctn, 箱号 = x.CntrNo, 箱量 = x.CtnNum, @@ -969,10 +1042,11 @@ namespace DS.WMS.Core.Op.Method var data = await tenantDb.Queryable().Filter(null, true).Where(x => !x.Deleted) .InnerJoin((x, y) => x.BusinessId == y.Id ) - .Select((x, y) => new ZySeaExportFeeInfo + .LeftJoin((x, y, z) => z.Id == y.BusinessId) + .Select((x, y,z) => new ZySeaExportFeeInfo { Id = x.Id, - 订单编号 = y.MBLNO, + 订单编号 = z.CustomerNo, 费用名称 = x.FeeName, 结算单位 = x.CustomerName, 费用类型 = x.FeeType == FeeType.Receivable ? 215 : 214, diff --git a/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/海运出口-分单 241109234123953633.xlsx b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/海运出口-分单 241109234123953633.xlsx new file mode 100644 index 00000000..b9101ff3 Binary files /dev/null and b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/海运出口-分单 241109234123953633.xlsx differ diff --git a/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/海运出口主单.xlsx b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/海运出口主单.xlsx index ce9771b6..2d38dad4 100644 Binary files a/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/海运出口主单.xlsx and b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/海运出口主单.xlsx differ diff --git a/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/海运出口主单241109234046353100.xlsx b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/海运出口主单241109234046353100.xlsx new file mode 100644 index 00000000..d16db16a Binary files /dev/null and b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/海运出口主单241109234046353100.xlsx differ diff --git a/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单订舱信息.xlsx b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单订舱信息.xlsx index bb4e4cb9..bfe86eba 100644 Binary files a/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单订舱信息.xlsx and b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单订舱信息.xlsx differ diff --git a/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单订舱信息241109234112630531.xlsx b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单订舱信息241109234112630531.xlsx new file mode 100644 index 00000000..b1e3f51c Binary files /dev/null and b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单订舱信息241109234112630531.xlsx differ diff --git a/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单货物信息.xlsx b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单货物信息.xlsx index f3ab18cd..e728675b 100644 Binary files a/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单货物信息.xlsx and b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单货物信息.xlsx differ diff --git a/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单货物信息241109234102817114.xlsx b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单货物信息241109234102817114.xlsx new file mode 100644 index 00000000..e515a3b5 Binary files /dev/null and b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单货物信息241109234102817114.xlsx differ diff --git a/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单费用信息241109234118859220.xlsx b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单费用信息241109234118859220.xlsx new file mode 100644 index 00000000..d001a15f Binary files /dev/null and b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单费用信息241109234118859220.xlsx differ diff --git a/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单集装箱信息-分单 24110923412974671.xlsx b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单集装箱信息-分单 24110923412974671.xlsx new file mode 100644 index 00000000..e9460d52 Binary files /dev/null and b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单集装箱信息-分单 24110923412974671.xlsx differ diff --git a/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单集装箱信息241109234107644023.xlsx b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单集装箱信息241109234107644023.xlsx new file mode 100644 index 00000000..e8d24fcf Binary files /dev/null and b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/订单集装箱信息241109234107644023.xlsx differ diff --git a/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/货物中文品名信息241109234056658568.xlsx b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/货物中文品名信息241109234056658568.xlsx new file mode 100644 index 00000000..14fef335 Binary files /dev/null and b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/货物中文品名信息241109234056658568.xlsx differ