|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- namespace TM.EDIBroker.TransSmart.Transforms {
-
-
- [Microsoft.XLANGs.BaseTypes.SchemaReference(@"TM.Shared.Schemas.OrderStatus", typeof(global::TM.Shared.Schemas.OrderStatus))]
- [Microsoft.XLANGs.BaseTypes.SchemaReference(@"TM.EDIBroker.TransSmart.Schemas.Status", typeof(global::TM.EDIBroker.TransSmart.Schemas.Status))]
- public sealed class TM_Shared_OrderStatus_to_TM_EDIBroker_TransSmart_Status : global::Microsoft.XLANGs.BaseTypes.TransformBase {
-
- private const string _strMap = @"<xsl:stylesheet xmlns:xsl=""http://www.w3.org/1999/XSL/Transform"" version=""1.0""
- xmlns:ScriptNS0=""http://schemas.microsoft.com/BizTalk/2003/ScriptNS0""
- xmlns:ScriptNS1=""http://schemas.microsoft.com/BizTalk/2003/ScriptNS1""
-
- xmlns:DateTime=""TM.Shared.Components.DateTime""
- xmlns:SSO=""TM.Shared.Components.SSO""
- xmlns:String=""TM.Shared.Components.String""
-
- xmlns:s0=""http://TM.KLG.com/KLG/OrderStatus""
- xmlns:ns0=""http://TM.EDIBroker.TransSmart.Status""
-
- exclude-result-prefixes=""s0 ns0 ScriptNS0 ScriptNS1 DateTime SSO String"">
-
- <xsl:output omit-xml-declaration=""yes"" method=""xml"" version=""1.0"" indent=""yes"" />
-
- <!-- region global variable initialization -->
-
- <xsl:variable name=""connectionString"" select=""SSO:GetValue('TM.EDIBroker.TransSmart', 'ESBLookupConnectionString')""/>
-
- <!-- end region -->
-
- <!-- region templates -->
-
- <xsl:template match=""/"">
- <xsl:apply-templates select=""/s0:StatusReport"" />
- </xsl:template>
-
- <xsl:template match=""/s0:StatusReport"">
- <xsl:variable name=""currentDateTime"" select=""DateTime:GetCurrentDateTime()"" />
- <xsl:variable name=""currentDate"" select=""DateTime:GetCurrentDate()"" />
-
- <ns0:root>
- <xsl:for-each select=""Status"">
- <status carrier=""KLG"">
- <shipment>
- <statusTimeStamp>
- <xsl:value-of select=""DateTime:FormatDateTime(StatusTimeStamp, 'yyyy-MM-ddTHH:mm:ss', 'yyyyMMddHHmm')""/>
- </statusTimeStamp>
- <reference>
- <xsl:value-of select=""ShipmentReference""/>
- </reference>
- <NoPieces>
- <xsl:text />
- </NoPieces>
- <weight>
- <xsl:text />
- </weight>
- <weightUom>
- <xsl:text />
- </weightUom>
- <incoterms>
- <xsl:text />
- </incoterms>
- <statusPrice>
- <xsl:text />
- </statusPrice>
- <currency>
- <xsl:text />
- </currency>
- <xsl:choose>
- <xsl:when test=""StatusCode = '012'"">
- <deliveryDate>
- <xsl:value-of select=""DateTime:FormatDateTime(StatusTimeStamp, 'yyyy-MM-ddTHH:mm:ss', 'yyyyMMdd')""/>
- </deliveryDate>
- <deliveryTime>
- <xsl:value-of select=""DateTime:FormatDateTime(StatusTimeStamp, 'yyyy-MM-ddTHH:mm:ss', 'HHmm')""/>
- </deliveryTime>
- </xsl:when>
- <xsl:otherwise>
- <deliveryDate>
- <xsl:text />
- </deliveryDate>
- <deliveryTime>
- <xsl:text />
- </deliveryTime>
- </xsl:otherwise>
- </xsl:choose>
- <acceptedBy>
- <xsl:text />
- </acceptedBy>
- <xsl:choose>
- <xsl:when test=""StatusCode = '020'"">
- <pickupDate>
- <xsl:value-of select=""DateTime:FormatDateTime(StatusTimeStamp, 'yyyy-MM-ddTHH:mm:ss', 'yyyyMMdd')""/>
- </pickupDate>
- </xsl:when>
- <xsl:otherwise>
- <pickupDate>
- <xsl:text />
- </pickupDate>
- </xsl:otherwise>
- </xsl:choose>
-
- <xsl:choose>
- <xsl:when test=""StatusCode = '012'"">
- <shipmentStatus>DONE</shipmentStatus>
- </xsl:when>
- <xsl:otherwise>
- <shipmentStatus>TRNS</shipmentStatus>
- </xsl:otherwise>
- </xsl:choose>
-
- <carrierStatusCode>
- <xsl:value-of select=""StatusCode""/>
- </carrierStatusCode>
- <carrierStatusDescription>
- <xsl:value-of select=""StatusCodeLookup""/>
- </carrierStatusDescription>
- </shipment>
- </status>
- </xsl:for-each>
- </ns0:root>
- </xsl:template>
- <!-- end region -->
-
- <xsl:variable name=""dbClose"" select=""ScriptNS0:DBLookupShutdown()""/>
-
- </xsl:stylesheet>
- ";
-
- private const string _strArgList = @"<ExtensionObjects>
- <ExtensionObject Namespace=""http://schemas.microsoft.com/BizTalk/2003/ScriptNS0""
- AssemblyName=""Microsoft.BizTalk.BaseFunctoids, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35""
- ClassName=""Microsoft.BizTalk.BaseFunctoids.FunctoidScripts"" />
- <ExtensionObject Namespace=""http://schemas.microsoft.com/BizTalk/2003/ScriptNS1""
- AssemblyName=""Microsoft.BizTalk.CrossReferencing, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35""
- ClassName=""Microsoft.BizTalk.CrossReferencing.CrossReferencing"" />
- <ExtensionObject Namespace=""TM.Shared.Components.DateTime""
- AssemblyName=""TM.Shared.Components, Version=1.0.7.0, Culture=neutral, PublicKeyToken=9cbf569b151cb1d4""
- ClassName=""TM.Shared.Components.DateTimeFunctions"" />
- <ExtensionObject Namespace=""TM.Shared.Components.KeyList""
- AssemblyName=""TM.Shared.Components, Version=1.0.7.0, Culture=neutral, PublicKeyToken=9cbf569b151cb1d4""
- ClassName=""TM.Shared.Components.KeyListFunctions"" />
- <ExtensionObject Namespace=""TM.Shared.Components.SSO""
- AssemblyName=""TM.Shared.Components, Version=1.0.7.0, Culture=neutral, PublicKeyToken=9cbf569b151cb1d4""
- ClassName=""TM.Shared.Components.SSOFunctions"" />
- <ExtensionObject Namespace=""TM.Shared.Components.String""
- AssemblyName=""TM.Shared.Components, Version=1.0.7.0, Culture=neutral, PublicKeyToken=9cbf569b151cb1d4""
- ClassName=""TM.Shared.Components.StringFunctions"" />
- </ExtensionObjects>";
-
- private const string _strSrcSchemasList0 = @"TM.Shared.Schemas.OrderStatus";
-
- private const global::TM.Shared.Schemas.OrderStatus _srcSchemaTypeReference0 = null;
-
- private const string _strTrgSchemasList0 = @"TM.EDIBroker.TransSmart.Schemas.Status";
-
- private const global::TM.EDIBroker.TransSmart.Schemas.Status _trgSchemaTypeReference0 = null;
-
- public override string XmlContent {
- get {
- return _strMap;
- }
- }
-
- public override string XsltArgumentListContent {
- get {
- return _strArgList;
- }
- }
-
- public override string[] SourceSchemas {
- get {
- string[] _SrcSchemas = new string [1];
- _SrcSchemas[0] = @"TM.Shared.Schemas.OrderStatus";
- return _SrcSchemas;
- }
- }
-
- public override string[] TargetSchemas {
- get {
- string[] _TrgSchemas = new string [1];
- _TrgSchemas[0] = @"TM.EDIBroker.TransSmart.Schemas.Status";
- return _TrgSchemas;
- }
- }
- }
- }
|