Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions ISO_ADM_Exporter/output/0/TASKDATA/LINKLIST.XML
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<LNK A="PDT1" B="Product.Name|3230Enlist" />
<LNK A="PDT1" B="Product.BrandName|Beck's" />
<LNK A="PDT1" B="Product.VarietyName|3230Enlist" />
<LNK A="PDT1" B="Product.GTIN|" />
<LNK A="PDT1" B="Product.Classification.Type|Crop" />
<LNK A="PDT1" B="Product.Classification.Codes.1.CropType|Soybeans" />
<LNK A="PDT1" B="Product.Classification.Codes.1.ListAgencyId|USDA" />
Expand All @@ -31,6 +32,7 @@
<LNK A="PDT2" B="Product.Name|3510Enlist" />
<LNK A="PDT2" B="Product.BrandName|Beck's" />
<LNK A="PDT2" B="Product.VarietyName|3510Enlist" />
<LNK A="PDT2" B="Product.GTIN|" />
<LNK A="PDT2" B="Product.Classification.Type|Crop" />
<LNK A="PDT2" B="Product.Classification.Codes.1.CropType|Soybeans" />
<LNK A="PDT2" B="Product.Classification.Codes.1.ListAgencyId|USDA" />
Expand All @@ -51,6 +53,7 @@
<LNK A="PDT3" B="Product.Name|XL 6081AM " />
<LNK A="PDT3" B="Product.BrandName|Beck's" />
<LNK A="PDT3" B="Product.VarietyName|XL 6081AM " />
<LNK A="PDT3" B="Product.GTIN|" />
<LNK A="PDT3" B="Product.Classification.Type|Crop" />
<LNK A="PDT3" B="Product.Classification.Codes.1.CropType|Corn" />
<LNK A="PDT3" B="Product.Classification.Codes.1.ListAgencyId|USDA" />
Expand All @@ -71,6 +74,7 @@
<LNK A="PDT4" B="Product.Name|XL 6241QR " />
<LNK A="PDT4" B="Product.BrandName|Beck's" />
<LNK A="PDT4" B="Product.VarietyName|XL 6241QR " />
<LNK A="PDT4" B="Product.GTIN|" />
<LNK A="PDT4" B="Product.Classification.Type|Crop" />
<LNK A="PDT4" B="Product.Classification.Codes.1.CropType|Corn" />
<LNK A="PDT4" B="Product.Classification.Codes.1.ListAgencyId|USDA" />
Expand All @@ -91,6 +95,7 @@
<LNK A="PDT5" B="Product.Name|6374VT2P B" />
<LNK A="PDT5" B="Product.BrandName|Beck's" />
<LNK A="PDT5" B="Product.VarietyName|6374VT2P B" />
<LNK A="PDT5" B="Product.GTIN|" />
<LNK A="PDT5" B="Product.Classification.Type|Crop" />
<LNK A="PDT5" B="Product.Classification.Codes.1.CropType|Corn" />
<LNK A="PDT5" B="Product.Classification.Codes.1.ListAgencyId|USDA" />
Expand All @@ -111,6 +116,7 @@
<LNK A="PDT6" B="Product.Name|6414VT2P B" />
<LNK A="PDT6" B="Product.BrandName|Beck's" />
<LNK A="PDT6" B="Product.VarietyName|6414VT2P B" />
<LNK A="PDT6" B="Product.GTIN|" />
<LNK A="PDT6" B="Product.Classification.Type|Crop" />
<LNK A="PDT6" B="Product.Classification.Codes.1.Corn|C" />
<LNK A="PDT6" B="Product.Classification.Codes.1.ListAgencyId|AGIIS" />
Expand All @@ -129,6 +135,7 @@
<LNK A="PDT7" B="Product.Name|3830Enlist" />
<LNK A="PDT7" B="Product.BrandName|Beck's" />
<LNK A="PDT7" B="Product.VarietyName|3830Enlist" />
<LNK A="PDT7" B="Product.GTIN|" />
<LNK A="PDT7" B="Product.Classification.Type|Crop" />
<LNK A="PDT7" B="Product.Classification.Codes.1.CropType|Soybeans" />
<LNK A="PDT7" B="Product.Classification.Codes.1.ListAgencyId|USDA" />
Expand All @@ -149,6 +156,7 @@
<LNK A="PDT8" B="Product.Name|4320Enlist" />
<LNK A="PDT8" B="Product.BrandName|Beck's" />
<LNK A="PDT8" B="Product.VarietyName|4320Enlist" />
<LNK A="PDT8" B="Product.GTIN|" />
<LNK A="PDT8" B="Product.Classification.Type|Crop" />
<LNK A="PDT8" B="Product.Classification.Codes.1.CropType|Soybeans" />
<LNK A="PDT8" B="Product.Classification.Codes.1.ListAgencyId|USDA" />
Expand All @@ -169,6 +177,7 @@
<LNK A="PDT9" B="Product.Name|4030Enlist" />
<LNK A="PDT9" B="Product.BrandName|Beck's" />
<LNK A="PDT9" B="Product.VarietyName|4030Enlist" />
<LNK A="PDT9" B="Product.GTIN|" />
<LNK A="PDT9" B="Product.Classification.Type|Crop" />
<LNK A="PDT9" B="Product.Classification.Codes.1.CropType|Soybeans" />
<LNK A="PDT9" B="Product.Classification.Codes.1.ListAgencyId|USDA" />
Expand All @@ -188,6 +197,7 @@
<LNK A="PDT10" B="Product.Name|3030Enlist" />
<LNK A="PDT10" B="Product.BrandName|Beck's" />
<LNK A="PDT10" B="Product.VarietyName|3030Enlist" />
<LNK A="PDT10" B="Product.GTIN|" />
<LNK A="PDT10" B="Product.Classification.Type|Crop" />
<LNK A="PDT10" B="Product.Classification.Codes.1.CropType|Soybeans" />
<LNK A="PDT10" B="Product.Classification.Codes.1.ListAgencyId|USDA" />
Expand All @@ -208,6 +218,7 @@
<LNK A="PDT11" B="Product.Name|4030Enlist" />
<LNK A="PDT11" B="Product.BrandName|Beck's" />
<LNK A="PDT11" B="Product.VarietyName|4030Enlist" />
<LNK A="PDT11" B="Product.GTIN|" />
<LNK A="PDT11" B="Product.Classification.Type|Crop" />
<LNK A="PDT11" B="Product.Classification.Codes.1.CropType|Soybeans" />
<LNK A="PDT11" B="Product.Classification.Codes.1.ListAgencyId|USDA" />
Expand All @@ -228,6 +239,7 @@
<LNK A="PDT12" B="Product.Name|A6544" />
<LNK A="PDT12" B="Product.BrandName|AgriGold" />
<LNK A="PDT12" B="Product.VarietyName|A6544" />
<LNK A="PDT12" B="Product.GTIN|" />
<LNK A="PDT12" B="Product.Classification.Type|Crop" />
<LNK A="PDT12" B="Product.Classification.Codes.1.CropType|Corn" />
<LNK A="PDT12" B="Product.Classification.Codes.1.ListAgencyId|USDA" />
Expand All @@ -246,6 +258,7 @@
<LNK A="PDT13" B="Product.Name|A64516" />
<LNK A="PDT13" B="Product.BrandName|AgriGold" />
<LNK A="PDT13" B="Product.VarietyName|A64516" />
<LNK A="PDT13" B="Product.GTIN|" />
<LNK A="PDT13" B="Product.Classification.Type|Crop" />
<LNK A="PDT13" B="Product.Classification.Codes.1.CropType|Corn" />
<LNK A="PDT13" B="Product.Classification.Codes.1.ListAgencyId|USDA" />
Expand All @@ -264,6 +277,7 @@
<LNK A="PDT14" B="Product.Name|A64259" />
<LNK A="PDT14" B="Product.BrandName|AgriGold" />
<LNK A="PDT14" B="Product.VarietyName|A64259" />
<LNK A="PDT14" B="Product.GTIN|" />
<LNK A="PDT14" B="Product.Classification.Type|Crop" />
<LNK A="PDT14" B="Product.Classification.Codes.1.CropType|Corn" />
<LNK A="PDT14" B="Product.Classification.Codes.1.ListAgencyId|USDA" />
Expand Down
2 changes: 1 addition & 1 deletion ISO_ADM_Exporter/output/0/TASKDATA/TASKDATA.XML
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ISO11783_TaskData VersionMajor="4" VersionMinor="2" ManagementSoftwareManufacturer="AgGateway" ManagementSoftwareVersion="1.0" TaskControllerManufacturer="" TaskControllerVersion="" DataTransferOrigin="1">
<!--Export created 5/1/2025 10:45:19 PM-->
<!--Export created 6/12/2025 8:49:53 PM-->
<PGP A="PGP1" B="CropType" C="2" />
<CTP A="CTP1" B="Soybeans" C="PGP1">
<CVT A="CVT1" B="3230Enlist-E22388816X" C="PDT1" />
Expand Down
Binary file modified ISO_ADM_Exporter/output/0/adm/Catalog.adm
Binary file not shown.
1 change: 1 addition & 0 deletions ISO_ADM_Exporter/output/1/TASKDATA/LINKLIST.XML
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<LNK A="PDT1" B="Product.Name|CP2585" />
<LNK A="PDT1" B="Product.BrandName|CROPLAN" />
<LNK A="PDT1" B="Product.VarietyName|VT2P/RIB" />
<LNK A="PDT1" B="Product.GTIN|00888346580291" />
<LNK A="PDT1" B="Product.PerPackageQuantity|55" />
<LNK A="PDT1" B="Product.PerPackageQuantity.UOM|LB" />
<LNK A="PDT1" B="Product.Classification.Type|Crop" />
Expand Down
2 changes: 1 addition & 1 deletion ISO_ADM_Exporter/output/1/TASKDATA/TASKDATA.XML
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ISO11783_TaskData VersionMajor="4" VersionMinor="2" ManagementSoftwareManufacturer="AgGateway" ManagementSoftwareVersion="1.0" TaskControllerManufacturer="" TaskControllerVersion="" DataTransferOrigin="1">
<!--Export created 5/1/2025 10:45:20 PM-->
<!--Export created 6/12/2025 8:49:53 PM-->
<PGP A="PGP1" B="CropType" C="2" />
<CTP A="CTP1" B="Corn" C="PGP1">
<CVT A="CVT1" B="CP2585-769MXJ4JX" C="PDT1" />
Expand Down
Binary file modified ISO_ADM_Exporter/output/1/adm/Catalog.adm
Binary file not shown.
24 changes: 11 additions & 13 deletions ShippedItemInstancePlugin/Mapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -529,23 +529,30 @@ private List<ContextItem> CreateProductContextItems(ShippedItemInstance shippedI
{
contextItems.Add(CreateContextItem("Product.Type", shippedItemInstance.TypeCode));
}
if (shippedItemInstance.Item.Description != null)
if (shippedItemInstance.Item?.Description != null)
{
contextItems.Add(CreateContextItem("Product.Description", shippedItemInstance.Item.Description));
}
if (shippedItemInstance.Item.ProductName != null)
if (shippedItemInstance.Item?.ProductName != null)
{
contextItems.Add(CreateContextItem("Product.Name", shippedItemInstance.Item.ProductName));
}
if (shippedItemInstance.Item.BrandName != null)
if (shippedItemInstance.Item?.BrandName != null)
{
contextItems.Add(CreateContextItem("Product.BrandName", shippedItemInstance.Item.BrandName));
}
if (shippedItemInstance.Item.VarietyName != null)
if (shippedItemInstance.Item?.VarietyName != null)
{
contextItems.Add(CreateContextItem("Product.VarietyName", shippedItemInstance.Item.VarietyName));
}

// gtin -- should I add this to unique identifer on product?

if (shippedItemInstance.Item?.Gtinid != null)
{
contextItems.Add(CreateContextItem("Product.GTIN", shippedItemInstance.Item.Gtinid));
}

// item perPackage quantity, e.g., weight of a bag
//
if (shippedItemInstance.Item?.Packaging?.PerPackageQuantity?.Content != null &&
Expand Down Expand Up @@ -641,15 +648,6 @@ private void SetManufacturerAndBrand(ShippedItemInstance shippedItemInstance, Pr
// it appears that the Add method generates the Id.ReferenceId
product.BrandId = brandName.Id.ReferenceId;

// map to contentItems
//
// gtin , add this to unique identifer on product?
//
var gtin = shippedItemInstance.Item.Gtinid;
_logger.LogInformation("GTIN = " + gtin);
//
// Where is gtin used?
//
// create a colleciton of Product components and add substatnce to it
// var productComponents = shippedItemInstance.Item.ItemTreatment.Substance.FirstOrDefault(s => s.Name = )
// product.ProductComponents = shippedItemInstance.Item.ItemTreatment.Substance
Expand Down
Loading