Explorar el Código

fixes to test local good

a.binder hace 7 años
padre
commit
a3e9e38ce2

+ 3 - 1
SE/schema/WPS_Functions/graph_gnuplot/build_graph_gnuplot.xml

@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project basedir="../../." name="graph_gnuplot" default="graph_to_image">
+<project 
+    xmlns:p5gnuplot="http://biuro.biall-net.pl/WPS_Functions/graph_gnuplot"
+    basedir="../../." name="graph_gnuplot" default="graph_to_image">
   <description>to use from to dita conversion from xsl/ant to generate png graphs</description>
     
     <include file="build.graph_gnuplot.PRODUCT.xml"/>

+ 1 - 0
SE/schema/WPS_Functions/graph_gnuplot/graph_gnuplot_helper.xsl

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:p5gnuplot="http://biuro.biall-net.pl/WPS_Functions/graph_gnuplot"
     xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
     exclude-result-prefixes="xs"
     version="2.0">

+ 20 - 0
SE/schema/WPS_Functions/graph_gnuplot/p5gnuplot__x3A__system_cache__dita.xsl

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+    xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
+    xmlns:p5gnuplot="http://biuro.biall-net.pl/WPS_Functions/graph_gnuplot"
+    exclude-result-prefixes="xs"
+    version="2.0">
+    
+   
+   
+    <xsl:function name="p5gnuplot:system_cache__dita__x3A__fix__x3A__axis__x3A__names">
+        <xsl:param name="title"/>
+        <!--<xsl:value-of select="replace($title,' ','&#160;')"/>-->
+        <xsl:value-of select="concat('&quot;',replace($title,'&quot;',' '),'&quot;')"/>
+    </xsl:function>
+   
+    
+    
+</xsl:stylesheet>

+ 55 - 33
SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.universal.xsl

@@ -307,6 +307,16 @@
         <xsl:param name="title" select="'Ścieżka śledzenia do '"/>
         <xsl:param name="count"/>
         
+        <xsl:choose>
+            <xsl:when test="Numer_kontrahenta/text()|ID/text()|source/text()|jednostka_organizacyjna/text()">
+                <ph>
+                    <xsl:if test="Numer_kontrahenta/text()"> nr kontr: <b><xsl:value-of select="Numer_kontrahenta"/></b></xsl:if>
+                    <xsl:if test="jednostka_organizacyjna/text()"> nr kontr: <b><xsl:value-of select="jednostka_organizacyjna"/></b></xsl:if>
+                    <xsl:if test="ID/text()"> ID <b><xsl:value-of select="ID"/></b></xsl:if>
+                    <xsl:if test="source/text()"> source <b><xsl:value-of select="source"/></b></xsl:if>
+                </ph>
+            </xsl:when>
+        </xsl:choose>
         <xsl:choose>
             <xsl:when test="nazwa/text()|Pelna_nazwa_kontrahenta/text()">
                 <ph>
@@ -320,7 +330,7 @@
             <xsl:when test="imiona/text()|nazwisko/text()">
                 <ph>
                     <xsl:if test="nazwisko/text()"> nazwisko: <b><xsl:value-of select="nazwisko"/></b></xsl:if>
-                    <xsl:if test="imiona/text()"> imiona : <b><xsl:value-of select="imiona"/></b></xsl:if>
+                    <xsl:if test="imiona/text()"> imiona: <b><xsl:value-of select="imiona"/></b></xsl:if>
                 </ph>
             </xsl:when>
         </xsl:choose>
@@ -328,8 +338,8 @@
         <xsl:choose>
             <xsl:when test="pesel/text()|PESEL/text()">
                 <ph>
-                    <xsl:if test="pesel/text()"> pesel: <b><xsl:value-of select="pesel"/></b></xsl:if>
-                    <xsl:if test="PESEL/text()"> PESEL : <b><xsl:value-of select="PESEL"/></b></xsl:if>
+                    <xsl:if test="pesel/text()"> PESEL: <b><xsl:value-of select="pesel"/></b></xsl:if>
+                    <xsl:if test="PESEL/text()"> PESEL: <b><xsl:value-of select="PESEL"/></b></xsl:if>
                 </ph>
             </xsl:when>
         </xsl:choose>
@@ -339,8 +349,8 @@
                 <ph>
                     <xsl:if test="krs/text()"> KRS: <b><xsl:value-of select="krs"/></b></xsl:if>
                     <xsl:if test="KRS/text()"> KRS: <b><xsl:value-of select="KRS"/></b></xsl:if>
