|
|
@ -1014,7 +1014,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
BookingSlotBase model = null;
|
|
|
|
BookingSlotBase model = null;
|
|
|
|
|
|
|
|
|
|
|
|
//接口方法直接调用save、delete等方法会报错,可能因为非token授权登录导致,故重写一遍保存、删除代码
|
|
|
|
//接口方法直接调用save、delete等方法会报错,可能因为非token授权登录导致,故重写一遍保存、删除代码
|
|
|
|
if (dto.OpType == "add" || dto.OpType == "update" || dto.OpType == "del" || dto.OpType == "cancellation" || dto.OpType == "back")
|
|
|
|
if (dto.OpType == "add" || dto.OpType == "update" || dto.OpType == "del" || dto.OpType == "cancellation" || dto.OpType == "back" || dto.OpType == "backcreate")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//翻译船公司
|
|
|
|
//翻译船公司
|
|
|
|
if (!string.IsNullOrWhiteSpace(dto.DataObj.CarrierCode) && string.IsNullOrWhiteSpace(dto.DataObj.CarrierCode))
|
|
|
|
if (!string.IsNullOrWhiteSpace(dto.DataObj.CarrierCode) && string.IsNullOrWhiteSpace(dto.DataObj.CarrierCode))
|
|
|
@ -1504,6 +1504,20 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
//await InsLog("Cancellation", model.Id, "取消舱位");
|
|
|
|
//await InsLog("Cancellation", model.Id, "取消舱位");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (dto.OpType == "back")
|
|
|
|
else if (dto.OpType == "back")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
back-返还舱位
|
|
|
|
|
|
|
|
1、(如果有对应舱位)删除舱位与订单的关系
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
var slotNO = dto.DataObj.SlotBookingNo;
|
|
|
|
|
|
|
|
model = await tenantDb.Queryable<BookingSlotBase>().FirstAsync(x => x.SlotBookingNo == slotNO);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(model != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (dto.OpType == "backcreate")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
back-返还舱位
|
|
|
|
back-返还舱位
|
|
|
@ -3511,7 +3525,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
|
|
//var sql = select.OrderByDescending(u => u.CreatedTime).ToSqlString();
|
|
|
|
//var sql = select.OrderByDescending(u => u.CreatedTime).ToSqlString();
|
|
|
|
|
|
|
|
|
|
|
|
var entities = await select.OrderByDescending(u => u.Id).ToListAsync();
|
|
|
|
var entities = await select.OrderByDescending(a => a.Id).ToListAsync();
|
|
|
|
|
|
|
|
|
|
|
|
var data = entities.Adapt<List<BookingSlotBaseDto>>();
|
|
|
|
var data = entities.Adapt<List<BookingSlotBaseDto>>();
|
|
|
|
|
|
|
|
|
|
|
@ -3647,20 +3661,24 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string fileRoot = AppSetting.app(new string[] { "FileSettings", "BasePath" });
|
|
|
|
var basePath = AppSetting.app(new string[] { "ExportFileSettings", "BasePath" });
|
|
|
|
string relativePath = AppSetting.app(new string[] { "FileSettings", "RelativePath" });
|
|
|
|
var relativePath = AppSetting.app(new string[] { "ExportFileSettings", "RelativePath" });
|
|
|
|
|
|
|
|
var dirAbs = string.Empty;
|
|
|
|
|
|
|
|
var fileRelaPath = string.Empty;
|
|
|
|
|
|
|
|
var fileAbsPath = string.Empty;
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(basePath))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
dirAbs = Path.Combine(_environment.WebRootPath ?? "", relativePath);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
dirAbs = Path.Combine(basePath, relativePath);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var tempDic = Path.Combine(fileRoot, relativePath, DateTime.Now.Ticks.ToString());
|
|
|
|
if (!Directory.Exists(dirAbs))
|
|
|
|
Directory.CreateDirectory(tempDic);
|
|
|
|
Directory.CreateDirectory(dirAbs);
|
|
|
|
var fileAbsPath = Path.Combine(tempDic, "");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//var opt = App.GetOptions<PrintTemplateOptions>();
|
|
|
|
fileAbsPath = Path.Combine(dirAbs, "舱位信息导出模板.xlsx");
|
|
|
|
//var dirAbs = opt.basePath;
|
|
|
|
|
|
|
|
//if (string.IsNullOrEmpty(dirAbs))
|
|
|
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
// dirAbs = App.WebHostEnvironment.WebRootPath;
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
//var fileAbsPath = Path.Combine(dirAbs, "upload/printtemplate/舱位信息导出模板.xlsx");
|
|
|
|
|
|
|
|
if (!File.Exists(fileAbsPath))
|
|
|
|
if (!File.Exists(fileAbsPath))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//舱位台账导出模板【舱位台账导出模板】文件不存在
|
|
|
|
//舱位台账导出模板【舱位台账导出模板】文件不存在
|
|
|
|