Přidány sestavy pro přehledy o vyúčtovaných a nevyúčtovaných cestovních příkazech.

master
Josef Rokos 6 years ago
parent 1aeff7f587
commit 4dbe7c47f8

@ -156,6 +156,9 @@ public class Constants {
new ReportMapping(MOD_TRIPREQUIREMENTS, new Report(10, true, "Přehled o protokolech předběžné kontroly", "tripRequirementProtocol"))
};
public final static long TRIB_BILLS_REP_ID = 100;
public final static long TRIB_BILLS_NP_REP_ID = 101;
// pokud je v agnde vic nez jedena podepisovaci sestava, musi se definovat ktera sestava nalezi jake entite
public final static Map<Class<?>, Integer> SIGN_REPORT_MAP = Collections.unmodifiableMap(new HashMap<Class<?>, Integer>() {{
put(TripBillApproval.class, 4);

@ -8,6 +8,7 @@ import info.bukova.isspst.data.DataModel;
import info.bukova.isspst.data.RequirementState;
import info.bukova.isspst.data.TripBill;
import info.bukova.isspst.data.TripBillApproval;
import info.bukova.isspst.reporting.Report;
import info.bukova.isspst.services.IsspstException;
import info.bukova.isspst.services.requirement.RequirementBaseServiceImpl;
import info.bukova.isspst.services.requirement.RequirementTypeService;
@ -20,7 +21,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @author Pepa Rokos
@ -121,4 +124,14 @@ public class TripBillApprovalServiceImpl extends RequirementBaseServiceImpl<Trip
super.delete(entity);
}
}
@Override
public List<Report> getReports() {
List<Report> reports = new ArrayList<Report>();
reports.add(new Report(Constants.TRIB_BILLS_REP_ID, false, "Přehled vyúčtovaných CP", "tripBills"));
reports.add(new Report(Constants.TRIB_BILLS_NP_REP_ID, false, "Přehled nevyúčtovaných CP", "tripBillsNP"));
return reports;
}
}

