Author: JirkaM Date: 2010-02-19 15:38:04 +0100 (Fri, 19 Feb 2010) New Revision: 1795 Modified: trunk/server/webServer2/SpringSource/cz/elvys/webServer/toSpring/stats/StatsCTRLImpl.java trunk/server/webServer2/WebContent/secured/statsrel/statisticsCompany.xhtml trunk/server/webServer2/WebContent/secured/statsrel/statisticsDocument.xhtml Log: * add column name for elvys modified SpringSource/cz/elvys/webServer/toSpring/stats/StatsCTRLImpl.java modified WebContent/secured/statsrel/statisticsCompany.xhtml modified WebContent/secured/statsrel/statisticsDocument.xhtml Modified: trunk/server/webServer2/SpringSource/cz/elvys/webServer/toSpring/stats/StatsCTRLImpl.java =================================================================== --- trunk/server/webServer2/SpringSource/cz/elvys/webServer/toSpring/stats/StatsCTRLImpl.java 2010-02-19 14:12:04 UTC (rev 1794) +++ trunk/server/webServer2/SpringSource/cz/elvys/webServer/toSpring/stats/StatsCTRLImpl.java 2010-02-19 14:38:04 UTC (rev 1795) @@ -90,11 +90,11 @@ * Queries for get information about line. */ // get all elvys for specified company - public String QUERY_IDENTIFIERS_COMPANY = "SELECT id,city,address FROM Elvys WHERE company = :ides"; + public String QUERY_IDENTIFIERS_COMPANY = "SELECT id,city,address, name FROM Elvys WHERE company = :ides"; // get all document for specified elvys public String QUERY_IDENTIFIERS_ELVYS = "SELECT distinct(statistics.file.id),statistics.file.origName,statistics.file.uploaded FROM Statistics statistics WHERE statistics.file.fileType.type='document' and statistics.elvys.id = :ides"; // get all elvyses for specified document - public String QUERY_IDENTIFIERS_DOCUMENT = "SELECT distinct(statistics.elvys.id),statistics.elvys.city,statistics.elvys.address FROM Statistics statistics WHERE statistics.file.id = :ides"; + public String QUERY_IDENTIFIERS_DOCUMENT = "SELECT distinct(statistics.elvys.id),statistics.elvys.city,statistics.elvys.address,statistics.elvys.name FROM Statistics statistics WHERE statistics.file.id = :ides"; /** * Queries for getting data for each line on graph for line type. @@ -106,7 +106,7 @@ /** * Queries for getting data for other type graph. */ - private String QUERY_DATA_BAR_COMPANY = "SELECT count( id ), statistics.elvys.id, statistics.elvys.city, statistics.elvys.address FROM Statistics statistics WHERE action_type = 'detail' and statistics.elvys.company = :ides and action_start > :dateFrom and action_start < :dateTo GROUP BY statistics.elvys.id"; + private String QUERY_DATA_BAR_COMPANY = "SELECT count( id ), statistics.elvys.id, statistics.elvys.city, statistics.elvys.address, statistics.elvys.name FROM Statistics statistics WHERE action_type = 'detail' and statistics.elvys.company = :ides and action_start > :dateFrom and action_start < :dateTo GROUP BY statistics.elvys.id"; private String QUERY_DATA_BAR_ELVYS = "SELECT count( id ), statistics.file.id,statistics.file.origName,statistics.file.uploaded FROM Statistics statistics WHERE action_type = 'detail' and statistics.file.fileType.type='document' and statistics.elvys = :ides and action_start > :dateFrom and action_start < :dateTo GROUP BY statistics.file.id"; private String QUERY_DATA_BAR_DOCUMENT = "SELECT count( id ), statistics.elvys.id,statistics.elvys.city,statistics.elvys.address FROM Statistics statistics WHERE action_type = 'detail' and statistics.file = :ides and action_start > :dateFrom and action_start < :dateTo GROUP BY statistics.elvys.id"; @@ -497,12 +497,14 @@ case SCREEN_DOCUMENT: outputData.setCity(row[1].toString()); outputData.setAddress(row[2].toString()); + outputData.setName(row[3].toString()); break; case SCREEN_ELVYS: outputData.setName(row[1].toString()); outputData.setDate(this.xmlFile.convertDate((Date) row[2], "dd.MM.yyyy")); break; case SCREEN_COMPANY: + outputData.setName(row[3].toString()); outputData.setCity(row[1].toString()); outputData.setAddress(row[2].toString()); break; Modified: trunk/server/webServer2/WebContent/secured/statsrel/statisticsCompany.xhtml =================================================================== --- trunk/server/webServer2/WebContent/secured/statsrel/statisticsCompany.xhtml 2010-02-19 14:12:04 UTC (rev 1794) +++ trunk/server/webServer2/WebContent/secured/statsrel/statisticsCompany.xhtml 2010-02-19 14:38:04 UTC (rev 1795) @@ -21,17 +21,26 @@ <f:facet name="header"> <h:outputText value="#{lbl['stats.show.range']}: #{statisticsBean.dateFromOutputFormat} - #{statisticsBean.dateToOutputFormat}" /> - </f:facet> - <rich:column sortBy="#{row.city}"> + </f:facet> + + <rich:column sortBy="#{row.name}"> <f:facet name="header"> - <h:outputText value="#{lbl['stats.show.city']}" /> + <h:outputText value="#{lbl['stats.show.name']}" /> </f:facet> - <h:commandLink id="logoutLink" value="#{row.city}" + <h:commandLink value="#{row.name}" action="#{statisticsBean.prepareElvysStats}"> <f:setPropertyActionListener value="#{row.id}" target="#{statisticsBean.selectedObjectId}" /> </h:commandLink> </rich:column> + + + <rich:column sortBy="#{row.city}"> + <f:facet name="header"> + <h:outputText value="#{lbl['stats.show.city']}" /> + </f:facet> + <h:outputText value="#{row.city}" /> + </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="#{lbl['stats.show.address']}" /> Modified: trunk/server/webServer2/WebContent/secured/statsrel/statisticsDocument.xhtml =================================================================== --- trunk/server/webServer2/WebContent/secured/statsrel/statisticsDocument.xhtml 2010-02-19 14:12:04 UTC (rev 1794) +++ trunk/server/webServer2/WebContent/secured/statsrel/statisticsDocument.xhtml 2010-02-19 14:38:04 UTC (rev 1795) @@ -23,16 +23,25 @@ <h:outputText value="Obdobi: #{statisticsBean.dateFromOutputFormat} - #{statisticsBean.dateToOutputFormat}" /> </f:facet> - <rich:column sortBy="#{row.city}"> + + <rich:column sortBy="#{row.name}"> <f:facet name="header"> - <h:outputText value="#{lbl['stats.show.city']}" /> + <h:outputText value="#{lbl['stats.show.name']}" /> </f:facet> - <h:commandLink id="logoutLink" value="#{row.city}" + <h:commandLink value="#{row.name}" action="#{statisticsBean.prepareElvysStats}"> <f:setPropertyActionListener value="#{row.id}" target="#{statisticsBean.selectedObjectId}" /> </h:commandLink> </rich:column> + + + <rich:column sortBy="#{row.city}"> + <f:facet name="header"> + <h:outputText value="#{lbl['stats.show.city']}" /> + </f:facet> + <h:outputText value="#{row.city}" /> + </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="#{lbl['stats.show.address']}" />