修改获取船公司信息

usertest
cjy 3 months ago
parent 047d4d1486
commit 64fcd09c1f

@ -1000,7 +1000,7 @@ namespace DS.WMS.Core.Op.Method
var carrMap = tenantDb.Queryable<MappingCarrier>().Where(t => t.Module.Equals("BOOK_OR_CLOSING_RT", StringComparison.OrdinalIgnoreCase) var carrMap = tenantDb.Queryable<MappingCarrier>().Where(t => t.Module.Equals("BOOK_OR_CLOSING_RT", StringComparison.OrdinalIgnoreCase)
&& t.LinkId == order.CarrierId) && t.LinkId == order.CarrierId)
.First(); .First();
var carrCode = seaComService.GetClientCode(order.CarrierId, tenantDb); var carrCode = seaComService.GetCarrierCode(order.CarrierId, tenantDb);
EDIRouteEnum ediRouteEnum = GetEDIRoute(carrCode, carrMap); EDIRouteEnum ediRouteEnum = GetEDIRoute(carrCode, carrMap);
if (ediRouteEnum == EDIRouteEnum.YT) if (ediRouteEnum == EDIRouteEnum.YT)

@ -473,12 +473,12 @@ namespace DS.WMS.Core.Op.Method
{ {
if (Id == 0) if (Id == 0)
return ""; return "";
var client = tenantDb.Queryable<InfoClient>().First(v => v.Id == Id && v.Status == StatusEnum.Enable.ToEnumInt()); var client = tenantDb.Queryable<CodeCarrier>().First(v => v.Id == Id);
if (client.IsNull()) if (client.IsNull())
{ {
throw new Exception("请检查船公司信息"); throw new Exception("请检查船公司信息");
} }
return client.EDICode.IsNull() ? client.CodeName : client.EDICode; return client.EdiCode.IsNull() ? client.Code : client.EdiCode;
} }
/// <summary> /// <summary>
/// 获取港口代码 /// 获取港口代码
@ -1090,7 +1090,7 @@ namespace DS.WMS.Core.Op.Method
} }
var yardCode = GetYardCode(order.YardId, tenantDb); var yardCode = GetYardCode(order.YardId, tenantDb);
var carrierCode = GetCarrierCode(order.YardId, tenantDb); var carrierCode = GetCarrierCode(order.CarrierId, tenantDb);
var tenantName = db.Queryable<SysTenant>().Filter(null, true).Where(u => u.Id == long.Parse(user.TenantId)).Select(u => u.Name).First(); var tenantName = db.Queryable<SysTenant>().Filter(null, true).Where(u => u.Id == long.Parse(user.TenantId)).Select(u => u.Name).First();
var checkRlt = XiahuozhiHelpler.CheckGoodsDescriptionWithInput(order); var checkRlt = XiahuozhiHelpler.CheckGoodsDescriptionWithInput(order);

@ -57,7 +57,7 @@ namespace DS.WMS.Core.Op.Method
foreach (var item in req) foreach (var item in req)
{ {
var yardCode = seaComService.GetClientCode(item.YardId, tenantDb); var yardCode = seaComService.GetClientCode(item.YardId, tenantDb);
var carrierCode = seaComService.GetClientCode(item.CarrierId, tenantDb); var carrierCode = seaComService.GetCarrierCode(item.CarrierId, tenantDb);
if (!string.IsNullOrWhiteSpace(item.CarrierId.ToString())) if (!string.IsNullOrWhiteSpace(item.CarrierId.ToString()))
{ {
var et = await tenantDb.Queryable<BookingStatus>().Where(x => x.StatusCode == "status_mudigang" && x.BusinessId == Convert.ToInt64(item.BusinessId)).FirstAsync(); var et = await tenantDb.Queryable<BookingStatus>().Where(x => x.StatusCode == "status_mudigang" && x.BusinessId == Convert.ToInt64(item.BusinessId)).FirstAsync();

@ -53,7 +53,7 @@ namespace DS.WMS.Core.Op.Method
//判断船公司是否支持 1790295446942519296 //判断船公司是否支持 1790295446942519296
var allowCarrier = db.Queryable<SysDictData>() var allowCarrier = db.Queryable<SysDictData>()
.InnerJoin<SysDictType>((a, b) => a.TypeId == b.Id).Where((a, b) => b.Code == "txxp_carrier_list").Select((a, b) => a.Value).ToList(); .InnerJoin<SysDictType>((a, b) => a.TypeId == b.Id).Where((a, b) => b.Code == "txxp_carrier_list").Select((a, b) => a.Value).ToList();
var carrCode = seaComService.GetClientCode(order.CarrierId, tenantDb); var carrCode = seaComService.GetCarrierCode(order.CarrierId, tenantDb);
if (!allowCarrier.Contains(carrCode)) if (!allowCarrier.Contains(carrCode))
return await Task.FromResult(DataResult<string>.Failed("不支持的船公司:"+ carrCode)); return await Task.FromResult(DataResult<string>.Failed("不支持的船公司:"+ carrCode));

Loading…
Cancel
Save