-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
U3X-979: Add stock Item Reference UI in the OWA (#8)
* U3X-979: Add stock Item Reference UI in the OWA * esuring that its editable * Removing duplication saving * Esnure that Stock source and code are unique per stock source * Removing deleted * adding uuid to reference table
- Loading branch information
Showing
19 changed files
with
1,109 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
api/src/main/java/org/openmrs/module/stockmanagement/api/dto/StockItemReferenceDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
package org.openmrs.module.stockmanagement.api.dto; | ||
|
||
public class StockItemReferenceDTO { | ||
|
||
private Integer id; | ||
|
||
private String uuid; | ||
|
||
private boolean voided; | ||
|
||
private String referenceCode; | ||
|
||
private int stockSourceId; | ||
|
||
private String stockSourceUuid; | ||
|
||
private String stockSourceName; | ||
|
||
private int stockItemId; | ||
|
||
private String stockItemUuid; | ||
|
||
public Integer getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Integer id) { | ||
this.id = id; | ||
} | ||
|
||
public String getUuid() { | ||
return uuid; | ||
} | ||
|
||
public void setUuid(String uuid) { | ||
this.uuid = uuid; | ||
} | ||
|
||
public boolean isVoided() { | ||
return voided; | ||
} | ||
|
||
public void setVoided(boolean voided) { | ||
this.voided = voided; | ||
} | ||
|
||
public String getReferenceCode() { | ||
return referenceCode; | ||
} | ||
|
||
public void setReferenceCode(String referenceCode) { | ||
this.referenceCode = referenceCode; | ||
} | ||
|
||
public int getStockSourceId() { | ||
return stockSourceId; | ||
} | ||
|
||
public void setStockSourceId(int stockSourceId) { | ||
this.stockSourceId = stockSourceId; | ||
} | ||
|
||
public String getStockSourceUuid() { | ||
return stockSourceUuid; | ||
} | ||
|
||
public void setStockSourceUuid(String stockSourceUuid) { | ||
this.stockSourceUuid = stockSourceUuid; | ||
} | ||
|
||
public String getStockSourceName() { | ||
return stockSourceName; | ||
} | ||
|
||
public void setStockSourceName(String stockSourceName) { | ||
this.stockSourceName = stockSourceName; | ||
} | ||
|
||
public int getStockItemId() { | ||
return stockItemId; | ||
} | ||
|
||
public void setStockItemId(int stockItemId) { | ||
this.stockItemId = stockItemId; | ||
} | ||
|
||
public String getStockItemUuid() { | ||
return stockItemUuid; | ||
} | ||
|
||
public void setStockItemUuid(String stockItemUuid) { | ||
this.stockItemUuid = stockItemUuid; | ||
} | ||
|
||
} |
133 changes: 133 additions & 0 deletions
133
.../main/java/org/openmrs/module/stockmanagement/api/dto/StockItemReferenceSearchFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
package org.openmrs.module.stockmanagement.api.dto; | ||
|
||
import java.util.List; | ||
|
||
public class StockItemReferenceSearchFilter { | ||
|
||
private String uuid; | ||
|
||
private List<String> stockItemUuids; | ||
|
||
private List<Integer> stockItemIds; | ||
|
||
private boolean includeVoided; | ||
|
||
private boolean includeDispensingUnit; | ||
|
||
private Integer startIndex; | ||
|
||
private Integer limit; | ||
|
||
public String getUuid() { | ||
return uuid; | ||
} | ||
|
||
public void setUuid(String uuid) { | ||
this.uuid = uuid; | ||
} | ||
|
||
public List<String> getStockItemUuids() { | ||
return stockItemUuids; | ||
} | ||
|
||
public void setStockItemUuids(List<String> stockItemUuids) { | ||
this.stockItemUuids = stockItemUuids; | ||
} | ||
|
||
public List<Integer> getStockItemIds() { | ||
return stockItemIds; | ||
} | ||
|
||
public void setStockItemIds(List<Integer> stockItemIds) { | ||
this.stockItemIds = stockItemIds; | ||
} | ||
|
||
public boolean isIncludeVoided() { | ||
return includeVoided; | ||
} | ||
|
||
public boolean getIncludeVoided() { | ||
return includeVoided; | ||
} | ||
|
||
public void setIncludeVoided(boolean includeVoided) { | ||
this.includeVoided = includeVoided; | ||
} | ||
|
||
public Integer getStartIndex() { | ||
return startIndex; | ||
} | ||
|
||
public void setStartIndex(Integer startIndex) { | ||
this.startIndex = startIndex; | ||
} | ||
|
||
public Integer getLimit() { | ||
return limit; | ||
} | ||
|
||
public void setLimit(Integer limit) { | ||
this.limit = limit; | ||
} | ||
|
||
public boolean includingDispensingUnit() { | ||
return includeDispensingUnit; | ||
} | ||
|
||
public void setIncludeDispensingUnit(boolean includeDispensingUnit) { | ||
this.includeDispensingUnit = includeDispensingUnit; | ||
} | ||
|
||
public static class ItemGroupFilter { | ||
|
||
private Integer stockItemId; | ||
|
||
private List<Integer> packagingUomIds; | ||
|
||
public ItemGroupFilter() { | ||
} | ||
|
||
public ItemGroupFilter(Integer stockItemId, List<Integer> packagingUomIds) { | ||
this.stockItemId = stockItemId; | ||
this.packagingUomIds = packagingUomIds; | ||
} | ||
|
||
public Integer getStockItemId() { | ||
return stockItemId; | ||
} | ||
|
||
public void setStockItemId(Integer stockItemId) { | ||
this.stockItemId = stockItemId; | ||
} | ||
|
||
public List<Integer> getPackagingUomIds() { | ||
return packagingUomIds; | ||
} | ||
|
||
public void setPackagingUomIds(List<Integer> packagingUomIds) { | ||
this.packagingUomIds = packagingUomIds; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) | ||
return true; | ||
if (o == null || getClass() != o.getClass()) | ||
return false; | ||
|
||
ItemGroupFilter that = (ItemGroupFilter) o; | ||
|
||
if (stockItemId != null ? !stockItemId.equals(that.stockItemId) : that.stockItemId != null) | ||
return false; | ||
return !(packagingUomIds != null ? !packagingUomIds.equals(that.packagingUomIds) : that.packagingUomIds != null); | ||
|
||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = stockItemId != null ? stockItemId.hashCode() : 0; | ||
result = 31 * result + (packagingUomIds != null ? packagingUomIds.hashCode() : 0); | ||
return result; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.