zhangxiaofeng 4 months ago
commit 792c95618e

@ -33,6 +33,11 @@ public static class MultiLanguageConst
[Description("查询成功")]
public const string DataQuerySuccess = "Data_Query_Success";
/// <summary>
/// 查询无数据
/// </summary>
[Description("查询无数据")]
public const string DataQueryNoData = "Data_Query_NoData";
/// <summary>
/// 新增成功
/// </summary>
[Description("新增成功")]
@ -424,6 +429,9 @@ public static class MultiLanguageConst
[Description("用户邮箱设置不存在")]
public const string UserEmailNotExist = "UserEmail_Not_Exist";
[Description("未配置个人邮箱账号")]
public const string UserEmailNotSet = "UserEmail_Not_Set";
[Description("列表字段设置已存在")]
public const string ColumnSetExist = "Column_Set_Exist";
[Description("表单复制字段设置已存在")]
@ -1004,6 +1012,20 @@ public static class MultiLanguageConst
[Description("船期数据校验失败,请重新查询船期信息")]
public const string SpaceBookingAPIShipScheduleCheckFailNotNull = "SpaceBK_API_Ship_Schedule_CheckFail_Not_Null";
/// <summary>
/// 船期数据校验失败,当前船期请求参数错误,请重新查询船期信息
/// </summary>
[Description("船期数据校验失败,当前船期请求参数错误,请重新查询船期信息")]
public const string SpaceBookingAPIShipScheduleCheckFailPriceIDNotEqual = "SpaceBK_API_Ship_Schedule_CheckFail_PriceIDNotEqual";
/// <summary>
/// 船期数据校验失败,当前船期请求参数错误,价格发生差异,请重新查询船期信息
/// </summary>
[Description("船期数据校验失败,当前船期请求参数错误,价格发生差异,请重新查询船期信息")]
public const string SpaceBookingAPIShipScheduleCheckFailAmountChange = "SpaceBK_API_Ship_Schedule_CheckFail_AmountChange";
/// <summary>
/// 港口或城市名称不能为空
/// </summary>
@ -1104,6 +1126,26 @@ public static class MultiLanguageConst
/// </summary>
[Description("MSK API SPOT 检索海运船期详情失败,原因:{0}")]
public const string SpaceBookingAPISpotSearchShipResultError2 = "SpaceBK_API_Spot_SearchShip_Exception";
/// <summary>
/// 复制数量不能小于1
/// </summary>
[Description("复制数量不能小于1")]
public const string SpaceBookingAPICopyLowNum = "SpaceBK_API_CopyLowNum";
/// <summary>
/// 复制数量不能大于1000
/// </summary>
[Description("复制数量不能大于1000")]
public const string SpaceBookingAPICopyLimitNum = "SpaceBK_API_CopyLimitNum";
/// <summary>
/// 请求的操作类型不能为空
/// </summary>
[Description("请求的操作类型不能为空")]
public const string SpaceBookingAPIOpTypeNull = "SpaceBK_API_OpTypeNull";
#endregion
#region 舱位管理

@ -47,6 +47,7 @@ public class MultiLanguageMiddleware
|| context.Request.Path.Value.IndexOf("HealthCheck", StringComparison.InvariantCultureIgnoreCase) > -1
|| context.Request.Path.Value.IndexOf("DownloadOpFileInfo", StringComparison.InvariantCultureIgnoreCase) > -1
|| context.Request.Path.Value.IndexOf("LinkAttach", StringComparison.InvariantCultureIgnoreCase) > -1
|| context.Request.Path.Value.IndexOf("PrintTempFile", StringComparison.InvariantCultureIgnoreCase) > -1
|| context.Request.Path.Value.IndexOf("GetOcrImg", StringComparison.InvariantCultureIgnoreCase) > -1
|| context.Request.Path.Value.IndexOf("DownloadBookingOrClosingEDI", StringComparison.InvariantCultureIgnoreCase) > -1
)

@ -58,6 +58,10 @@ namespace DS.WMS.Core.Code.Dtos
/// 发件SSL
/// </summary>
public bool? SmtpSSL { get; set; } = false;
/// <summary>
/// 是否为公司账号
/// </summary>
public bool IsCompany { get; set; } = false;
/// <summary>
/// 状态 0启用 1禁用

@ -60,5 +60,10 @@ namespace DS.WMS.Core.Code.Dtos
/// 状态 0启用 1禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 是否为公司账号
/// </summary>
public bool IsCompany { get; set; } = false;
}
}

@ -71,5 +71,11 @@ namespace DS.WMS.Core.Code.Entity
/// </summary>
[SugarColumn(ColumnDescription = "状态", DefaultValue = "0")]
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 是否为公司账号
/// </summary>
[SugarColumn(ColumnDescription = "是否为公司账号", DefaultValue = "0")]
public bool IsCompany { get; set; } = false;
}
}

@ -46,4 +46,11 @@ public interface IUserEmailService
/// <param name="req"></param>
/// <returns></returns>
public DataResult BatchDelUserEmail(IdModel req);
/// <summary>
/// 获取用户邮箱配置
/// </summary>
/// <returns></returns>
public Task<DataResult<CodeUserEmailRes>> GetUserEmailSetInfo();
}

@ -125,4 +125,32 @@ public class CodeUserEmailService : IUserEmailService
}
return DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess);
}
/// <summary>
/// 获取用户邮箱配置
/// </summary>
/// <returns></returns>
public async Task<DataResult<CodeUserEmailRes>> GetUserEmailSetInfo()
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = await tenantDb.Queryable<CodeUserEmail>()
.Where(a => a.IsCompany == false && a.CreateBy == long.Parse(user.UserId))
.Select<CodeUserEmailRes>()
.FirstAsync();
if (data == null)
{
data = await tenantDb.Queryable<CodeThirdParty>()
.Where(a => a.IsCompany == true)
.Select<CodeUserEmailRes>()
.FirstAsync();
}
if (data == null)
return DataResult<CodeUserEmailRes>.Failed("未配置个人邮箱账号", MultiLanguageConst.UserEmailNotSet);
return DataResult<CodeUserEmailRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
}
}

@ -20,17 +20,22 @@ namespace DS.WMS.Core.Op.Dtos
/// <summary>
/// 船公司主键
/// </summary>
public long carrierId { get; set; }
public Nullable<long> carrierId { get; set; }
/// <summary>
/// 船公司代码
/// </summary>
public string carrierCode { get; set; }
/// <summary>
/// 订舱ID
/// </summary>
public long bookingId { get; set; }
public Nullable<long> bookingId { get; set; }
/// <summary>
/// 主键ID
/// </summary>
public long PId { get; set; }
public Nullable<long> PId { get; set; }
/// <summary>
/// 船期MD5
@ -126,7 +131,7 @@ namespace DS.WMS.Core.Op.Dtos
/// <summary>
/// 承运人代码MAEU, SEAU, SEJJ, MCPU, MAEI
/// </summary>
public string carrierCode { get; set; }
public string vesselCarrierCode { get; set; }
/// <summary>
/// 最早起运日期, 不可小于当前日期

@ -20,12 +20,12 @@ namespace DS.WMS.Core.Op.Dtos
/// <summary>
/// 船公司主键
/// </summary>
public long carrierId { get; set; }
public Nullable<long> carrierId { get; set; }
///// <summary>
///// 船公司代码
///// </summary>
//public string carrierCode { get; set; }
/// <summary>
/// 船公司代码
/// </summary>
public string carrierCode { get; set; }
/// <summary>
/// 订舱ID
@ -136,7 +136,7 @@ namespace DS.WMS.Core.Op.Dtos
/// <summary>
/// 承运人代码MAEU, SEAU, SEJJ, MCPU, MAEI
/// </summary>
public string carrierCode { get; set; }
public string vesselCarrierCode { get; set; }
/// <summary>
/// 最早起运日期, 不可小于当前日期

@ -0,0 +1,112 @@
using AutoMapper;
using DS.WMS.Core.Op.Entity;
using Mapster;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.Dtos
{
public class SpaceBookingMapper : IRegister
{
public void Register(TypeAdapterConfig config)
{
config.ForType<MSKBookingDto, SpaceBookingOrder>()
.Map(dest => dest.CarrierCode, src => src.carrierCode)
.Map(dest => dest.PriceReference, src => src.priceReference)
.Map(dest => dest.ProductCode, src => src.productCode)
.Map(dest => dest.Sender, src => src.sender)
.Map(dest => dest.BookedByCompanyName, src => src.bookedByCompanyName)
.Map(dest => dest.BookedByCompanyPartyCode, src => src.bookedByMaerskPartyCode)
.Map(dest => dest.BookedByCompanyContact, src => src.bookedByCompanyContactName)
.Map(dest => dest.BookedByCompanyContactEmail, src => src.bookedByCompanyContactEmail)
.Map(dest => dest.IsBookingPartOwnPrice, src => src.isBookingPartOwnPrice)
.Map(dest => dest.PriceOwnerCompanyName, src => src.priceOwnerCompanyName)
.Map(dest => dest.PriceOwnerCompanyPartyCode, src => src.priceOwnerMaerskPartyCode)
.Map(dest => dest.PriceOwnerCompanyContact, src => src.priceOwnerContactName)
.Map(dest => dest.PriceOwnerCompanyContactEmail, src => src.priceOwnerContactEmail)
.Map(dest => dest.CarrierCode, src => src.carrierCode)
.Map(dest => dest.EarliestDepartureDate, src => src.earliestDepartureDate)
.Map(dest => dest.ExportServiceMode, src => src.exportServiceMode)
.Map(dest => dest.ImportServiceMode, src => src.importServiceMode)
.Map(dest => dest.PlaceReceiptCity, src => src.placeOfReceiptCityName)
.Map(dest => dest.PlaceReceiptUnlocCode, src => src.placeOfReceiptUnLocCode)
.Map(dest => dest.PlaceDeliveryCity, src => src.placeOfDeliveryCityName)
.Map(dest => dest.PlaceDeliveryUnlocCode, src => src.placeOfDeliveryUnLocCode)
.Map(dest => dest.ETD, src => src.originDepartureDateTimeLocal)
.Map(dest => dest.ETA, src => src.destinationArrivalDateTimeLocal)
.Map(dest => dest.Vessel, src => src.vesselName)
.Map(dest => dest.VesselCode, src => src.carrierVesselCode)
.Map(dest => dest.Voyno, src => src.exportVoyageNumber)
.Map(dest => dest.TransportMode, src => src.transportMode)
.Map(dest => dest.TotalCargoWeight, src => src.totalCargoWeight)
.Map(dest => dest.NoOfProbes, src => src.noOfProbes)
.Map(dest => dest.TempSet, src => src.temperature)
.Map(dest => dest.Vent, src => src.ventilation)
.Map(dest => dest.Humidity, src => src.humidity)
.Map(dest => dest.CommodityCodeType, src => src.commodityCodeType)
.Map(dest => dest.GoodsCode, src => src.commodityCode)
.Map(dest => dest.GoodsName, src => src.commodityName)
.Map(dest => dest.CargoType, src => src.cargoType)
.Map(dest => dest.PlaceReceiptCountryCode, src => src.placeOfReceiptCountryCode)
.Map(dest => dest.PlaceDeliveryCountryCode, src => src.placeOfDeliveryCountryCode)
.Map(dest => dest.EstSailingDays, src => src.EstSailingDays)
.Map(dest => dest.PriceReferenceId, src => src.priceReferenceId)
.Map(dest => dest.PriceReferenceName, src => src.priceReferenceName)
.Map(dest => dest.PriceOwnerReferenceId, src => src.priceOwnerReferenceId)
.Map(dest => dest.PriceOwnerReference, src => src.priceOwnerReference)
.Map(dest => dest.PriceOwnerReferenceName, src => src.priceOwnerReferenceName)
.Map(dest => dest.IsReefer, src => src.isReefer)
.Map(dest => dest.IsShipperOwner, src => src.isShipperOwned)
.Map(dest => dest.IsImportReturned, src => src.isImportReturned)
.Map(dest => dest.CarrierProductId, src => src.carrierProductId)
.Map(dest => dest.IsSendNoSchedule, src => src.isSendNoSchedule)
.Map(dest => dest.PlaceReceiptCountryName, src => src.placeOfReceiptCountryName)
.Map(dest => dest.PlaceReceiptRegionName, src => src.placeOfReceiptRegionName)
.Map(dest => dest.PlaceReceiptCountryName, src => src.placeOfDeliveryCountryName)
.Map(dest => dest.PlaceDeliveryRegionName, src => src.placeOfDeliveryRegionName)
.Map(dest => dest.PlaceDeliveryCity, src => src.userPlaceOfDeliveryCityName)
.Map(dest => dest.PlaceDeliveryCountryCode, src => src.userPlaceOfDeliveryCountryCode)
.Map(dest => dest.PlaceDeliveryCountryName, src => src.userPlaceOfDeliveryCountryName)
.Map(dest => dest.ShipRatePId, src => src.PId)
.Map(dest => dest.ShipRateMD5, src => src.MD5)
.Map(dest => dest.PlaceReceiptGeoId, src => src.carrierCollectionOriginGeoID)
.Map(dest => dest.PlaceDeliveryGeoId, src => src.carrierDeliveryDestinationGeoID);
}
}
public class SpaceBookingAutoProfile : Profile
{
public SpaceBookingAutoProfile()
{
CreateMap<MSKBookingDto, SpaceBookingOrder>()
.ForMember(x => x.Id, option => option.MapFrom(x => x.id))
.ForMember(x => x.PriceReference, option => option.MapFrom(x => x.priceReference))
.ForMember(x => x.ProductCode, option => option.MapFrom(x => x.priceReference))
.ForMember(x => x.Sender, option => option.MapFrom(x => x.sender))
.ForMember(x => x.BookedByCompanyName, option => option.MapFrom(x => x.bookedByCompanyName))
.ForMember(x => x.BookedByCompanyPartyCode, option => option.MapFrom(x => x.bookedByMaerskPartyCode))
.ForMember(x => x.BookedByCompanyContact, option => option.MapFrom(x => x.bookedByCompanyContactName))
;
}
}
//public class Maker
//{
// static IMapper _mapper;
// static IMapper Configure()
// {
// var config = new MapperConfiguration(cfg =>
// {
// cfg.AddProfile<SpaceBookingAutoMapper>();
// });
// return config.CreateMapper();
// }
// public static IMapper Mapper => _mapper ??= Configure();
//}
}

