Oprava merge.

Verze_2.0
Josef Rokos 10 years ago
parent e01e32f10c
commit 42deec695a

@ -10,6 +10,8 @@ public interface TripRequirementService extends RequirementBaseService<TripRequi
public void loadPassangers(TripRequirement entity);
public TripBill getTripBill(TripRequirement requirement);
/**
* Vrátí seznam vyúčtování, která josu vázána k požadavku
*

@ -1,13 +1,15 @@
package info.bukova.isspst.services.requirement;
import info.bukova.isspst.Constants;
import info.bukova.isspst.data.*;
import info.bukova.isspst.data.NumberSeries;
import info.bukova.isspst.data.RequirementState;
import info.bukova.isspst.data.TripBill;
import info.bukova.isspst.data.TripRequirement;
import info.bukova.isspst.data.User;
import info.bukova.isspst.services.LazyLoader;
import info.bukova.isspst.services.tripbill.TripBillService;
import info.bukova.isspst.services.workgroups.WorkgroupService;
import java.util.Date;
import org.hibernate.Hibernate;
import org.hibernate.LazyInitializationException;
import org.hibernate.Query;
import org.springframework.beans.factory.annotation.Autowired;
@ -71,6 +73,20 @@ public class TripRequirementServiceImpl extends RequirementBaseServiceImpl<TripR
}
}
@Override
@Transactional
public TripBill getTripBill(TripRequirement requirement) {
Query q = dao.getQuery("from TripBill tb where tb.requirement = :req");
q.setParameter("req", requirement);
List<TripBill> result = q.list();
if (result.size() > 0) {
return result.get(0);
}
return null;
}
@Override
@Transactional
public List<TripBill> getBills(TripRequirement entity) {

@ -26,7 +26,7 @@ import org.zkoss.zul.Window;
import java.util.List;
public class TripRequirementForm extends FormViewModel<TripRequirement> {
public class TripRequirementForm extends FormWithUpload<TripRequirement> {
@WireVariable
private UserService userService;

Loading…
Cancel
Save