public static System.Collections.Generic.List <DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS> GenerateOrders(int?ordersCount) { using (new zAppDev.DotNet.Framework.Profiling.Profiler("OrderGenerator", zAppDev.DotNet.Framework.Profiling.AppDevSymbolType.ClassOperation, "GenerateOrders")) { System.Collections.Generic.List <DSS3_LogisticsPoolingForUrbanDistribution.BO.GeoArea> areas = new DSS3_LogisticsPoolingForUrbanDistribution.DAL.Repository().GetAll <DSS3_LogisticsPoolingForUrbanDistribution.BO.GeoArea>(); System.Collections.Generic.List <DSS3_LogisticsPoolingForUrbanDistribution.BO.Warehouse> warehouses = new DSS3_LogisticsPoolingForUrbanDistribution.DAL.Repository().GetAll <DSS3_LogisticsPoolingForUrbanDistribution.BO.Warehouse>(); System.Collections.Generic.List <DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS> orders = new DSS3_LogisticsPoolingForUrbanDistribution.DAL.Repository().GetAll <DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS>(); System.Collections.Generic.List <DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS> generatedOrders = new System.Collections.Generic.List <DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS>(); int?areasNo = (areas?.Count() ?? 0); int?ordersNo = (orders?.Count() ?? 0); int?warehousesNo = (warehouses?.Count() ?? 0); for (var i = 0; i < ordersCount; i = i + 1) { int?randomOrderIndex = zAppDev.DotNet.Framework.Utilities.Common.Random.Next(0, (ordersNo).GetValueOrDefault(0)); DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS tempOrder = zAppDev.DotNet.Framework.Utilities.Common.GetItemFromList(orders, randomOrderIndex.GetValueOrDefault(0)); DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS copyOrder = tempOrder?.Copy(false, null, true); int?randomAreaIndex = zAppDev.DotNet.Framework.Utilities.Common.Random.Next(0, (areasNo).GetValueOrDefault(0)); DSS3_LogisticsPoolingForUrbanDistribution.BO.GeoArea selectedGeoArea = zAppDev.DotNet.Framework.Utilities.Common.GetItemFromList(areas, randomAreaIndex.GetValueOrDefault(0)); copyOrder.OrdDlsAddress = ""; copyOrder.OrdDlsCity = (selectedGeoArea?.Area ?? ""); copyOrder.OrdDlsArea = (selectedGeoArea?.County ?? ""); copyOrder.OrdDlsZipCode = (selectedGeoArea?.PostalCode ?? ""); int?randomWarehouseIndex = zAppDev.DotNet.Framework.Utilities.Common.Random.Next(0, (warehousesNo).GetValueOrDefault(0)); DSS3_LogisticsPoolingForUrbanDistribution.BO.Warehouse warehouse = zAppDev.DotNet.Framework.Utilities.Common.GetItemFromList(warehouses, randomWarehouseIndex.GetValueOrDefault(0)); System.Collections.Generic.List <DSS3_LogisticsPoolingForUrbanDistribution.BO.RegionalAgent> regionalAgents = new DSS3_LogisticsPoolingForUrbanDistribution.DAL.Repository().Get <DSS3_LogisticsPoolingForUrbanDistribution.BO.RegionalAgent>((ra) => ra.AreaSupport.Contains(selectedGeoArea)); int?randomRAIndex = zAppDev.DotNet.Framework.Utilities.Common.Random.Next(0, (regionalAgents?.Count() ?? 0)); DSS3_LogisticsPoolingForUrbanDistribution.BO.RegionalAgent regionalAgent = zAppDev.DotNet.Framework.Utilities.Common.GetItemFromList(regionalAgents, randomRAIndex.GetValueOrDefault(0)); copyOrder.OrdAgencyCode = (regionalAgent?.AgencyCode ?? ""); copyOrder.OrdAgencyAddress = (regionalAgent?.AgencyAddress ?? ""); copyOrder.OrdAgencyDescr = (regionalAgent?.AgencyDescription ?? ""); DateTime?now = DateTime.UtcNow; copyOrder.OrdRegDateTime = now; int?randomDaysAdd = zAppDev.DotNet.Framework.Utilities.Common.Random.Next(1, 100); copyOrder.OrdDeliveryDateTime = (now?.AddDays((randomDaysAdd).GetValueOrDefault(0)) ?? System.Data.SqlTypes.SqlDateTime.MinValue.Value); copyOrder.OrdStatus = 10; generatedOrders?.Add(copyOrder); new DSS3_LogisticsPoolingForUrbanDistribution.DAL.Repository().Save <DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS>(copyOrder); } return(generatedOrders); } }
public static void DesirializePubMessage(System.Collections.Generic.List <DSS3_LogisticsPoolingForUrbanDistribution.BO.PubMessage> message, string objectType) { using (new zAppDev.DotNet.Framework.Profiling.Profiler("Utils", zAppDev.DotNet.Framework.Profiling.AppDevSymbolType.ClassOperation, "DesirializePubMessage")) { if (((objectType == null || objectType == ""))) { } switch ((objectType)) { case "OrderWMS": { DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS order = DSS3_LogisticsPoolingForUrbanDistribution.BO.UtilsExtensions.InitOrderWMS(message); break; } } } }
public static void CopyFields(this BO.OrderWMS @this, DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS order) { using (new zAppDev.DotNet.Framework.Profiling.Profiler("OrderWMS", zAppDev.DotNet.Framework.Profiling.AppDevSymbolType.ClassOperation, "CopyFields")) { @this.OrdID = (order?.OrdID ?? 0); @this.OrdOrderID_Remote = (order?.OrdOrderID_Remote ?? 0); @this.OrdOrderExternalCode = (order?.OrdOrderExternalCode ?? ""); @this.OrdOrderDescr = (order?.OrdOrderDescr ?? ""); @this.OrdRegDateTime = (order?.OrdRegDateTime ?? System.Data.SqlTypes.SqlDateTime.MinValue.Value); @this.OrdDateTime = (order?.OrdDateTime ?? System.Data.SqlTypes.SqlDateTime.MinValue.Value); @this.OrdDeliveryDateTime = (order?.OrdDeliveryDateTime ?? System.Data.SqlTypes.SqlDateTime.MinValue.Value); @this.OrdDepositorCode = (order?.OrdDepositorCode ?? ""); @this.OrdDepositorFullName = (order?.OrdDepositorFullName ?? ""); @this.OrdCustomerCode = (order?.OrdCustomerCode ?? ""); @this.OrdCustomerFullName = (order?.OrdCustomerFullName ?? ""); @this.OrdStatus = (order?.OrdStatus ?? 0); @this.OrdMemo = (order?.OrdMemo ?? ""); @this.OrdPurpose = (order?.OrdPurpose ?? ""); @this.OrdDeliveryValue = (order?.OrdDeliveryValue ?? 0); @this.OrdDeliveryNotes = (order?.OrdDeliveryNotes ?? ""); @this.OrdIsReturn = (order?.OrdIsReturn ?? 0); @this.OrdPrdTypeDescr = (order?.OrdPrdTypeDescr ?? ""); @this.OrdWrhRoutingCode = (order?.OrdWrhRoutingCode ?? ""); @this.OrdDlsId = (order?.OrdDlsId ?? 0); @this.OrdDlsDescr = (order?.OrdDlsDescr ?? ""); @this.OrdDlsAddress = (order?.OrdDlsAddress ?? ""); @this.OrdDlsCity = (order?.OrdDlsCity ?? ""); @this.OrdDlsArea = (order?.OrdDlsArea ?? ""); @this.OrdRoutingStatus = (order?.OrdRoutingStatus ?? 0); @this.OrdLfdWeight = (order?.OrdLfdWeight ?? 0); @this.OrdLfdVol = (order?.OrdLfdVol ?? 0); @this.OrdLfdCtn = (order?.OrdLfdCtn ?? 0); @this.OrdLfdCtn = (order?.OrdLfdCtn ?? 0); @this.OrdLfdBar = (order?.OrdLfdBar ?? 0); @this.OrdLfdPalEuro = (order?.OrdLfdPalEuro ?? 0); @this.OrdLfdPalInd = (order?.OrdLfdPalInd ?? 0); @this.OrdLfdPalElsa = (order?.OrdLfdPalElsa ?? 0); @this.OrdLfdParOU = (order?.OrdLfdParOU ?? 0); @this.OrdLfdVar = (order?.OrdLfdVar ?? 0); @this.OrdVoucherDateTime = (order?.OrdVoucherDateTime ?? System.Data.SqlTypes.SqlDateTime.MinValue.Value); @this.OrdVoucherNumber = (order?.OrdVoucherNumber ?? ""); @this.OrdVoucherSeries = (order?.OrdVoucherSeries ?? ""); @this.OrdVoucherId = (order?.OrdVoucherId ?? 0); @this.OrdAgencyCode = (order?.OrdAgencyCode ?? ""); @this.OrdAgencyAddress = (order?.OrdAgencyAddress ?? ""); @this.OrdAgencyDescr = (order?.OrdAgencyDescr ?? ""); @this.OrdTelRouteId = (order?.OrdTelRouteId ?? 0); @this.OrdVchPlateNr = (order?.OrdVchPlateNr ?? ""); @this.OrdVchRouteNr = (order?.OrdVchRouteNr ?? 0); @this.OrdVhrDate = (order?.OrdVhrDate ?? System.Data.SqlTypes.SqlDateTime.MinValue.Value); @this.OrdVhrID = (order?.OrdVhrID ?? 0); @this.OrdLastUpdateDateTime = (order?.OrdLastUpdateDateTime ?? System.Data.SqlTypes.SqlDateTime.MinValue.Value); @this.OrdReadyForLoading = (order?.OrdReadyForLoading ?? 0); @this.Polyline = (order?.Polyline ?? ""); @this.Warehouse = (order?.Warehouse ?? ""); @this.Truck = (order?.Truck ?? ""); } }
public static DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS InitOrderWMS(System.Collections.Generic.List <DSS3_LogisticsPoolingForUrbanDistribution.BO.PubMessage> message) { using (new zAppDev.DotNet.Framework.Profiling.Profiler("Utils", zAppDev.DotNet.Framework.Profiling.AppDevSymbolType.ClassOperation, "InitOrderWMS")) { DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS order = new DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS(); foreach (var attr in message ?? Enumerable.Empty <DSS3_LogisticsPoolingForUrbanDistribution.BO.PubMessage>()) { switch (((attr?.key ?? ""))) { case "OrdID": { order.OrdID = int.Parse((attr?.val ?? "")); break; } case "OrdOrderID_Remote": { order.OrdOrderID_Remote = int.Parse((attr?.val ?? "")); break; } case "OrdOrderExternalCode": { order.OrdOrderExternalCode = (attr?.val ?? ""); break; } case "OrdOrderDescr": { order.OrdOrderDescr = (attr?.val ?? ""); break; } case "OrdRegDateTime": { order.OrdRegDateTime = zAppDev.DotNet.Framework.Utilities.Common.ParseExactDate((attr?.val ?? ""), "yyyy-MM-ddThh-mm-ss", System.Globalization.CultureInfo.InvariantCulture).GetValueOrDefault(System.Data.SqlTypes.SqlDateTime.MinValue.Value); break; } case "OrdDateTime": { order.OrdDateTime = zAppDev.DotNet.Framework.Utilities.Common.ParseExactDate((attr?.val ?? ""), "yyyy-MM-ddThh-mm-ss", System.Globalization.CultureInfo.InvariantCulture).GetValueOrDefault(System.Data.SqlTypes.SqlDateTime.MinValue.Value); break; } case "OrdDeliveryDateTime": { order.OrdDeliveryDateTime = zAppDev.DotNet.Framework.Utilities.Common.ParseExactDate((attr?.val ?? ""), "yyyy-MM-ddThh-mm-ss", System.Globalization.CultureInfo.InvariantCulture).GetValueOrDefault(System.Data.SqlTypes.SqlDateTime.MinValue.Value); break; } case "OrdDepositorCode": { order.OrdDepositorCode = (attr?.val ?? ""); break; } case "OrdDepositorFullName": { order.OrdDepositorFullName = (attr?.val ?? ""); break; } case "OrdCustomerCode": { order.OrdCustomerCode = (attr?.val ?? ""); break; } case "OrdCustomerFullName": { order.OrdCustomerFullName = (attr?.val ?? ""); break; } case "OrdStatus": { order.OrdStatus = int.Parse((attr?.val ?? "")); break; } case "OrdMemo": { order.OrdMemo = (attr?.val ?? ""); break; } case "OrdPurpose": { order.OrdPurpose = (attr?.val ?? ""); break; } case "OrdDeliveryval": { order.OrdDeliveryValue = float.Parse((attr?.val ?? ""), System.Globalization.NumberStyles.Number | System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture); break; } case "OrdDeliveryNotes": { order.OrdDeliveryNotes = (attr?.val ?? ""); break; } case "OrdIsReturn": { order.OrdIsReturn = int.Parse((attr?.val ?? "")); break; } case "OrdPrdTypeDescr": { order.OrdPrdTypeDescr = (attr?.val ?? ""); break; } case "OrdWrhRoutingCode": { order.OrdWrhRoutingCode = (attr?.val ?? ""); break; } case "OrdDlsId": { order.OrdDlsId = int.Parse((attr?.val ?? "")); break; } case "OrdDlsDescr": { order.OrdDlsDescr = (attr?.val ?? ""); break; } case "OrdDlsCity": { order.OrdDlsCity = (attr?.val ?? ""); break; } case "OrdDlsArea": { order.OrdDlsArea = (attr?.val ?? ""); break; } case "OrdDlsAddress": { order.OrdDlsAddress = (attr?.val ?? ""); break; } case "OrdDlsZipCode": { order.OrdDlsZipCode = (attr?.val ?? ""); break; } case "OrdRoutingStatus": { order.OrdRoutingStatus = int.Parse((attr?.val ?? "")); break; } case "OrdLfdBar": { order.OrdLfdBar = int.Parse((attr?.val ?? "")); break; } case "OrdLfdCtn": { order.OrdLfdCtn = int.Parse((attr?.val ?? "")); break; } case "OrdLfdPalElsa": { order.OrdLfdPalElsa = int.Parse((attr?.val ?? "")); break; } case "OrdLfdPalEuro": { order.OrdLfdPalEuro = int.Parse((attr?.val ?? "")); break; } case "OrdLfdPalInd": { order.OrdLfdPalInd = int.Parse((attr?.val ?? "")); break; } case "OrdLfdParOU": { order.OrdLfdParOU = int.Parse((attr?.val ?? "")); break; } case "OrdLfdVar": { order.OrdLfdVar = int.Parse((attr?.val ?? "")); break; } case "OrdLfdVol": { order.OrdLfdVol = float.Parse((attr?.val ?? ""), System.Globalization.NumberStyles.Number | System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture); break; } case "OrdLfdWeight": { order.OrdLfdWeight = float.Parse((attr?.val ?? ""), System.Globalization.NumberStyles.Number | System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture); break; } case "OrdVoucherId": { order.OrdVoucherId = int.Parse((attr?.val ?? "")); break; } case "OrdVoucherDateTime": { order.OrdVoucherDateTime = zAppDev.DotNet.Framework.Utilities.Common.ParseExactDate((attr?.val ?? ""), "yyyy-MM-ddThh-mm-ss", System.Globalization.CultureInfo.InvariantCulture).GetValueOrDefault(System.Data.SqlTypes.SqlDateTime.MinValue.Value); break; } case "OrdVoucherNumber": { order.OrdVoucherNumber = (attr?.val ?? ""); break; } case "OrdVoucherSeries": { order.OrdVoucherSeries = (attr?.val ?? ""); break; } case "OrdAgencyCode": { order.OrdAgencyCode = (attr?.val ?? ""); break; } case "OrdAgencyAddress": { order.OrdAgencyAddress = (attr?.val ?? ""); break; } case "OrdAgencyDescr": { order.OrdAgencyDescr = (attr?.val ?? ""); break; } case "OrdTelRouteId": { break; } case "OrdVchRouteNr": { order.OrdVchRouteNr = int.Parse((attr?.val ?? "")); break; } case "OrdVchPlateNr": { order.OrdVchPlateNr = (attr?.val ?? ""); break; } case "OrdVhrID": { break; } case "OrdVhrDate": { order.OrdVhrDate = zAppDev.DotNet.Framework.Utilities.Common.ParseExactDate((attr?.val ?? ""), "yyyy-MM-ddThh-mm-ss", System.Globalization.CultureInfo.InvariantCulture).GetValueOrDefault(System.Data.SqlTypes.SqlDateTime.MinValue.Value); break; } case "OrdLastUpdateDateTime": { order.OrdLastUpdateDateTime = zAppDev.DotNet.Framework.Utilities.Common.ParseExactDate((attr?.val ?? ""), "yyyy-MM-ddThh-mm-ss", System.Globalization.CultureInfo.InvariantCulture).GetValueOrDefault(System.Data.SqlTypes.SqlDateTime.MinValue.Value); break; } case "OrdReadyForLoading": { order.OrdReadyForLoading = int.Parse((attr?.val ?? "")); break; } case "Polyline": { order.Polyline = (attr?.val ?? ""); break; } case "OrdStatusString": { order.OrdStatusString = (attr?.val ?? ""); break; } } } return(order); } }
public static void DeserializeMessage(string json) { using (new zAppDev.DotNet.Framework.Profiling.Profiler("Utils", zAppDev.DotNet.Framework.Profiling.AppDevSymbolType.ClassOperation, "DeserializeMessage")) { try { zAppDev.DotNet.Framework.Utilities.Serializer <System.Collections.Generic.List <DSS3_LogisticsPoolingForUrbanDistribution.BO.PubMessage> > ser = new zAppDev.DotNet.Framework.Utilities.Serializer <System.Collections.Generic.List <DSS3_LogisticsPoolingForUrbanDistribution.BO.PubMessage> >(); zAppDev.DotNet.Framework.Utilities.Serializer <DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderDTO> ord = new zAppDev.DotNet.Framework.Utilities.Serializer <DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderDTO>(); System.Collections.Generic.List <DSS3_LogisticsPoolingForUrbanDistribution.BO.PubMessage> kvpairs = ser.FromJson(json); zAppDev.DotNet.Framework.Utilities.DebugHelper.Log(zAppDev.DotNet.Framework.Utilities.DebugMessageType.Warning, "Utils", DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseDebugMessage, "Starting message parsing... JSON contains " + (kvpairs?.Count() ?? 0) + " objects"); foreach (var mes in kvpairs ?? Enumerable.Empty <DSS3_LogisticsPoolingForUrbanDistribution.BO.PubMessage>()) { if ((mes?.key == "sarmed_order" && int.Parse((mes?.val ?? "")) > 0)) { zAppDev.DotNet.Framework.Utilities.DebugHelper.Log(zAppDev.DotNet.Framework.Utilities.DebugMessageType.Warning, "Utils", DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseDebugMessage, "Order received!"); DSS3_LogisticsPoolingForUrbanDistribution.BO.PubMessage payload = kvpairs?.FirstOrDefault((x) => x.key == "payload"); string orderjson = zAppDev.DotNet.Framework.Utilities.Common.Base64Decode((payload?.val ?? "")); DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderDTO tempDTO = ord.FromJson(orderjson); DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS temp = (new DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderTransformationDataTransformation.Transformer()).OrderWMS_To_OrderDTOReversed(tempDTO); var _var0 = temp?.OrdID; DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS tempord = new DSS3_LogisticsPoolingForUrbanDistribution.DAL.Repository().GetAsQueryable <DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS>((x) => x.OrdID == _var0)?.FirstOrDefault(); if ((tempord != null)) { zAppDev.DotNet.Framework.Utilities.DebugHelper.Log(zAppDev.DotNet.Framework.Utilities.DebugMessageType.Warning, "Utils", DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseDebugMessage, "Order found in database. Updating..."); tempord?.CopyFields(temp); if ((tempord?.OrdRoutingStatus == 30)) { tempord.ATA = DateTime.UtcNow; System.Collections.Generic.List <string> roles = new System.Collections.Generic.List <string>(); foreach (var role in zAppDev.DotNet.Framework.Identity.IdentityHelper.GetCurrentApplicationUser()?.Roles ?? Enumerable.Empty <zAppDev.DotNet.Framework.Identity.Model.ApplicationRole>()) { roles.Add((role?.Name ?? "")); } tempord.OrdStatus = 30; new DSS3_LogisticsPoolingForUrbanDistribution.DAL.Repository().Update <DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS>(tempord); DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseSaveOrder((tempord?.OrdID ?? 0), roles.ToArray()); } else { new DSS3_LogisticsPoolingForUrbanDistribution.DAL.Repository().Save <DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS>(tempord); System.Collections.Generic.List <string> roles = new System.Collections.Generic.List <string>(); foreach (var role in zAppDev.DotNet.Framework.Identity.IdentityHelper.GetCurrentApplicationUser()?.Roles ?? Enumerable.Empty <zAppDev.DotNet.Framework.Identity.Model.ApplicationRole>()) { roles.Add((role?.Name ?? "")); } DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseUpdateDatasets((tempord?.Id ?? 0), roles.ToArray()); } } else { zAppDev.DotNet.Framework.Utilities.DebugHelper.Log(zAppDev.DotNet.Framework.Utilities.DebugMessageType.Info, "Utils", DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseDebugMessage, "New order received!"); if ((temp?.OrdRoutingStatus == 30)) { temp.ATA = DateTime.UtcNow; } new DSS3_LogisticsPoolingForUrbanDistribution.DAL.Repository().Save <DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS>(temp); } zAppDev.DotNet.Framework.Utilities.DebugHelper.Log(zAppDev.DotNet.Framework.Utilities.DebugMessageType.Warning, "Utils", DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseDebugMessage, "Order saved successfully."); zAppDev.DotNet.Framework.Data.MiniSessionManager.Instance.Session.Flush(); if ((temp?.OrdRoutingStatus == 20)) { DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseOrderStarted((temp?.OrdID ?? 0), (temp?.OrdVchPlateNr ?? "")); } else if ((temp?.OrdRoutingStatus == 30)) { DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseOrderFinished((temp?.OrdID ?? 0)); } else { System.Collections.Generic.List <string> roles = new System.Collections.Generic.List <string>(); foreach (var role in zAppDev.DotNet.Framework.Identity.IdentityHelper.GetCurrentApplicationUser()?.Roles ?? Enumerable.Empty <zAppDev.DotNet.Framework.Identity.Model.ApplicationRole>()) { roles.Add((role?.Name ?? "")); } DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseOnOrderReceive((temp?.OrdID ?? 0), (temp?.Warehouse ?? ""), (temp?.OrdDlsCity ?? ""), (temp?.OrdAgencyDescr ?? ""), roles.ToArray()); } } else if ((mes?.key == "truck_location")) { zAppDev.DotNet.Framework.Utilities.DebugHelper.Log(zAppDev.DotNet.Framework.Utilities.DebugMessageType.Info, "Utils", DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseDebugMessage, "Truck location received!"); DSS3_LogisticsPoolingForUrbanDistribution.BO.PubMessage payload = kvpairs?.FirstOrDefault((x) => x.key == "payload"); string gpsjson = zAppDev.DotNet.Framework.Utilities.Common.Base64Decode((payload?.val ?? "")); zAppDev.DotNet.Framework.Utilities.DebugHelper.Log(zAppDev.DotNet.Framework.Utilities.DebugMessageType.Info, "Utils", DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseDebugMessage, "gps data " + gpsjson); zAppDev.DotNet.Framework.Utilities.Serializer <DSS3_LogisticsPoolingForUrbanDistribution.BO.GPSLocation> gps = new zAppDev.DotNet.Framework.Utilities.Serializer <DSS3_LogisticsPoolingForUrbanDistribution.BO.GPSLocation>(); DSS3_LogisticsPoolingForUrbanDistribution.BO.GPSLocation temp = gps.FromJson(gpsjson); DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseOnGPSReceive((temp?.truck_license_plate ?? ""), (temp?.latitude?.ToString() ?? ""), (temp?.longitude?.ToString() ?? "")); } else if ((mes?.key == "sarmed_truck_recommendation" && int.Parse((mes?.val ?? "")) > 0)) { DSS3_LogisticsPoolingForUrbanDistribution.BO.PubMessage payload = kvpairs?.FirstOrDefault((x) => x.key == "payload"); string truckRec = zAppDev.DotNet.Framework.Utilities.Common.Base64Decode((payload?.val ?? "")); zAppDev.DotNet.Framework.Utilities.DebugHelper.Log(zAppDev.DotNet.Framework.Utilities.DebugMessageType.Info, "Utils", DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseDebugMessage, "TruckRec " + truckRec); zAppDev.DotNet.Framework.Utilities.Serializer <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.DisruptionAPI.TrucksRecommended> truckSer = new zAppDev.DotNet.Framework.Utilities.Serializer <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.DisruptionAPI.TrucksRecommended>(); DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.DisruptionAPI.TrucksRecommended truck = truckSer.FromJson(truckRec); System.Collections.Generic.List <string> roles = new System.Collections.Generic.List <string>(); foreach (var role in zAppDev.DotNet.Framework.Identity.IdentityHelper.GetCurrentApplicationUser()?.Roles ?? Enumerable.Empty <zAppDev.DotNet.Framework.Identity.Model.ApplicationRole>()) { roles.Add((role?.Name ?? "")); } DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseOnNTUARecommendationReceive(truck.order_id, zAppDev.DotNet.Framework.Utilities.Common.GetItemFromArray(truck.trucks_recommended, 0), roles.ToArray()); } else if ((mes?.key == "sarmed_truck_eta")) { DSS3_LogisticsPoolingForUrbanDistribution.BO.PubMessage payload = kvpairs?.FirstOrDefault((x) => x.key == "payload"); string trucketa = zAppDev.DotNet.Framework.Utilities.Common.Base64Decode((payload?.val ?? "")); zAppDev.DotNet.Framework.Utilities.DebugHelper.Log(zAppDev.DotNet.Framework.Utilities.DebugMessageType.Info, "Utils", DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseDebugMessage, "Truck eta mess " + trucketa); zAppDev.DotNet.Framework.Utilities.Serializer <DSS3_LogisticsPoolingForUrbanDistribution.BO.truck_eta> truckSer = new zAppDev.DotNet.Framework.Utilities.Serializer <DSS3_LogisticsPoolingForUrbanDistribution.BO.truck_eta>(); DSS3_LogisticsPoolingForUrbanDistribution.BO.truck_eta truck = truckSer.FromJson(trucketa); var _var1 = truck?.order_id; DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS orderETA = new DSS3_LogisticsPoolingForUrbanDistribution.DAL.Repository().GetAsQueryable <DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS>((ordETA) => ordETA.OrdID == _var1)?.FirstOrDefault(); DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseOnETAReceived((truck?.truck_license_plate ?? ""), (truck?.eta ?? System.Data.SqlTypes.SqlDateTime.MinValue.Value), (truck?.order_id ?? 0)); } else if ((mes?.key == "sarmed_truck_emissions")) { DSS3_LogisticsPoolingForUrbanDistribution.BO.PubMessage payload = kvpairs?.FirstOrDefault((x) => x.key == "payload"); string truckemiss = zAppDev.DotNet.Framework.Utilities.Common.Base64Decode((payload?.val ?? "")); zAppDev.DotNet.Framework.Utilities.DebugHelper.Log(zAppDev.DotNet.Framework.Utilities.DebugMessageType.Info, "Utils", DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseDebugMessage, "co2 " + truckemiss); zAppDev.DotNet.Framework.Utilities.Serializer <DSS3_LogisticsPoolingForUrbanDistribution.BO.truck_emission> truckSer = new zAppDev.DotNet.Framework.Utilities.Serializer <DSS3_LogisticsPoolingForUrbanDistribution.BO.truck_emission>(); DSS3_LogisticsPoolingForUrbanDistribution.BO.truck_emission truck = truckSer.FromJson(truckemiss); var _var2 = truck?.truck_license_plate; DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS orderCOE = new DSS3_LogisticsPoolingForUrbanDistribution.DAL.Repository().GetAsQueryable <DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS>((ordco) => ordco.OrdVchPlateNr == _var2 && ordco.OrdRoutingStatus == 20)?.FirstOrDefault(); float?co2em = float.Parse((truck?.co2_emission ?? ""), System.Globalization.NumberStyles.Number | System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture); co2em = co2em.GetValueOrDefault(0) / 1000; truck.co2_emission = (co2em?.ToString() ?? ""); DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseOnCO2Received((truck?.truck_license_plate ?? ""), (truck?.co2_emission ?? "")); } else if ((mes?.key == "sarmed_truck_delivery_time")) { DSS3_LogisticsPoolingForUrbanDistribution.BO.PubMessage payload = kvpairs?.FirstOrDefault((x) => x.key == "payload"); string truckAVGtime = zAppDev.DotNet.Framework.Utilities.Common.Base64Decode((payload?.val ?? "")); zAppDev.DotNet.Framework.Utilities.DebugHelper.Log(zAppDev.DotNet.Framework.Utilities.DebugMessageType.Info, "Utils", DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseDebugMessage, "avg time " + truckAVGtime); zAppDev.DotNet.Framework.Utilities.Serializer <DSS3_LogisticsPoolingForUrbanDistribution.BO.AVGTime> avgSer = new zAppDev.DotNet.Framework.Utilities.Serializer <DSS3_LogisticsPoolingForUrbanDistribution.BO.AVGTime>(); DSS3_LogisticsPoolingForUrbanDistribution.BO.AVGTime avg = avgSer.FromJson(truckAVGtime); new DSS3_LogisticsPoolingForUrbanDistribution.DAL.Repository().Save <DSS3_LogisticsPoolingForUrbanDistribution.BO.AVGTime>(avg); } } } catch (System.Exception x) { zAppDev.DotNet.Framework.Utilities.DebugHelper.Log(zAppDev.DotNet.Framework.Utilities.DebugMessageType.Error, "Utils", DSS3_LogisticsPoolingForUrbanDistribution.Hubs.EventsHub.RaiseDebugMessage, x); } } }
public DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS OrderWMS_To_OrderDTOReversed(DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderDTO domainOrderDTOInput, DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS domainOrderWMSInstance) { //Leave, if there is nothing to transform if (domainOrderDTOInput == null) { return(default(DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS)); } if (domainOrderWMSInstance == null) { return(OrderWMS_To_OrderDTOReversed(domainOrderDTOInput)); } // If the same Transformation has already ran, get the stored Output and return if (OrderWMS_To_OrderDTOReversed_MappingTransformations.ContainsKey(domainOrderDTOInput)) { return(OrderWMS_To_OrderDTOReversed_MappingTransformations[domainOrderDTOInput]); } // Instantiate target root var domainOrderWMSOutput = domainOrderWMSInstance; OrderWMS_To_OrderDTOReversed_MappingTransformations.Add(domainOrderDTOInput, domainOrderWMSOutput); // OrderDTO.OrdPurpose to OrderWMS.OrdPurpose domainOrderWMSOutput.OrdPurpose = domainOrderDTOInput?.OrdPurpose; // OrderDTO.OrdOrderExternalCode to OrderWMS.OrdOrderExternalCode domainOrderWMSOutput.OrdOrderExternalCode = domainOrderDTOInput?.OrdOrderExternalCode; // OrderDTO.OrdOrderDescr to OrderWMS.OrdOrderDescr domainOrderWMSOutput.OrdOrderDescr = domainOrderDTOInput?.OrdOrderDescr; // OrderDTO.OrdRegDateTime to OrderWMS.OrdRegDateTime DateTime?helperFordomainOrderWMSOutputOrdRegDateTime_55745 = domainOrderWMSOutput?.OrdRegDateTime ?? default(DateTime?); OrderWMS_OrdRegDateTimeToOrderDTO_OrdRegDateTimeRightToLeft(domainOrderDTOInput?.OrdRegDateTime, out helperFordomainOrderWMSOutputOrdRegDateTime_55745); domainOrderWMSOutput.OrdRegDateTime = helperFordomainOrderWMSOutputOrdRegDateTime_55745; // OrderDTO.OrdDeliveryDateTime to OrderWMS.OrdDeliveryDateTime DateTime?helperFordomainOrderWMSOutputOrdDeliveryDateTime_640d8 = domainOrderWMSOutput?.OrdDeliveryDateTime ?? default(DateTime?); OrderWMS_OrdDeliveryDateTimeToOrderDTO_OrdDeliveryDateTimeRightToLeft(domainOrderDTOInput?.OrdDeliveryDateTime, out helperFordomainOrderWMSOutputOrdDeliveryDateTime_640d8); domainOrderWMSOutput.OrdDeliveryDateTime = helperFordomainOrderWMSOutputOrdDeliveryDateTime_640d8; // OrderDTO.OrdDepositorCode to OrderWMS.OrdDepositorCode domainOrderWMSOutput.OrdDepositorCode = domainOrderDTOInput?.OrdDepositorCode; // OrderDTO.OrdDepositorFullName to OrderWMS.OrdDepositorFullName domainOrderWMSOutput.OrdDepositorFullName = domainOrderDTOInput?.OrdDepositorFullName; // OrderDTO.OrdCustomerCode to OrderWMS.OrdCustomerCode domainOrderWMSOutput.OrdCustomerCode = domainOrderDTOInput?.OrdCustomerCode; // OrderDTO.OrdCustomerFullName to OrderWMS.OrdCustomerFullName domainOrderWMSOutput.OrdCustomerFullName = domainOrderDTOInput?.OrdCustomerFullName; // OrderDTO.OrdStatus to OrderWMS.OrdStatus domainOrderWMSOutput.OrdStatus = domainOrderDTOInput?.OrdStatus; // OrderDTO.OrdMemo to OrderWMS.OrdMemo domainOrderWMSOutput.OrdMemo = domainOrderDTOInput?.OrdMemo; // OrderDTO.OrdAgencyDescr to OrderWMS.OrdAgencyDescr domainOrderWMSOutput.OrdAgencyDescr = domainOrderDTOInput?.OrdAgencyDescr; // OrderDTO.OrdVoucherNumber to OrderWMS.OrdVoucherNumber domainOrderWMSOutput.OrdVoucherNumber = domainOrderDTOInput?.OrdVoucherNumber; // OrderDTO.OrdIsReturn to OrderWMS.OrdIsReturn domainOrderWMSOutput.OrdIsReturn = domainOrderDTOInput?.OrdIsReturn; // OrderDTO.OrdPrdTypeDescr to OrderWMS.OrdPrdTypeDescr domainOrderWMSOutput.OrdPrdTypeDescr = domainOrderDTOInput?.OrdPrdTypeDescr; // OrderDTO.OrdWrhRoutingCode to OrderWMS.OrdWrhRoutingCode domainOrderWMSOutput.OrdWrhRoutingCode = domainOrderDTOInput?.OrdWrhRoutingCode; // OrderDTO.OrdDlsId to OrderWMS.OrdDlsId domainOrderWMSOutput.OrdDlsId = domainOrderDTOInput?.OrdDlsId; // OrderDTO.OrdDlsDescr to OrderWMS.OrdDlsDescr domainOrderWMSOutput.OrdDlsDescr = domainOrderDTOInput?.OrdDlsDescr; // OrderDTO.OrdVhrID to OrderWMS.OrdVhrID domainOrderWMSOutput.OrdVhrID = domainOrderDTOInput?.OrdVhrID; // OrderDTO.OrdReadyForLoading to OrderWMS.OrdReadyForLoading domainOrderWMSOutput.OrdReadyForLoading = domainOrderDTOInput?.OrdReadyForLoading; // OrderDTO.Polyline to OrderWMS.Polyline domainOrderWMSOutput.Polyline = domainOrderDTOInput?.Polyline; // OrderDTO.WarehouseAddress to OrderWMS.WarehouseAddress domainOrderWMSOutput.WarehouseAddress = domainOrderDTOInput?.WarehouseAddress; // OrderDTO.OrdDeliveryNotes to OrderWMS.OrdDeliveryNotes domainOrderWMSOutput.OrdDeliveryNotes = domainOrderDTOInput?.OrdDeliveryNotes; // OrderDTO.OrdDeliveryValue to OrderWMS.OrdDeliveryValue domainOrderWMSOutput.OrdDeliveryValue = domainOrderDTOInput?.OrdDeliveryValue; // OrderDTO.Warehouse to OrderWMS.Warehouse domainOrderWMSOutput.Warehouse = domainOrderDTOInput?.Warehouse; // OrderDTO.OrdOrderID_Remote to OrderWMS.OrdOrderID_Remote domainOrderWMSOutput.OrdOrderID_Remote = domainOrderDTOInput?.OrdOrderID_Remote; // OrderDTO.OrdDateTime to OrderWMS.OrdDateTime DateTime?helperFordomainOrderWMSOutputOrdDateTime_12124 = domainOrderWMSOutput?.OrdDateTime ?? default(DateTime?); OrderWMS_OrdDateTimeToOrderDTO_OrdDateTimeRightToLeft(domainOrderDTOInput?.OrdDateTime, out helperFordomainOrderWMSOutputOrdDateTime_12124); domainOrderWMSOutput.OrdDateTime = helperFordomainOrderWMSOutputOrdDateTime_12124; // OrderDTO.OrdDlsCity to OrderWMS.OrdDlsCity domainOrderWMSOutput.OrdDlsCity = domainOrderDTOInput?.OrdDlsCity; // OrderDTO.OrdRoutingStatus to OrderWMS.OrdRoutingStatus domainOrderWMSOutput.OrdRoutingStatus = domainOrderDTOInput?.OrdRoutingStatus; // OrderDTO.OrdLfdWeight to OrderWMS.OrdLfdWeight domainOrderWMSOutput.OrdLfdWeight = domainOrderDTOInput?.OrdLfdWeight; // OrderDTO.OrdLfdVol to OrderWMS.OrdLfdVol domainOrderWMSOutput.OrdLfdVol = domainOrderDTOInput?.OrdLfdVol; // OrderDTO.OrdLfdCtn to OrderWMS.OrdLfdCtn domainOrderWMSOutput.OrdLfdCtn = domainOrderDTOInput?.OrdLfdCtn; // OrderDTO.OrdLfdBar to OrderWMS.OrdLfdBar domainOrderWMSOutput.OrdLfdBar = domainOrderDTOInput?.OrdLfdBar; // OrderDTO.OrdLfdPalEuro to OrderWMS.OrdLfdPalEuro domainOrderWMSOutput.OrdLfdPalEuro = domainOrderDTOInput?.OrdLfdPalEuro; // OrderDTO.OrdLfdPalElsa to OrderWMS.OrdLfdPalElsa domainOrderWMSOutput.OrdLfdPalElsa = domainOrderDTOInput?.OrdLfdPalElsa; // OrderDTO.OrdLfdParOU to OrderWMS.OrdLfdParOU domainOrderWMSOutput.OrdLfdParOU = domainOrderDTOInput?.OrdLfdParOU; // OrderDTO.OrdLfdVar to OrderWMS.OrdLfdVar domainOrderWMSOutput.OrdLfdVar = domainOrderDTOInput?.OrdLfdVar; // OrderDTO.OrdLfdPalInd to OrderWMS.OrdLfdPalInd domainOrderWMSOutput.OrdLfdPalInd = domainOrderDTOInput?.OrdLfdPalInd; // OrderDTO.OrdVoucherSeries to OrderWMS.OrdVoucherSeries domainOrderWMSOutput.OrdVoucherSeries = domainOrderDTOInput?.OrdVoucherSeries; // OrderDTO.OrdVchPlateNr to OrderWMS.OrdVchPlateNr domainOrderWMSOutput.OrdVchPlateNr = domainOrderDTOInput?.OrdVchPlateNr; // OrderDTO.OrdVoucherId to OrderWMS.OrdVoucherId domainOrderWMSOutput.OrdVoucherId = domainOrderDTOInput?.OrdVoucherId; // OrderDTO.OrdDlsArea to OrderWMS.OrdDlsArea domainOrderWMSOutput.OrdDlsArea = domainOrderDTOInput?.OrdDlsArea; // OrderDTO.OrdVhrDate to OrderWMS.OrdVhrDate DateTime?helperFordomainOrderWMSOutputOrdVhrDate_cb86e = domainOrderWMSOutput?.OrdVhrDate ?? default(DateTime?); OrderWMS_OrdVhrDateToOrderDTO_OrdVhrDateRightToLeft(domainOrderDTOInput?.OrdVhrDate, out helperFordomainOrderWMSOutputOrdVhrDate_cb86e); domainOrderWMSOutput.OrdVhrDate = helperFordomainOrderWMSOutputOrdVhrDate_cb86e; // OrderDTO.OrdVchRouteNr to OrderWMS.OrdVchRouteNr domainOrderWMSOutput.OrdVchRouteNr = domainOrderDTOInput?.OrdVchRouteNr; // OrderDTO.OrdDlsZipCode to OrderWMS.OrdDlsZipCode domainOrderWMSOutput.OrdDlsZipCode = domainOrderDTOInput?.OrdDlsZipCode; // OrderDTO.OrdTelRouteId to OrderWMS.OrdTelRouteId domainOrderWMSOutput.OrdTelRouteId = zAppDev.DotNet.Framework.Utilities.Common.ConvertToNullableLong(domainOrderDTOInput?.OrdTelRouteId.ToString()); // OrderDTO.OrdAgencyAddress to OrderWMS.OrdAgencyAddress domainOrderWMSOutput.OrdAgencyAddress = domainOrderDTOInput?.OrdAgencyAddress; // OrderDTO.OrdDlsAddress to OrderWMS.OrdDlsAddress domainOrderWMSOutput.OrdDlsAddress = domainOrderDTOInput?.OrdDlsAddress; // OrderDTO.OrdAgencyCode to OrderWMS.OrdAgencyCode domainOrderWMSOutput.OrdAgencyCode = domainOrderDTOInput?.OrdAgencyCode; // OrderDTO.OrdID to OrderWMS.OrdID domainOrderWMSOutput.OrdID = domainOrderDTOInput?.OrdID; return(domainOrderWMSOutput); }
public DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderDTO OrderWMS_To_OrderDTO(DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS domainOrderWMSInput, DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderDTO domainOrderDTOInstance) { //Leave, if there is nothing to transform if (domainOrderWMSInput == null) { return(default(DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderDTO)); } if (domainOrderDTOInstance == null) { return(OrderWMS_To_OrderDTO(domainOrderWMSInput)); } // If the same Transformation has already ran, get the stored Output and return if (OrderWMS_To_OrderDTO_MappingTransformations.ContainsKey(domainOrderWMSInput)) { return(OrderWMS_To_OrderDTO_MappingTransformations[domainOrderWMSInput]); } // Instantiate target root var domainOrderDTOOutput = domainOrderDTOInstance; OrderWMS_To_OrderDTO_MappingTransformations.Add(domainOrderWMSInput, domainOrderDTOOutput); // OrderWMS.OrdPurpose to OrderDTO.OrdPurpose domainOrderDTOOutput.OrdPurpose = domainOrderWMSInput?.OrdPurpose; // OrderWMS.OrdOrderExternalCode to OrderDTO.OrdOrderExternalCode domainOrderDTOOutput.OrdOrderExternalCode = domainOrderWMSInput?.OrdOrderExternalCode; // OrderWMS.OrdOrderDescr to OrderDTO.OrdOrderDescr domainOrderDTOOutput.OrdOrderDescr = domainOrderWMSInput?.OrdOrderDescr; // OrderWMS.OrdRegDateTime to OrderDTO.OrdRegDateTime string helperFordomainOrderDTOOutputOrdRegDateTime_1bf6b = domainOrderDTOOutput?.OrdRegDateTime ?? default(string); OrderDTO_OrdRegDateTimeToOrderWMS_OrdRegDateTimeLeftToRight(domainOrderWMSInput?.OrdRegDateTime, out helperFordomainOrderDTOOutputOrdRegDateTime_1bf6b); domainOrderDTOOutput.OrdRegDateTime = helperFordomainOrderDTOOutputOrdRegDateTime_1bf6b; // OrderWMS.OrdDeliveryDateTime to OrderDTO.OrdDeliveryDateTime string helperFordomainOrderDTOOutputOrdDeliveryDateTime_8cd18 = domainOrderDTOOutput?.OrdDeliveryDateTime ?? default(string); OrderDTO_OrdDeliveryDateTimeToOrderWMS_OrdDeliveryDateTimeLeftToRight(domainOrderWMSInput?.OrdDeliveryDateTime, out helperFordomainOrderDTOOutputOrdDeliveryDateTime_8cd18); domainOrderDTOOutput.OrdDeliveryDateTime = helperFordomainOrderDTOOutputOrdDeliveryDateTime_8cd18; // OrderWMS.OrdDepositorCode to OrderDTO.OrdDepositorCode domainOrderDTOOutput.OrdDepositorCode = domainOrderWMSInput?.OrdDepositorCode; // OrderWMS.OrdDepositorFullName to OrderDTO.OrdDepositorFullName domainOrderDTOOutput.OrdDepositorFullName = domainOrderWMSInput?.OrdDepositorFullName; // OrderWMS.OrdCustomerCode to OrderDTO.OrdCustomerCode domainOrderDTOOutput.OrdCustomerCode = domainOrderWMSInput?.OrdCustomerCode; // OrderWMS.OrdCustomerFullName to OrderDTO.OrdCustomerFullName domainOrderDTOOutput.OrdCustomerFullName = domainOrderWMSInput?.OrdCustomerFullName; // OrderWMS.OrdStatus to OrderDTO.OrdStatus domainOrderDTOOutput.OrdStatus = domainOrderWMSInput?.OrdStatus; // OrderWMS.OrdMemo to OrderDTO.OrdMemo domainOrderDTOOutput.OrdMemo = domainOrderWMSInput?.OrdMemo; // OrderWMS.OrdAgencyDescr to OrderDTO.OrdAgencyDescr domainOrderDTOOutput.OrdAgencyDescr = domainOrderWMSInput?.OrdAgencyDescr; // OrderWMS.OrdVoucherNumber to OrderDTO.OrdVoucherNumber domainOrderDTOOutput.OrdVoucherNumber = domainOrderWMSInput?.OrdVoucherNumber; // OrderWMS.OrdIsReturn to OrderDTO.OrdIsReturn domainOrderDTOOutput.OrdIsReturn = domainOrderWMSInput?.OrdIsReturn; // OrderWMS.OrdPrdTypeDescr to OrderDTO.OrdPrdTypeDescr domainOrderDTOOutput.OrdPrdTypeDescr = domainOrderWMSInput?.OrdPrdTypeDescr; // OrderWMS.OrdWrhRoutingCode to OrderDTO.OrdWrhRoutingCode domainOrderDTOOutput.OrdWrhRoutingCode = domainOrderWMSInput?.OrdWrhRoutingCode; // OrderWMS.OrdDlsId to OrderDTO.OrdDlsId domainOrderDTOOutput.OrdDlsId = domainOrderWMSInput?.OrdDlsId; // OrderWMS.OrdDlsDescr to OrderDTO.OrdDlsDescr domainOrderDTOOutput.OrdDlsDescr = domainOrderWMSInput?.OrdDlsDescr; // OrderWMS.OrdVhrID to OrderDTO.OrdVhrID domainOrderDTOOutput.OrdVhrID = domainOrderWMSInput?.OrdVhrID; // OrderWMS.OrdReadyForLoading to OrderDTO.OrdReadyForLoading domainOrderDTOOutput.OrdReadyForLoading = domainOrderWMSInput?.OrdReadyForLoading; // OrderWMS.Polyline to OrderDTO.Polyline domainOrderDTOOutput.Polyline = domainOrderWMSInput?.Polyline; // OrderWMS.WarehouseAddress to OrderDTO.WarehouseAddress domainOrderDTOOutput.WarehouseAddress = domainOrderWMSInput?.WarehouseAddress; // OrderWMS.OrdDeliveryNotes to OrderDTO.OrdDeliveryNotes domainOrderDTOOutput.OrdDeliveryNotes = domainOrderWMSInput?.OrdDeliveryNotes; // OrderWMS.OrdDeliveryValue to OrderDTO.OrdDeliveryValue domainOrderDTOOutput.OrdDeliveryValue = domainOrderWMSInput?.OrdDeliveryValue; // OrderWMS.Warehouse to OrderDTO.Warehouse domainOrderDTOOutput.Warehouse = domainOrderWMSInput?.Warehouse; // OrderWMS.OrdOrderID_Remote to OrderDTO.OrdOrderID_Remote domainOrderDTOOutput.OrdOrderID_Remote = domainOrderWMSInput?.OrdOrderID_Remote; // OrderWMS.OrdDateTime to OrderDTO.OrdDateTime string helperFordomainOrderDTOOutputOrdDateTime_98ff9 = domainOrderDTOOutput?.OrdDateTime ?? default(string); OrderDTO_OrdDateTimeToOrderWMS_OrdDateTimeLeftToRight(domainOrderWMSInput?.OrdDateTime, out helperFordomainOrderDTOOutputOrdDateTime_98ff9); domainOrderDTOOutput.OrdDateTime = helperFordomainOrderDTOOutputOrdDateTime_98ff9; // OrderWMS.OrdDlsCity to OrderDTO.OrdDlsCity domainOrderDTOOutput.OrdDlsCity = domainOrderWMSInput?.OrdDlsCity; // OrderWMS.OrdRoutingStatus to OrderDTO.OrdRoutingStatus domainOrderDTOOutput.OrdRoutingStatus = domainOrderWMSInput?.OrdRoutingStatus; // OrderWMS.OrdLfdWeight to OrderDTO.OrdLfdWeight domainOrderDTOOutput.OrdLfdWeight = domainOrderWMSInput?.OrdLfdWeight; // OrderWMS.OrdLfdVol to OrderDTO.OrdLfdVol domainOrderDTOOutput.OrdLfdVol = domainOrderWMSInput?.OrdLfdVol; // OrderWMS.OrdLfdCtn to OrderDTO.OrdLfdCtn domainOrderDTOOutput.OrdLfdCtn = domainOrderWMSInput?.OrdLfdCtn; // OrderWMS.OrdLfdBar to OrderDTO.OrdLfdBar domainOrderDTOOutput.OrdLfdBar = domainOrderWMSInput?.OrdLfdBar; // OrderWMS.OrdLfdPalEuro to OrderDTO.OrdLfdPalEuro domainOrderDTOOutput.OrdLfdPalEuro = domainOrderWMSInput?.OrdLfdPalEuro; // OrderWMS.OrdLastUpdateDateTime to OrderDTO.OrdLastUpdateDateTime string helperFordomainOrderDTOOutputOrdLastUpdateDateTime_894b1 = domainOrderDTOOutput?.OrdLastUpdateDateTime ?? default(string); OrderDTO_OrdLastUpdateDateTimeToOrderWMS_OrdLastUpdateDateTimeLeftToRight(domainOrderWMSInput?.OrdLastUpdateDateTime, out helperFordomainOrderDTOOutputOrdLastUpdateDateTime_894b1); domainOrderDTOOutput.OrdLastUpdateDateTime = helperFordomainOrderDTOOutputOrdLastUpdateDateTime_894b1; // OrderWMS.OrdLfdPalElsa to OrderDTO.OrdLfdPalElsa domainOrderDTOOutput.OrdLfdPalElsa = domainOrderWMSInput?.OrdLfdPalElsa; // OrderWMS.OrdLfdParOU to OrderDTO.OrdLfdParOU domainOrderDTOOutput.OrdLfdParOU = domainOrderWMSInput?.OrdLfdParOU; // OrderWMS.OrdLfdVar to OrderDTO.OrdLfdVar domainOrderDTOOutput.OrdLfdVar = domainOrderWMSInput?.OrdLfdVar; // OrderWMS.OrdVoucherDateTime to OrderDTO.OrdVoucherDateTime string helperFordomainOrderDTOOutputOrdVoucherDateTime_2ac1f = domainOrderDTOOutput?.OrdVoucherDateTime ?? default(string); OrderDTO_OrdVoucherDateTimeToOrderWMS_OrdVoucherDateTimeLeftToRight(domainOrderWMSInput?.OrdVoucherDateTime, out helperFordomainOrderDTOOutputOrdVoucherDateTime_2ac1f); domainOrderDTOOutput.OrdVoucherDateTime = helperFordomainOrderDTOOutputOrdVoucherDateTime_2ac1f; // OrderWMS.OrdLfdPalInd to OrderDTO.OrdLfdPalInd domainOrderDTOOutput.OrdLfdPalInd = domainOrderWMSInput?.OrdLfdPalInd; // OrderWMS.OrdVoucherSeries to OrderDTO.OrdVoucherSeries domainOrderDTOOutput.OrdVoucherSeries = domainOrderWMSInput?.OrdVoucherSeries; // OrderWMS.OrdVchPlateNr to OrderDTO.OrdVchPlateNr domainOrderDTOOutput.OrdVchPlateNr = domainOrderWMSInput?.OrdVchPlateNr; // OrderWMS.OrdVoucherId to OrderDTO.OrdVoucherId domainOrderDTOOutput.OrdVoucherId = domainOrderWMSInput?.OrdVoucherId; // OrderWMS.OrdDlsArea to OrderDTO.OrdDlsArea domainOrderDTOOutput.OrdDlsArea = domainOrderWMSInput?.OrdDlsArea; // OrderWMS.OrdVhrDate to OrderDTO.OrdVhrDate string helperFordomainOrderDTOOutputOrdVhrDate_8ba08 = domainOrderDTOOutput?.OrdVhrDate ?? default(string); OrderDTO_OrdVhrDateToOrderWMS_OrdVhrDateLeftToRight(domainOrderWMSInput?.OrdVhrDate, out helperFordomainOrderDTOOutputOrdVhrDate_8ba08); domainOrderDTOOutput.OrdVhrDate = helperFordomainOrderDTOOutputOrdVhrDate_8ba08; // OrderWMS.OrdVchRouteNr to OrderDTO.OrdVchRouteNr domainOrderDTOOutput.OrdVchRouteNr = domainOrderWMSInput?.OrdVchRouteNr; // OrderWMS.OrdDlsZipCode to OrderDTO.OrdDlsZipCode domainOrderDTOOutput.OrdDlsZipCode = domainOrderWMSInput?.OrdDlsZipCode; // OrderWMS.OrdTelRouteId to OrderDTO.OrdTelRouteId domainOrderDTOOutput.OrdTelRouteId = domainOrderWMSInput?.OrdTelRouteId.ToString(); // OrderWMS.OrdAgencyAddress to OrderDTO.OrdAgencyAddress domainOrderDTOOutput.OrdAgencyAddress = domainOrderWMSInput?.OrdAgencyAddress; // OrderWMS.OrdDlsAddress to OrderDTO.OrdDlsAddress domainOrderDTOOutput.OrdDlsAddress = domainOrderWMSInput?.OrdDlsAddress; // OrderWMS.OrdAgencyCode to OrderDTO.OrdAgencyCode domainOrderDTOOutput.OrdAgencyCode = domainOrderWMSInput?.OrdAgencyCode; // OrderWMS.OrdID to OrderDTO.OrdID domainOrderDTOOutput.OrdID = domainOrderWMSInput?.OrdID; return(domainOrderDTOOutput); }