diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 712fd0fb..73289de0 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -826,15 +826,27 @@ namespace Myshipping.Application throw Oops.Bah("当前主提单号已存在,请勿重复录入!"); } } + //if (!string.IsNullOrWhiteSpace(input.HBLNO) && !string.IsNullOrWhiteSpace(input.MBLNO) && input.ParentId != 0) + //{ + // var et = await _rep.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false && x.MBLNO == input.MBLNO && x.HBLNO == input.HBLNO && x.TenantId == UserManager.TENANT_ID && x.ParentId == input.ParentId && x.Id != input.Id).FirstAsync(); + // if (et != null) + // { + // throw Oops.Bah("当前分提单号已存在,请勿重复录入!"); + // } + //} + + //input.HBLNO请求参数的分单号,主提单号,都不为空时 if (!string.IsNullOrWhiteSpace(input.HBLNO) && !string.IsNullOrWhiteSpace(input.MBLNO) && input.ParentId != 0) { - var et = await _rep.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false && x.MBLNO == input.MBLNO && x.HBLNO == input.HBLNO && x.TenantId == UserManager.TENANT_ID && x.ParentId == input.ParentId && x.Id != input.Id).FirstAsync(); + //查询表中是否有当前输入的分单号 + var et = await _rep.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false && x.HBLNO == input.HBLNO && x.TenantId == UserManager.TENANT_ID && x.ParentId == input.ParentId && x.Id != input.Id).FirstAsync(); if (et != null) { throw Oops.Bah("当前分提单号已存在,请勿重复录入!"); } } + //陈冠宇提订舱编号不允许重复 if (!string.IsNullOrWhiteSpace(input.CUSTNO)) {