GenericOrdersDataset
contact -215 line
//---- Adding the Product --//
addColumn(new SummaryColumnEssenceBuilder("productSummary")
.displayName("Product Summary")
.objectName(PRODUCT_CODES)
.type([Link]).build()
.setMultilineReport(false))
.hideFromColumnSelection(true);
addColumn(new StringColumnEssenceBuilder("productTypee")
.displayName("Product Type")
.objectName(PRODUCT_CODES)
.field("[Link]").build())
.groupable(true).displayColumn("productSummary")
.hideFromColumnSelection(true);
addColumn(new EnumColumnEssenceBuilder("productValuee")
.objectName(PRODUCT_CODES)
.field("[Link]")
.displayName("Product Value").build().groupable(true)
.allowMultipleValues(true).displayColumn("ProductSummary")
.hideFromColumnSelection(true).possibleValues(
[Link]([Link]())
.map(t -> new EnumValue([Link](),
[Link]()))
.collect([Link]())));
addColumn(new StringColumn("VP", "VP",
"Vendor Part Number", false, true).hideFromColumnSelection(true));
addColumn(new StringColumn("BP", "BP",
"Buyer Part Number", false, true).hideFromColumnSelection(true));
//-------------------------//
[Link]
709
[Link](first);
//-- code for product identifier
if ([Link]("VP")) {
ArrayList<Map<String, Object>> newList = new ArrayList<>();
for (ReportDataGroupChunk chunk : chunks) {
for (Map<String, Object> item : [Link]()) {
List<Map<String, String>> productCodes = (List<Map<String,
String>>) [Link](
"[Link]");
//-- For-each loop for iteration
HashMap<String, String> hashMap = new HashMap<>();
for (Map<String, String> mp : productCodes) {
[Link]([Link]("value"), [Link]("type"));
}
Map<String, List<String>> prodMap =
[Link]().stream().collect([Link](
[Link]::getValue,
[Link]([Link]::getKey, [Link]())));
//-- Start VP put --//
[Link]("prodmap get vp -- " +
[Link]("VP"));
if ([Link]("VP") != null) {
for (String oneVP : [Link]("VP")) {
[Link]("one each VP -- " + oneVP);
LinkedHashMap<String, Object> newItem = new
LinkedHashMap<>();
[Link](item);
[Link]("[Link]");
[Link]("productCodesSummary");
[Link]("VP", oneVP);
[Link]("BP", "");
[Link](newItem);
}
}
//-- End VP put ---//
//-- Start BP put --//
if ([Link]("BP") != null) {
for (String oneBP : [Link]("BP")) {
[Link]("one each BP -- " + oneBP);
LinkedHashMap<String, Object> newItem = new
LinkedHashMap<>();
[Link](item);
[Link]("[Link]");
[Link]("productCodesSummary");
[Link]("VP", "");
[Link]("BP", oneBP);
[Link](newItem);
}
}
//-- End BP put ---//
//-- code end
// -- end code of pi --//
}
[Link](newList);
//}
//for (ReportDataGroupChunk chunk : chunks) {
for (Map<String, Object> newItm : [Link]()) {
[Link](newItm, orderedColumns);
}
}
[Link]("productSummary");
} else {
// -- If not Order Identifier
for (ReportDataGroupChunk chunk : chunks) {
for (Map<String, Object> newItm : [Link]()) {
[Link](newItm, orderedColumns);
}
}
}
[Link](groupName, [Link]());