Skip to content

Commit

Permalink
#121 | Remove numberOfDistributions
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayvenu committed Apr 23, 2024
1 parent f0d365c commit ae4da20
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public interface DistributionConstants {
String DISTRIBUTED_TO = "Distributed to";
String INVENTORY_ID = "Inventory Id";
String TYPE_OF_MATERIAL = "Type Of Material";
String NUMBER_OF_DISTRIBUTIONS = "Number of distributions";
String QUANTITY = "Quantity";
String UNIT = "Unit";
String ACTIVITIES_DONE = "Activities Done";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"sourceId",
"distributedTo",
"implementationInventoryId",
"numberOfdistributions",
"quantity",
"unit"
})
Expand All @@ -22,35 +21,31 @@ public class DistributionLine {
private String distributedTo;
@JsonProperty("implementationInventoryId")
private String implementationInventoryId;
@JsonProperty("numberOfdistributions")
private int numberofdistributions;
@JsonProperty("quantity")
private int quantity;
@JsonProperty("unit")
private String unit;

/**
* No args constructor for use in serialization
*
*
*/
public DistributionLine() {
}

/**
*
*
* @param sourceId
* @param distributedTo
* @param quantity
* @param unit
* @param implementationInventoryId
* @param numberofdistributions
*/
public DistributionLine(String sourceId, String distributedTo, String implementationInventoryId, int numberofdistributions, int quantity, String unit) {
public DistributionLine(String sourceId, String distributedTo, String implementationInventoryId, int quantity, String unit) {
super();
this.sourceId = sourceId;
this.distributedTo = distributedTo;
this.implementationInventoryId = implementationInventoryId;
this.numberofdistributions = numberofdistributions;
this.quantity = quantity;
this.unit = unit;
}
Expand Down Expand Up @@ -79,14 +74,6 @@ public String getimplementationInventoryId() {
public void setimplementationInventoryId(String implementationInventoryId) {
this.implementationInventoryId = implementationInventoryId;
}
@JsonProperty("numberOfdistributions")
public int getNumberofdistributions() {
return numberofdistributions;
}
@JsonProperty("numberOfdistributions")
public void setNumberofdistributions(int numberofdistributions) {
this.numberofdistributions = numberofdistributions;
}
@JsonProperty("quantity")
public int getQuantity() {
return quantity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,8 @@ private DistributionLine createDistributionLine(HashMap<String, Object> entry, S
String sourceId = getSourceId(subject.getUuid(), inventoryExternalId);
String distributedTo = (String) entry.get(DISTRIBUTED_TO);
String unit = (String) inventorySubject.getObservation(UNIT);
int noOfDistributions = (Integer) entry.get(NUMBER_OF_DISTRIBUTIONS);
int quantity = (Integer) entry.get(QUANTITY);
return new DistributionLine(sourceId, distributedTo, inventoryExternalId, noOfDistributions, quantity, unit);
return new DistributionLine(sourceId, distributedTo, inventoryExternalId, quantity, unit);
}

private List<DistributionActivities> fetchActivities(Subject subject) {
Expand Down

0 comments on commit ae4da20

Please sign in to comment.