@ -1,5 +1,7 @@
using System;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -388,36 +390,6 @@ namespace DS.WMS.Core.Op.Dtos
/// </summary>
public string priceReferenceName { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreatedTime { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public Nullable<DateTime> UpdatedTime { get; set; }
/// <summary>
/// 创建人ID
/// </summary>
public long CreatedUserId { get; set; }
/// <summary>
/// 创建人名称
/// </summary>
public string CreatedUserName { get; set; }
/// <summary>
/// 修改人ID
/// </summary>
public long UpdatedUserId { get; set; }
/// <summary>
/// 修改人名称
/// </summary>
public string UpdatedUserName { get; set; }
/// <summary>
/// 我希望使用托运人自己的集装箱
/// </summary>
@ -482,5 +454,59 @@ namespace DS.WMS.Core.Op.Dtos
/// 订舱通道类型 CON_API-合约APISPOT_API-SPOT订舱EDI-EDI订舱
/// </summary>
public string bookingChannelTypeName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
public long CreateBy { get; set; }
/// <summary>
/// 创建人名称
/// </summary>
public string CreateUserName { get; set; }
/// <summary>
/// 修改人
/// </summary>
public long UpdateBy { get; set; }
/// <summary>
/// 修改人名称
/// </summary>
public string UpdateUserName { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public DateTime UpdateTime { get; set; }
/// <summary>
/// 删除
/// </summary>
public bool Deleted { get; set; } = false;
/// <summary>
/// 删除人名称
/// </summary>
public string DeleteUserName { get; set; }
/// <summary>
/// 删除时间
/// </summary>
public DateTime DeleteTime { get; set; }
/// <summary>
/// 删除人
/// </summary>
public long DeleteBy { get; set; }
}
}

@ -620,5 +620,17 @@ namespace DS.WMS.Core.Op.Entity
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "交货地定位ID", Length = 50, IsNullable = true)]
public string PlaceDeliveryGeoId { get; set; }
/// <summary>
/// 船公司主键
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "船公司主键", IsNullable = true)]
public Nullable<long> CarrierId { get; set; }
/// <summary>
/// 承运人代码
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "承运人代码", Length = 20, IsNullable = true)]
public string vesselCarrierCode { get; set; }
}
}

@ -198,7 +198,7 @@ namespace DS.WMS.Core.Op.Method
var data = await query.Select<BookingContractNoManageDto>().OrderBy(a=>a.ContractNo).Take(top).ToListAsync();
if(data.Count > 0)
if(data.Count == 0)
return DataResult<List<BookingContractNoManageDto>>.FailedData(data);
return DataResult<List<BookingContractNoManageDto>>.Success(data);

