jianghaiqing 6 months ago
commit e2595bcc2d

@ -1545,30 +1545,15 @@ namespace Myshipping.Application
//陈冠宇提订舱编号不允许重复 //陈冠宇提订舱编号不允许重复
if (!string.IsNullOrWhiteSpace(input.CUSTNO)) if (!string.IsNullOrWhiteSpace(input.CUSTNO))
{ {
bool et; // 因存在舱位拆票产生多票订舱的情况,所以拆票的舱位是能够重复的
// 自用订舱模式下,因存在舱位拆票产生多票订舱的情况,所以拆票的舱位是能够重复的 bool et = await _rep.AsQueryable()
if (App.Configuration["RunType"] == CommonConst.RUN_TYPE_NORMAL) .Filter(null, true)
{ .AnyAsync(x => x.IsDeleted == false
et = await _rep.AsQueryable() && (x.IsSplit == false || x.IsSplit == null)
.Filter(null, true) && x.CUSTNO == input.CUSTNO
.AnyAsync(x => x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID
&& (x.IsSplit == false || x.IsSplit == null) && x.ParentId == 0
&& x.CUSTNO == input.CUSTNO && x.Id != input.Id);
&& 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) if (et)
{ {
throw Oops.Bah("当前订舱编号已存在,请勿重复录入!"); throw Oops.Bah("当前订舱编号已存在,请勿重复录入!");
@ -12832,7 +12817,7 @@ namespace Myshipping.Application
newOrder.VERSION = version; newOrder.VERSION = version;
if(!string.IsNullOrWhiteSpace(dto.VESSEL)) if (!string.IsNullOrWhiteSpace(dto.VESSEL))
{ {
newOrder.VESSEL = dto.VESSEL; newOrder.VESSEL = dto.VESSEL;
@ -12852,7 +12837,7 @@ namespace Myshipping.Application
updateColumnList.Add(nameof(BookingOrder.VOYNO)); updateColumnList.Add(nameof(BookingOrder.VOYNO));
} }
if (dto.ETD.HasValue) if (dto.ETD.HasValue)
{ {
newOrder.ETD = dto.ETD; newOrder.ETD = dto.ETD;
@ -12940,7 +12925,7 @@ namespace Myshipping.Application
updateColumnList.Add(nameof(BookingOrder.PORTDISCHARGE)); 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; newOrder.DESTINATIONID = dto.DESTINATIONID;
@ -12969,7 +12954,7 @@ namespace Myshipping.Application
} }
} }
if(updateColumnList.Count == 0) if (updateColumnList.Count == 0)
throw Oops.Bah("没有提交要修改的数据,请重新填写"); throw Oops.Bah("没有提交要修改的数据,请重新填写");
//newOrder.VOYNOINNER = dto.VOYNOINNER; //newOrder.VOYNOINNER = dto.VOYNOINNER;
@ -13007,7 +12992,7 @@ namespace Myshipping.Application
} }
#endregion #endregion
} }

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

Loading…
Cancel
Save