jianghaiqing 2 years ago
commit 6b502bf430

@ -151,13 +151,15 @@ namespace Myshipping.Application.EDI
attFile.TenantName = order.TenantName;
repBookingFile.Insert(attFile);
SplitFtpServerAndPort(paraServer.Value, out string server, out int port);
//发送ftp
var ftpPostObj = new
{
host = paraServer.Value,
host = server,
username = paraUser.Value,
pwd = paraPwd.Value,
path = "/"
path = "/",
port = port,
};
var ftpSpiderUrl = dicData.FirstOrDefault(x => x.TypeCode == "url_set" && x.Code == "booking_edi_ftp_server").Value;
Log.Information($"准备请求发送ftp{ftpSpiderUrl} ,参数:{ftpPostObj.ToJsonString()},文件:{ediFileName}");
@ -411,13 +413,15 @@ namespace Myshipping.Application.EDI
attFile.TenantName = order.TenantName;
await repBookingFile.InsertAsync(attFile);
SplitFtpServerAndPort(ftpset.SERVERIP, out string server, out int port);
//后续发送
var ftpPostObj = new
{
host = ftpset.SERVERIP,
host = server,
username = ftpset.USERNAME,
pwd = ftpset.PASSWORD,
path = ftpset.FOLDERNAME
path = ftpset.FOLDERNAME,
port = port,
};
var ftpSpiderUrl = (await cacheService.GetAllDictData()).FirstOrDefault(x => x.TypeCode == "url_set" && x.Code == "booking_edi_ftp_server").Value;
Log.Information($"准备请求发送ftp{ftpSpiderUrl} ,参数:{ftpPostObj.ToJsonString()},文件:{ediFileName}");
@ -512,13 +516,15 @@ namespace Myshipping.Application.EDI
attFile.TenantName = order.TenantName;
repBookingFile.Insert(attFile);
SplitFtpServerAndPort(ftpset.SERVERIP, out string server, out int port);
//后续发送
var ftpPostObj = new
{
host = ftpset.SERVERIP,
host = server,
username = ftpset.USERNAME,
pwd = ftpset.PASSWORD,
path = ftpset.FOLDERNAME
path = ftpset.FOLDERNAME,
port = port
};
var ftpSpiderUrl = (await cacheService.GetAllDictData()).FirstOrDefault(x => x.TypeCode == "url_set" && x.Code == "booking_edi_ftp_server").Value;
Log.Information($"准备请求发送ftp{ftpSpiderUrl} ,参数:{ftpPostObj.ToJsonString()},文件:{ediFileName}");
@ -1030,5 +1036,24 @@ namespace Myshipping.Application.EDI
return list;
}
/// <summary>
/// 分割ftp服务器地址和端口
/// </summary>
/// <param name="str"></param>
private static void SplitFtpServerAndPort(string str, out string server, out int port)
{
if (str.IndexOf(':') > -1)
{
var arr = str.Split(':');
server = arr[0];
port = Convert.ToInt32(arr[1]);
}
else
{
server = str;
port = 21;
}
}
}
}

@ -818,7 +818,11 @@ namespace Myshipping.Application.Entity
public string WarehouseID { get; set; }
/// <summary>
/// ep号
/// </summary>
public string EPCode { get; set; }
}
}