@ -35,6 +35,9 @@ using LanguageExt;
using DS.Module.Core.Data;
using DS.WMS.Core.TaskPlat.Dtos;
using NLog.Fluent;
using Fasterflect;
using AutoMapper;
using System.Reflection;
namespace DS.WMS.Core.Op.Method
{
@ -53,6 +56,7 @@ namespace DS.WMS.Core.Op.Method
private readonly IRedisService redisService;
private readonly IConfigService configService;
const string CONST_MSK_API_Poing2P_SECD_URL = "MSKApiSailingSchedulePoint2Point";
const string CONST_MSK_API_BOOKING_URL = "MSKApiBooking";
const string CONST_MSK_API_LOCATION_URL = "MSKApilocation";
@ -588,7 +592,7 @@ namespace DS.WMS.Core.Op.Method
if (spaceBookingOrderShipSchedule == null)
{
selectedShipSchedule = GetCacheShipSailingSchedule(model.PId);
selectedShipSchedule = GetCacheShipSailingSchedule(model.PId.Value);
}
else
{
@ -648,7 +652,7 @@ namespace DS.WMS.Core.Op.Method
bookingDto.bookingBody.transport = new MSKAPIBookingTransport
{
carrierCode = model.carrierCode,
carrierCode = model.vesselCarrierCode,
earliestDepartureDate = model.earliestDepartureDate.Value.ToString("yyyy-MM-ddTHH:mm:ss"),
exportServiceMode = model.exportServiceMode,
importServiceMode = model.importServiceMode,
@ -824,7 +828,7 @@ namespace DS.WMS.Core.Op.Method
{
model.ctns.ForEach(async ctn =>
{
var ctnMapping = mappingCtnService.QueryMappingCtn(model.carrierId, CONST_MSK_API_MAPPING_MODULE, ctn.ctnCode).GetAwaiter().GetResult()?.Data;
var ctnMapping = mappingCtnService.QueryMappingCtn(model.carrierId.Value, CONST_MSK_API_MAPPING_MODULE, ctn.ctnCode).GetAwaiter().GetResult()?.Data;
//var ctnMapping = ctnCodeMappingList.FirstOrDefault(t => t.Code.Equals(ctn.ctnCode));
//if (ctnMapping == null)
@ -1366,10 +1370,72 @@ namespace DS.WMS.Core.Op.Method
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var entity = await tenantDb.Queryable<SpaceBookingOrder>().FirstAsync(a => a.Id == id);
//if (entity == null)
//throw Oops.Oh($"获取马士基API订舱详情失败不存在或已作废");
model = entity.Adapt<MSKBookingDto>();
if (entity == null)
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingAPIOrderDeletedOrNoExists)));
model = new MSKBookingDto {
id = entity.Id,
carrierCode = entity.CarrierCode,
vesselCarrierCode = entity.vesselCarrierCode,
carrierId = entity.CarrierId,
priceReference = entity.PriceReference,
productCode = entity.ProductCode,
sender = entity.Sender,
bookedByCompanyName = entity.BookedByCompanyName,
bookedByMaerskPartyCode = entity.BookedByCompanyPartyCode,
bookedByCompanyContactName = entity.BookedByCompanyContact,
bookedByCompanyContactEmail = entity.BookedByCompanyContactEmail,
isBookingPartOwnPrice = entity.IsBookingPartOwnPrice,
priceOwnerCompanyName = entity.PriceOwnerCompanyName,
priceOwnerMaerskPartyCode = entity.PriceOwnerCompanyPartyCode,
priceOwnerContactName = entity.PriceOwnerCompanyContact,
priceOwnerContactEmail = entity.PriceOwnerCompanyContactEmail,
earliestDepartureDate = entity.EarliestDepartureDate,
exportServiceMode = entity.ExportServiceMode,
importServiceMode = entity.ImportServiceMode,
placeOfReceiptCityName = entity.PlaceReceiptCity,
placeOfReceiptUnLocCode = entity.PlaceReceiptUnlocCode,
placeOfDeliveryCityName = entity.PlaceDeliveryCity,
placeOfDeliveryUnLocCode = entity.PlaceDeliveryUnlocCode,
originDepartureDateTimeLocal = entity.ETD,
destinationArrivalDateTimeLocal = entity.ETA,
vesselName = entity.Vessel,
carrierVesselCode = entity.VesselCode,
exportVoyageNumber = entity.Voyno,
transportMode = entity.TransportMode,
totalCargoWeight = entity.TotalCargoWeight,
noOfProbes = entity.NoOfProbes,
temperature = !string.IsNullOrWhiteSpace(entity.TempSet)?decimal.Parse(entity.TempSet):null,
ventilation = entity.Vent,
humidity = entity.Humidity,
commodityCodeType = entity.CommodityCodeType,
commodityCode = entity.GoodsCode,
commodityName = entity.GoodsName,
isReefer = entity.IsReefer,
cargoType = entity.CargoType,
placeOfReceiptCountryCode = entity.PlaceReceiptCountryCode,
placeOfDeliveryCountryCode = entity.PlaceDeliveryCountryCode,
EstSailingDays = entity.EstSailingDays,
priceReferenceId = entity.PriceReferenceId,
priceReferenceName = entity.PriceReferenceName,
priceOwnerReferenceId = entity.PriceOwnerReferenceId.HasValue? entity.PriceOwnerReferenceId.Value.ToString():"",
priceOwnerReference = entity.PriceOwnerReference,
priceOwnerReferenceName = entity.PriceOwnerReferenceName,
isShipperOwned = entity.IsShipperOwner,
isImportReturned = entity.IsImportReturned,
carrierProductId = entity.CarrierProductId,
isSendNoSchedule = entity.IsSendNoSchedule,
placeOfReceiptCountryName = entity.PlaceReceiptCountryName,
placeOfReceiptRegionName = entity.PlaceReceiptRegionName,
placeOfDeliveryCountryName = entity.PlaceDeliveryCountryName,
placeOfDeliveryRegionName = entity.PlaceDeliveryRegionName,
PId = entity.ShipRatePId,
MD5 = entity.ShipRateMD5,
bookingChannelTypeName = entity.BookingChannelType,
bookingChannelType = entity.BookingChannelTypeName,
carrierCollectionOriginGeoID = entity.PlaceReceiptGeoId,
carrierDeliveryDestinationGeoID = entity.PlaceDeliveryGeoId,
};
var ctnList = tenantDb.Queryable<SpaceBookingOrderCtn>().Where(a => a.RecordId == id && a.Deleted == false).ToList();
@ -1436,7 +1502,7 @@ namespace DS.WMS.Core.Op.Method
string ctnStat = string.Empty;
//_logger.LogInformation($"获取请求马士基API订舱报文JSON={JSON.Serialize(model)}");
Logger.Log(NLog.LogLevel.Info, $"获取请求马士基API订舱报文JSON={JsonConvert.SerializeObject(model)}");
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
@ -1457,7 +1523,7 @@ namespace DS.WMS.Core.Op.Method
if (shipScheduleRecord == null)
{
selectedShipSchedule = GetCacheShipSailingSchedule(model.PId);
selectedShipSchedule = GetCacheShipSailingSchedule(model.PId.Value);
}
else
{
@ -1502,7 +1568,69 @@ namespace DS.WMS.Core.Op.Method
}
SpaceBookingOrder entity = model.Adapt<SpaceBookingOrder>();
#region 赋值
SpaceBookingOrder entity = new SpaceBookingOrder
{
CarrierCode = model.carrierCode,
vesselCarrierCode = model.vesselCarrierCode,
CarrierId = model.carrierId,
PriceReference = model.priceReference,
ProductCode = model.productCode,
Sender = model.sender,
BookedByCompanyName = model.bookedByCompanyName,
BookedByCompanyPartyCode = model.bookedByMaerskPartyCode,
BookedByCompanyContact = model.bookedByCompanyContactName,
BookedByCompanyContactEmail = model.bookedByCompanyContactEmail,
IsBookingPartOwnPrice = model.isBookingPartOwnPrice,
PriceOwnerCompanyName = model.priceOwnerCompanyName,
PriceOwnerCompanyPartyCode = model.priceOwnerMaerskPartyCode,
PriceOwnerCompanyContact = model.priceOwnerContactName,
PriceOwnerCompanyContactEmail = model.priceOwnerContactEmail,
EarliestDepartureDate = model.earliestDepartureDate,
ExportServiceMode = model.exportServiceMode,
ImportServiceMode = model.importServiceMode,
PlaceReceiptCity = model.placeOfReceiptCityName,
PlaceReceiptUnlocCode = model.placeOfReceiptUnLocCode,
PlaceDeliveryCity = model.placeOfDeliveryCityName,
PlaceDeliveryUnlocCode = model.placeOfDeliveryUnLocCode,
ETD = model.originDepartureDateTimeLocal,
ETA = model.destinationArrivalDateTimeLocal,
Vessel = model.vesselName,
VesselCode = model.carrierVesselCode,
Voyno = model.exportVoyageNumber,
TransportMode = model.transportMode,
TotalCargoWeight = model.totalCargoWeight,
NoOfProbes = model.noOfProbes,
TempSet = model.temperature.HasValue ? model.temperature.Value.ToString() : "",
Vent = model.ventilation,
Humidity = model.humidity,
CommodityCodeType = model.commodityCodeType,
GoodsCode = model.commodityCode,
GoodsName = model.commodityName,
CargoType = model.cargoType,
PlaceReceiptCountryCode = model.placeOfReceiptCountryCode,
PlaceDeliveryCountryCode = model.placeOfDeliveryCountryCode,
EstSailingDays = model.EstSailingDays,
PriceReferenceId = model.priceReferenceId,
PriceReferenceName = model.priceReferenceName,
PriceOwnerReferenceId = !string.IsNullOrWhiteSpace(model.priceOwnerReferenceId) ? long.Parse(model.priceOwnerReferenceId) : null,
PriceOwnerReference = model.priceOwnerReference,
PriceOwnerReferenceName = model.priceOwnerReferenceName,
IsReefer = model.isReefer,
IsShipperOwner = model.isShipperOwned,
IsImportReturned = model.isImportReturned,
CarrierProductId = model.carrierProductId,
IsSendNoSchedule = model.isSendNoSchedule,
PlaceReceiptCountryName = model.placeOfReceiptCountryName,
PlaceReceiptRegionName = model.placeOfReceiptRegionName,
PlaceDeliveryRegionName = model.placeOfDeliveryRegionName,
PlaceDeliveryCountryName = model.userPlaceOfDeliveryCountryName,
ShipRatePId = model.PId,
ShipRateMD5 = model.MD5,
PlaceReceiptGeoId = model.carrierCollectionOriginGeoID,
PlaceDeliveryGeoId = model.carrierDeliveryDestinationGeoID,
};
#endregion
entity.Id = model.id.Value;
entity.UpdateTime = nowDate;
@ -1543,7 +1671,13 @@ namespace DS.WMS.Core.Op.Method
}
//更新
var ctnEntity = ctn.Adapt<SpaceBookingOrderCtn>();
var ctnEntity = new SpaceBookingOrderCtn
{
CtnCode = ctn.ctnCode,
CtnName = ctn.ctnName,
CtnNum = ctn.ctnNum,
CtnSufferWeight = ctn.ctnSufferWeight.HasValue?(int)ctn.ctnSufferWeight.Value:0
};
ctnEntity.Id = ctn.id.Value;
ctnEntity.RecordId = entity.Id;
@ -1630,12 +1764,74 @@ namespace DS.WMS.Core.Op.Method
}
else
{
SpaceBookingOrder entity = model.Adapt<SpaceBookingOrder>();
#region 赋值
SpaceBookingOrder entity = new SpaceBookingOrder {
CarrierCode = model.carrierCode,
vesselCarrierCode = model.vesselCarrierCode,
CarrierId = model.carrierId,
PriceReference = model.priceReference,
ProductCode = model.productCode,
Sender = model.sender,
BookedByCompanyName = model.bookedByCompanyName,
BookedByCompanyPartyCode = model.bookedByMaerskPartyCode,
BookedByCompanyContact = model.bookedByCompanyContactName,
BookedByCompanyContactEmail = model.bookedByCompanyContactEmail,
IsBookingPartOwnPrice = model.isBookingPartOwnPrice,
PriceOwnerCompanyName = model.priceOwnerCompanyName,
PriceOwnerCompanyPartyCode = model.priceOwnerMaerskPartyCode,
PriceOwnerCompanyContact = model.priceOwnerContactName,
PriceOwnerCompanyContactEmail = model.priceOwnerContactEmail,
EarliestDepartureDate = model.earliestDepartureDate,
ExportServiceMode = model.exportServiceMode,
ImportServiceMode = model.importServiceMode,
PlaceReceiptCity = model.placeOfReceiptCityName,
PlaceReceiptUnlocCode = model.placeOfReceiptUnLocCode,
PlaceDeliveryCity = model.placeOfDeliveryCityName,
PlaceDeliveryUnlocCode = model.placeOfDeliveryUnLocCode,
ETD = model.originDepartureDateTimeLocal,
ETA = model.destinationArrivalDateTimeLocal,
Vessel = model.vesselName,
VesselCode = model.carrierVesselCode,
Voyno = model.exportVoyageNumber,
TransportMode = model.transportMode,
TotalCargoWeight = model.totalCargoWeight,
NoOfProbes = model.noOfProbes,
TempSet = model.temperature.HasValue? model.temperature.Value.ToString():"",
Vent = model.ventilation,
Humidity = model.humidity,
CommodityCodeType = model.commodityCodeType,
GoodsCode = model.commodityCode,
GoodsName = model.commodityName,
CargoType = model.cargoType,
PlaceReceiptCountryCode = model.placeOfReceiptCountryCode,
PlaceDeliveryCountryCode = model.placeOfDeliveryCountryCode,
EstSailingDays = model.EstSailingDays,
PriceReferenceId = model.priceReferenceId,
PriceReferenceName = model.priceReferenceName,
PriceOwnerReferenceId = !string.IsNullOrWhiteSpace(model.priceOwnerReferenceId)?long.Parse(model.priceOwnerReferenceId):null,
PriceOwnerReference = model.priceOwnerReference,
PriceOwnerReferenceName = model.priceOwnerReferenceName,
IsReefer = model.isReefer,
IsShipperOwner = model.isShipperOwned,
IsImportReturned = model.isImportReturned,
CarrierProductId = model.carrierProductId,
IsSendNoSchedule = model.isSendNoSchedule,
PlaceReceiptCountryName = model.placeOfReceiptCountryName,
PlaceReceiptRegionName = model.placeOfReceiptRegionName,
PlaceDeliveryRegionName = model.placeOfDeliveryRegionName,
PlaceDeliveryCountryName = model.userPlaceOfDeliveryCountryName,
ShipRatePId = model.PId,
ShipRateMD5 = model.MD5,
PlaceReceiptGeoId = model.carrierCollectionOriginGeoID,
PlaceDeliveryGeoId = model.carrierDeliveryDestinationGeoID,
};
#endregion
entity.CreateTime = nowDate;
entity.UpdateTime = nowDate;
entity.CreateBy = long.Parse(user.UserId);
entity.CreateUserName = user.UserName;
entity.Status = "TEMP";
entity.StatusName = "暂存";
entity.CtnStat = ctnStat;
@ -1841,20 +2037,24 @@ namespace DS.WMS.Core.Op.Method
/// <returns>返回执行结果消息</returns>
public async Task<DataResult<string>> BatchCopy(MSKAPIBookingCopyDto model)
{
//if (model.copyNum < 1)
// throw Oops.Oh($"复制数量不能小于1");
//复制数量不能小于1
if (model.copyNum < 1)
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingAPICopyLowNum)));
//if (model.copyNum > 1000)
// throw Oops.Oh($"复制数量不能大于1000");
//复制数量不能大于1000
if (model.copyNum > 1000)
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingAPICopyLimitNum)));
//if (string.IsNullOrWhiteSpace(model.opType))
// throw Oops.Oh($"请求的操作类型不能为空");
//请求的操作类型不能为空
if (string.IsNullOrWhiteSpace(model.opType))
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingAPIOpTypeNull)));
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var entity = await tenantDb.Queryable<SpaceBookingOrder>().FirstAsync(a => a.Id == model.originalId);
//if (entity == null)
// throw Oops.Oh($"获取马士基API订舱详情失败不存在或已作废");
//预订舱数据不存在或已作废
if (entity == null)
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingRecordDeletedOrNoExists)));
var ctnList = tenantDb.Queryable<SpaceBookingOrderCtn>()
.Where(a => a.RecordId == model.originalId && a.Deleted == false).ToList();
@ -1863,7 +2063,7 @@ namespace DS.WMS.Core.Op.Method
DateTime nowDate = DateTime.Now;
//_logger.LogInformation("获取到批量复制功能");
Logger.Log(NLog.LogLevel.Info, "获取到批量复制功能");
//如果是指定的编辑信息需要先把编辑数据同步到实体类,再进行复制
if (model.opType == "copy_edit")
@ -1883,14 +2083,14 @@ namespace DS.WMS.Core.Op.Method
{
CtnCode = ctn.ctnCode,
CtnName = ctn.ctnName,
CtnNum = ctn.ctnNum.Value,
CtnNum = ctn.ctnNum.HasValue? ctn.ctnNum.Value:0,
CtnSufferWeight = (int)ctn.ctnSufferWeight.Value,
};
ctnEntity.CreateTime = nowDate;
ctnEntity.UpdateTime = nowDate;
ctnEntity.CreateBy = long.Parse(user.UserId);
//ctnEntity.CreatedUserName = UserManager.Name;
ctnEntity.CreateUserName = user.UserName;
ctnEntity.StuffingMeasurementType = "WEIGHT";
ctnEntity.StuffingMeasurementUnit = "KGS";
@ -1903,7 +2103,7 @@ namespace DS.WMS.Core.Op.Method
entity.CreateTime = nowDate;
entity.UpdateTime = nowDate;
entity.CreateBy = long.Parse(user.UserId);
//entity.CreatedUserName = UserManager.Name;
entity.CreateUserName = user.UserName;
entity.Status = "TEMP";
entity.StatusName = "暂存";
entity.CtnStat = ctnStat;
@ -1920,7 +2120,7 @@ namespace DS.WMS.Core.Op.Method
copyEntity.Id = 0;
copyEntity.CreateTime = nowDate;
copyEntity.CreateBy = long.Parse(user.UserId);
//copyEntity.CreatedUserName = UserManager.Name;
copyEntity.CreateUserName = user.UserName;
copyEntity.UpdateTime = nowDate;
copyEntity.Status = "TEMP";
copyEntity.StatusName = "暂存";
@ -1947,7 +2147,7 @@ namespace DS.WMS.Core.Op.Method
ctnEntity.CreateTime = nowDate;
ctnEntity.UpdateTime = nowDate;
ctnEntity.CreateBy = long.Parse(user.UserId);
//ctnEntity.CreatedUserName = UserManager.Name;
ctnEntity.CreateUserName = user.UserName;
await tenantDb.Insertable<SpaceBookingOrderCtn>(ctnEntity).ExecuteReturnEntityAsync();
});

