|
|
|
@ -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) {
|
|
|
|
|