Přidaná sestava "Protokol o kontrole" - digitální podpis při schvalování nákupů.

Verze_3.0 3.0
Josef Rokos 9 years ago
parent d1ccaf530d
commit cd6a6cf5a6

@ -144,7 +144,8 @@ public class Constants {
new ReportMapping(MOD_TRIPBILL, new Report(4, true, "Vyúčtování", "tripBill", false, true, true)),
new ReportMapping(MOD_ORDER, new Report(5, false, "Objednávka", "order", true, true)),
new ReportMapping(MOD_REQUIREMENTS, new Report(6, false, "Požadavky", "requirements")),
new ReportMapping(MOD_TRIPREQUIREMENTS, new Report(7, true, "Žádost o SC", "tripRequirementApp", false, true))
new ReportMapping(MOD_TRIPREQUIREMENTS, new Report(7, true, "Žádost o SC", "tripRequirementApp", false, true)),
new ReportMapping(MOD_REQUIREMENTS, new Report(8, true, "Protokol o kontrole", "orderRequirement", false, true))
};
public final static String REQTYPE_ORDER = "ORDER";

@ -475,6 +475,7 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
}
@Override
@Transactional
public boolean prepareSignData(T entity, Date approveDate) {
SignData data = new SignData();
sessionData.setProperty(Constants.KEY_SIGN_DATA, data);
@ -502,16 +503,24 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
data.setSignDate(approveDate);
data.setSigned(signedDocumentService.getItem(entityForSignReport(entity), report.getReportId()) != null);
if (getNextWorkflow(entity).getCentre()) { // viditelné podpisy lze pouze na urovni strediska
if (entity.getState() == RequirementState.NEW) {
data.setAreaId(1);
} else {
loadAuthItems(entity);
data.setAreaId(entity.getAuthorization().size() + 1);
int wgCount = 0;
for (Workflow wf : entity.getWorkflow()) {
if (!wf.getCentre()) {
++wgCount;
}
}
data.setAreaId(entity.getAuthorization().size() - wgCount + 1);
}
if (userService.getUserSettings().getSignatureFile() != null) {
data.setSignImg(storage.fileData(userService.getUserSettings().getSignatureFile()));
}
}
return true;
}