@ -773,7 +773,7 @@ namespace DS.WMS.Core.Op.Method
bookingDto.bookingBody.transport = new MSKAPIBookingTransport
{
carrierCode = model.carrierCode,
carrierCode = model.vesselCarrierCode,
//earliestDepartureDate = model.earliestDepartureDate.Value.ToString("yyyy-MM-ddTHH:mm:ss"),
exportServiceMode = model.exportServiceMode,
importServiceMode = model.importServiceMode,
@ -962,7 +962,7 @@ namespace DS.WMS.Core.Op.Method
{
model.ctns.ForEach(ctn =>
{
var ctnMapping = mappingCtnService.QueryMappingCtn(model.carrierId, CONST_MSK_API_BOOKING_URL, ctn.ctnCode).GetAwaiter().GetResult()?.Data;
var ctnMapping = mappingCtnService.QueryMappingCtn(model.carrierId.Value, CONST_MSK_API_BOOKING_URL, ctn.ctnCode).GetAwaiter().GetResult()?.Data;
MSKAPIBookingEquipmentAndHaulage haulage = new MSKAPIBookingEquipmentAndHaulage
{
@ -1397,10 +1397,76 @@ namespace DS.WMS.Core.Op.Method
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var entity = await tenantDb.Queryable<SpaceBookingOrder>().FirstAsync(a => a.Id == id);
//if (entity == null)
//throw Oops.Oh($"获取马士基API订舱详情失败不存在或已作废");
if (entity == null)
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingAPIOrderDeletedOrNoExists)));
model = entity.Adapt<MSKSPOTBookingDto>();
model = new MSKSPOTBookingDto
{
id = entity.Id,
carrierCode = entity.CarrierCode,
vesselCarrierCode = entity.vesselCarrierCode,
carrierId = entity.CarrierId,
priceReference = entity.PriceReference,
productCode = entity.ProductCode,
sender = entity.Sender,
bookedByCompanyName = entity.BookedByCompanyName,
bookedByMaerskPartyCode = entity.BookedByCompanyPartyCode,
bookedByCompanyContactName = entity.BookedByCompanyContact,
bookedByCompanyContactEmail = entity.BookedByCompanyContactEmail,
isBookingPartOwnPrice = entity.IsBookingPartOwnPrice,
priceOwnerCompanyName = entity.PriceOwnerCompanyName,
priceOwnerMaerskPartyCode = entity.PriceOwnerCompanyPartyCode,
priceOwnerContactName = entity.PriceOwnerCompanyContact,
priceOwnerContactEmail = entity.PriceOwnerCompanyContactEmail,
earliestDepartureDate = entity.EarliestDepartureDate,
exportServiceMode = entity.ExportServiceMode,
importServiceMode = entity.ImportServiceMode,
placeOfReceiptCityName = entity.PlaceReceiptCity,
placeOfReceiptUnLocCode = entity.PlaceReceiptUnlocCode,
placeOfDeliveryCityName = entity.PlaceDeliveryCity,
placeOfDeliveryUnLocCode = entity.PlaceDeliveryUnlocCode,
originDepartureDateTimeLocal = entity.ETD,
destinationArrivalDateTimeLocal = entity.ETA,
vesselName = entity.Vessel,
carrierVesselCode = entity.VesselCode,
exportVoyageNumber = entity.Voyno,
transportMode = entity.TransportMode,
totalCargoWeight = entity.TotalCargoWeight,
noOfProbes = entity.NoOfProbes,
temperature = !string.IsNullOrWhiteSpace(entity.TempSet) ? decimal.Parse(entity.TempSet) : null,
ventilation = entity.Vent,
humidity = entity.Humidity,
commodityCodeType = entity.CommodityCodeType,
commodityCode = entity.GoodsCode,
commodityName = entity.GoodsName,
isReefer = entity.IsReefer,
cargoType = entity.CargoType,
placeOfReceiptCountryCode = entity.PlaceReceiptCountryCode,
placeOfDeliveryCountryCode = entity.PlaceDeliveryCountryCode,
EstSailingDays = entity.EstSailingDays,
priceReferenceId = entity.PriceOwnerReferenceId,
priceReferenceName = entity.PriceOwnerReference,
priceOwnerReferenceId = entity.PriceOwnerReferenceId.HasValue ? entity.PriceOwnerReferenceId.Value.ToString() : "",
priceOwnerReference = entity.PriceOwnerReference,
priceOwnerReferenceName = entity.PriceOwnerReferenceName,
isShipperOwned = entity.IsShipperOwner,
isImportReturned = entity.IsImportReturned,
carrierProductId = entity.CarrierProductId,
isSendNoSchedule = entity.IsSendNoSchedule,
placeOfReceiptCountryName = entity.PlaceReceiptCountryName,
placeOfReceiptRegionName = entity.PlaceReceiptRegionName,
placeOfDeliveryCountryName = entity.PlaceDeliveryCountryName,
placeOfDeliveryRegionName = entity.PlaceDeliveryRegionName,
PId = entity.ShipRatePId.HasValue? entity.ShipRatePId.Value:0,
MD5 = entity.ShipRateMD5,
bookingChannelTypeName = entity.BookingChannelType,
bookingChannelType = entity.BookingChannelTypeName,
carrierCollectionOriginGeoID = entity.PlaceReceiptGeoId,
carrierDeliveryDestinationGeoID = entity.PlaceDeliveryGeoId,
priceID = entity.PriceId,
ShipRateTotalAmount = entity.ShipRateTotalAmount,
ShipRateTotalCurrency = entity.ShipRateTotalCurrency
};
var ctnList = tenantDb.Queryable<SpaceBookingOrderCtn>().Where(a => a.RecordId == id && a.Deleted == false).ToList();
@ -1495,22 +1561,26 @@ namespace DS.WMS.Core.Op.Method
selectedShipSchedule = JsonConvert.DeserializeObject<MSKAPISPOTSearchScheduleRateResultDataDto>(shipScheduleRecord.ShipJson);
}
//if (selectedShipSchedule == null)
// throw Oops.Oh("船期数据校验失败,请重新查询船期信息");
//船期数据校验失败,请重新查询船期信息
if (selectedShipSchedule == null)
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingAPIShipScheduleCheckFailNotNull)));
//if (!selectedShipSchedule.priceID.Equals(model.priceID))
//{
// _logger.LogInformation($"请求当前船期请求参数错误 priceID={model.priceID} 缓存priceID={selectedShipSchedule.priceID} PId={model.PId}");
if (!selectedShipSchedule.priceID.Equals(model.priceID))
{
Logger.Log(NLog.LogLevel.Info, $"请求当前船期请求参数错误 priceID={model.priceID} 缓存priceID={selectedShipSchedule.priceID} PId={model.PId}");
// throw Oops.Oh("船期数据校验失败,当前船期请求参数错误,请重新查询船期信息");
//}
//船期数据校验失败,当前船期请求参数错误,请重新查询船期信息
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingAPIShipScheduleCheckFailPriceIDNotEqual)));
}
//if (selectedShipSchedule.totalAmount.Value != model.ShipRateTotalAmount.Value)
//{
// _logger.LogInformation($"请求当前船期请求参数错误 totalAmount={selectedShipSchedule.totalAmount.Value} 缓存totalAmount={model.ShipRateTotalAmount.Value} PId={model.PId}");
if (selectedShipSchedule.totalAmount.Value != model.ShipRateTotalAmount.Value)
{
Logger.Log(NLog.LogLevel.Info, $"请求当前船期请求参数错误 totalAmount={selectedShipSchedule.totalAmount.Value} 缓存totalAmount={model.ShipRateTotalAmount.Value} PId={model.PId}");
// throw Oops.Oh("船期数据校验失败,当前船期请求参数错误,价格发生差异,请重新查询船期信息");
//}
//船期数据校验失败,当前船期请求参数错误,价格发生差异,请重新查询船期信息
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingAPIShipScheduleCheckFailAmountChange)));
}
model.placeOfReceiptCountryName = selectedShipSchedule.originCountryName;
model.placeOfReceiptRegionName = selectedShipSchedule.originRegionName;
@ -1532,24 +1602,89 @@ namespace DS.WMS.Core.Op.Method
var oldInfo = tenantDb.Queryable<SpaceBookingOrder>()
.First(a => a.Id == model.id);
//if (oldInfo == null)
//throw Oops.Oh("订舱数据不存在或已作废");
if (oldInfo == null)
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingRecordDeletedOrNoExists)));
if (oldInfo.Status == "SUCC")
{
//if (isSendApi)
//throw Oops.Oh("订舱数据已发送成功,不能重复发送");
//throw Oops.Oh("订舱数据已发送成功,不能修改");
}
SpaceBookingOrder entity = model.Adapt<SpaceBookingOrder>();
if (isSendApi)
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingBeSendNotRepeat)));
//预订舱数据已发送成功,不能修改
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingBeSendNotModify)));
}
#region 赋值
SpaceBookingOrder entity = new SpaceBookingOrder
{
CarrierCode = model.carrierCode,
vesselCarrierCode = model.vesselCarrierCode,
CarrierId = model.carrierId,
PriceReference = model.priceReference,
ProductCode = model.productCode,
Sender = model.sender,
BookedByCompanyName = model.bookedByCompanyName,
BookedByCompanyPartyCode = model.bookedByMaerskPartyCode,
BookedByCompanyContact = model.bookedByCompanyContactName,
BookedByCompanyContactEmail = model.bookedByCompanyContactEmail,
IsBookingPartOwnPrice = model.isBookingPartOwnPrice,
PriceOwnerCompanyName = model.priceOwnerCompanyName,
PriceOwnerCompanyPartyCode = model.priceOwnerMaerskPartyCode,
PriceOwnerCompanyContact = model.priceOwnerContactName,
PriceOwnerCompanyContactEmail = model.priceOwnerContactEmail,
EarliestDepartureDate = model.earliestDepartureDate,
ExportServiceMode = model.exportServiceMode,
ImportServiceMode = model.importServiceMode,
PlaceReceiptCity = model.placeOfReceiptCityName,
PlaceReceiptUnlocCode = model.placeOfReceiptUnLocCode,
PlaceDeliveryCity = model.placeOfDeliveryCityName,
PlaceDeliveryUnlocCode = model.placeOfDeliveryUnLocCode,
ETD = model.originDepartureDateTimeLocal,
ETA = model.destinationArrivalDateTimeLocal,
Vessel = model.vesselName,
VesselCode = model.carrierVesselCode,
Voyno = model.exportVoyageNumber,
TransportMode = model.transportMode,
TotalCargoWeight = model.totalCargoWeight,
NoOfProbes = model.noOfProbes,
TempSet = model.temperature.HasValue ? model.temperature.Value.ToString() : "",
Vent = model.ventilation,
Humidity = model.humidity,
CommodityCodeType = model.commodityCodeType,
GoodsCode = model.commodityCode,
GoodsName = model.commodityName,
CargoType = model.cargoType,
PlaceReceiptCountryCode = model.placeOfReceiptCountryCode,
PlaceDeliveryCountryCode = model.placeOfDeliveryCountryCode,
EstSailingDays = model.EstSailingDays,
PriceReferenceId = model.priceReferenceId,
PriceReferenceName = model.priceReferenceName,
PriceOwnerReferenceId = !string.IsNullOrWhiteSpace(model.priceOwnerReferenceId) ? long.Parse(model.priceOwnerReferenceId) : null,
PriceOwnerReference = model.priceOwnerReference,
PriceOwnerReferenceName = model.priceOwnerReferenceName,
IsReefer = model.isReefer,
IsShipperOwner = model.isShipperOwned,
IsImportReturned = model.isImportReturned,
CarrierProductId = model.carrierProductId,
IsSendNoSchedule = model.isSendNoSchedule,
PlaceReceiptCountryName = model.placeOfReceiptCountryName,
PlaceReceiptRegionName = model.placeOfReceiptRegionName,
PlaceDeliveryRegionName = model.placeOfDeliveryRegionName,
PlaceDeliveryCountryName = model.userPlaceOfDeliveryCountryName,
ShipRatePId = model.PId,
ShipRateMD5 = model.MD5,
PlaceReceiptGeoId = model.carrierCollectionOriginGeoID,
PlaceDeliveryGeoId = model.carrierDeliveryDestinationGeoID,
PriceId = model.priceID,
ShipRateTotalAmount = model.ShipRateTotalAmount,
ShipRateTotalCurrency = model.ShipRateTotalCurrency
};
#endregion
entity.Id = model.id.Value;
entity.UpdateTime = nowDate;
entity.UpdateBy = long.Parse(user.UserId);
//entity.UpdatedUserName = UserManager.Name;
entity.UpdateUserName = user.UserName;
entity.CtnStat = ctnStat;
entity.BookingChannelType = "SPOT_API";
entity.BookingChannelTypeName = "SPOT订舱";
@ -1558,7 +1693,7 @@ namespace DS.WMS.Core.Op.Method
{
x.CreateTime,
x.CreateBy,
//x.CreatedUserName,
x.CreateUserName,
x.BookingReference,
x.BookingId,
x.RequestAcknowledgementId,
@ -1585,17 +1720,23 @@ namespace DS.WMS.Core.Op.Method
}
//更新
var ctnEntity = ctn.Adapt<SpaceBookingOrderCtn>();
var ctnEntity = new SpaceBookingOrderCtn
{
CtnCode = ctn.ctnCode,
CtnName = ctn.ctnName,
CtnNum = ctn.ctnNum,
CtnSufferWeight = ctn.ctnSufferWeight.HasValue ? (int)ctn.ctnSufferWeight.Value : 0
};
ctnEntity.Id = ctn.id.Value;
ctnEntity.RecordId = entity.Id;
ctnEntity.UpdateTime = nowDate;
ctnEntity.UpdateBy = long.Parse(user.UserId);
//ctnEntity.UpdatedUserName = UserManager.Name;
ctnEntity.UpdateUserName = user.UserName;
tenantDb.Updateable<SpaceBookingOrderCtn>(ctnEntity).IgnoreColumns(x => new {
x.CreateBy,
//x.CreatedUserName,
x.CreateUserName,
x.CreateTime,
//x.TenantId,
x.StuffingMeasurementType,
@ -1617,7 +1758,7 @@ namespace DS.WMS.Core.Op.Method
ctnEntity.CreateTime = nowDate;
ctnEntity.UpdateTime = nowDate;
ctnEntity.CreateBy = long.Parse(user.UserId);
//ctnEntity.CreatedUserName = UserManager.Name;
ctnEntity.CreateUserName = user.UserName;
ctnEntity.StuffingMeasurementType = "WEIGHT";
ctnEntity.StuffingMeasurementUnit = "KGS";
@ -1632,13 +1773,13 @@ namespace DS.WMS.Core.Op.Method
ctn.Deleted = true;
ctn.DeleteTime = nowDate;
ctn.DeleteBy = long.Parse(user.UserId);
//ctn.UpdatedUserName = UserManager.Name;
ctn.UpdateUserName = user.UserName;
await tenantDb.Updateable<SpaceBookingOrderCtn>(ctn).UpdateColumns(x => new {
x.Deleted,
x.DeleteTime,
x.DeleteBy,
//x.UpdatedUserName
x.UpdateUserName
}).ExecuteCommandAsync();
});
}
@ -1658,7 +1799,7 @@ namespace DS.WMS.Core.Op.Method
CreateTime = nowDate,
UpdateTime = nowDate,
CreateBy = long.Parse(user.UserId),
//CreatedUserName = UserManager.Name
CreateUserName = user.UserName
};
await tenantDb.Insertable<SpaceBookingOrderShipSchedule>(shipScheduleRecord).ExecuteCommandAsync();
@ -1669,12 +1810,77 @@ namespace DS.WMS.Core.Op.Method
}
else
{
SpaceBookingOrder entity = model.Adapt<SpaceBookingOrder>();
#region 赋值
SpaceBookingOrder entity = new SpaceBookingOrder
{
CarrierCode = model.carrierCode,
vesselCarrierCode = model.vesselCarrierCode,
CarrierId = model.carrierId,
PriceReference = model.priceReference,
ProductCode = model.productCode,
Sender = model.sender,
BookedByCompanyName = model.bookedByCompanyName,
BookedByCompanyPartyCode = model.bookedByMaerskPartyCode,
BookedByCompanyContact = model.bookedByCompanyContactName,
BookedByCompanyContactEmail = model.bookedByCompanyContactEmail,
IsBookingPartOwnPrice = model.isBookingPartOwnPrice,
PriceOwnerCompanyName = model.priceOwnerCompanyName,
PriceOwnerCompanyPartyCode = model.priceOwnerMaerskPartyCode,
PriceOwnerCompanyContact = model.priceOwnerContactName,
PriceOwnerCompanyContactEmail = model.priceOwnerContactEmail,
EarliestDepartureDate = model.earliestDepartureDate,
ExportServiceMode = model.exportServiceMode,
ImportServiceMode = model.importServiceMode,
PlaceReceiptCity = model.placeOfReceiptCityName,
PlaceReceiptUnlocCode = model.placeOfReceiptUnLocCode,
PlaceDeliveryCity = model.placeOfDeliveryCityName,
PlaceDeliveryUnlocCode = model.placeOfDeliveryUnLocCode,
ETD = model.originDepartureDateTimeLocal,
ETA = model.destinationArrivalDateTimeLocal,
Vessel = model.vesselName,
VesselCode = model.carrierVesselCode,
Voyno = model.exportVoyageNumber,
TransportMode = model.transportMode,
TotalCargoWeight = model.totalCargoWeight,
NoOfProbes = model.noOfProbes,
TempSet = model.temperature.HasValue ? model.temperature.Value.ToString() : "",
Vent = model.ventilation,
Humidity = model.humidity,
CommodityCodeType = model.commodityCodeType,
GoodsCode = model.commodityCode,
GoodsName = model.commodityName,
CargoType = model.cargoType,
PlaceReceiptCountryCode = model.placeOfReceiptCountryCode,
PlaceDeliveryCountryCode = model.placeOfDeliveryCountryCode,
EstSailingDays = model.EstSailingDays,
PriceReferenceId = model.priceReferenceId,
PriceReferenceName = model.priceReferenceName,
PriceOwnerReferenceId = !string.IsNullOrWhiteSpace(model.priceOwnerReferenceId) ? long.Parse(model.priceOwnerReferenceId) : null,
PriceOwnerReference = model.priceOwnerReference,
PriceOwnerReferenceName = model.priceOwnerReferenceName,
IsReefer = model.isReefer,
IsShipperOwner = model.isShipperOwned,
IsImportReturned = model.isImportReturned,
CarrierProductId = model.carrierProductId,
IsSendNoSchedule = model.isSendNoSchedule,
PlaceReceiptCountryName = model.placeOfReceiptCountryName,
PlaceReceiptRegionName = model.placeOfReceiptRegionName,
PlaceDeliveryRegionName = model.placeOfDeliveryRegionName,
PlaceDeliveryCountryName = model.userPlaceOfDeliveryCountryName,
ShipRatePId = model.PId,
ShipRateMD5 = model.MD5,
PlaceReceiptGeoId = model.carrierCollectionOriginGeoID,
PlaceDeliveryGeoId = model.carrierDeliveryDestinationGeoID,
PriceId = model.priceID,
ShipRateTotalAmount = model.ShipRateTotalAmount,
ShipRateTotalCurrency = model.ShipRateTotalCurrency
};
#endregion
entity.CreateTime = nowDate;
entity.UpdateTime = nowDate;
entity.CreateBy = long.Parse(user.UserId);
//entity.CreatedUserName = UserManager.Name;
entity.CreateUserName = user.UserName;
entity.Status = "TEMP";
entity.StatusName = "暂存";
entity.CtnStat = ctnStat;
@ -1699,7 +1905,7 @@ namespace DS.WMS.Core.Op.Method
ctnEntity.CreateTime = nowDate;
ctnEntity.UpdateTime = nowDate;
ctnEntity.CreateBy = long.Parse(user.UserId);
//ctnEntity.CreatedUserName = UserManager.Name;
ctnEntity.CreateUserName = user.UserName;
ctnEntity.StuffingMeasurementType = "WEIGHT";
ctnEntity.StuffingMeasurementUnit = "KGS";
@ -1721,7 +1927,7 @@ namespace DS.WMS.Core.Op.Method
CreateTime = nowDate,
UpdateTime = nowDate,
CreateBy = long.Parse(user.UserId),
//CreatedUserName = UserManager.Name
CreateUserName = user.UserName
};
await tenantDb.Insertable<SpaceBookingOrderShipSchedule>(shipScheduleRecord).ExecuteCommandAsync();
@ -1732,17 +1938,18 @@ namespace DS.WMS.Core.Op.Method
//只有船期发生变化时才重新写入新的船期记录
if (model.PId != shipScheduleRecord.ShipRatePid.Value)
{
//_logger.LogInformation($"MSK CON id={model.id} 换了船期 原记录:{selectedShipSchedule.PId} 新记录:{model.PId} 作废原船期,插入新船期");
Logger.Log(NLog.LogLevel.Info, $"MSK CON id={model.id} 换了船期 原记录:{selectedShipSchedule.PId} 新记录:{model.PId} 作废原船期,插入新船期");
shipScheduleRecord.Deleted = true;
shipScheduleRecord.DeleteTime = nowDate;
shipScheduleRecord.DeleteBy = long.Parse(user.UserId);
//shipScheduleRecord.UpdatedUserName = UserManager.Name;
shipScheduleRecord.DeleteUserName = user.UserName;
await tenantDb.Updateable<SpaceBookingOrderShipSchedule>(shipScheduleRecord).UpdateColumns(x => new {
x.Deleted,
x.DeleteTime,
x.DeleteBy,
x.DeleteUserName
//x.UpdatedTime
}).ExecuteCommandAsync();
@ -1756,14 +1963,14 @@ namespace DS.WMS.Core.Op.Method
CreateTime = nowDate,
UpdateTime = nowDate,
CreateBy = long.Parse(user.UserId),
//CreatedUserName = UserManager.Name
CreateUserName = user.UserName
};
await tenantDb.Insertable<SpaceBookingOrderShipSchedule>(shipScheduleRecord).ExecuteCommandAsync();
}
else
{
//_logger.LogInformation($"MSK CON id={model.id} 船期没变化 model.PId={model.PId} shipScheduleRecord.SHIP_RATE_PID={shipScheduleRecord.SHIP_RATE_PID.Value}");
Logger.Log(NLog.LogLevel.Info, $"MSK CON id={model.id} 船期没变化 model.PId={model.PId} shipScheduleRecord.SHIP_RATE_PID={shipScheduleRecord.ShipRatePid.Value}");
}
}
@ -1790,7 +1997,7 @@ namespace DS.WMS.Core.Op.Method
info.Deleted = true;
info.DeleteTime = DateTime.Now;
info.DeleteBy = long.Parse(user.UserId);
//info.UpdatedUserName = UserManager.Name;
info.UpdateUserName = user.UserName;
await tenantDb.Updateable<SpaceBookingOrder>(info).UpdateColumns(x => new {
x.Deleted,
@ -1878,20 +2085,24 @@ namespace DS.WMS.Core.Op.Method
/// <returns>返回执行结果消息</returns>
public async Task<DataResult<string>> BatchCopy(MSKAPISPOTBookingCopyDto model)
{
//if (model.copyNum < 1)
// throw Oops.Oh($"复制数量不能小于1");
//复制数量不能小于1
if (model.copyNum < 1)
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingAPICopyLowNum)));
//if (model.copyNum > 1000)
// throw Oops.Oh($"复制数量不能大于1000");
//复制数量不能大于1000
if (model.copyNum > 1000)
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingAPICopyLimitNum)));
//if (string.IsNullOrWhiteSpace(model.opType))
// throw Oops.Oh($"请求的操作类型不能为空");
//请求的操作类型不能为空
if (string.IsNullOrWhiteSpace(model.opType))
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingAPIOpTypeNull)));
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var entity = await tenantDb.Queryable<SpaceBookingOrder>().FirstAsync(a => a.Id == model.originalId);
//if (entity == null)
// throw Oops.Oh($"获取马士基API订舱详情失败不存在或已作废");
//预订舱数据不存在或已作废
if (entity == null)
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingRecordDeletedOrNoExists)));
var ctnList = tenantDb.Queryable<SpaceBookingOrderCtn>()
.Where(a => a.RecordId == model.originalId && a.Deleted == false).ToList();
@ -1900,7 +2111,7 @@ namespace DS.WMS.Core.Op.Method
DateTime nowDate = DateTime.Now;
//_logger.LogInformation("获取到批量复制功能");
Logger.Log(NLog.LogLevel.Info, "获取到批量复制功能");
//如果是指定的编辑信息需要先把编辑数据同步到实体类,再进行复制
if (model.opType == "copy_edit")
@ -1920,14 +2131,14 @@ namespace DS.WMS.Core.Op.Method
{
CtnCode = ctn.ctnCode,
CtnName = ctn.ctnName,
CtnNum = ctn.ctnNum.Value,
CtnNum = ctn.ctnNum.HasValue? ctn.ctnNum.Value:0,
CtnSufferWeight = (int)ctn.ctnSufferWeight.Value,
};
ctnEntity.CreateTime = nowDate;
ctnEntity.UpdateTime = nowDate;
ctnEntity.CreateBy = long.Parse(user.UserId);
//ctnEntity.CreatedUserName = UserManager.Name;
ctnEntity.CreateUserName = user.UserName;
ctnEntity.StuffingMeasurementType = "WEIGHT";
ctnEntity.StuffingMeasurementUnit = "KGS";
@ -1940,7 +2151,7 @@ namespace DS.WMS.Core.Op.Method
entity.CreateTime = nowDate;
entity.UpdateTime = nowDate;
entity.CreateBy = long.Parse(user.UserId);
//entity.CreatedUserName = UserManager.Name;
entity.CreateUserName = user.UserName;
entity.Status = "TEMP";
entity.StatusName = "暂存";
entity.CtnStat = ctnStat;
@ -1968,10 +2179,11 @@ namespace DS.WMS.Core.Op.Method
{
var copyEntity = entity.Adapt<SpaceBookingOrder>();
copyEntity.Id = 0;
copyEntity.CreateTime = nowDate;
copyEntity.CreateBy = long.Parse(user.UserId);
//copyEntity.CreatedUserName = UserManager.Name;
copyEntity.CreateUserName = user.UserName;
copyEntity.UpdateTime = nowDate;
copyEntity.Status = "TEMP";
copyEntity.StatusName = "暂存";
@ -1998,7 +2210,7 @@ namespace DS.WMS.Core.Op.Method
ctnEntity.CreateTime = nowDate;
ctnEntity.UpdateTime = nowDate;
ctnEntity.CreateBy = long.Parse(user.UserId);
//ctnEntity.CreatedUserName = UserManager.Name;
ctnEntity.CreateUserName = user.UserName;
await tenantDb.Insertable<SpaceBookingOrderCtn>(ctnEntity).ExecuteReturnEntityAsync();
});
@ -2019,7 +2231,7 @@ namespace DS.WMS.Core.Op.Method
CreateTime = nowDate,
UpdateTime = nowDate,
CreateBy = long.Parse(user.UserId),
//CreatedUserName = UserManager.Name
CreateUserName = user.UserName
};
await tenantDb.Insertable<SpaceBookingOrderShipSchedule>(shipScheduleRecord).ExecuteReturnEntityAsync();
@ -2060,7 +2272,7 @@ namespace DS.WMS.Core.Op.Method
model.LstRecvBCDate = nowDate;
model.UpdateTime = nowDate;
model.UpdateBy = long.Parse(user.UserId);
//model.UpdatedUserName = UserManager.Name;
model.UpdateUserName = user.UserName;
await tenantDb.Updateable<SpaceBookingOrder>(model).UpdateColumns(x => new
{
@ -2068,7 +2280,7 @@ namespace DS.WMS.Core.Op.Method
x.LstRecvBCDate,
x.UpdateTime,
x.UpdateBy,
//x.UpdatedUserName
x.UpdateUserName
}).ExecuteCommandAsync();
}
else if (opTypeName == "Cancellation")
@ -2077,7 +2289,7 @@ namespace DS.WMS.Core.Op.Method
model.LstRecvBKCancelDate = nowDate;
model.UpdateTime = nowDate;
model.UpdateBy = long.Parse(user.UserId);
//model.UpdatedUserName = UserManager.Name;
model.UpdateUserName = user.UserName;
await tenantDb.Updateable<SpaceBookingOrder>(model).UpdateColumns(x => new
{
@ -2085,7 +2297,7 @@ namespace DS.WMS.Core.Op.Method
x.LstRecvBKCancelDate,
x.UpdateTime,
x.UpdateBy,
//x.UpdatedUserName
x.UpdateUserName
}).ExecuteCommandAsync();
}

