jianghaiqing 6 months ago
commit e2595bcc2d

@ -1545,11 +1545,8 @@ namespace Myshipping.Application
//陈冠宇提订舱编号不允许重复
if (!string.IsNullOrWhiteSpace(input.CUSTNO))
{
bool et;
// 自用订舱模式下,因存在舱位拆票产生多票订舱的情况,所以拆票的舱位是能够重复的
if (App.Configuration["RunType"] == CommonConst.RUN_TYPE_NORMAL)
{
et = await _rep.AsQueryable()
// 因存在舱位拆票产生多票订舱的情况,所以拆票的舱位是能够重复的
bool et = await _rep.AsQueryable()
.Filter(null, true)
.AnyAsync(x => x.IsDeleted == false
&& (x.IsSplit == false || x.IsSplit == null)
@ -1557,18 +1554,6 @@ namespace Myshipping.Application
&& x.TenantId == UserManager.TENANT_ID
&& x.ParentId == 0
&& x.Id != input.Id);
}
else
{
et = await _rep.AsQueryable()
.Filter(null, true)
.AnyAsync(x => x.IsDeleted == false
//&& (x.IsSplit == false || x.IsSplit == null)
&& x.CUSTNO == input.CUSTNO
&& x.TenantId == UserManager.TENANT_ID
&& x.ParentId == 0
&& x.Id != input.Id);
}
if (et)
{
throw Oops.Bah("当前订舱编号已存在,请勿重复录入!");

@ -2699,6 +2699,7 @@ namespace Myshipping.Application
var filestream = new FileStream(Path.Combine(fileFullPath, fileName), FileMode.OpenOrCreate, FileAccess.ReadWrite);
excelwork.Write(filestream);
await Task.Delay(2000);
//return HttpUtility.UrlEncode(fileName, Encoding.GetEncoding("UTF-8"));
return fileName;
}

Loading…
Cancel
Save