7.0.0.17: Korrektur für nicht gemappte Waste Code Typen

This commit is contained in:
Daniel Schick 2022-03-29 09:02:25 +02:00
parent b7f651fe34
commit 57849a776d
2 changed files with 18 additions and 17 deletions

View File

@ -36,8 +36,8 @@
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion> <MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish> <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage> <WebPage>publish.html</WebPage>
<ApplicationRevision>16</ApplicationRevision> <ApplicationRevision>17</ApplicationRevision>
<ApplicationVersion>7.0.0.16</ApplicationVersion> <ApplicationVersion>7.0.0.17</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted> <PublishWizardCompleted>true</PublishWizardCompleted>

View File

@ -1180,18 +1180,6 @@ namespace ENI2.Excel
} }
waste.WasteType = (int?) reader.ReadNumber(wasteCode); waste.WasteType = (int?) reader.ReadNumber(wasteCode);
// falls ein altes Sheet eingelesen wird, diese Felder automatisch mappen
if (waste.WasteType == 1100) waste.WasteType = 102;
if (waste.WasteType == 1200) waste.WasteType = 101;
if (waste.WasteType == 1300) waste.WasteType = 999;
if (waste.WasteType == 2100) waste.WasteType = 502;
if (waste.WasteType == 2200) waste.WasteType = 501;
if (waste.WasteType == 2300) waste.WasteType = 503;
if (waste.WasteType == 2311) waste.WasteType = 504;
if (waste.WasteType == 2308) waste.WasteType = 505;
if (waste.WasteType == 2313) waste.WasteType = 506;
if (waste.WasteType == 2309) waste.WasteType = 507;
if (waste.WasteType == 3000) waste.WasteType = 401;
// Waste description Spezialfälle für DK // Waste description Spezialfälle für DK
waste.WasteDescription = reader.ReadText(wasteDescription); waste.WasteDescription = reader.ReadText(wasteDescription);
@ -1226,6 +1214,19 @@ namespace ENI2.Excel
waste.WasteType = 2300; waste.WasteType = 2300;
} }
// falls ein altes Sheet eingelesen wird, diese Felder automatisch mappen
if (waste.WasteType == 1100) waste.WasteType = 102;
if (waste.WasteType == 1200) waste.WasteType = 101;
if (waste.WasteType == 1300) waste.WasteType = 999;
if (waste.WasteType == 2100) waste.WasteType = 502;
if (waste.WasteType == 2200) waste.WasteType = 501;
if (waste.WasteType == 2300) waste.WasteType = 503;
if (waste.WasteType == 2311) waste.WasteType = 504;
if (waste.WasteType == 2308) waste.WasteType = 505;
if (waste.WasteType == 2313) waste.WasteType = 506;
if (waste.WasteType == 2309) waste.WasteType = 507;
if (waste.WasteType == 3000) waste.WasteType = 401;
waste.WasteDisposalAmount_MTQ = reader.ReadNumberDefaultZero(wasteAmount); waste.WasteDisposalAmount_MTQ = reader.ReadNumberDefaultZero(wasteAmount);
waste.WasteCapacity_MTQ = reader.ReadNumberDefaultZero(wasteCapacity); waste.WasteCapacity_MTQ = reader.ReadNumberDefaultZero(wasteCapacity);
waste.WasteAmountRetained_MTQ = reader.ReadNumberDefaultZero(wasteRetained); waste.WasteAmountRetained_MTQ = reader.ReadNumberDefaultZero(wasteRetained);
@ -1239,7 +1240,7 @@ namespace ENI2.Excel
waste.WasteAmountGeneratedTillNextPort_MTQ = reader.ReadNumberDefaultZero(amountGen); waste.WasteAmountGeneratedTillNextPort_MTQ = reader.ReadNumberDefaultZero(amountGen);
if (!waste.WasteType.HasValue) if (!waste.WasteType.HasValue || (waste.WasteType > 999))
{ {
was.Waste.Remove(waste); was.Waste.Remove(waste);
} }