diff --git a/src/main/java/info/bukova/isspst/services/requirement/TripRequirementService.java b/src/main/java/info/bukova/isspst/services/requirement/TripRequirementService.java index cd44cea2..e116f223 100644 --- a/src/main/java/info/bukova/isspst/services/requirement/TripRequirementService.java +++ b/src/main/java/info/bukova/isspst/services/requirement/TripRequirementService.java @@ -10,6 +10,8 @@ public interface TripRequirementService extends RequirementBaseService result = q.list(); + + if (result.size() > 0) { + return result.get(0); + } + + return null; + } + @Override @Transactional public List getBills(TripRequirement entity) { diff --git a/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementForm.java b/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementForm.java index a38524d6..70b35615 100644 --- a/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementForm.java +++ b/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementForm.java @@ -26,7 +26,7 @@ import org.zkoss.zul.Window; import java.util.List; -public class TripRequirementForm extends FormViewModel { +public class TripRequirementForm extends FormWithUpload { @WireVariable private UserService userService;