diff --git a/ds-wms-service/DS.WMS.Core/Check/Method/CheckBillService.cs b/ds-wms-service/DS.WMS.Core/Check/Method/CheckBillService.cs index 69ef6029..54f179e3 100644 --- a/ds-wms-service/DS.WMS.Core/Check/Method/CheckBillService.cs +++ b/ds-wms-service/DS.WMS.Core/Check/Method/CheckBillService.cs @@ -14,6 +14,7 @@ using DS.WMS.Core.Fee.Entity; using DS.WMS.Core.Info.Entity; using DS.WMS.Core.Op.Dtos; using DS.WMS.Core.Op.Entity; +using DS.WMS.Core.Op.View; using DS.WMS.Core.Sys.Entity; using DS.WMS.Core.Sys.Interface; using DS.WMS.Core.Sys.Method; @@ -403,6 +404,10 @@ namespace DS.WMS.Core.Check.Method var businessList = new List(); var feeList = new List(); + + if (tenantDb.Queryable().Where(x => req.Ids.Contains(x.BusinessId) && x.CustomerId!= info.CustomerId).Any()) + return DataResult.Failed("明细客户与对账客户不一致"); + var businessIds = tenantDb.Queryable().Where(x => x.CheckId == checkId).Select(x => x.BusinessId).ToList(); if (businessIds.Where(x=> req.Ids.Contains(x)).Any()) return DataResult.Failed("明细业务存在已添加"); diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/OpCtnReq.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/OpCtnReq.cs index 4ee9106a..9be9ba51 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Dtos/OpCtnReq.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/OpCtnReq.cs @@ -35,7 +35,10 @@ namespace DS.WMS.Core.Op.Dtos /// 箱型 /// public string Ctn { get; set; } - + /// + /// 箱型Id + /// + public long CtnId { get; set; } /// /// 箱量 /// diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/OpCtnRes.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/OpCtnRes.cs index 2070c7d5..71dbcceb 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Dtos/OpCtnRes.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/OpCtnRes.cs @@ -34,7 +34,10 @@ namespace DS.WMS.Core.Op.Dtos /// 箱型 /// public string Ctn { get; set; } - + /// + /// 箱型Id + /// + public long CtnId { get; set; } /// /// 箱量 /// diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/ShippingBillCtnReq.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/ShippingBillCtnReq.cs index d91cf3ab..e51e4bf2 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Dtos/ShippingBillCtnReq.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/ShippingBillCtnReq.cs @@ -32,7 +32,10 @@ namespace DS.WMS.Core.Op.Dtos /// 箱型 /// public string Ctn { get; set; } - + /// + /// 箱型Id + /// + public long CtnId { get; set; } /// /// 表现形式 diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/ShippingBillCtnRes.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/ShippingBillCtnRes.cs index 97f98a17..13e0233f 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Dtos/ShippingBillCtnRes.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/ShippingBillCtnRes.cs @@ -32,7 +32,10 @@ namespace DS.WMS.Core.Op.Dtos /// 箱型 /// public string Ctn { get; set; } - + /// + /// 箱型Id + /// + public long CtnId { get; set; } /// /// 表现形式 diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/SeaExportShippingBillCtn.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/SeaExportShippingBillCtn.cs index 3fb0a8df..3876493e 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/SeaExportShippingBillCtn.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/SeaExportShippingBillCtn.cs @@ -33,8 +33,11 @@ namespace DS.WMS.Core.Op.Entity /// [SugarColumn(ColumnDescription = "箱型", IsNullable = true, Length = 10)] public string Ctn { get; set; } - - + /// + /// 箱型Id + /// + [SugarColumn(ColumnDescription = "箱型Id")] + public long CtnId { get; set; } /// /// 表现形式 /// diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/ShippingBillService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/ShippingBillService.cs index 08423ec5..77d2d56b 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/ShippingBillService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/ShippingBillService.cs @@ -215,36 +215,35 @@ namespace DS.WMS.Core.Op.Method { var ctn = item.Adapt(); ctn.Pid = info.Id; - if (ctn.CtnAll.Length == 4) - { - ctn.Size = ctn.CtnAll != null ? ctn.CtnAll.Substring(0, 2) : ""; - ctn.Ctn = ctn.CtnAll != null ? ctn.CtnAll.Substring(2, 2) : ""; - - } - if (ctn.CtnAll.Contains("'")) - { - ctn.Size = ctn.CtnAll.Split("'")[0].ToString(); - ctn.Ctn = ctn.CtnAll.Split("'")[1].ToString(); - - } + //if (ctn.CtnAll.Length == 4) + //{ + // ctn.Size = ctn.CtnAll != null ? ctn.CtnAll.Substring(0, 2) : ""; + // ctn.Ctn = ctn.CtnAll != null ? ctn.CtnAll.Substring(2, 2) : ""; + + //} + //if (ctn.CtnAll.Contains("'")) + //{ + // ctn.Size = ctn.CtnAll.Split("'")[0].ToString(); + // ctn.Ctn = ctn.CtnAll.Split("'")[1].ToString(); + //} tenantDb.Insertable(ctn).ExecuteCommand(); } else { var ctn = ctnList.First(x => x.Id == item.Id); ctn = item.Adapt(ctn); - if (ctn.CtnAll.Length == 4) - { - ctn.Size = ctn.CtnAll != null ? ctn.CtnAll.Substring(0, 2) : ""; - ctn.Ctn = ctn.CtnAll != null ? ctn.CtnAll.Substring(2, 2) : ""; - - } - if (ctn.CtnAll.Contains("'")) - { - ctn.Size = ctn.CtnAll.Split("'")[0].ToString(); - ctn.Ctn = ctn.CtnAll.Split("'")[1].ToString(); - - } + //if (ctn.CtnAll.Length == 4) + //{ + // ctn.Size = ctn.CtnAll != null ? ctn.CtnAll.Substring(0, 2) : ""; + // ctn.Ctn = ctn.CtnAll != null ? ctn.CtnAll.Substring(2, 2) : ""; + + //} + //if (ctn.CtnAll.Contains("'")) + //{ + // ctn.Size = ctn.CtnAll.Split("'")[0].ToString(); + // ctn.Ctn = ctn.CtnAll.Split("'")[1].ToString(); + + //} tenantDb.Updateable(ctn).ExecuteCommand(); }