@ -13,7 +13,8 @@ namespace DS.WMS.Core.Sys.Interface;
///
/// </summary>
public interface IClientCommonService
{
{
/// <summary>
/// 根据类型获取用户下拉列表
/// </summary>

@ -43,6 +43,7 @@ public class ClientCommonService : IClientCommonService
user = _serviceProvider.GetRequiredService<IUser>();
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
}
/// <summary>
/// 根据类型获取用户下拉列表
/// </summary>

@ -22,7 +22,7 @@ public class JwtSafeMiddleware
{
// Console.WriteLine(context.Request.Path);
var path = context.Request.Path.ToString().ToLower();
if (path.Contains("swagger") || path.Contains("login")|| path.Contains("tenantregister") || path.Contains("linkattach") || path.Contains("PrintTempFile") || path.Contains("favicon") || path.Contains("clientuserlogin") )
if (path.Contains("swagger") || path.Contains("login")|| path.Contains("tenantregister") || path.Contains("linkattach") || path.Contains("printtempfile") || path.Contains("favicon") || path.Contains("clientuserlogin") )
{
//跳过swagger及login
}

@ -41,7 +41,7 @@ if (!policyName.IsNullOrEmpty())
// if (app.Environment.IsDevelopment())
// {
var apis = new List<string> { "WmsMainAPI", "WmsAdminAPI", "WmsOpAPI", "WmsFeeAPI", "WmsCheckAPI", "WmsFinanceAPI", "TestApi" };
var apis = new List<string> { "WmsMainAPI", "WmsAdminAPI", "WmsOpAPI", "WmsFeeAPI", "WmsCheckAPI", "WmsFinanceAPI", "WmsPrintAPI", "TestApi" };
app
.UseSwagger()

@ -234,6 +234,39 @@
"Type": "RoundRobin"
}
},
{
"DownstreamPathTemplate": "/swagger/v1/swagger.json",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 2999
}
],
"UpstreamPathTemplate": "/WmsPrintAPI/swagger.json",
"UpstreamHttpMethod": [
"Get",
"Post"
]
},
{
"DownstreamPathTemplate": "/printApi/{url}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 2999
}
],
"UpstreamPathTemplate": "/printApi/{url}",
"UpstreamHttpMethod": [
"Get",
"Post"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
}
},
{
"DownstreamPathTemplate": "/PrintTempFile/{url}",
"DownstreamScheme": "http",

@ -152,30 +152,30 @@ namespace DS.WMS.MainApi.Controllers
{
return await _invokeService.GetOpenPrintTemplateList(req);
}
/// <summary>
/// 获取Json本地打印信息
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("GetJsonPrintInfoAsync")]
public async Task<DataResult<string>> GetJsonPrintInfoAsync([FromBody] OpenJsonPrintReq req)
{
///// <summary>
///// 获取Json本地打印信息
///// </summary>
///// <param name="req"></param>
///// <returns></returns>
//[HttpPost]
//[Route("GetJsonPrintInfoAsync")]
//public async Task<DataResult<string>> GetJsonPrintInfoAsync([FromBody] OpenJsonPrintReq req)
//{
var url = AppSetting.Configuration["PrintService:LocalPrintUrl"];
if (url.IsNull())
return await Task.FromResult(DataResult<string>.Failed("未配置本地打印地址"));
// var url = AppSetting.Configuration["PrintService:LocalPrintUrl"];
// if (url.IsNull())
// return await Task.FromResult(DataResult<string>.Failed("未配置本地打印地址"));
var res = await RequestHelper.PostJosnAsyncNoHeaders(url, req.ToJson());
var result = JsonConvert.DeserializeObject<DataResult<string>>(res);
if (result.Succeeded)
{
return await Task.FromResult(DataResult<string>.Success(result.Message));
}
else
{
return await Task.FromResult(DataResult<string>.Failed(result.Message));
}
}
// var res = await RequestHelper.PostJosnAsyncNoHeaders(url, req.ToJson());
// var result = JsonConvert.DeserializeObject<DataResult<string>>(res);
// if (result.Succeeded)
// {
// return await Task.FromResult(DataResult<string>.Success(result.Message));
// }
// else
// {
// return await Task.FromResult(DataResult<string>.Failed(result.Message));
// }
//}
}
}

