修改舱位导出

dev
jianghaiqing 1 month ago
parent 1640a52784
commit 75e0c06e8a

@ -429,5 +429,8 @@ namespace DS.WMS.Core.Op.Entity
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "提单类型MBL-Master单,HBL-House单", Length = 20, IsNullable = true)]
public string BLIssueType { get; set; }
}
}

@ -1014,7 +1014,7 @@ namespace DS.WMS.Core.Op.Method
BookingSlotBase model = null;
//接口方法直接调用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))
@ -1504,6 +1504,20 @@ namespace DS.WMS.Core.Op.Method
//await InsLog("Cancellation", model.Id, "取消舱位");
}
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-
@ -3511,7 +3525,7 @@ namespace DS.WMS.Core.Op.Method
//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>>();
@ -3647,20 +3661,24 @@ namespace DS.WMS.Core.Op.Method
}
string fileRoot = AppSetting.app(new string[] { "FileSettings", "BasePath" });
string relativePath = AppSetting.app(new string[] { "FileSettings", "RelativePath" });
var basePath = AppSetting.app(new string[] { "ExportFileSettings", "BasePath" });
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());
Directory.CreateDirectory(tempDic);
var fileAbsPath = Path.Combine(tempDic, "");
if (!Directory.Exists(dirAbs))
Directory.CreateDirectory(dirAbs);
//var opt = App.GetOptions<PrintTemplateOptions>();
//var dirAbs = opt.basePath;
//if (string.IsNullOrEmpty(dirAbs))
//{
// dirAbs = App.WebHostEnvironment.WebRootPath;
//}
//var fileAbsPath = Path.Combine(dirAbs, "upload/printtemplate/舱位信息导出模板.xlsx");
fileAbsPath = Path.Combine(dirAbs, "舱位信息导出模板.xlsx");
if (!File.Exists(fileAbsPath))
{
//舱位台账导出模板【舱位台账导出模板】文件不存在

@ -120,7 +120,7 @@
"Port": 465,
"UseSSL": true,
"Receivers": "daisusu@dongshengsoft.com",
"Content" : ""
"Content": ""
}
},
"FeeService": {
@ -139,5 +139,10 @@
"MQQueueNameDingCang": "djy.output.dingcang.ds6",
"MQExchangeNameFangCang": "djy.output.dingcang.ds6",
"MQQueueNameFangCang": "djy.output.dingcang.ds6_fangcang"
},
"ExportFileSettings": {
"BasePath": "", //使
"RelativePath": "ExportTemplate",
"FileType": [ ".xls", ".xlsx" ]
}
}

Loading…
Cancel
Save