MAYF#36163 Afmeld-tijdstip=Laatste tracking-tijdstip als geen MLDAFM-tracking

svn path=/Website/branches/v2016.2/; revision=31322
This commit is contained in:
Maarten van der Heide
2016-11-02 11:03:22 +00:00
parent 2e4a933ac5
commit a073c40f47

View File

@@ -1,113 +1,149 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" encoding="utf-8"/>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt">
<xsl:output method="xml" indent="yes" encoding="utf-8"/>
<xsl:param name="mode"/>
<xsl:param name="srtnotificatiecode"/>
<xsl:param name="mode"/>
<xsl:param name="srtnotificatiecode"/>
<xsl:variable name="Rev">
<!-- Revision van deze fame.xsl -->
<xsl:value-of select="substring(translate('$Revision$', '$ ', ''), 10)"/>
</xsl:variable>
<xsl:variable name="Rev">
<!-- Revision van deze fame.xsl -->
<xsl:value-of select="substring(translate('$Revision$', '$ ', ''), 10)"/>
</xsl:variable>
<xsl:template match="melding">
<fame>
<inlognaam>wOEuLCq22K0=</inlognaam>
<wachtwoord>Ds+DteZG1pKQyCYQpAcYEg==</wachtwoord>
<xsl:choose>
<xsl:when test="$srtnotificatiecode='MLDAFM' or status_key='5'">
<meldingenummer action="finish">
<xsl:value-of select="externnr"/>
</meldingenummer>
<prognosedatum>
<xsl:value-of select="datum_gepland/datum"/>
</prognosedatum>
<prognosetijd>
<xsl:value-of select="datum_gepland/tijd"/>
</prognosetijd>
<startdatum>
<xsl:value-of select="begindatum/datum"/>
</startdatum>
<starttijd>
<xsl:value-of select="begindatum/tijd"/>
</starttijd>
<einddatum>
<xsl:value-of select="tracking/track[@code='MLDAFM']/datum/datum"/>
</einddatum>
<eindtijd>
<xsl:value-of select="tracking/track[@code='MLDAFM']/datum/tijd"/>
</eindtijd>
<urenaantal></urenaantal>
<kosten></kosten>
<datumgereed>
<xsl:value-of select="tracking/track[@code='MLDAFM']/datum/datum"/>
</datumgereed>
<tijdgereed>
<xsl:value-of select="tracking/track[@code='MLDAFM']/datum/tijd"/>
</tijdgereed>
<aantekeningen>
<xsl:value-of select="opmerking"/>
</aantekeningen>
</xsl:when>
<xsl:when test="$srtnotificatiecode='MLDREJ' or status_key='1'">
<meldingenummer action="finish">
<xsl:value-of select="externnr"/>
</meldingenummer>
<prognosedatum>
<xsl:value-of select="datum_gepland/datum"/>
</prognosedatum>
<prognosetijd>
<xsl:value-of select="datum_gepland/tijd"/>
</prognosetijd>
<startdatum>
<xsl:value-of select="begindatum/datum"/>
</startdatum>
<starttijd>
<xsl:value-of select="begindatum/tijd"/>
</starttijd>
<einddatum>
<xsl:value-of select="tracking/track[@code='MLDREJ']/datum/datum"/>
</einddatum>
<eindtijd>
<xsl:value-of select="tracking/track[@code='MLDREJ']/datum/tijd"/>
</eindtijd>
<urenaantal></urenaantal>
<kosten></kosten>
<datumgereed>
<xsl:value-of select="tracking/track[@code='MLDREJ']/datum/datum"/>
</datumgereed>
<tijdgereed>
<xsl:value-of select="tracking/track[@code='MLDREJ']/datum/tijd"/>
</tijdgereed>
<aantekeningen>
Melding afgewezen!
<xsl:value-of select="opmerking"/>
</aantekeningen>
</xsl:when>
<xsl:otherwise>
<meldingenummer action="update">
<xsl:value-of select="externnr"/>
</meldingenummer>
<prognosedatum>
<xsl:value-of select="datum_gepland/datum"/>
</prognosedatum>
<prognosetijd>
<xsl:value-of select="datum_gepland/tijd"/>
</prognosetijd>
<aantekeningen>
<xsl:value-of select="opmerking"/>
</aantekeningen>
</xsl:otherwise>
</xsl:choose>
</fame>
</xsl:template>
<xsl:template match="melding">
<xsl:variable name="maxtrack">
<xsl:for-each select="tracking/track/datum">
<xsl:sort select="timestamp" data-type="number" order="descending"/>
<xsl:if test="position()=1">
<xsl:copy-of select="."/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<fame>
<inlognaam>wOEuLCq22K0=</inlognaam>
<wachtwoord>Ds+DteZG1pKQyCYQpAcYEg==</wachtwoord>
<xsl:choose>
<xsl:when test="$srtnotificatiecode='MLDAFM' or status_key='5'">
<meldingenummer action="finish">
<xsl:value-of select="externnr"/>
</meldingenummer>
<prognosedatum>
<xsl:value-of select="datum_gepland/datum"/>
</prognosedatum>
<prognosetijd>
<xsl:value-of select="datum_gepland/tijd"/>
</prognosetijd>
<startdatum>
<xsl:value-of select="begindatum/datum"/>
</startdatum>
<starttijd>
<xsl:value-of select="begindatum/tijd"/>
</starttijd>
<einddatum>
<xsl:choose>
<xsl:when test="$srtnotificatiecode='MLDAFM'">
<xsl:value-of select="tracking/track[@code='MLDAFM']/datum/datum"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="msxml:node-set($maxtrack)/datum/datum"/>
</xsl:otherwise>
</xsl:choose>
</einddatum>
<eindtijd>
<xsl:choose>
<xsl:when test="$srtnotificatiecode='MLDAFM'">
<xsl:value-of select="tracking/track[@code='MLDAFM']/datum/tijd"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="msxml:node-set($maxtrack)/datum/tijd"/>
</xsl:otherwise>
</xsl:choose>
</eindtijd>
<urenaantal></urenaantal>
<kosten></kosten>
<datumgereed>
<xsl:choose>
<xsl:when test="$srtnotificatiecode='MLDAFM'">
<xsl:value-of select="tracking/track[@code='MLDAFM']/datum/datum"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="msxml:node-set($maxtrack)/datum/datum"/>
</xsl:otherwise>
</xsl:choose>
</datumgereed>
<tijdgereed>
<xsl:choose>
<xsl:when test="$srtnotificatiecode='MLDAFM'">
<xsl:value-of select="tracking/track[@code='MLDAFM']/datum/tijd"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="msxml:node-set($maxtrack)/datum/tijd"/>
</xsl:otherwise>
</xsl:choose>
</tijdgereed>
<aantekeningen>
<xsl:value-of select="opmerking"/>
</aantekeningen>
</xsl:when>
<xsl:when test="$srtnotificatiecode='MLDREJ' or status_key='1'">
<meldingenummer action="finish">
<xsl:value-of select="externnr"/>
</meldingenummer>
<prognosedatum>
<xsl:value-of select="datum_gepland/datum"/>
</prognosedatum>
<prognosetijd>
<xsl:value-of select="datum_gepland/tijd"/>
</prognosetijd>
<startdatum>
<xsl:value-of select="begindatum/datum"/>
</startdatum>
<starttijd>
<xsl:value-of select="begindatum/tijd"/>
</starttijd>
<einddatum>
<xsl:value-of select="tracking/track[@code='MLDREJ']/datum/datum"/>
</einddatum>
<eindtijd>
<xsl:value-of select="tracking/track[@code='MLDREJ']/datum/tijd"/>
</eindtijd>
<urenaantal></urenaantal>
<kosten></kosten>
<datumgereed>
<xsl:value-of select="tracking/track[@code='MLDREJ']/datum/datum"/>
</datumgereed>
<tijdgereed>
<xsl:value-of select="tracking/track[@code='MLDREJ']/datum/tijd"/>
</tijdgereed>
<aantekeningen>
Melding afgewezen!
<xsl:value-of select="opmerking"/>
</aantekeningen>
</xsl:when>
<xsl:otherwise>
<meldingenummer action="update">
<xsl:value-of select="externnr"/>
</meldingenummer>
<prognosedatum>
<xsl:value-of select="datum_gepland/datum"/>
</prognosedatum>
<prognosetijd>
<xsl:value-of select="datum_gepland/tijd"/>
</prognosetijd>
<aantekeningen>
<xsl:value-of select="opmerking"/>
</aantekeningen>
</xsl:otherwise>
</xsl:choose>
</fame>
</xsl:template>
<xsl:template match="facilitor">
<xsl:apply-templates select="melding"/>
</xsl:template>
<xsl:template match="facilitor">
<xsl:apply-templates select="melding"/>
</xsl:template>
<!-- Root -->
<xsl:template match="/">
<xsl:apply-templates select="facilitor"/>
</xsl:template>
<!-- Root -->
<xsl:template match="/">
<xsl:apply-templates select="facilitor"/>
</xsl:template>
</xsl:stylesheet>