@ -0,0 +1,190 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0 -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="TripBills" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="b63eddc4-7326-45c4-99b4-fc35d6e98179">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="bill.requirement.numser" class="java.lang.String"/>
<field name="bill.requirement.reqDate" class="java.util.Date"/>
<field name="bill.requirement.tripDate" class="java.util.Date"/>
<field name="bill.requirement.to" class="java.lang.String"/>
<field name="bill.requirement.from" class="java.lang.String"/>
<field name="bill.total" class="java.math.BigDecimal"/>
<field name="bill.ownedBy" class="info.bukova.isspst.data.User"/>
<field name="bill.paidDate" class="java.util.Date"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="23" splitType="Stretch">
<staticText>
<reportElement x="203" y="0" width="212" height="20" uuid="bc6cd7eb-bb1a-4114-b37d-ac64e951ca84"/>
<textElement textAlignment="Center">
<font size="14" isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Přehled vyúčtovaných CP]]></text>
</staticText>
</band>
</title>
<columnHeader>
<band height="26" splitType="Stretch">
<staticText>
<reportElement x="-3" y="0" width="49" height="24" uuid="4ac41092-a9db-4a53-adcf-403484a88f0c">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="5bae174d-9ec1-47bf-b996-c693f3deb590"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Číslo]]></text>
</staticText>
<staticText>
<reportElement x="52" y="0" width="55" height="25" uuid="4ad11f47-bf12-4f6a-9459-31f6a1bf740a">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="ec379d5f-c508-4339-997b-960e31840623"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Datum požad.]]></text>
</staticText>
<staticText>
<reportElement x="109" y="0" width="55" height="24" uuid="82e13fca-38df-497d-879a-a83b5811e7fc">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="1a0527d9-8676-4271-b662-dbed84c8de59"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Datum cesty]]></text>
</staticText>
<staticText>
<reportElement x="166" y="0" width="95" height="24" uuid="b37db24a-5134-42fb-92f6-1be4891f19ae">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="f01bf96d-78de-440b-9322-27510f96e117"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Počátek cesty]]></text>
</staticText>
<staticText>
<reportElement x="262" y="0" width="95" height="24" uuid="dc940c96-6170-4ff0-bf1c-c3b228635812">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="f296e149-4f38-4ed6-b0a6-1e4544728890"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Cíl]]></text>
</staticText>
<staticText>
<reportElement x="358" y="0" width="100" height="24" uuid="9eddb29b-3024-4f0d-90f5-e8e896add7c0">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="df75863b-fbfb-4332-a9fa-dbacf818e85c"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Žadatel]]></text>
</staticText>
<staticText>
<reportElement x="460" y="0" width="40" height="24" uuid="783dc31a-7f32-44d1-b455-6e8d25d5a943">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="ef5d98d4-a0b8-4098-be82-3ea9a1bc2213"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Částka]]></text>
</staticText>
<staticText>
<reportElement x="501" y="0" width="52" height="24" uuid="2e899e0b-4c95-4088-8342-b6c701267c1f">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="781e4236-2351-4b02-99d0-cc2f76e00e3b"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Datum vyúčt.]]></text>
</staticText>
<line>
<reportElement x="0" y="25" width="550" height="1" uuid="813c3d6a-167c-4710-ab3a-e0795d31b3eb"/>
</line>
</band>
</columnHeader>
<detail>
<band height="18" splitType="Stretch">
<printWhenExpression><![CDATA[$F{bill.paidDate} != null]]></printWhenExpression>
<textField>
<reportElement x="-3" y="1" width="57" height="12" uuid="52ea43dc-f565-4502-9d17-4a41dab6db08">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="5bae174d-9ec1-47bf-b996-c693f3deb590"/>
</reportElement>
<textElement>
<font pdfFontName="Helvetica" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{bill.requirement.numser}]]></textFieldExpression>
</textField>
<textField pattern="dd.MM.yyyy">
<reportElement x="52" y="1" width="60" height="12" uuid="88d723d7-ab14-4c78-8b26-26d804e52b42">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="ec379d5f-c508-4339-997b-960e31840623"/>
</reportElement>
<textElement>
<font pdfFontName="Helvetica" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{bill.requirement.reqDate}]]></textFieldExpression>
</textField>
<textField pattern="dd.MM.yyyy">
<reportElement x="109" y="1" width="60" height="12" uuid="02f1eb70-9fa5-4249-93a3-aaa27ce5db96">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="1a0527d9-8676-4271-b662-dbed84c8de59"/>
</reportElement>
<textElement>
<font pdfFontName="Helvetica" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{bill.requirement.tripDate}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="166" y="1" width="95" height="12" uuid="10790d11-b692-4a37-849f-8b3054f65b52">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="f01bf96d-78de-440b-9322-27510f96e117"/>
</reportElement>
<textElement>
<font pdfFontName="Helvetica" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{bill.requirement.from}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="262" y="1" width="95" height="12" uuid="bc0a5da9-d998-4734-a0dd-8993e24d96d2">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="f296e149-4f38-4ed6-b0a6-1e4544728890"/>
</reportElement>
<textElement>
<font pdfFontName="Helvetica" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{bill.requirement.to}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="358" y="1" width="100" height="12" uuid="3a197226-28d7-4384-b74a-12e748bd0967">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="df75863b-fbfb-4332-a9fa-dbacf818e85c"/>
</reportElement>
<textElement>
<font pdfFontName="Helvetica" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{bill.ownedBy}]]></textFieldExpression>
</textField>
<textField pattern="###0.00;-###0.00">
<reportElement x="460" y="1" width="40" height="12" uuid="02a5e327-b7ab-4841-a895-0d285770e3c8">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="ef5d98d4-a0b8-4098-be82-3ea9a1bc2213"/>
</reportElement>
<textElement textAlignment="Right">
<font pdfFontName="Helvetica" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$F{bill.total}]]></textFieldExpression>
</textField>
<textField pattern="dd.MM.yyyy">
<reportElement x="501" y="1" width="60" height="12" uuid="9750faaa-4e86-4b96-ae11-e394af572b82">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="781e4236-2351-4b02-99d0-cc2f76e00e3b"/>
</reportElement>
<textElement>
<font pdfFontName="Helvetica" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{bill.paidDate}]]></textFieldExpression>
</textField>
</band>
</detail>
<summary>
<band height="23" splitType="Stretch"/>
</summary>
</jasperReport>