@ -0,0 +1,191 @@
<?xml version="1.0" encoding="UTF-8"?>
<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="orderRequirement" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="abff8784-0f6e-4a9a-bf8e-f2285ba6e75f">
<property name="ireport.zoom" value="2.0"/>
<property name="ireport.x" value="284"/>
<property name="ireport.y" value="0"/>
<parameter name="P_LOGO" class="java.lang.String"/>
<parameter name="P_MAIN_ADDRESS" class="java.lang.String"/>
<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["/home/pepa/Dokumenty/dev/java/isspst/"]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[]]>
</queryString>
<field name="authorization" class="java.util.List">
<fieldDescription><![CDATA[authorization]]></fieldDescription>
</field>
<field name="centre" class="info.bukova.isspst.data.Workgroup">
<fieldDescription><![CDATA[centre]]></fieldDescription>
</field>
<field name="items" class="java.util.List">
<fieldDescription><![CDATA[items]]></fieldDescription>
</field>
<field name="ownedBy" class="info.bukova.isspst.data.User">
<fieldDescription><![CDATA[ownedBy]]></fieldDescription>
</field>
<field name="numser" class="java.lang.String">
<fieldDescription><![CDATA[numser]]></fieldDescription>
</field>
<field name="reqDate" class="java.util.Date">
<fieldDescription><![CDATA[reqDate]]></fieldDescription>
</field>
<field name="sumTotal" class="java.math.BigDecimal">
<fieldDescription><![CDATA[sumTotal]]></fieldDescription>
</field>
<field name="workgroup" class="info.bukova.isspst.data.Workgroup">
<fieldDescription><![CDATA[workgroup]]></fieldDescription>
</field>
<field name="description" class="java.lang.String">
<fieldDescription><![CDATA[description]]></fieldDescription>
</field>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="54" splitType="Stretch">
<image onErrorType="Blank">
<reportElement uuid="692a2c5d-a058-4f16-8c03-dd0739d45ffb" x="0" y="0" width="100" height="54">
<printWhenExpression><![CDATA[$P{P_LOGO} != null]]></printWhenExpression>
</reportElement>
<imageExpression><![CDATA[$P{P_LOGO}]]></imageExpression>
</image>
<textField isBlankWhenNull="true">
<reportElement uuid="42aa4bd4-8b58-4e06-b7d9-ab3f1082b739" x="100" y="0" width="455" height="20"/>
<textElement textAlignment="Center">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression><![CDATA[$P{P_MAIN_ADDRESS}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="3672bded-2358-40b4-a0f3-037e7fc50fa3" x="100" y="20" width="455" height="20"/>
<textElement textAlignment="Center">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250"/>
</textElement>
<text><![CDATA[Protokol o předběžné kontrole]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band height="41" splitType="Stretch">
<textField>
<reportElement uuid="d1468362-4eba-425c-8534-f80eab528580" x="0" y="20" width="83" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{numser}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="b9b69697-354b-4cb0-a84c-a41fea872d15" x="0" y="0" width="83" height="20"/>
<textElement/>
<text><![CDATA[Poř. číslo]]></text>
</staticText>
<textField>
<reportElement uuid="09f38f15-b1e4-4975-997c-e70f19078c24" x="83" y="20" width="140" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[""+$F{centre}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="8e7dfc80-cdf7-4777-b0f2-35a98e02a339" x="223" y="20" width="140" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[""+$F{workgroup}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="2f5cd1fb-4f7e-4e9f-ba7c-b1f7b288a625" x="363" y="20" width="113" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[""+$F{ownedBy}]]></textFieldExpression>
</textField>
<textField pattern="dd. MM. yyyy">
<reportElement uuid="8eaf7add-3fe8-4115-9154-27c4b8904650" x="476" y="20" width="79" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{reqDate}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="01cebcaf-0e12-4a09-8956-590d45e19eef" x="83" y="0" width="140" height="20"/>
<textElement/>
<text><![CDATA[Středisko]]></text>
</staticText>
<staticText>
<reportElement uuid="17ac2428-7d56-411b-bcd9-7348df757b84" x="223" y="0" width="140" height="20"/>
<textElement/>
<text><![CDATA[Komise]]></text>
</staticText>
<staticText>
<reportElement uuid="f7790fa3-c39e-41ad-b94d-93c69afb14a9" x="363" y="0" width="113" height="20"/>
<textElement/>
<text><![CDATA[Vytvořil]]></text>
</staticText>
<staticText>
<reportElement uuid="93d65bd9-27b6-4952-a8eb-d57b14665d2b" x="476" y="0" width="79" height="20"/>
<textElement/>
<text><![CDATA[Datum]]></text>
</staticText>
<line>
<reportElement uuid="b93cc333-922f-404d-86d1-3af92064c807" x="0" y="40" width="555" height="1"/>
<graphicElement>
<pen lineStyle="Solid"/>
</graphicElement>
</line>
<line>
<reportElement uuid="f47cde5f-e0f7-4578-b3d7-4b1774284e0b" x="0" y="0" width="555" height="1"/>
</line>
<line>
<reportElement uuid="9ab3a189-c15e-4031-bc2e-ff329d4400c4" x="475" y="0" width="1" height="40"/>
</line>
<line>
<reportElement uuid="5c7c3117-8911-426d-ba2a-1b2ca842801d" x="362" y="0" width="1" height="40"/>
</line>
<line>
<reportElement uuid="a0968b35-779d-4b3c-9168-edfaa22e4cc3" x="554" y="0" width="1" height="40"/>
</line>
<line>
<reportElement uuid="2e919fcb-44aa-4a7a-bc86-8a6597f702e3" x="222" y="0" width="1" height="40"/>
</line>
<line>
<reportElement uuid="cf230cb5-d75e-41c5-8a26-5c65fdbddd82" x="82" y="0" width="1" height="40"/>
</line>
<line>
<reportElement uuid="da4a873e-2347-4362-9f29-59eb20b6d40b" x="-1" y="0" width="1" height="41"/>
</line>
</band>
</pageHeader>
<detail>
<band height="78" splitType="Stretch">
<subreport>
<reportElement uuid="6ba491d5-dc90-4be4-b70e-d7aae44ad3ce" x="0" y="4" width="554" height="73"/>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{items})]]></dataSourceExpression>
<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "orderRequirementItems.jasper"]]></subreportExpression>
</subreport>
</band>
</detail>
<summary>
<band height="72" splitType="Stretch">
<staticText>
<reportElement uuid="f170d5a4-9595-4aee-8b1f-dc761b603a40" x="-1" y="10" width="59" height="20"/>
<textElement/>
<text><![CDATA[Příkazce:]]></text>
</staticText>
<genericElement>
<reportElement uuid="af57c2c2-8459-4647-9506-cc900edad55a" x="61" y="0" width="148" height="42"/>
<genericElementType namespace="urn:sig:sig" name="signature"/>
<genericElementParameter name="index">
<valueExpression><![CDATA[1]]></valueExpression>
</genericElementParameter>
</genericElement>
<staticText>
<reportElement uuid="c33d945b-9a1e-456a-bf36-c3e761540b78" x="223" y="10" width="100" height="20"/>
<textElement/>
<text><![CDATA[Správce rozpočtu:]]></text>
</staticText>
<genericElement>
<reportElement uuid="13896576-2961-40c4-a186-b89f54676644" x="323" y="0" width="148" height="42"/>
<genericElementType namespace="urn:sig:sig" name="signature"/>
<genericElementParameter name="index">
<valueExpression><![CDATA[3]]></valueExpression>
</genericElementParameter>
</genericElement>
<staticText>
<reportElement uuid="f37ccd3c-f71f-4c6e-a850-a9699f73e867" x="-1" y="52" width="555" height="20"/>
<textElement/>
<text><![CDATA[Pověření pracovníci potvrzují svými podpisy provedení předběžné kontroly v souladu se zákonem č. 320/2001 Sb.]]></text>
</staticText>
</band>
</summary>
</jasperReport>