-                    <xsl:if test="regon/text()"> Regon: <b><xsl:value-of select="regon"/></b></xsl:if>
-                    <xsl:if test="REGON/text()"> Regon: <b><xsl:value-of select="REGON"/></b></xsl:if>
+                    <xsl:if test="regon/text()"> REGON: <b><xsl:value-of select="regon"/></b></xsl:if>
+                    <xsl:if test="REGON/text()"> REGON: <b><xsl:value-of select="REGON"/></b></xsl:if>
                     <xsl:if test="NIP/text()"> NIP: <b><xsl:value-of select="NIP"/></b></xsl:if>
                     <xsl:if test="nip/text()"> NIP: <b><xsl:value-of select="nip"/></b></xsl:if>
                     
@@ -351,8 +361,8 @@
         <xsl:choose>
             <xsl:when test="S_kraj/text()|S_wojewodztwo/text()">
                 <ph>
-                    <xsl:if test="S_kraj/text()"> Kraj: <b><xsl:value-of select="S_kraj"/></b></xsl:if>
-                    <xsl:if test="S_wojewodztwo/text()"> Województwo: <b><xsl:value-of select="S_wojewodztwo"/></b></xsl:if>
+                    <xsl:if test="S_kraj/text()"> kraj: <b><xsl:value-of select="S_kraj"/></b></xsl:if>
+                    <xsl:if test="S_wojewodztwo/text()"> woj.: <b><xsl:value-of select="S_wojewodztwo"/></b></xsl:if>
                     
                 </ph>
             </xsl:when>
@@ -362,17 +372,17 @@
         <xsl:choose>
             <xsl:when test="A_miejscowosc/text()|Miejscowosc/text()|A_ulica/text()|A_nrDomu/text()|ulica/text()|Numer_budynku/text()|nrLokalu/text()|Numer_mieszkania_lokalu/text()|Ulica/text()">
                 <ph>
-                    <xsl:if test="A_miejscowosc/text()"> Miejscowość: <b><xsl:value-of select="A_miejscowosc"/></b></xsl:if>
-                    <xsl:if test="Miejscowosc/text()"> Miejscowość: <b><xsl:value-of select="Miejscowosc"/></b></xsl:if>
-                    <xsl:if test="A_ulica/text()"> Ulica: <b><xsl:value-of select="A_ulica"/></b></xsl:if>
-                    <xsl:if test="ulica/text()"> Ulica: <b><xsl:value-of select="ulica"/></b></xsl:if>
-                    <xsl:if test="Ulica/text()"> Ulica: <b><xsl:value-of select="Ulica"/></b></xsl:if>
-                    <xsl:if test="A_nrDomu/text()"> Nr: <b><xsl:value-of select="A_nrDomu"/></b></xsl:if>
-                    <xsl:if test="Numer_budynku/text()"> Nr: <b><xsl:value-of select="Numer_budynku"/></b></xsl:if>
-                    <xsl:if test="nrLokalu/text()"> lok: <b><xsl:value-of select="nrLokalu"/></b></xsl:if>
-                    <xsl:if test="A_nrLokalu/text()"> lok: <b><xsl:value-of select="A_nrLokalu"/></b></xsl:if>
+                    <xsl:if test="A_miejscowosc/text()"> msc.: <b><xsl:value-of select="A_miejscowosc"/></b></xsl:if>
+                    <xsl:if test="Miejscowosc/text()"> msc.: <b><xsl:value-of select="Miejscowosc"/></b></xsl:if>
+                    <xsl:if test="A_ulica/text()"> ul.: <b><xsl:value-of select="A_ulica"/></b></xsl:if>
+                    <xsl:if test="ulica/text()"> ul.: <b><xsl:value-of select="ulica"/></b></xsl:if>
+                    <xsl:if test="Ulica/text()"> ul.: <b><xsl:value-of select="Ulica"/></b></xsl:if>
+                    <xsl:if test="A_nrDomu/text()"> dom: <b><xsl:value-of select="A_nrDomu"/></b></xsl:if>
+                    <xsl:if test="Numer_budynku/text()"> dom: <b><xsl:value-of select="Numer_budynku"/></b></xsl:if>
+                    <xsl:if test="nrLokalu/text()"> lok.: <b><xsl:value-of select="nrLokalu"/></b></xsl:if>
+                    <xsl:if test="A_nrLokalu/text()"> lok.: <b><xsl:value-of select="A_nrLokalu"/></b></xsl:if>
                     
