From 948921d51fa179cbde8087975ebc39cde254bfb5 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Thu, 20 Jun 2024 18:39:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=88=B1=E4=BD=8D=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=8E=9F=E5=A7=8B=E7=AE=B1?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingSlot/BookingSlotAllocation.cs | 5 +++++ .../BookingOrder/BookingOrderService.cs | 8 ++++++++ .../Service/BookingSlot/BookingSlotService.cs | 8 ++++++++ .../BookingSlot/Dto/BookingGenerateDto.cs | 20 +++++++++++++++++++ .../BookingSlot/Dto/BookingSlotCtnDto.cs | 5 +++++ 5 files changed, 46 insertions(+) diff --git a/Myshipping.Application/Entity/BookingSlot/BookingSlotAllocation.cs b/Myshipping.Application/Entity/BookingSlot/BookingSlotAllocation.cs index 732c3619..4049782b 100644 --- a/Myshipping.Application/Entity/BookingSlot/BookingSlotAllocation.cs +++ b/Myshipping.Application/Entity/BookingSlot/BookingSlotAllocation.cs @@ -329,5 +329,10 @@ namespace Myshipping.Application /// 卖价 /// public decimal? SELLING_PRICE { get; set; } + + /// + /// 拆票或合票标记 1-拆票 2-合票 + /// + public Nullable SPLIT_OR_MERGE_FLAG { get; set; } } } \ No newline at end of file diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index c86f0cd5..5c5302bd 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -2070,6 +2070,14 @@ namespace Myshipping.Application SaleName = main.SALE, GOODSNAME = main.GOODSNAME, }; + + if (input.Slots.Any(k => k.SplitOrMerge == 1 || k.SplitOrMerge == 2)) + { + generateDto.BookingReferNo = entity.CUSTNO; + generateDto.NewMBlNo = entity.MBLNO; + generateDto.NewSubBlNo = entity.HBLNO; + } + if (long.TryParse(main.CUSTSERVICEID, out long t1)) generateDto.CustServiceId = t1; if (long.TryParse(main.SALEID, out long t2)) generateDto.SaleId = t2; await bookingSlotService.ImportSlots(input.Slots, entity.Id, false, generateDto); diff --git a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs index a1344419..f2f8edd2 100644 --- a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs +++ b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs @@ -1530,6 +1530,7 @@ namespace Myshipping.Application { q1.id, q1.ctnCode, + q1.numAll, numResidue = SqlFunc.IsNull(q1.numAll - q2.numUse, q1.numAll) }) .MergeTable() @@ -1565,6 +1566,7 @@ namespace Myshipping.Application { CTNCODE = c.ctnCode, CTNNUM = c.numResidue, + TOTALNUM = c.numAll, CTNALL = ctnCodeCache.FirstOrDefault(e => e.Code == c.ctnCode)?.Name ?? throw new Exception($"舱位信息中存在未收录的箱型:{c.ctnCode},需要在箱型字典中补充"), }).ToList(); } @@ -1765,6 +1767,12 @@ namespace Myshipping.Application newSlotAllocation.SHIPPER = generateModel.SHIPPER; newSlotAllocation.GOODSNAME = generateModel.GOODSNAME; newSlotAllocation.SELLING_PRICE = generateModel.SELLING_PRICE; + newSlotAllocation.SPLIT_OR_MERGE_FLAG = generateModel.SplitOrMerge; + + if(generateModel.SplitOrMerge == 1 || generateModel.SplitOrMerge == 2) + { + newSlotAllocation.ALLO_BILL_NO = generateModel.NewMBlNo; + } } await _repAllocation.InsertAsync(newSlotAllocation); diff --git a/Myshipping.Application/Service/BookingSlot/Dto/BookingGenerateDto.cs b/Myshipping.Application/Service/BookingSlot/Dto/BookingGenerateDto.cs index 10fb952d..00bd7a10 100644 --- a/Myshipping.Application/Service/BookingSlot/Dto/BookingGenerateDto.cs +++ b/Myshipping.Application/Service/BookingSlot/Dto/BookingGenerateDto.cs @@ -142,5 +142,25 @@ namespace Myshipping.Application /// 舱位箱信息 /// public List CtnList { get; set; } + + /// + /// 订舱编号 + /// + public string BookingReferNo { get; set; } + + /// + /// 新提单号 + /// + public string NewMBlNo { get; set; } + + /// + /// 新分单号 + /// + public string NewSubBlNo { get; set; } + + /// + /// 拆票或合票标志 1-拆票 2-合票 + /// + public int SplitOrMerge { get; set; } } } diff --git a/Myshipping.Application/Service/BookingSlot/Dto/BookingSlotCtnDto.cs b/Myshipping.Application/Service/BookingSlot/Dto/BookingSlotCtnDto.cs index 91e4e66c..3edc5da4 100644 --- a/Myshipping.Application/Service/BookingSlot/Dto/BookingSlotCtnDto.cs +++ b/Myshipping.Application/Service/BookingSlot/Dto/BookingSlotCtnDto.cs @@ -78,6 +78,11 @@ namespace Myshipping.Application.Service.BookingSlot.Dto /// 称重联系人 /// public string WEIGHATTN { get; set; } + + /// + /// 总计箱量 + /// + public int TOTALNUM { get; set; } } ///