@ -0,0 +1,172 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0 -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="TripBills" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="b63eddc4-7326-45c4-99b4-fc35d6e98179">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="bill.requirement.numser" class="java.lang.String"/>
<field name="bill.requirement.reqDate" class="java.util.Date"/>
<field name="bill.requirement.tripDate" class="java.util.Date"/>
<field name="bill.requirement.to" class="java.lang.String"/>
<field name="bill.requirement.from" class="java.lang.String"/>
<field name="bill.total" class="java.math.BigDecimal"/>
<field name="bill.ownedBy" class="info.bukova.isspst.data.User"/>
<field name="bill.paidDate" class="java.util.Date"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="23" splitType="Stretch">
<staticText>
<reportElement x="203" y="0" width="237" height="20" uuid="bc6cd7eb-bb1a-4114-b37d-ac64e951ca84"/>
<textElement textAlignment="Center">
<font size="14" isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Přehled nevyúčtovaných CP]]></text>
</staticText>
</band>
</title>
<columnHeader>
<band height="26" splitType="Stretch">
<staticText>
<reportElement x="-3" y="0" width="49" height="24" uuid="4ac41092-a9db-4a53-adcf-403484a88f0c">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="5bae174d-9ec1-47bf-b996-c693f3deb590"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Číslo]]></text>
</staticText>
<staticText>
<reportElement x="57" y="0" width="55" height="25" uuid="4ad11f47-bf12-4f6a-9459-31f6a1bf740a">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="ec379d5f-c508-4339-997b-960e31840623"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Datum požad.]]></text>
</staticText>
<staticText>
<reportElement x="120" y="0" width="55" height="24" uuid="82e13fca-38df-497d-879a-a83b5811e7fc">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="1a0527d9-8676-4271-b662-dbed84c8de59"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Datum cesty]]></text>
</staticText>
<staticText>
<reportElement x="183" y="0" width="105" height="24" uuid="b37db24a-5134-42fb-92f6-1be4891f19ae">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="f01bf96d-78de-440b-9322-27510f96e117"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Počátek cesty]]></text>
</staticText>
<staticText>
<reportElement x="290" y="0" width="105" height="24" uuid="dc940c96-6170-4ff0-bf1c-c3b228635812">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="f296e149-4f38-4ed6-b0a6-1e4544728890"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Cíl]]></text>
</staticText>
<staticText>
<reportElement x="398" y="0" width="112" height="24" uuid="9eddb29b-3024-4f0d-90f5-e8e896add7c0">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="df75863b-fbfb-4332-a9fa-dbacf818e85c"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Žadatel]]></text>
</staticText>
<staticText>
<reportElement x="512" y="0" width="40" height="24" uuid="783dc31a-7f32-44d1-b455-6e8d25d5a943">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="ef5d98d4-a0b8-4098-be82-3ea9a1bc2213"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Částka]]></text>
</staticText>
<line>
<reportElement x="0" y="25" width="550" height="1" uuid="813c3d6a-167c-4710-ab3a-e0795d31b3eb"/>
</line>
</band>
</columnHeader>
<detail>
<band height="18" splitType="Stretch">
<printWhenExpression><![CDATA[$F{bill.paidDate} == null]]></printWhenExpression>
<textField>
<reportElement x="-3" y="1" width="57" height="12" uuid="52ea43dc-f565-4502-9d17-4a41dab6db08">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="5bae174d-9ec1-47bf-b996-c693f3deb590"/>
</reportElement>
<textElement>
<font pdfFontName="Helvetica" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{bill.requirement.numser}]]></textFieldExpression>
</textField>
<textField pattern="dd.MM.yyyy">
<reportElement x="57" y="1" width="60" height="12" uuid="88d723d7-ab14-4c78-8b26-26d804e52b42">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="ec379d5f-c508-4339-997b-960e31840623"/>
</reportElement>
<textElement>
<font pdfFontName="Helvetica" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{bill.requirement.reqDate}]]></textFieldExpression>
</textField>
<textField pattern="dd.MM.yyyy">
<reportElement x="120" y="1" width="60" height="12" uuid="02f1eb70-9fa5-4249-93a3-aaa27ce5db96">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="1a0527d9-8676-4271-b662-dbed84c8de59"/>
</reportElement>
<textElement>
<font pdfFontName="Helvetica" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{bill.requirement.tripDate}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="183" y="1" width="105" height="12" uuid="10790d11-b692-4a37-849f-8b3054f65b52">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="f01bf96d-78de-440b-9322-27510f96e117"/>
</reportElement>
<textElement>
<font pdfFontName="Helvetica" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{bill.requirement.from}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="290" y="1" width="105" height="12" uuid="bc0a5da9-d998-4734-a0dd-8993e24d96d2">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="f296e149-4f38-4ed6-b0a6-1e4544728890"/>
</reportElement>
<textElement>
<font pdfFontName="Helvetica" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{bill.requirement.to}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="398" y="1" width="112" height="12" uuid="3a197226-28d7-4384-b74a-12e748bd0967">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="df75863b-fbfb-4332-a9fa-dbacf818e85c"/>
</reportElement>
<textElement>
<font pdfFontName="Helvetica" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{bill.ownedBy}]]></textFieldExpression>
</textField>
<textField pattern="###0.00;-###0.00">
<reportElement x="512" y="1" width="40" height="12" uuid="02a5e327-b7ab-4841-a895-0d285770e3c8">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="ef5d98d4-a0b8-4098-be82-3ea9a1bc2213"/>
</reportElement>
<textElement textAlignment="Right">
<font pdfFontName="Helvetica" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$F{bill.total}]]></textFieldExpression>
</textField>
</band>
</detail>
<summary>
<band height="23" splitType="Stretch"/>
</summary>
</jasperReport>
Loading…
Cancel
Save