Pro org.codehaus.castor přidána vazba na xercesImpl.
Implicitní plnění měrných jednotek. Příprava položek pro nové požadavky. Logování událostí probíhá od úrovně warning. Logování hibernate dotazů deaktivováno. refs #100multitenant
							parent
							
								
									dd369c5186
								
							
						
					
					
						commit
						b633309b74
					
				@ -0,0 +1,136 @@
 | 
				
			|||||||
 | 
					package info.bukova.isspst.data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.math.BigDecimal;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import javax.persistence.Column;
 | 
				
			||||||
 | 
					import javax.persistence.Embedded;
 | 
				
			||||||
 | 
					import javax.persistence.Entity;
 | 
				
			||||||
 | 
					import javax.persistence.FetchType;
 | 
				
			||||||
 | 
					import javax.persistence.GeneratedValue;
 | 
				
			||||||
 | 
					import javax.persistence.Id;
 | 
				
			||||||
 | 
					import javax.persistence.JoinColumn;
 | 
				
			||||||
 | 
					import javax.persistence.ManyToOne;
 | 
				
			||||||
 | 
					import javax.persistence.Table;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Entity
 | 
				
			||||||
 | 
					@Table(name = "REQUIREMENT_ITEMS")
 | 
				
			||||||
 | 
					public class RequirementItem
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						@Id
 | 
				
			||||||
 | 
						@Column(name="ID")
 | 
				
			||||||
 | 
					    @GeneratedValue
 | 
				
			||||||
 | 
						private int id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@ManyToOne(fetch = FetchType.LAZY)
 | 
				
			||||||
 | 
						@JoinColumn(name = "REQSUBJECT_ID")
 | 
				
			||||||
 | 
						private RequirementSubject reqSubject;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@Column(name = "CODE")
 | 
				
			||||||
 | 
						private String code;
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						@Column(name = "NAME")
 | 
				
			||||||
 | 
						private String name;
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						@Column(name = "QUANTITY", precision=15, scale=4)
 | 
				
			||||||
 | 
						private BigDecimal quantity;
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						@Embedded
 | 
				
			||||||
 | 
						private MUnitEmb mUnit;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@Column(name = "UNITPRICE", precision=15, scale=4)
 | 
				
			||||||
 | 
						private BigDecimal unitPrice;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@Column(name = "TOTAL", precision=15, scale=4)
 | 
				
			||||||
 | 
						private BigDecimal total;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@Column(name = "DESCRIPTION")
 | 
				
			||||||
 | 
						private String description;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public int getId()
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							return id;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setId(int id)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							this.id = id;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public RequirementSubject getReqSubject()
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							return reqSubject;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setReqSubject(RequirementSubject reqSubject)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							this.reqSubject = reqSubject;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public String getCode()
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							return code;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setCode(String code)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							this.code = code;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public String getName()
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							return name;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setName(String name)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							this.name = name;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public BigDecimal getQuantity()
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							return quantity;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setQuantity(BigDecimal quantity)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							this.quantity = quantity;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public MUnitEmb getMUnit() {
 | 
				
			||||||
 | 
							return mUnit;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setMUnit(MUnitEmb mUnit) {
 | 
				
			||||||
 | 
							this.mUnit = mUnit;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public BigDecimal getUnitPrice()
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							return unitPrice;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setUnitPrice(BigDecimal unitPrice)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							this.unitPrice = unitPrice;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public BigDecimal getTotal()
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							return total;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setTotal(BigDecimal total)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							this.total = total;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public String getDescription()
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							return description;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setDescription(String description)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							this.description = description;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,82 @@
 | 
				
			|||||||
 | 
					package info.bukova.isspst.ui.requirements;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import info.bukova.isspst.data.Material;
 | 
				
			||||||
 | 
					import info.bukova.isspst.data.ServiceItem;
 | 
				
			||||||
 | 
					import info.bukova.isspst.services.reqsubjects.MaterialService;
 | 
				
			||||||
 | 
					import info.bukova.isspst.services.reqsubjects.ServiceItemService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.zkoss.bind.annotation.Command;
 | 
				
			||||||
 | 
					import org.zkoss.bind.annotation.Init;
 | 
				
			||||||
 | 
					import org.zkoss.zk.ui.select.annotation.WireVariable;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class SelectItems
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						@WireVariable
 | 
				
			||||||
 | 
						private MaterialService materialService;
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						@WireVariable
 | 
				
			||||||
 | 
						private ServiceItemService serviceItemService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						private List<Material> materialList;
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						private List<ServiceItem> serviceItemList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						private Material selectedMaterial;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						private ServiceItem selectedServiceItem;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@Init
 | 
				
			||||||
 | 
						public void init()
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							this.setMaterialList(materialService.getAll());
 | 
				
			||||||
 | 
							this.setServiceItemList(serviceItemService.getAll());
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public List<Material> getMaterialList()
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							return materialList;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setMaterialList(List<Material> materialList)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							this.materialList = materialList;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public List<ServiceItem> getServiceItemList()
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							return serviceItemList;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setServiceItemList(List<ServiceItem> serviceItemList)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							this.serviceItemList = serviceItemList;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public Material getSelectedMaterial()
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							return selectedMaterial;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setSelectedMaterial(Material selectedMaterial)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							this.selectedMaterial = selectedMaterial;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public ServiceItem getSelectedServiceItem()
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							return selectedServiceItem;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setSelectedServiceItem(ServiceItem selectedServiceItem)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							this.selectedServiceItem = selectedServiceItem;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						@Command
 | 
				
			||||||
 | 
						public void addItem()
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							//this
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,108 @@
 | 
				
			|||||||
 | 
					<?page title="${labels.AddItem}" contentType="text/html;charset=UTF-8"?>
 | 
				
			||||||
 | 
					<zk>
 | 
				
			||||||
 | 
						<window
 | 
				
			||||||
 | 
							id="selectItemsWnd"
 | 
				
			||||||
 | 
							closable="true"
 | 
				
			||||||
 | 
							border="normal"
 | 
				
			||||||
 | 
							position="center"
 | 
				
			||||||
 | 
							apply="org.zkoss.bind.BindComposer"
 | 
				
			||||||
 | 
							viewModel="@id('vm') @init('info.bukova.isspst.ui.requirements.SelectItems')">
 | 
				
			||||||
 | 
							<caption
 | 
				
			||||||
 | 
								src="/img/item-add.png"
 | 
				
			||||||
 | 
								zclass="form-caption"
 | 
				
			||||||
 | 
								label="${labels.AddItem}" />
 | 
				
			||||||
 | 
							<vlayout>
 | 
				
			||||||
 | 
								<tabbox
 | 
				
			||||||
 | 
									id="tabboxItems"
 | 
				
			||||||
 | 
									hflex="1">
 | 
				
			||||||
 | 
									<tabs>
 | 
				
			||||||
 | 
										<tab
 | 
				
			||||||
 | 
											id="tabMaterial"
 | 
				
			||||||
 | 
											label="${labels.AgendaMaterial}"
 | 
				
			||||||
 | 
											image="/img/material.png" />
 | 
				
			||||||
 | 
										<tab
 | 
				
			||||||
 | 
											id="tabService"
 | 
				
			||||||
 | 
											label="${labels.AgendaServices}"
 | 
				
			||||||
 | 
											image="/img/service.png" />
 | 
				
			||||||
 | 
									</tabs>
 | 
				
			||||||
 | 
									<tabpanels>
 | 
				
			||||||
 | 
										<tabpanel>
 | 
				
			||||||
 | 
											<listbox
 | 
				
			||||||
 | 
												model="@load(vm.materialList)"
 | 
				
			||||||
 | 
												selectedItem="@bind(vm.selectedMaterial)">
 | 
				
			||||||
 | 
												<listhead menupopup="auto">
 | 
				
			||||||
 | 
													<listheader
 | 
				
			||||||
 | 
														label="${labels.code}"
 | 
				
			||||||
 | 
														sort="czech(code)"
 | 
				
			||||||
 | 
														width="10%" />
 | 
				
			||||||
 | 
													<listheader
 | 
				
			||||||
 | 
														label="${labels.name}"
 | 
				
			||||||
 | 
														sort="czech(name)"
 | 
				
			||||||
 | 
														width="25%" />
 | 
				
			||||||
 | 
													<listheader
 | 
				
			||||||
 | 
														label="${labels.description}"
 | 
				
			||||||
 | 
														sort="czech(description)"
 | 
				
			||||||
 | 
														width="55%" />
 | 
				
			||||||
 | 
													<listheader
 | 
				
			||||||
 | 
														label="${labels.munit}"
 | 
				
			||||||
 | 
														width="10%" />
 | 
				
			||||||
 | 
												</listhead>
 | 
				
			||||||
 | 
												<template name="model">
 | 
				
			||||||
 | 
													<listitem>
 | 
				
			||||||
 | 
														<listcell label="@load(each.code)" />
 | 
				
			||||||
 | 
														<listcell label="@load(each.name)" />
 | 
				
			||||||
 | 
														<listcell label="@load(each.description)" />
 | 
				
			||||||
 | 
														<listcell label="@load(each.munit.code)" />
 | 
				
			||||||
 | 
													</listitem>
 | 
				
			||||||
 | 
												</template>
 | 
				
			||||||
 | 
											</listbox>
 | 
				
			||||||
 | 
										</tabpanel>
 | 
				
			||||||
 | 
										<tabpanel>
 | 
				
			||||||
 | 
											<listbox
 | 
				
			||||||
 | 
												model="@load(vm.serviceItemList)"
 | 
				
			||||||
 | 
												selectedItem="@bind(vm.selectedServiceItem)">
 | 
				
			||||||
 | 
												<listhead menupopup="auto">
 | 
				
			||||||
 | 
													<listheader
 | 
				
			||||||
 | 
														label="${labels.code}"
 | 
				
			||||||
 | 
														sort="czech(code)"
 | 
				
			||||||
 | 
														width="10%" />
 | 
				
			||||||
 | 
													<listheader
 | 
				
			||||||
 | 
														label="${labels.name}"
 | 
				
			||||||
 | 
														sort="czech(name)"
 | 
				
			||||||
 | 
														width="30%" />
 | 
				
			||||||
 | 
													<listheader
 | 
				
			||||||
 | 
														label="${labels.description}"
 | 
				
			||||||
 | 
														sort="czech(description)"
 | 
				
			||||||
 | 
														width="60%" />
 | 
				
			||||||
 | 
												</listhead>
 | 
				
			||||||
 | 
												<template name="model">
 | 
				
			||||||
 | 
													<listitem>
 | 
				
			||||||
 | 
														<listcell label="@load(each.code)" />
 | 
				
			||||||
 | 
														<listcell label="@load(each.name)" />
 | 
				
			||||||
 | 
														<listcell label="@load(each.description)" />
 | 
				
			||||||
 | 
													</listitem>
 | 
				
			||||||
 | 
												</template>
 | 
				
			||||||
 | 
											</listbox>
 | 
				
			||||||
 | 
										</tabpanel>
 | 
				
			||||||
 | 
									</tabpanels>
 | 
				
			||||||
 | 
								</tabbox>
 | 
				
			||||||
 | 
							</vlayout>
 | 
				
			||||||
 | 
							<vlayout>
 | 
				
			||||||
 | 
								<div
 | 
				
			||||||
 | 
									hflex="max"
 | 
				
			||||||
 | 
									align="right">
 | 
				
			||||||
 | 
									<button
 | 
				
			||||||
 | 
										image="~./zul/img/misc/drag-disallow.png"
 | 
				
			||||||
 | 
										label="${labels.ButtonStorno}"
 | 
				
			||||||
 | 
										onClick="selectItemsWnd.detach()"
 | 
				
			||||||
 | 
										sclass="nicebutton" />
 | 
				
			||||||
 | 
									<button
 | 
				
			||||||
 | 
										image="/img/item-add.png"
 | 
				
			||||||
 | 
										label="${labels.AddItem}"
 | 
				
			||||||
 | 
										onClick="@command('addItem', window=selectItemsWnd)"
 | 
				
			||||||
 | 
										disabled="false"
 | 
				
			||||||
 | 
										sclass="nicebutton" />
 | 
				
			||||||
 | 
								</div>
 | 
				
			||||||
 | 
							</vlayout>
 | 
				
			||||||
 | 
						</window>
 | 
				
			||||||
 | 
					</zk>
 | 
				
			||||||
					Loading…
					
					
				
		Reference in New Issue