修改舱位导出

dev
jianghaiqing 1 month ago
parent 1640a52784
commit 75e0c06e8a

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

@ -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))
{ {
//舱位台账导出模板【舱位台账导出模板】文件不存在 //舱位台账导出模板【舱位台账导出模板】文件不存在

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

Loading…
Cancel
Save