@ -75,4 +75,17 @@ public class UserEmailController : ApiController
var res = _invokeService.BatchDelUserEmail(req);
return res;
}
/// <summary>
/// 获取用户邮箱配置
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetUserEmailSetInfo")]
public async Task<DataResult<CodeUserEmailRes>> GetUserEmailSetInfo()
{
var res = await _invokeService.GetUserEmailSetInfo();
return res;
}
}

@ -516,3 +516,192 @@
2024-07-19 11:37:09.1867 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-19 11:37:09.1867 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-19 11:37:09.2022 Info Configuration initialized.
2024-07-19 18:57:19.3838 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-19 18:57:19.3975 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-19 18:57:19.3975 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-19 18:57:19.4105 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-19 18:57:19.4105 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-19 18:57:19.4105 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-19 18:57:19.4105 Info Configuration initialized.
2024-07-19 19:28:21.2912 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-19 19:28:21.3048 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-19 19:28:21.3048 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-19 19:28:21.3201 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-19 19:28:21.3268 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-19 19:28:21.3268 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-19 19:28:21.3268 Info Configuration initialized.
2024-07-19 19:30:36.8206 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-19 19:30:36.8359 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-19 19:30:36.8359 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-19 19:30:36.8512 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-19 19:30:36.8580 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-19 19:30:36.8580 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-19 19:30:36.8580 Info Configuration initialized.
2024-07-19 19:36:30.1695 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-19 19:36:30.1843 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-19 19:36:30.1843 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-19 19:36:30.1843 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-19 19:36:30.2039 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-19 19:36:30.2039 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-19 19:36:30.2039 Info Configuration initialized.
2024-07-22 08:37:02.2527 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 08:37:02.2691 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 08:37:02.2691 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 08:37:02.2900 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 08:37:02.2995 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 08:37:02.2995 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 08:37:02.2995 Info Configuration initialized.
2024-07-22 08:56:57.5643 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 08:56:57.5820 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 08:56:57.5820 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 08:56:57.6000 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 08:56:57.6000 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 08:56:57.6124 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 08:56:57.6124 Info Configuration initialized.
2024-07-22 09:00:03.8931 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 09:00:03.8931 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 09:00:03.9080 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 09:00:03.9080 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 09:00:03.9241 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 09:00:03.9241 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 09:00:03.9241 Info Configuration initialized.
2024-07-22 09:20:15.0020 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 09:20:15.0020 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 09:20:15.0172 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 09:20:15.0172 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 09:20:15.0336 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 09:20:15.0336 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 09:20:15.0336 Info Configuration initialized.
2024-07-22 09:34:16.8672 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 09:34:16.8810 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 09:34:16.8810 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 09:34:16.8946 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 09:34:16.8946 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 09:34:16.8946 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 09:34:16.9082 Info Configuration initialized.
2024-07-22 10:30:43.8182 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 10:30:43.8311 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 10:30:43.8311 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 10:30:43.8499 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 10:30:43.8499 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 10:30:43.8615 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 10:30:43.8615 Info Configuration initialized.
2024-07-22 10:32:06.0346 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 10:32:06.0346 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 10:32:06.0346 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 10:32:06.0571 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 10:32:06.0571 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 10:32:06.0653 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 10:32:06.0653 Info Configuration initialized.
2024-07-22 11:02:04.9887 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 11:02:05.0015 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 11:02:05.0015 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 11:02:05.0015 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 11:02:05.0194 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 11:02:05.0194 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 11:02:05.0194 Info Configuration initialized.
2024-07-22 11:04:21.7204 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 11:04:21.7204 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 11:04:21.7364 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 11:04:21.7364 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 11:04:21.7517 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 11:04:21.7517 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 11:04:21.7517 Info Configuration initialized.
2024-07-22 11:37:30.2987 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 11:37:30.2987 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 11:37:30.2987 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 11:37:30.3214 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 11:37:30.3214 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 11:37:30.3298 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 11:37:30.3298 Info Configuration initialized.
2024-07-22 11:42:15.2716 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 11:42:15.2874 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 11:42:15.2874 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 11:42:15.3034 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 11:42:15.3034 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 11:42:15.3169 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 11:42:15.3169 Info Configuration initialized.
2024-07-22 11:48:44.5703 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 11:48:44.5830 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 11:48:44.5830 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 11:48:44.5983 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 11:48:44.5983 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 11:48:44.6142 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 11:48:44.6142 Info Configuration initialized.
2024-07-22 12:03:46.0798 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 12:03:46.0798 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 12:03:46.0798 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 12:03:46.1062 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 12:03:46.1149 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 12:03:46.1149 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 12:03:46.1262 Info Configuration initialized.
2024-07-22 12:05:30.8727 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 12:05:30.8906 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 12:05:30.8940 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 12:05:30.8940 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 12:05:30.9115 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 12:05:30.9115 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 12:05:30.9115 Info Configuration initialized.
2024-07-22 12:38:46.1107 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 12:38:46.1107 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 12:38:46.1268 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 12:38:46.1268 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 12:38:46.1446 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 12:38:46.1446 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 12:38:46.1446 Info Configuration initialized.
2024-07-22 17:44:20.8207 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 17:44:20.8363 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 17:44:20.8363 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 17:44:20.8530 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 17:44:20.8530 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 17:44:20.8626 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 17:44:20.8626 Info Configuration initialized.
2024-07-22 17:51:49.8988 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 17:51:49.9117 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 17:51:49.9117 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 17:51:49.9244 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 17:51:49.9244 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 17:51:49.9244 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 17:51:49.9244 Info Configuration initialized.
2024-07-22 17:55:06.9758 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 17:55:06.9881 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 17:55:06.9881 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 17:55:07.0020 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 17:55:07.0020 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 17:55:07.0020 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 17:55:07.0191 Info Configuration initialized.
2024-07-22 18:15:38.5262 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 18:15:38.5390 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 18:15:38.5390 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 18:15:38.5528 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 18:15:38.5528 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 18:15:38.5528 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 18:15:38.5659 Info Configuration initialized.
2024-07-22 18:23:25.1858 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 18:23:25.1982 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 18:23:25.1982 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 18:23:25.2121 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 18:23:25.2121 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 18:23:25.2121 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 18:23:25.2263 Info Configuration initialized.
2024-07-22 18:32:54.7832 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 18:32:54.7983 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 18:32:54.7983 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 18:32:54.8151 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 18:32:54.8219 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 18:32:54.8219 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 18:32:54.8219 Info Configuration initialized.
2024-07-22 18:34:27.7720 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 18:34:27.7720 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 18:34:27.7861 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 18:34:27.7861 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 18:34:27.7861 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 18:34:27.8037 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 18:34:27.8037 Info Configuration initialized.
2024-07-22 18:36:53.4718 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-22 18:36:53.4718 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-22 18:36:53.4872 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-22 18:36:53.4872 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-22 18:36:53.5029 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-22 18:36:53.5029 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-22 18:36:53.5029 Info Configuration initialized.