-                    <xsl:if test="Numer_mieszkania_lokalu/text()"> lok: <b><xsl:value-of select="Numer_mieszkania_lokalu"/></b></xsl:if>
+                    <xsl:if test="Numer_mieszkania_lokalu/text()"> lok.: <b><xsl:value-of select="Numer_mieszkania_lokalu"/></b></xsl:if>
                     
                 </ph>
             </xsl:when>
@@ -381,9 +391,9 @@
         <xsl:choose>
             <xsl:when test="A_poczta/text()|kodPocztowy/text()|A_kod/text()">
                 <ph>
-                    <xsl:if test="A_poczta/text()"> Poczta: <b><xsl:value-of select="A_poczta"/></b></xsl:if>
+                    <xsl:if test="A_poczta/text()"> pcozta: <b><xsl:value-of select="A_poczta"/></b></xsl:if>
                     <xsl:if test="kodPocztowy/text()"> kod: <b><xsl:value-of select="kodPocztowy"/></b></xsl:if>
-                    <xsl:if test="A_kod/text()"> Kod: <b><xsl:value-of select="A_kod"/></b></xsl:if>
+                    <xsl:if test="A_kod/text()"> kod: <b><xsl:value-of select="A_kod"/></b></xsl:if>
                 </ph>
             </xsl:when>
         </xsl:choose>
@@ -391,26 +401,38 @@
         <xsl:choose>
             <xsl:when test="BI_audit_ENERGA_PRACOWNICY_adresy/*">
                 <xsl:for-each select="BI_audit_ENERGA_PRACOWNICY_adresy">
-                    <ph>
-                        <i>teryt</i>
+                    <lq>
+                        <xsl:choose>
+                            <xsl:when test="last() &gt; 0"><i> adres nr <xsl:value-of select="position()"/>/<xsl:value-of select="last()"/></i></xsl:when>
+                        </xsl:choose>
+                        
                         <xsl:if test="kodPocztowy/text()"> kod: <b><xsl:value-of select="kodPocztowy"/></b> </xsl:if>
-                        <xsl:if test="miejscowosc/text()"> miejsc.: <b><xsl:value-of select="miejscowosc"/></b> </xsl:if>
-                        <xsl:if test="ulica/text()"> ulic.: <b><xsl:value-of select="ulica"/></b> </xsl:if>
-                        <xsl:if test="nrBudynku/text()"> Nr: <b><xsl:value-of select="nrBudynku"/></b> </xsl:if>
-                        <xsl:if test="nrLokalu/text()"> lok: <b><xsl:value-of select="nrLokalu"/></b> </xsl:if>
-                    </ph>
+                        <xsl:if test="miejscowosc/text()"> msc.: <b><xsl:value-of select="miejscowosc"/></b> </xsl:if>
+                        <xsl:if test="ulica/text()"> ul.: <b><xsl:value-of select="ulica"/></b> </xsl:if>
+                        <xsl:if test="nrBudynku/text()"> dom: <b><xsl:value-of select="nrBudynku"/></b> </xsl:if>
+                        <xsl:if test="nrLokalu/text()"> lok.: <b><xsl:value-of select="nrLokalu"/></b> </xsl:if>
+                    </lq>
                 </xsl:for-each>
             </xsl:when>
         </xsl:choose>
         
         <xsl:choose>
-            <xsl:when test="Numer_kontrahenta/text()|ID/text()|source/text()|jednostka_organizacyjna/text()">
-                <ph>
-                    <xsl:if test="Numer_kontrahenta/text()"> nr kontr: <b><xsl:value-of select="Numer_kontrahenta"/></b></xsl:if>
-                    <xsl:if test="jednostka_organizacyjna/text()"> nr kontr: <b><xsl:value-of select="jednostka_organizacyjna"/></b></xsl:if>
-                    <xsl:if test="ID/text()"> ID <b><xsl:value-of select="ID"/></b></xsl:if>
-                    <xsl:if test="source/text()"> source <b><xsl:value-of select="source"/></b></xsl:if>
-                </ph>
+            <xsl:when test="TERYT_names/*">
+                <xsl:for-each select="TERYT_names">
+                    <lq>
+                        <xsl:choose>
+                            <xsl:when test="last() &gt; 0"><i> teryt. adres: </i></xsl:when>
+                        </xsl:choose>
+                        
+                        <xsl:if test="wojewodztwo/text()"> woj.: <b><xsl:value-of select="wojewodztwo"/></b> </xsl:if>
+                        <xsl:if test="powiat/text()"> pow.: <b><xsl:value-of select="powiat"/></b> </xsl:if>
+                        <xsl:if test="miejscowosc/text()"> msc.: <b><xsl:value-of select="miejscowosc"/></b> </xsl:if>
+                        <xsl:if test="gmina/text()"> gm.: <b><xsl:value-of select="gmina"/></b> </xsl:if>
+                        <xsl:if test="ulica_cecha/text()"><i><xsl:value-of select="ulica_cecha"/>:</i> </xsl:if>
+                        <xsl:if test="ulica_nazwa_1/text()"> <b><xsl:value-of select="ulica_nazwa_1"/></b> </xsl:if>
+                        <xsl:if test="ulica_nazwa_2/text()"> <b><xsl:value-of select="ulica_nazwa_2"/></b> </xsl:if>
+                    </lq>
+                </xsl:for-each>
             </xsl:when>
         </xsl:choose>
         