@ -323,13 +323,13 @@ namespace Myshipping.Application
var list = entities.Adapt<SqlSugarPagedList<PageBookingOrder>>();
var status =await _repBookingStatus.AsQueryable().ToListAsync();
var remark =await _bookingremark.AsQueryable().ToListAsync();
var status = await _repBookingStatus.AsQueryable().ToListAsync();
var remark = await _bookingremark.AsQueryable().ToListAsync();
foreach (var item in list.Items)
{
var sta = status.Where(x => x.BookingId == item.Id).ToList();
var sta = status.Where(x => x.BookingId == item.Id).ToList();
if (sta != null) { item.bookstatus = sta; }
var st = remark.Where(x => x.PId == item.Id).ToList();
var st = remark.Where(x => x.PId == item.Id).ToList();
if (st != null) { item.bookremark = st; }
if (!string.IsNullOrWhiteSpace(item.ETD))
{
@ -4783,7 +4783,8 @@ namespace Myshipping.Application
public async Task<dynamic> GetAllData(long bookingId)
{
BookingAllData allData = new BookingAllData();
if (bookingId==0) {
if (bookingId == 0)
{
return allData;
}
@ -4799,23 +4800,23 @@ namespace Myshipping.Application
var statuslog = await _repStatuslog.AsQueryable().Filter(null, true).Where(x => x.BookingId == bookingId).OrderByDescending(x => x.OpTime).ToListAsync();
var dto = statuslog.Adapt<List<BookingStatusLogDto>>();
var statuslogdetail =await _statuslogdetail.AsQueryable().ToListAsync();
var statuslogdetail = await _statuslogdetail.AsQueryable().ToListAsync();
foreach (var item in dto)
{
var detail = statuslogdetail.Where(x => x.PId == item.Id).ToList();
item.detail = detail.Adapt<List<BookingStatusLogDetailDto>>();
}
allData.statuslog = dto;
var bookinglog =await _bookinglog.AsQueryable().ToListAsync();
var bookinglog = await _bookinglog.AsQueryable().ToListAsync();
List<BookingLogDto> list = new List<BookingLogDto>();
var main = bookinglog.Where(u => u.BookingId == bookingId).ToList();
var main = bookinglog.Where(u => u.BookingId == bookingId).ToList();
list = main.Adapt<List<BookingLogDto>>();
if (list != null)
{
var bookinglogdetail = await _bookinglogdetail.AsQueryable().ToListAsync();
foreach (var item in list)
{
var details = bookinglogdetail.Where(x => x.PId == item.Id).ToList();
var details = bookinglogdetail.Where(x => x.PId == item.Id).ToList();
item.details = details;
}
}

@ -507,7 +507,7 @@ namespace Myshipping.Application
/// <summary>
/// 客户ID
/// </summary>
public string CUSTOMERID { get; set; }
public long? CUSTOMERID { get; set; }
/// <summary>
/// 订舱代理ID
/// </summary>
@ -666,5 +666,11 @@ namespace Myshipping.Application
/// 仓库ID
/// </summary>
public string WarehouseID { get; set; }
/// <summary>
/// ep号
/// </summary>
public string EPCode { get; set; }
}
}

@ -774,6 +774,39 @@ namespace Myshipping.Application.Service.BookingOrder.Dto
//[Description("尺寸合计")]
public string CBMTOTAL { get; set; }
/// <summary>
/// 航线ID
/// </summary>
public string ROUTEID { get; set; }
/// <summary>
/// 航线
/// </summary>
public string ROUTE { get; set; }
/// <summary>
/// 航线
/// </summary>
public string Warehouse { get; set; }
/// <summary>
/// 仓库ID
/// </summary>
public string WarehouseID { get; set; }
/// <summary>
/// ep号
/// </summary>
public string EPCode { get; set; }
public List<BookingStatus> bookstatus { get; set; }
public List<BookingRemark> bookremark { get; set; }

@ -172,6 +172,7 @@ namespace Myshipping.Report.Controllers
log.Debug($"准备获取订舱数据:{bookingId}");
var order = sqlSugarClient.Queryable<BookingOrder>().First(x => x.Id == bookingId);
var ctns = sqlSugarClient.Queryable<BookingCtn>().Where(x => x.BILLID == bookingId).ToList();
var bookingEdi = sqlSugarClient.Queryable<BookingEDIExt>().First(x => x.BookingId == bookingId);
var letterYard = sqlSugarClient.Queryable<BookingLetteryard>().First(x => x.BookingId == bookingId);
DjyCustomer customer = null;
@ -186,6 +187,7 @@ namespace Myshipping.Report.Controllers
ctns = ctns,
letterYard,
agentCustomer = customer,
ediExt = bookingEdi,
});
log.Debug($"订舱数据:{strObj}");

@ -175,6 +175,9 @@
<Compile Include="..\Myshipping.Application\Entity\BookingCtnDetail.cs">
<Link>DB\BookingCtnDetail.cs</Link>
</Compile>
<Compile Include="..\Myshipping.Application\Entity\BookingEDIExt.cs">
<Link>DB\BookingEDIExt.cs</Link>
</Compile>
<Compile Include="..\Myshipping.Application\Entity\BookingLetteryard.cs">
<Link>DB\BookingLetteryard.cs</Link>
</Compile>

Loading…
Cancel
Save