@ -6,7 +6,7 @@
<Project>
<PropertyGroup>
<_PublishTargetUrl>D:\Code\PublishCopy\ds8-opapi</_PublishTargetUrl>
<History>True|2024-07-19T07:45:49.1068004Z||;True|2024-07-19T15:33:45.3242155+08:00||;False|2024-07-19T15:32:41.9604526+08:00||;True|2024-07-19T13:48:27.9722093+08:00||;False|2024-07-19T13:47:56.7900396+08:00||;True|2024-07-19T11:41:15.4223247+08:00||;True|2024-07-19T08:46:28.8014836+08:00||;True|2024-07-18T19:24:50.4184188+08:00||;True|2024-07-18T19:19:14.7056635+08:00||;True|2024-07-18T19:04:43.5615501+08:00||;True|2024-07-18T18:38:39.1976753+08:00||;True|2024-07-18T18:25:15.6833492+08:00||;True|2024-07-18T18:08:46.3114951+08:00||;True|2024-07-18T17:59:12.5292256+08:00||;True|2024-07-18T16:18:45.8049777+08:00||;True|2024-07-18T16:12:42.9723969+08:00||;True|2024-07-18T16:07:14.1432207+08:00||;True|2024-07-17T17:44:18.4741963+08:00||;True|2024-07-17T17:42:47.2735071+08:00||;True|2024-07-17T16:13:32.9037697+08:00||;True|2024-07-17T15:40:21.2550083+08:00||;True|2024-07-17T14:03:08.1814323+08:00||;True|2024-07-15T13:43:42.6073130+08:00||;True|2024-07-15T11:53:40.6498579+08:00||;True|2024-07-15T11:53:03.1652559+08:00||;True|2024-07-15T11:42:33.0154478+08:00||;True|2024-07-15T10:20:03.3925876+08:00||;True|2024-07-15T10:13:28.1415352+08:00||;True|2024-07-08T14:33:12.6884426+08:00||;True|2024-07-08T09:56:58.4995696+08:00||;</History>
<History>True|2024-07-22T08:42:12.1933090Z||;True|2024-07-19T18:28:29.1420269+08:00||;True|2024-07-19T15:45:49.1068004+08:00||;True|2024-07-19T15:33:45.3242155+08:00||;False|2024-07-19T15:32:41.9604526+08:00||;True|2024-07-19T13:48:27.9722093+08:00||;False|2024-07-19T13:47:56.7900396+08:00||;True|2024-07-19T11:41:15.4223247+08:00||;True|2024-07-19T08:46:28.8014836+08:00||;True|2024-07-18T19:24:50.4184188+08:00||;True|2024-07-18T19:19:14.7056635+08:00||;True|2024-07-18T19:04:43.5615501+08:00||;True|2024-07-18T18:38:39.1976753+08:00||;True|2024-07-18T18:25:15.6833492+08:00||;True|2024-07-18T18:08:46.3114951+08:00||;True|2024-07-18T17:59:12.5292256+08:00||;True|2024-07-18T16:18:45.8049777+08:00||;True|2024-07-18T16:12:42.9723969+08:00||;True|2024-07-18T16:07:14.1432207+08:00||;True|2024-07-17T17:44:18.4741963+08:00||;True|2024-07-17T17:42:47.2735071+08:00||;True|2024-07-17T16:13:32.9037697+08:00||;True|2024-07-17T15:40:21.2550083+08:00||;True|2024-07-17T14:03:08.1814323+08:00||;True|2024-07-15T13:43:42.6073130+08:00||;True|2024-07-15T11:53:40.6498579+08:00||;True|2024-07-15T11:53:03.1652559+08:00||;True|2024-07-15T11:42:33.0154478+08:00||;True|2024-07-15T10:20:03.3925876+08:00||;True|2024-07-15T10:13:28.1415352+08:00||;True|2024-07-08T14:33:12.6884426+08:00||;True|2024-07-08T09:56:58.4995696+08:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>

