Připraveny podklady pro novou agendu "Podepsané dokumenty"
Vzhled agendy (grid/strom/...) zatím není znám. closes #222
This commit is contained in:
@@ -6,6 +6,7 @@ import info.bukova.isspst.data.PermissionType;
|
||||
import info.bukova.isspst.data.Requirement;
|
||||
import info.bukova.isspst.data.RequirementType;
|
||||
import info.bukova.isspst.data.Role;
|
||||
import info.bukova.isspst.data.SignedDocument;
|
||||
import info.bukova.isspst.data.TripBill;
|
||||
import info.bukova.isspst.data.TripBillApproval;
|
||||
import info.bukova.isspst.data.TripRequirement;
|
||||
@@ -86,6 +87,7 @@ public class Constants {
|
||||
public final static String MOD_ORDER = "ORDER";
|
||||
public final static String MOD_INVOICING = "INVOICING";
|
||||
public final static String MOD_SEARCH = "SEARCH";
|
||||
public final static String MOD_SIGNEDDOCS = "SIGNEDDOCS";
|
||||
public final static Module MODULES[] = {
|
||||
new Module(MOD_USERS, "Uživatelé", UserService.class),
|
||||
new Module(MOD_PERMISSIONS, "Práva", RoleService.class),
|
||||
@@ -103,6 +105,7 @@ public class Constants {
|
||||
new Module(MOD_ORDER, "Objednávky", OrderService.class),
|
||||
new Module(MOD_INVOICING, "Fakturace požadavků", InvoicingService.class),
|
||||
new Module(MOD_SEARCH, "Fulltextové vyhledávání", FullTextService.class, true, false),
|
||||
new Module(MOD_SIGNEDDOCS, "Podepsané dokumenty", SignedDocument.class, true, false),
|
||||
};
|
||||
|
||||
public final static String PERM_APPROVE = "PERM_APPROVE";
|
||||
@@ -130,16 +133,17 @@ public class Constants {
|
||||
new Permission(PERM_APPROVE, "Schválení", MOD_TRIPREQUIREMENTS, PermissionType.WORKGROUP),
|
||||
|
||||
new Permission(PERM_SEARCH, "Vyhledávat", MOD_SEARCH, PermissionType.GLOBAL),
|
||||
new Permission(PERM_READ, "Číst", MOD_SIGNEDDOCS, PermissionType.GLOBAL)
|
||||
};
|
||||
|
||||
public final static String DYNAMIC_REPORT_NAME = "Tabulková sestava";
|
||||
public final static ReportMapping REPORTS[] = {
|
||||
new ReportMapping(MOD_ADDRESSBOOK, new Report("Adresní karty", "address")),
|
||||
new ReportMapping(MOD_ADDRESSBOOK, new Report("Adresa", "address", false, true)),
|
||||
new ReportMapping(MOD_TRIPBILL, new Report("Žádost", "tripRequirement", false, true)),
|
||||
new ReportMapping(MOD_TRIPBILL, new Report("Vyúčtování", "tripBill", false, true, true)),
|
||||
new ReportMapping(MOD_ORDER, new Report("Objednávka", "order", true, true)),
|
||||
new ReportMapping(MOD_REQUIREMENTS, new Report("Požadavky", "requirements"))
|
||||
new ReportMapping(MOD_ADDRESSBOOK, new Report(1, false, "Adresní karty", "address")),
|
||||
new ReportMapping(MOD_ADDRESSBOOK, new Report(2, false, "Adresa", "address", false, true)),
|
||||
new ReportMapping(MOD_TRIPBILL, new Report(3, true, "Žádost", "tripRequirement", false, true)),
|
||||
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"))
|
||||
};
|
||||
|
||||
public final static String REQTYPE_ORDER = "ORDER";
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package info.bukova.isspst.dao;
|
||||
|
||||
import info.bukova.isspst.data.SignedDocument;
|
||||
|
||||
public interface SignedDocumentDao extends BaseDao<SignedDocument> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package info.bukova.isspst.dao.jpa;
|
||||
|
||||
import info.bukova.isspst.dao.SignedDocumentDao;
|
||||
import info.bukova.isspst.data.SignedDocument;
|
||||
|
||||
public class SignedDocumentDaoJPA extends BaseDaoJPA<SignedDocument> implements SignedDocumentDao {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package info.bukova.isspst.data;
|
||||
|
||||
import info.bukova.isspst.Constants;
|
||||
import info.bukova.isspst.Module;
|
||||
import info.bukova.isspst.StringUtils;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "SIGNED_DOCUMENTS")
|
||||
public class SignedDocument extends BaseData {
|
||||
|
||||
@Column(name = "MODULE_NAME", length = Constants.LEN_TEXT)
|
||||
private String moduleName;
|
||||
|
||||
@Column(name = "RECORD_ID")
|
||||
private int recordId;
|
||||
|
||||
@Column(name = "NUMSER", length = Constants.LEN_TEXT)
|
||||
private String numser;
|
||||
|
||||
@Column(name = "DESCRIPTION", length = Constants.LEN_DESCRIPTION)
|
||||
private String description;
|
||||
|
||||
@Column(name = "SIGN_DATE")
|
||||
private Date signDate;
|
||||
|
||||
public String getModuleName() {
|
||||
return moduleName;
|
||||
}
|
||||
|
||||
public void setModuleName(String moduleName) {
|
||||
this.moduleName = moduleName;
|
||||
}
|
||||
|
||||
public int getRecordId() {
|
||||
return recordId;
|
||||
}
|
||||
|
||||
public void setRecordId(int recordId) {
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public String getNumser() {
|
||||
return numser;
|
||||
}
|
||||
|
||||
public void setNumser(String numser) {
|
||||
this.numser = numser;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Date getSignDate() {
|
||||
return signDate;
|
||||
}
|
||||
|
||||
public void setSignDate(Date signDate) {
|
||||
this.signDate = signDate;
|
||||
}
|
||||
|
||||
public String getAgendaName() {
|
||||
|
||||
if (StringUtils.isNullOrEmpty(this.moduleName)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
for (Module m : Constants.MODULES) {
|
||||
if (m.getId() == this.moduleName) {
|
||||
return m.getName();
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package info.bukova.isspst.data;
|
||||
|
||||
import info.bukova.isspst.Constants;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "SIGNED_DOCUMENTS_ITEMS")
|
||||
public class SignedDocumentItem {
|
||||
|
||||
@Id
|
||||
@Column(name = "ID")
|
||||
@GeneratedValue
|
||||
private int id;
|
||||
|
||||
@Column(name = "REPORT_ID")
|
||||
private int reportId;
|
||||
|
||||
@Column(name = "REPORT_NAME", length = Constants.LEN_TEXT)
|
||||
private String reportName;
|
||||
|
||||
@Column(name = "FILENAME", length = Constants.LEN_TEXT)
|
||||
private String fileName;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "SIGNED_DOCUMENT_ID")
|
||||
private SignedDocument signedDocument;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getReportId() {
|
||||
return reportId;
|
||||
}
|
||||
|
||||
public void setReportId(int reportId) {
|
||||
this.reportId = reportId;
|
||||
}
|
||||
|
||||
public String getReportName() {
|
||||
return reportName;
|
||||
}
|
||||
|
||||
public void setReportName(String reportName) {
|
||||
this.reportName = reportName;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public SignedDocument getSignedDocument() {
|
||||
return signedDocument;
|
||||
}
|
||||
|
||||
public void setSignedDocument(SignedDocument signedDocument) {
|
||||
this.signedDocument = signedDocument;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,8 @@ package info.bukova.isspst.reporting;
|
||||
public class Report {
|
||||
|
||||
private ReportType type;
|
||||
private long reportId;
|
||||
private boolean signable;
|
||||
private String name;
|
||||
private String jasperFile;
|
||||
private boolean hasSettings;
|
||||
@@ -11,53 +13,65 @@ public class Report {
|
||||
private boolean hasCondition;
|
||||
|
||||
public Report() {
|
||||
this.reportId = 0;
|
||||
this.signable = false;
|
||||
hasSettings = false;
|
||||
singleRecord = false;
|
||||
hasCondition = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reportId
|
||||
* @param signable
|
||||
* @param name
|
||||
* @param jasperFile
|
||||
*/
|
||||
public Report(String name, String jasperFile) {
|
||||
public Report(long reportId, boolean signable, String name, String jasperFile) {
|
||||
this();
|
||||
this.type = ReportType.DEFINED;
|
||||
this.reportId = reportId;
|
||||
this.signable = signable;
|
||||
this.name = name;
|
||||
this.jasperFile = jasperFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reportId
|
||||
* @param signable
|
||||
* @param name
|
||||
* @param jasperFile
|
||||
* @param hasSettings
|
||||
*/
|
||||
public Report(String name, String jasperFile, boolean hasSettings) {
|
||||
this(name, jasperFile);
|
||||
public Report(long reportId, boolean signable, String name, String jasperFile, boolean hasSettings) {
|
||||
this(reportId, signable, name, jasperFile);
|
||||
this.hasSettings = hasSettings;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reportId
|
||||
* @param signable
|
||||
* @param name
|
||||
* @param jasperFile
|
||||
* @param hasSettings
|
||||
* @param singleRecord
|
||||
*/
|
||||
public Report(String name, String jasperFile, boolean hasSettings, boolean singleRecord) {
|
||||
this(name, jasperFile, hasSettings);
|
||||
public Report(long reportId, boolean signable, String name, String jasperFile, boolean hasSettings, boolean singleRecord) {
|
||||
this(reportId, signable, name, jasperFile, hasSettings);
|
||||
this.singleRecord = singleRecord;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param reportId
|
||||
* @param signable
|
||||
* @param name
|
||||
* @param jasperFile
|
||||
* @param hasSettings
|
||||
* @param singleRecord
|
||||
* @param hasCondition
|
||||
*/
|
||||
public Report(String name, String jasperFile, boolean hasSettings, boolean singleRecord, boolean hasCondition) {
|
||||
this(name, jasperFile, hasSettings, singleRecord);
|
||||
public Report(long reportId, boolean signable, String name, String jasperFile, boolean hasSettings, boolean singleRecord, boolean hasCondition) {
|
||||
this(reportId, signable, name, jasperFile, hasSettings, singleRecord);
|
||||
this.hasCondition = hasCondition;
|
||||
}
|
||||
|
||||
@@ -108,4 +122,20 @@ public class Report {
|
||||
public void setHasCondition(boolean hasCondition) {
|
||||
this.hasCondition = hasCondition;
|
||||
}
|
||||
|
||||
public long getReportId() {
|
||||
return reportId;
|
||||
}
|
||||
|
||||
public void setReportId(long reportId) {
|
||||
this.reportId = reportId;
|
||||
}
|
||||
|
||||
public boolean isSignable() {
|
||||
return signable;
|
||||
}
|
||||
|
||||
public void setSignable(boolean signable) {
|
||||
this.signable = signable;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package info.bukova.isspst.services.signeddocs;
|
||||
|
||||
import info.bukova.isspst.data.SignedDocument;
|
||||
import info.bukova.isspst.services.Service;
|
||||
|
||||
public interface SignedDocumentService extends Service<SignedDocument> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package info.bukova.isspst.services.signeddocs;
|
||||
|
||||
import info.bukova.isspst.data.SignedDocument;
|
||||
import info.bukova.isspst.services.AbstractOwnedService;
|
||||
|
||||
public class SignedDocumentServiceImpl extends AbstractOwnedService<SignedDocument> implements SignedDocumentService {
|
||||
}
|
||||
@@ -36,5 +36,7 @@
|
||||
<mapping class="info.bukova.isspst.data.FileMetainfo"></mapping>
|
||||
<mapping class="info.bukova.isspst.data.FileContent"></mapping>
|
||||
<mapping class="info.bukova.isspst.data.TripBillApproval"></mapping>
|
||||
<mapping class="info.bukova.isspst.data.SignedDocument"></mapping>
|
||||
<mapping class="info.bukova.isspst.data.SignedDocumentItem"></mapping>
|
||||
</session-factory>
|
||||
</hibernate-configuration>
|
||||
@@ -1,5 +1,6 @@
|
||||
# Default file
|
||||
AppName=Objednávkový systém SPŠ Třebíč
|
||||
AppName=Informační systém SPŠ Třebíč
|
||||
AgendaSignedDocuments=Podepsané dokumenty
|
||||
|
||||
AgendaActRequirements=Aktuální požadavky
|
||||
AgendaRequirementsHistory=Ukončené požadavky
|
||||
|
||||
@@ -273,6 +273,10 @@
|
||||
<property name="sessionFactory" ref="sessionFactory"/>
|
||||
</bean>
|
||||
|
||||
<bean id="signedDocumentDao" class="info.bukova.isspst.dao.jpa.SignedDocumentDaoJPA">
|
||||
<property name="sessionFactory" ref="sessionFactory"/>
|
||||
</bean>
|
||||
|
||||
<!-- Business logic -->
|
||||
<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>
|
||||
|
||||
@@ -453,4 +457,7 @@
|
||||
<property name="dao" ref="tripBillApprovalDao"/>
|
||||
</bean>
|
||||
|
||||
<bean id="signedDocumentService" class="info.bukova.isspst.services.signeddocs.SignedDocumentServiceImpl">
|
||||
<property name="dao" ref="signedDocumentDao"/>
|
||||
</bean>
|
||||
</beans>
|
||||
|
||||
@@ -61,6 +61,12 @@
|
||||
<menuseparator />
|
||||
<menu label="${labels.Lists}">
|
||||
<menupopup>
|
||||
<menuitem
|
||||
image="/img/adobe-016.png"
|
||||
label="${labels.AgendaSignedDocuments}"
|
||||
href="/lists/signeddocs/"
|
||||
disabled="${not sec:isAllGranted('PERM_READ_SIGNEDDOCS')}" />
|
||||
<menuseparator />
|
||||
<menuitem
|
||||
image="/img/palet-024.png"
|
||||
label="${labels.AgendaMaterial}"
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 803 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,10 @@
|
||||
<?page title="${labels.AgendaSignedDocuments}" contentType="text/html;charset=UTF-8"?>
|
||||
<zk>
|
||||
|
||||
<zscript>
|
||||
String gridZul = "grid.zul";
|
||||
</zscript>
|
||||
|
||||
<include src="/app/template.zhtml"/>
|
||||
|
||||
</zk>
|
||||
Reference in New Issue
Block a user