Commit pr pr_p1 reports

This commit is contained in:
Dimitris 2021-01-13 13:03:01 +02:00
parent f36e7d7dc6
commit f53ead952a
1 changed files with 11 additions and 4 deletions

View File

@ -9,16 +9,24 @@ import java.util.List;
* Created by tsampikos on 31/10/2016. * Created by tsampikos on 31/10/2016.
*/ */
public class ItemPerformance { public class ItemPerformance {
private Period period; private Period period;
private List<Instance> instances = new ArrayList<>(); private List<Instance> instances = new ArrayList<>();
public ItemPerformance() { public ItemPerformance() {
} }
public ItemPerformance(String start, String end, String ft_count, String abstr) { public ItemPerformance(String start, String end, String ft_count,
String abstr) {
period = new Period(start, end); period = new Period(start, end);
instances.add(new Instance("Total_Items_Requests", ft_count)); if (ft_count != null && abstr != null) {
instances.add(new Instance("Total_Items_Investigations", abstr)); instances.add(new Instance("Total_Items_Requests", ft_count));
instances.add(new Instance("Total_Items_Investigations", abstr));
}
else if(ft_count != null && abstr == null )
instances.add(new Instance("Total_Items_Requests", ft_count));
else if(ft_count == null && abstr != null )
instances.add(new Instance("Total_Items_Investigations",abstr));
} }
@JsonProperty("Period") @JsonProperty("Period")
@ -30,7 +38,6 @@ public class ItemPerformance {
// public String getCategory() { // public String getCategory() {
// return "Requests"; // return "Requests";
// } // }
@JsonProperty("Instance") @JsonProperty("Instance")
public List<Instance> getInstance() { public List<Instance> getInstance() {
return instances; return instances;