@ -92,7 +92,7 @@
"Environment": "TEST"
},
"RedisInfo": {
"RedisConfig": "127.0.0.1:6379,password=,defaultDatabase=15"
"RedisConfig": "60.209.125.238:36379,password=,defaultDatabase=15"
},
"BCCompare": {
"Url": "http://localhost:5110/api/TaskBookingAmendmentParser/ExcuteBookingAmendmentCompare"

@ -23,7 +23,7 @@ namespace DS.WMS.PrintApi.Controllers
}
/// <summary>
/// 获取Json打印信息
/// 根据模板Id获取Json打印信息
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
@ -35,5 +35,19 @@ namespace DS.WMS.PrintApi.Controllers
var res = await _invokeService.GetOpenJsonPrintInfo(req);
return res;
}
/// <summary>
/// 根据模板Code获取Json打印信息
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[AllowAnonymous]
[Route("GetOpenJsonPrintInfoByTemplateCode")]
public async Task<PrintDataResult> GetOpenJsonPrintInfoByTemplateCode([FromBody] OpenJsonPrintByCodeReq req)
{
var res = await _invokeService.GetOpenJsonPrintInfoByTemplateCode(req);
return res;
}
}
}

@ -0,0 +1,28 @@
namespace DS.WMS.PrintApi.Model
{
/// <summary>
/// Json打印请求数据
/// </summary>
public class OpenJsonPrintByCodeReq
{
/// <summary>
/// 租户Id
/// </summary>
public long TenantId { get; set; }
/// <summary>
/// 模板Code
/// </summary>
public string Code { get; set; }
/// <summary>
/// Json数据
/// </summary>
public string JsonDataStr { get; set; }
/// <summary>
/// 打印类型 1. PDF 2.EXCEL 2.WORD
/// </summary>
public string PrintType { get; set; }
}
}

@ -20,6 +20,11 @@ namespace DS.WMS.PrintApi.Model
/// </summary>
public long ModuleId { get; set; }
/// <summary>
///打印模板唯一编码
/// </summary>
[Description("打印模板唯一编码")]
public string TemplateCode { get; set; }
/// <summary>
///打印模板名称
/// </summary>
[Description("打印模板名称")]

@ -4,7 +4,7 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:14242",
"applicationUrl": "http://localhost:2999",
"sslPort": 0
}
},

@ -11,5 +11,13 @@ namespace DS.WMS.PrintApi.Service
/// <param name="req"></param>
/// <returns></returns>
public Task<PrintDataResult> GetOpenJsonPrintInfo(OpenJsonPrintReq req);
/// <summary>
/// 根据打印模板代码获取Json打印信息
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public Task<PrintDataResult> GetOpenJsonPrintInfoByTemplateCode(OpenJsonPrintByCodeReq req);
}
}

@ -97,5 +97,91 @@ namespace DS.WMS.PrintApi.Service
return await Task.FromResult(PrintDataResult.Failed(ex.Message));
}
}
public async Task<PrintDataResult> GetOpenJsonPrintInfoByTemplateCode(OpenJsonPrintByCodeReq req)
{
try
{
using (var db = SqlSugarUtil.GetInstance())
{
var template = db.Queryable<SysPrintTemplate>().Filter(null, true).Where(x => x.TemplateCode == req.Code && x.TenantId == req.TenantId).First();
if (template == null)
{
return await Task.FromResult(PrintDataResult.Failed("打印模板编码:["+ req.Code+"]的打印格式不存在!"));
}
if (template.IsUseDataSource)
{
return await Task.FromResult(PrintDataResult.Failed("非Json打印接口!"));
}
try
{
var basePath = String.Empty;
var savePath = "wwwroot/PrintTempFile";
var fileName = DateTime.Now.Ticks;
var printFileName = $"{fileName}.frx";
var printFile = Path.Combine(savePath, printFileName);
//写入CRX文件
using (FileStream fs = new FileStream(printFile, FileMode.Create))
{
Byte[] info = new UTF8Encoding(true).GetBytes(template.PrintJsonContent);
fs.Write(info, 0, info.Length);
}
//生成报表
FastReport.Report report = new FastReport.Report();
report.Load(printFile);
var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
var str = new FastReport.Data.JsonConnection.JsonDataSourceConnectionStringBuilder();
str.Json = req.JsonDataStr;
dataSource.ConnectionString = str.ConnectionString;
report.Prepare();
var printName = string.Empty;
var saveFile = string.Empty;
//var saveFile = Path.Combine(savePath, printName);
if (req.PrintType == "1")
{
printName = $"{fileName}.pdf";
saveFile = Path.Combine(savePath, printName);
PDFExport pdfExport = new PDFExport();
pdfExport.Export(report, saveFile);
}
else if (req.PrintType == "2")
{
printName = $"{fileName}.xlsx";
saveFile = Path.Combine(savePath, printName);
Excel2007Export excelExport = new Excel2007Export();
excelExport.Export(report, saveFile);
}
else if (req.PrintType == "3")
{
printName = $"{fileName}.doc";
saveFile = Path.Combine(savePath, printName);
Word2007Export wordExport = new Word2007Export();
wordExport.Export(report, saveFile);
}
else
{
return await Task.FromResult(PrintDataResult.Failed("非法打印格式!"));
}
return await Task.FromResult(PrintDataResult.OK(printName));
}
catch (Exception e)
{
return await Task.FromResult(PrintDataResult.Failed(e.Message));
}
}
}
catch (Exception ex)
{
//Logger.Warn(ex, "方法: GetOpenJsonPrintInfo");
return await Task.FromResult(PrintDataResult.Failed(ex.Message));
}
}
}
}

@ -63,10 +63,11 @@ namespace DS.WMS.PrintApi
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
var documentName = AppSetting.Configuration["SwaggerDoc:ContactName"];
// app.UseHttpsRedirection();
app.UseSwagger().UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", AppSetting.Configuration["SwaggerDoc:Version"]);
c.SwaggerEndpoint("/swagger/v1/swagger.json", documentName);
});
app.UseRouting();
//¾²Ì¬Îļþ

@ -12,7 +12,7 @@
"Pro": "server=60.209.125.238;port=32006;uid=root;pwd=Djy@Mysql.test;database=shippingweb8_dev"
},
"SwaggerDoc": {
"ContactName": "WmsPrint API.Core",
"ContactName": "WmsPrintAPI",
"ContactEmail": "WmsPrint API.Core@xxx.com",
"ContactUrl": "https://www.xxx.com",
"Version": "1.0",

@ -213,19 +213,19 @@ public class SaasTest
var tenantDb = saasService.GetBizDbScopeById("1750335377144680448");
StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持
tenantDb.CodeFirst.InitTables(typeof(SpaceBookingOrder));
tenantDb.CodeFirst.InitTables(typeof(SpaceBookingOrderCtn));
tenantDb.CodeFirst.InitTables(typeof(SpaceBookingOrderShipSchedule));
tenantDb.CodeFirst.InitTables(typeof(BookingSlotBase));
tenantDb.CodeFirst.InitTables(typeof(BookingSlotCtn));
tenantDb.CodeFirst.InitTables(typeof(BookingSlotStock));
tenantDb.CodeFirst.InitTables(typeof(BookingSlotAllocation));
tenantDb.CodeFirst.InitTables(typeof(BookingSlotAllocationCtn));
tenantDb.CodeFirst.InitTables(typeof(BookingSlotDemand));
tenantDb.CodeFirst.InitTables(typeof(BookingSlotDemandCtn));
tenantDb.CodeFirst.InitTables(typeof(BookingSlotCompare));
tenantDb.CodeFirst.InitTables(typeof(BookingContractNoManage));
tenantDb.CodeFirst.InitTables(typeof(BookingLabel));
tenantDb.CodeFirst.InitTables(typeof(BookingLabelAllocation));
//tenantDb.CodeFirst.InitTables(typeof(SpaceBookingOrderCtn));
//tenantDb.CodeFirst.InitTables(typeof(SpaceBookingOrderShipSchedule));
//tenantDb.CodeFirst.InitTables(typeof(BookingSlotBase));
//tenantDb.CodeFirst.InitTables(typeof(BookingSlotCtn));
//tenantDb.CodeFirst.InitTables(typeof(BookingSlotStock));
//tenantDb.CodeFirst.InitTables(typeof(BookingSlotAllocation));
//tenantDb.CodeFirst.InitTables(typeof(BookingSlotAllocationCtn));
//tenantDb.CodeFirst.InitTables(typeof(BookingSlotDemand));
//tenantDb.CodeFirst.InitTables(typeof(BookingSlotDemandCtn));
//tenantDb.CodeFirst.InitTables(typeof(BookingSlotCompare));
//tenantDb.CodeFirst.InitTables(typeof(BookingContractNoManage));
//tenantDb.CodeFirst.InitTables(typeof(BookingLabel));
//tenantDb.CodeFirst.InitTables(typeof(BookingLabelAllocation));
//tenantDb.CodeFirst.InitTables(typeof(CodeThirdParty));
//tenantDb.CodeFirst.InitTables(typeof(CheckBillAutoDetail));

Loading…
Cancel
Save