jianghaiqing 6 months ago
commit e2595bcc2d

@ -1545,30 +1545,15 @@ namespace Myshipping.Application
//陈冠宇提订舱编号不允许重复
if (!string.IsNullOrWhiteSpace(input.CUSTNO))
{
bool et;
// 自用订舱模式下,因存在舱位拆票产生多票订舱的情况,所以拆票的舱位是能够重复的
if (App.Configuration["RunType"] == CommonConst.RUN_TYPE_NORMAL)
{
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);
}
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);
}
// 因存在舱位拆票产生多票订舱的情况,所以拆票的舱位是能够重复的
bool 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("当前订舱编号已存在,请勿重复录入!");
@ -12832,7 +12817,7 @@ namespace Myshipping.Application
newOrder.VERSION = version;
if(!string.IsNullOrWhiteSpace(dto.VESSEL))
if (!string.IsNullOrWhiteSpace(dto.VESSEL))
{
newOrder.VESSEL = dto.VESSEL;
@ -12940,7 +12925,7 @@ namespace Myshipping.Application
updateColumnList.Add(nameof(BookingOrder.PORTDISCHARGE));
}
if (dto.enforceUpdateField.Any(a => a.Equals("DESTINATIONID", StringComparison.OrdinalIgnoreCase)) && string.IsNullOrWhiteSpace(dto.DESTINATIONID))
if (dto.enforceUpdateField.Any(a => a.Equals("DESTINATIONID", StringComparison.OrdinalIgnoreCase)) && string.IsNullOrWhiteSpace(dto.DESTINATIONID))
{
newOrder.DESTINATIONID = dto.DESTINATIONID;
@ -12969,7 +12954,7 @@ namespace Myshipping.Application
}
}
if(updateColumnList.Count == 0)
if (updateColumnList.Count == 0)
throw Oops.Bah("没有提交要修改的数据,请重新填写");
//newOrder.VOYNOINNER = dto.VOYNOINNER;

@ -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