+ 99 - 0
SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_tree_to_dita.stats_all.xsl

@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+    xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
+    xmlns:ogr="http://ogr.maptools.org/"
+    xmlns:Benford="https://pl.wikipedia.org/wiki/Rozkład_Benforda"
+    xmlns:default_db="https://biuro.biall-net.pl/wfs/default_db"
+    xmlns:p5="https://biuro.biall-net.pl/wfs"
+    xmlns:get_wfs="http://biuro.biall-net.pl/WPS_Functions/get_wfs/get_wfs.xsd"
+    xmlns:p5gnuplot="http://biuro.biall-net.pl/WPS_Functions/graph_gnuplot"
+    exclude-result-prefixes="xs system_cache__appinfo system_cache__dita ogr Benford default_db get_wfs p5 p5gnuplot"
+    version="2.0">
+    
+    
+   
+    
+    <xsl:output indent="yes"/>
+    <xsl:strip-space elements="*"/>
+    
+    <xsl:template name="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.stats_all">
+        <xsl:for-each-group select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[not(position()=1) and not(position()=last())]/*[1]" group-by="local-name()">
+            <topicref href="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.stats_all.{local-name()}.dita" props="name__BaERKP.stats_all">
+                <xsl:result-document href="{$temp}/{$uuid}/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.stats_all.{local-name()}.dita">
+                    <xsl:apply-templates select="." mode="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.stats_all.local-name"/>
+                </xsl:result-document>
+            </topicref>
+        </xsl:for-each-group>
+    </xsl:template>
+    
+    
+    
+    <xsl:template name="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.stats_all__x3A__preprocess">
+        <xsl:for-each-group select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[not(position()=1) and not(position()=last())]/*[1]" group-by="local-name()">
+                    <xsl:apply-templates select="." mode="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.stats_all.local-name"/>
+        </xsl:for-each-group>
+    </xsl:template>
+    
+    <xsl:template mode="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.stats_all.local-name" match="*">
+        <topic id="{$uuid}BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.stats_all.{local-name()}.dita" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:topic.xsd">
+            <title>Statystyka powiązań dla obiektu <xsl:value-of select="local-name()"/>
+                
+            </title>
+            <xsl:comment>#972-38 </xsl:comment>
+            <body>
+                
+                
+                
+                <xsl:variable name="simpletable"> 
+                    <simpletable frame="all" id="{$uuid}BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.stats_all.{local-name()}.dita" props="print__no">
+                        <strow>
+                            
+                            <xsl:for-each-group select="current-group()[nazwisko|nazwa|Pelna_nazwa_kontrahenta|ID]" group-by="@fid">
+                                <stentry>
+                                    <xsl:value-of select="p5gnuplot:system_cache__dita__x3A__fix__x3A__axis__x3A__names(concat('[',ID,'] ',imiona,' ',nazwisko,' ', nazwa, Pelna_nazwa_kontrahenta,' ',TERYT_names/miejscowosc,' ',TERYT_names/ulica_cecha,' ',TERYT_names/ulica_nazwa_1,' ',TERYT_names/ulica_nazwa_2))"/>
+                                </stentry>
+                            </xsl:for-each-group>
+                        </strow>
+                        <strow>
+                            
+                            <xsl:for-each-group select="current-group()[nazwisko|nazwa|Pelna_nazwa_kontrahenta|ID]" group-by="@fid">
+                                <stentry>
+                                    <xsl:value-of select="count(current-group())"/>
+                                </stentry>
+                            </xsl:for-each-group>
+                        </strow>
+                    </simpletable>
+                </xsl:variable>
+                <xsl:choose>
+                    <xsl:when test="$simpletable//stentry">
+                        <p> Ilości powiązań  obiektu <xsl:value-of select="name()"/>
+                            <foreign>
+                                <xsl:copy-of select="$simpletable" copy-namespaces="no"/>
+                            </foreign>
+                            <xsl:apply-templates mode="system_cache__dita:graph__read" select="$simpletable">
+                                <xsl:with-param name="fileindex" select="$simpletable/simpletable/@id"/>
+                                <xsl:with-param name="width" select="500"/>
+                            </xsl:apply-templates>
+                        </p>
+                    </xsl:when>
+                    
+                </xsl:choose>
+                
+                
+                
+                                
+                <xsl:comment>#1016-103 </xsl:comment>
+                
+                
+            </body>
+        </topic>
+    </xsl:template>
+    
+    
+    
+    <xsl:template mode="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.stats_all.local-name" match="text()|comment()"/>
+    
+</xsl:stylesheet>

+ 99 - 32
SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_tree_to_dita.xsl

@@ -8,7 +8,8 @@
     xmlns:default_db="https://biuro.biall-net.pl/wfs/default_db"
     xmlns:p5="https://biuro.biall-net.pl/wfs"
     xmlns:get_wfs="http://biuro.biall-net.pl/WPS_Functions/get_wfs/get_wfs.xsd"
-    exclude-result-prefixes="xs system_cache__appinfo system_cache__dita ogr Benford default_db get_wfs p5"
+    xmlns:p5gnuplot="http://biuro.biall-net.pl/WPS_Functions/graph_gnuplot"
+    exclude-result-prefixes="xs system_cache__appinfo system_cache__dita ogr Benford default_db get_wfs p5 p5gnuplot"
     version="2.0">
     
     
@@ -154,8 +155,16 @@
             </xsl:apply-templates>
         </xsl:for-each>
         
+        <xsl:variable name="dita">
+            <xsl:call-template name="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.stats_all__x3A__preprocess"/>
+        </xsl:variable>
         
-        
+        <xsl:for-each select="$dita//simpletable">
+            <xsl:message>#163 ..stats_all for @id = <xsl:value-of select="@id"/></xsl:message>
+            <xsl:apply-templates select="." mode="system_cache__dita:graph__write_dita_preprocess">
+                <xsl:with-param name="fileindex" select="@id"/>
+            </xsl:apply-templates>
+        </xsl:for-each>
         
         <xsl:comment>#144 bocian-graph-2-html.preprocess </xsl:comment>
         <!--<xsl:variable name="dita">
@@ -708,21 +717,7 @@
                     <xsl:copy-of select="$BI_audit_ENERGA_RUM_KONTRAHENCI_filtered"/>
                 </xsl:result-document>
                 
-                <topichead navtitle="Graf powiązań">
-                    <topicref href="bocian-graph-2-html.BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_statystyka_pracownik.dita">
-                        <xsl:result-document href="{$temp}/{$uuid}/bocian-graph-2-html.BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_statystyka_pracownik.dita">
-                            <xsl:apply-templates select="." mode="bocian-graph-2-html.BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_statystyka_pracownik.dita"/>
-                        </xsl:result-document>
-                    </topicref>
-                </topichead>
-                
-                <topichead navtitle="Statystyka ilości powiązań">
-                    <topicref href="statystyka_pracownik.dita">
-                        <xsl:result-document href="{$temp}/{$uuid}/statystyka_pracownik.dita">
-                            <xsl:apply-templates select="." mode="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_statystyka_pracownik.dita"/>
-                        </xsl:result-document>
-                    </topicref>
-                </topichead>
+               
                 
                 <xsl:choose><!-- XX1 sure -->
                     <xsl:when test="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[1]/*[not(local-name()='BI_audit_ENERGA_PRACOWNICY')]">
@@ -1647,7 +1642,25 @@
                     </xsl:for-each>
                 </topichead>
                 
+                <topichead navtitle="Graf powiązań">
+                    <topicref href="bocian-graph-2-html.BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_statystyka_pracownik.dita">
+                        <xsl:result-document href="{$temp}/{$uuid}/bocian-graph-2-html.BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_statystyka_pracownik.dita">
+                            <xsl:apply-templates select="." mode="bocian-graph-2-html.BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_statystyka_pracownik.dita"/>
+                        </xsl:result-document>
+                    </topicref>
+                </topichead>
                 
+                <topichead navtitle="Statystyka ilości powiązań">
+                    <topicref href="statystyka_pracownik.dita" props="mode__BaERKP_statystyka_pracownik.dita">
+                        <xsl:result-document href="{$temp}/{$uuid}/statystyka_pracownik.dita">
+                            <xsl:apply-templates select="." mode="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_statystyka_pracownik.dita"/>
+                        </xsl:result-document>
+                    </topicref>
+                    
+                    <xsl:call-template name="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.stats_all"/>
+                    
+                    
+                </topichead>
                 
                 
             </map>
@@ -1690,30 +1703,55 @@
             <xsl:comment>#972 </xsl:comment>
             <body>
                 
-                <xsl:for-each-group select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position() = 1]/BI_audit_ENERGA_PRACOWNICY" group-by="@fud">
-                    <p><xsl:value-of select="ID"/> - <xsl:value-of select="nazwisko"/><xsl:text> </xsl:text> <xsl:value-of select="imiona"/><xsl:text> </xsl:text> <xsl:value-of select="nazwa"/><xsl:text> </xsl:text><xsl:if test="source">źródło:<xsl:value-of select="source"/></xsl:if></p>
+                <!--<xsl:for-each-group select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position() = 1]/*[1]" group-by="@fud">
+                    <p><xsl:value-of select="ID"/> - <xsl:value-of select="nazwisko"/><xsl:text> </xsl:text> <xsl:value-of select="imiona"/><xsl:text> </xsl:text> <xsl:value-of select="nazwa"/><xsl:text> </xsl:text><xsl:text> </xsl:text> <xsl:value-of select="Pelna_nazwa_kontrahenta"/> <xsl:if test="source"> źródło:<xsl:value-of select="source"/></xsl:if></p>
+                    </xsl:for-each-group>-->
+                
+                <xsl:variable name="avg">
+                    <xsl:for-each-group select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position() = 1]/*[1]" group-by="@fid">
+                        <xsl:variable name="pracownik" select="ID"/>
+                        <stentry><xsl:value-of select=" count( current-group() )"/></stentry>
                     </xsl:for-each-group>
+                </xsl:variable>
+                
+                <xsl:variable name="avg.scale_max" select="(round(max($avg//stentry) div 100)) * 100"/>
                 
                 <xsl:variable name="simpletable"> 
-                    <simpletable frame="all" id="{$uuid}topic_simpletable_statystyka_pracownik.dita_table">
+                    <simpletable frame="all" id="{$uuid}topic_simpletable_statystyka_pracownik.dita_table" props="print__no">
                         <strow>
-                            <xsl:for-each-group select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position() = 1]/BI_audit_ENERGA_PRACOWNICY" group-by="@fid">
-                                <stentry><xsl:value-of select="ID"/></stentry>
+                            <stentry><xsl:value-of select="p5gnuplot:system_cache__dita__x3A__fix__x3A__axis__x3A__names('skala 0')"/></stentry>
+                            <xsl:for-each-group select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position() = 1]/*[1]" group-by="@fid">
+                                <stentry>
+                                    <xsl:choose>
+                                        <xsl:when test="last() &lt; 5">
+                                            <xsl:value-of select="p5gnuplot:system_cache__dita__x3A__fix__x3A__axis__x3A__names(concat('[',ID,'] ',imiona,' ',nazwisko,' ', nazwa, Pelna_nazwa_kontrahenta ))"/>
+                                        </xsl:when>
+                                        <xsl:otherwise>
+                                            <xsl:value-of select="ID"/>
+                                        </xsl:otherwise>
+                                    </xsl:choose>
+                                    
+                                    <!--<xsl:value-of select="ID"/>-->
+                                </stentry>
                             </xsl:for-each-group>
+                            <stentry><xsl:value-of select="p5gnuplot:system_cache__dita__x3A__fix__x3A__axis__x3A__names(concat('skala ',$avg.scale_max))"/></stentry>
                         </strow>
                         <strow>
-                            <xsl:for-each-group select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position() = 1]/BI_audit_ENERGA_PRACOWNICY" group-by="@fid">
+                            <stentry>0</stentry>
+                            <xsl:for-each-group select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position() = 1]/*[1]" group-by="@fid">
                                 <xsl:variable name="pracownik" select="ID"/>
                                 <stentry><xsl:value-of select=" count( current-group() )"/></stentry>
                             </xsl:for-each-group>
+                            <stentry><xsl:value-of select="$avg.scale_max"/></stentry>
                         </strow>
                     </simpletable>
                 </xsl:variable>
                 <xsl:choose>
                     <xsl:when test="$simpletable//stentry">
-                        <p> Ilości powiązań <note>Uwaga, w przypadku odnalezionych kilku tras do tego samego kontrahenta pokazywana jest jedna trasa (wykres nie zawiera tego ograniczenia)</note>
-                            
+                        <p> Ilości powiązań 
+                            <foreign>
                             <xsl:copy-of select="$simpletable" copy-namespaces="no"/>
+                            </foreign>
                             <xsl:apply-templates mode="system_cache__dita:graph__read" select="$simpletable">
                                 <xsl:with-param name="fileindex" select="$simpletable/simpletable/@id"/>
                                 <xsl:with-param name="width" select="500"/>
@@ -1733,18 +1771,35 @@
                 
                 <xsl:comment>#1016 </xsl:comment>
                 
+                <xsl:variable name="avg">
+                    <stentry><xsl:value-of select=" round(BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/count(BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object))"/></stentry>
+                </xsl:variable>
+                
                 <xsl:variable name="simpletable"> 
-                    <simpletable frame="all" id="{$uuid}topic_simpletable_statystyka_pracownik.dita_table_srednie">
+                    <simpletable frame="all" id="{$uuid}topic_simpletable_statystyka_pracownik.dita_table_srednie" props="print__no">
                         <strow>
-                            <xsl:for-each-group select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position() = 1]/BI_audit_ENERGA_PRACOWNICY" group-by="@fid">
-                                <stentry><xsl:value-of select="ID"/></stentry>
+                            <stentry><xsl:value-of select="p5gnuplot:system_cache__dita__x3A__fix__x3A__axis__x3A__names('skala 0')"/></stentry>
+                            <xsl:for-each-group select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position() = 1]/*[1]" group-by="@fid">
+                                <stentry>
+                                    <xsl:choose>
+                                        <xsl:when test="last() &lt; 5">
+                                            <xsl:value-of select="p5gnuplot:system_cache__dita__x3A__fix__x3A__axis__x3A__names(concat('[',ID,'] ',imiona,' ',nazwisko,' ', nazwa, Pelna_nazwa_kontrahenta ))"/>
+                                        </xsl:when>
+                                        <xsl:otherwise>
+                                            <xsl:value-of select="ID"/>
+                                        </xsl:otherwise>
+                                    </xsl:choose>
+                                </stentry>
                             </xsl:for-each-group>
+                            <stentry><xsl:value-of select="p5gnuplot:system_cache__dita__x3A__fix__x3A__axis__x3A__names(concat('skala ',$avg.scale_max))"/></stentry>
                         </strow>
                         <strow>
-                            <xsl:for-each-group select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position() = 1]/BI_audit_ENERGA_PRACOWNICY" group-by="@fid">
+                            <stentry>0</stentry>
+                            <xsl:for-each-group select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position() = 1]/*[1]" group-by="@fid">
                                 <xsl:variable name="pracownik" select="@fid"/>
-                                <stentry><xsl:value-of select=" round(count( $current/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row[ BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position() = 1]/BI_audit_ENERGA_PRACOWNICY/@fid=$pracownik]/*[1]) div count( current-group() ) )"/></stentry>
+                                <stentry><xsl:value-of select=" round(count( $current/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row[ BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[*[1]/@fid=$pracownik][ position() = 1]]/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object) div count( current-group() ) )"/></stentry>
                             </xsl:for-each-group>
+                            <stentry><xsl:value-of select="$avg.scale_max"/></stentry>
                         </strow>
                     </simpletable>
                 </xsl:variable>
@@ -1753,8 +1808,9 @@
                     <xsl:when test="$simpletable//stentry">
                         <p>Średnie długości powiązań
                             <!--<xsl:value-of select="count( $current/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row[ BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position() = 1]/BI_audit_ENERGA_PRACOWNICY/ID=$PROCES_INIT_tree.ditamap]/object)"/>-->
-                            
+                            <foreign>
                             <xsl:copy-of select="$simpletable" copy-namespaces="no"/>
+                            </foreign>
                             <xsl:apply-templates mode="system_cache__dita:graph__read" select="$simpletable">
                                 <xsl:with-param name="fileindex" select="$simpletable/simpletable/@id"/>
                                 <xsl:with-param name="width" select="500"/>
@@ -1771,7 +1827,18 @@
                     <simpletable frame="all" id="{$uuid}topic_simpletable_statystyka_pracownik.dita_table_kwoty">
                         <strow>
                             <xsl:for-each-group select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position() = 1]/BI_audit_ENERGA_PRACOWNICY" group-by="ID">
-                                <stentry><xsl:value-of select="ID"/></stentry>
+                                <stentry>
+                                    <xsl:choose>
+                                        <xsl:when test="last() &lt; 5">
+                                            <xsl:value-of select="p5gnuplot:system_cache__dita__x3A__fix__x3A__axis__x3A__names(concat(ID,' ',imiona,' ',nazwisko,' ', substring(nazwa,1,10), substring(Pelna_nazwa_kontrahenta,1,10) ))"/>
+                                        </xsl:when>
+                                        <xsl:otherwise>
+                                            <xsl:value-of select="ID"/>
+                                        </xsl:otherwise>
+                                    </xsl:choose>
+                                    <!--<xsl:value-of select="ID"/>-->
+                                
+                                </stentry>
                             </xsl:for-each-group>
                         </strow>
                         <strow>

+ 6 - 4
SE/schema/default_db_xml_cache.public/default_db/graph_gnuplot/graph_gnuplot.xsl

@@ -43,7 +43,7 @@
     <xsl:output indent="yes"/>
     <xsl:strip-space elements="*"/>
     
-    
+    <xsl:include href="../../../WPS_Functions/graph_gnuplot/p5gnuplot__x3A__system_cache__dita.xsl"/>
     
     
     <xsl:template mode="system_cache__dita:graph__write_dita_preprocess" match="simpletable">
@@ -53,13 +53,14 @@
             <xsl:with-param name="fileindex" select="$fileindex"/>
         </xsl:apply-templates>
         <xsl:result-document href="{$ditadir}/graph_to_image/{$fileindex}.gnuplot" omit-xml-declaration="yes">
-set terminal pngcairo font "arial,6" size 800,600
+set terminal pngcairo font "arial,9" size 800,600
 set nokey
 set output '<xsl:value-of select="$fileindex"/>.png'
 set boxwidth 0.75
 set style fill solid
 set title "Wykres"
-plot "<xsl:value-of select="$fileindex"/>.gnuplot.dat" using 2:xtic(1) with boxes
+set xtics rotate
+plot "<xsl:value-of select="$fileindex"/>.gnuplot.dat" using 0:2:3:xtic(1) with boxes  lc variable
         </xsl:result-document>
         <xsl:result-document href="{$ditadir}/graph_to_image/{$fileindex}.gnuplot.dat" omit-xml-declaration="yes">
             <!--<system_cache__appinfo:graph_to_image.population.dat>-->
@@ -68,6 +69,7 @@ plot "<xsl:value-of select="$fileindex"/>.gnuplot.dat" using 2:xtic(1) with boxe
             <xsl:variable name="strow" select="(strow|sthead)"/>
                 <xsl:message>#69 graph cols <xsl:value-of select="$cols"/></xsl:message>
                 <xsl:for-each select="1 to $cols">
+                    <xsl:variable name="column" select="."/>
                     <xsl:for-each select="$strow/stentry[ position() = current()]">
                         <xsl:choose>
                             <xsl:when test="position() = 1">
@@ -75,7 +77,7 @@ plot "<xsl:value-of select="$fileindex"/>.gnuplot.dat" using 2:xtic(1) with boxe
                                 <xsl:value-of select="string(.)"/><xsl:text>&#09;</xsl:text>
                             </xsl:when>
                             <xsl:otherwise>
-                                <xsl:value-of select="string(.)"/><xsl:text>&#09;</xsl:text>
+                                <xsl:value-of select="string(.)"/><xsl:text>&#09;</xsl:text><xsl:text>&#09;</xsl:text><xsl:value-of select="$column"/>
                             </xsl:otherwise>
                         </xsl:choose>
                     </xsl:for-each>

+ 1 - 1
SE/schema/default_db_xml_cache.public/default_db/tree_to_dita__x3A__to_merge.xsl

@@ -22,6 +22,6 @@
     
     <xsl:include href="system_cache__dita.map.title__x3A__to_merge/tree_to_dita__x3A__map.title.xsl"/>
     <xsl:include href="system_cache__dita__x3A__to_merge/tree_to_dita__x3A__parts.xsl"/>
-    
+    <xsl:include href="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_tree_to_dita.stats_all.xsl"/>
     
 </xsl:stylesheet>