BU Bayer
This commit is contained in:
@@ -28,7 +28,7 @@ import com.univocity.parsers.csv.CsvWriterSettings;
|
||||
public class ToolboxImportFileGenerator {
|
||||
private static Logger log = Logger.getLogger(ToolboxImportFileGenerator.class);
|
||||
|
||||
private static String toolboxExportFilePath = "C:\\Temp\\Migration CS - SQL Server\\export-2017-08-15.csv";
|
||||
private static String toolboxExportFilePath = "C:\\Temp\\Migration CS - SQL Server\\auszug.csv";
|
||||
private static String importFilePath = "C:\\Temp\\Migration CS - SQL Server\\importFile.csv";
|
||||
|
||||
private static final Map<String, String> brandMap;
|
||||
@@ -314,7 +314,7 @@ public class ToolboxImportFileGenerator {
|
||||
|
||||
|
||||
unitMap = new HashMap<String, String>();
|
||||
unitMap.put("Bayer/General", "Crop Protection");
|
||||
unitMap.put("Bayer/General", "Bayer");
|
||||
unitMap.put("National Tradeshow", "Crop Protection");
|
||||
unitMap.put("Absolute", "Crop Protection");
|
||||
unitMap.put("Absolute Maxx", "Crop Protection");
|
||||
@@ -1130,19 +1130,19 @@ public class ToolboxImportFileGenerator {
|
||||
if (asset.byr_cs_businessUnit == null) {
|
||||
asset.byr_cs_businessUnit = unitMap.get(brandMap.get(line[14]));
|
||||
}
|
||||
else if (!asset.byr_cs_businessUnit.equals(unitMap.get(brandMap.get(line[14])))) {
|
||||
|
||||
String assignedBrands = "";
|
||||
for (String brand : asset.brands) {
|
||||
if (assignedBrands.length() > 0)
|
||||
assignedBrands += ", ";
|
||||
assignedBrands += brand;
|
||||
}
|
||||
|
||||
// else if (!asset.byr_cs_businessUnit.equals(unitMap.get(brandMap.get(line[14])))) {
|
||||
//
|
||||
// String assignedBrands = "";
|
||||
// for (String brand : asset.brands) {
|
||||
// if (assignedBrands.length() > 0)
|
||||
// assignedBrands += ", ";
|
||||
// assignedBrands += brand;
|
||||
// }
|
||||
//
|
||||
// log.error("Asset " + asset.toolboxAssetId + ": Additional brand " + brandMap.get(line[14]) + " ("
|
||||
// + unitMap.get(brandMap.get(line[14])) + ") does not belong to business unit " + asset.byr_cs_businessUnit
|
||||
// + " of already assigned brand(s) " + assignedBrands);
|
||||
}
|
||||
// }
|
||||
|
||||
// Indications stored in POJO for reference only. Indications are added to classifications in readToolboxExport()
|
||||
if (indicationMap.get(line[14]) != null)
|
||||
|
||||
Reference in New Issue
Block a user