@ -0,0 +1,136 @@
<?xml version="1.0" encoding="UTF-8"?>
<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="orderRequirementItems" pageWidth="552" pageHeight="842" columnWidth="552" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="7908f48d-e554-48b1-b4dd-c11ef78facbd">
<property name="ireport.zoom" value="1.5"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="textItem" class="java.lang.String">
<fieldDescription><![CDATA[textItem]]></fieldDescription>
</field>
<field name="quantity" class="java.math.BigDecimal">
<fieldDescription><![CDATA[quantity]]></fieldDescription>
</field>
<field name="total" class="java.math.BigDecimal">
<fieldDescription><![CDATA[total]]></fieldDescription>
</field>
<field name="description" class="java.lang.String">
<fieldDescription><![CDATA[description]]></fieldDescription>
</field>
<variable name="sumTotal" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA[$F{total}]]></variableExpression>
</variable>
<background>
<band splitType="Stretch"/>
</background>
<columnHeader>
<band height="31" splitType="Stretch">
<staticText>
<reportElement uuid="a09b3d2e-cf95-4881-93c6-708e11b6c085" x="2" y="2" width="211" height="29"/>
<textElement verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<text><![CDATA[Text položky]]></text>
</staticText>
<staticText>
<reportElement uuid="1b89a66f-1905-4c2c-a60a-8c493f7a7d9d" x="215" y="2" width="61" height="29"/>
<textElement verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<text><![CDATA[Množství]]></text>
</staticText>
<staticText>
<reportElement uuid="b38f8df2-e54a-4245-a9cb-7620ce2136f2" x="276" y="2" width="77" height="29"/>
<textElement verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<text><![CDATA[Předpokládaná celková cena]]></text>
</staticText>
<staticText>
<reportElement uuid="9ee00ce3-4d8a-4383-be96-e92301bff873" x="353" y="2" width="199" height="29"/>
<textElement verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<text><![CDATA[Poznámka]]></text>
</staticText>
<line>
<reportElement uuid="2d2a338f-570f-476c-97b0-5c6dde159fbe" x="352" y="0" width="1" height="31"/>
</line>
<line>
<reportElement uuid="6a7b4ebd-13ff-4174-b7a7-5e2d52e4556a" x="551" y="0" width="1" height="31"/>
</line>
<line>
<reportElement uuid="23a1033c-ab45-41fa-8fe0-4b7266efec08" x="275" y="0" width="1" height="31"/>
</line>
<line>
<reportElement uuid="440059ef-8740-4aa7-9a9f-444331d74065" x="214" y="0" width="1" height="31"/>
</line>
<line>
<reportElement uuid="4d61086f-7725-4cf7-bba0-084f02a4f7d1" x="0" y="0" width="1" height="31"/>
</line>
<line>
<reportElement uuid="004f8f2d-a8e6-470b-b0ca-97df8d0f82f7" x="0" y="-1" width="552" height="1"/>
</line>
<line>
<reportElement uuid="939c6d77-7055-4443-8495-e0f9ef3c231f" x="1" y="30" width="550" height="1"/>
</line>
</band>
</columnHeader>
<detail>
<band height="21" splitType="Stretch">
<textField>
<reportElement uuid="5723f178-f940-4925-ad9a-1fa697eb49c7" x="2" y="0" width="211" height="20"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{textItem}]]></textFieldExpression>
</textField>
<textField pattern="###0.00;-###0.00">
<reportElement uuid="6ff7e0cc-488f-4195-bccc-69b3e155cc13" x="276" y="0" width="76" height="20"/>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{total}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="dd95129e-6e74-4421-86e4-35484ebccdb0" x="353" y="0" width="199" height="20"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{description}]]></textFieldExpression>
</textField>
<textField pattern="###0.00;-###0.00">
<reportElement uuid="557ae236-bf5e-44b3-ba24-84c68fbeb5c5" x="215" y="0" width="60" height="20"/>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{quantity}]]></textFieldExpression>
</textField>
<line>
<reportElement uuid="8c57dfc4-31ce-44d4-b7b1-879b52dfb0fa" x="0" y="20" width="552" height="1"/>
</line>
<line>
<reportElement uuid="ffd7b1b5-43a6-4514-b4f4-12c7ab88a240" x="0" y="0" width="1" height="20"/>
</line>
<line>
<reportElement uuid="a11c2dbf-c5ee-4149-bde7-02166952e438" x="214" y="0" width="1" height="20"/>
</line>
<line>
<reportElement uuid="ee379730-e4de-4d94-9089-5f1e1de0533c" x="275" y="0" width="1" height="20"/>
</line>
<line>
<reportElement uuid="7e562dde-1389-4dad-9dce-bc746cbf86e1" x="352" y="0" width="1" height="20"/>
</line>
<line>
<reportElement uuid="3f1e7aab-88dd-4a0c-9da2-3d20d93e1ace" x="551" y="0" width="1" height="20"/>
</line>
</band>
</detail>
<summary>
<band height="21" splitType="Stretch">
<textField pattern="###0.00;-###0.00">
<reportElement uuid="1d885404-1f6d-4249-ba4d-80ded0762cc8" x="276" y="0" width="76" height="20"/>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$V{sumTotal}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="078354a7-cce2-4bd5-9e2c-a410d73e23fc" x="215" y="0" width="61" height="20"/>
<textElement verticalAlignment="Middle"/>
<text><![CDATA[Celkem]]></text>
</staticText>
</band>
</summary>
</jasperReport>
Loading…
Cancel
Save