airs-1432
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| airs-1432 [2019/02/04 13:56] – [TODO] kalaschnikow | airs-1432 [2019/02/21 15:56] (current) – [Merge 20190206] kalaschnikow | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== AIRS-1432 Add " | ||
| + | [[https:// | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | ===== Spezifikation ===== | ||
| + | |||
| + | ==== Kurzbeschreibung mit eigenen Worten ==== | ||
| + | |||
| + | Abhängig vom Flag (CustomsRequired bzw. UXDimensionRequired) in der DA zugrundeliegenden Nachricht (PO oder VMI) müssen bestimmte Felder beim Import / Upload geprüft werden. Wenn das Flag auf true steht, müssen die Felder gefüllt sein. | ||
| + | |||
| + | * CustomsRequired | ||
| + | * Customs Value (ElementaryUnits.ElementaryUnit.CustomsValue -> TAG_UE_CUSTOMS_VALUE, | ||
| + | * Customs Value UOM (-> Currency of Customs value) (ElementaryUnits.ElementaryUnit.Currency -> TAG_UE_CURRENCY, | ||
| + | * Net weight (ElementaryUnits.ElementaryUnit.NetWeight -> TAG_UE_NETWEIGHT, | ||
| + | * Net weight UOM (ElementaryUnits.ElementaryUnit.NetWeightUOM -> TAG_UE_NETWEIGHT_UOM, | ||
| + | * Country of Origin (ElementaryUnits.ElementaryUnit.CountryOfOrigin -> TAG_UE_COUNTRY_OF_ORIGIN, | ||
| + | * UXDimensionRequired | ||
| + | * Packaging Type (Positions.Position.UXType (?), CSV name) | ||
| + | * Gross Weight (Positions.Position.GrossWeight, | ||
| + | * Gross Weight UoM (Positions.Position.GrossWeightUOM, | ||
| + | * Length (Positions.Position.Length, | ||
| + | * Length UoM (-> | ||
| + | * Width (Positions.Position.Width, | ||
| + | * Width UoM (-> | ||
| + | * Height (Positions.Position., | ||
| + | * Height UoM (-> | ||
| + | * Dimensions UoM (Positions.Position.DimensionsUOM, | ||
| + | * Stackable Goods (Positions.Position.StackableGoods, | ||
| + | * Hazardous Goods (Positions.Position.HazardousGoods, | ||
| + | * Special Instructions (Positions.Position.SpecialInstructions, | ||
| + | * Total Value (Positions.Position.TotalValue, | ||
| + | * Currency (Positions.Position.Currency, | ||
| + | |||
| + | Bei UX Dimensions müssen nicht immer alle Felder Pflichtfelder sein, sondern man muss schauen wie das Feld konfiguriert ist. Der Code kann sich wahrscheinlich an den von der UI anlehnen. | ||
| + | |||
| + | Zusätzlich muss geprüft werden: | ||
| + | |||
| + | * ob die UoM Werte vom System akzeptiert werden (sie müssen in einer " | ||
| + | * ob DimensionsUOM Werte bei einer UX alle gleich sind (LengthUOM==WidthUOM && LengthUOM==HeightUOM) | ||
| + | |||
| + | |||
| + | Außerdem müssen die eingehenden(? | ||
| + | |||
| + | CSV Upload Spec ist in dem Task [[https:// | ||
| + | ==== Fragen an Saskia ==== | ||
| + | |||
| + | * Welche Felder genau (4 oder 5?)? -> Spec wird erweitert um die genaue Liste. | ||
| + | * Zitat aus Confluence zu AIRS-1433: "CSV message contains the five new fields: Customs Value, Customs Value UOM, Net weight, Net weight UOM, country of origin" | ||
| + | * Burkhard: Customs Value UOM -> UnitOfMeasure? | ||
| + | * UxDimensions müssen jetzt wohl auch geprüft werden? | ||
| + | * Ja? -> Ja | ||
| + | * Welche Felder? -> Spec wird erweitert um die genaue Liste. | ||
| + | * Welches Flag? -> UEModel.uxDimensionsRequired | ||
| + | * Wo in der CSV-Nachricht müssen die Felder stehen? | ||
| + | * Task AIRS-1433 ? -> wird von Saskia spezifiziert | ||
| + | |||
| + | |||
| + | ===== TODO ===== | ||
| + | * **-** DA XML Import | ||
| + | * **-** Import | ||
| + | * **+** Implement | ||
| + | * **-** Test | ||
| + | * **-** Wenn alle Felder befüllt sind, dann landen sie auch alle in der DB | ||
| + | * **-** Wenn CustomsRequired auf true steht, prüft die Anwendung, ob die entsprechenden Felder befüllt sind: | ||
| + | * **-** CustomsRequired steht auf true, und alle Felder sind befüllt (positiv) | ||
| + | * **-** CustomsRequired steht auf true, aber keins von diesen Feldern ist befüllt (negativ) | ||
| + | * **-** CustomsRequired steht auf true, aber eins von diesen Feldern ist nicht befüllt | ||
| + | * **-** Customs Value | ||
| + | * **-** Customs Value UOM | ||
| + | * **-** Net weight | ||
| + | * **-** Net weight UOM | ||
| + | * **-** Country of Origin | ||
| + | * **-** Wenn UXDimensionRequired auf true steht, prüft die Anwendung ob die entsprechenden Felder befüllt sind: | ||
| + | * **-** UXDimensionRequired steht auf true, und alle Felder sind befüllt (positiv) | ||
| + | * **-** UXDimensionRequired steht auf true, aber keins von diesen Feldern ist befüllt (negativ) | ||
| + | * **-** UXDimensionRequired steht auf true, aber eins von diesen Feldern ist nicht befüllt | ||
| + | * **-** Packaging type | ||
| + | * **-** Gross weight | ||
| + | * **-** Gross weight UOM | ||
| + | * **-** Length | ||
| + | * **-** Length UOM | ||
| + | * **-** Width | ||
| + | * **-** Width UOM | ||
| + | * **-** Height | ||
| + | * **-** Height UOM | ||
| + | * **-** Stackable goods | ||
| + | * **-** Hazardous goods | ||
| + | * **-** Special instructions | ||
| + | * **-** Total value | ||
| + | * **-** Currency | ||
| + | * **-** UoM Konsistenztests | ||
| + | * **-** UoM enthält validen Wert | ||
| + | * **-** Customs Value UOM | ||
| + | * **-** Net weight UOM | ||
| + | * **-** Gross weight UOM | ||
| + | * **-** Dimensions (Length, Width, Height) UOM | ||
| + | * **-** UoM enthält unerlaubten Wert | ||
| + | * **-** Customs Value UOM | ||
| + | * **-** Net weight UOM | ||
| + | * **-** Gross weight UOM | ||
| + | * **-** Dimensions (Length, Width, Height) UOM | ||
| + | * **x** Alle dimension UoMs enthalten gleichen Wert -> im Falle vom XML Import automatisch erfüllt | ||
| + | * **-** UoM Umrechnung | ||
| + | * **+** Implement | ||
| + | * **-** Test | ||
| + | * **-** DA CSV Upload | ||
| + | * **-** Import | ||
| + | * **-** Implement | ||
| + | * **-** ... | ||
| + | * **-** Implement the proper fields order | ||
| + | * **-** Check if all weight/ | ||
| + | * **-** Test | ||
| + | * **-** Wenn alle Felder befüllt sind, dann landen sie auch alle in der DB | ||
| + | * **-** Wenn CustomsRequired auf true steht, prüft die Anwendung ob die entsprechenden Felder befüllt sind: | ||
| + | * **-** CustomsRequired steht auf true, und alle Felder sind befüllt (positiv) | ||
| + | * **-** CustomsRequired steht auf true, aber keins von diesen Feldern ist befüllt (negativ) | ||
| + | * **-** CustomsRequired steht auf true, aber eins von diesen Feldern ist nicht befüllt | ||
| + | * **-** Customs Value | ||
| + | * **-** Customs Value UOM | ||
| + | * **-** Net weight | ||
| + | * **-** Net weight UOM | ||
| + | * **-** Country of Origin | ||
| + | * **-** Wenn UXDimensionRequired auf true steht, prüft die Anwendung ob die entsprechenden Felder befüllt sind: | ||
| + | * **-** UXDimensionRequired steht auf true, und alle Felder sind befüllt (positiv) | ||
| + | * **-** UXDimensionRequired steht auf true, aber keins von diesen Feldern ist befüllt (negativ) | ||
| + | * **-** UXDimensionRequired steht auf true, aber eins von diesen Feldern ist nicht befüllt | ||
| + | * **-** Packaging type | ||
| + | * **-** Gross weight | ||
| + | * **-** Gross weight UOM | ||
| + | * **-** Length | ||
| + | * **-** Length UOM | ||
| + | * **-** Width | ||
| + | * **-** Width UOM | ||
| + | * **-** Height | ||
| + | * **-** Height UOM | ||
| + | * **-** Stackable goods | ||
| + | * **-** Hazardous goods | ||
| + | * **-** Special instructions | ||
| + | * **-** Total value | ||
| + | * **-** Currency | ||
| + | * **-** UoM Konsistenztests | ||
| + | * **-** UoM enthält validen Wert | ||
| + | * **-** Customs Value UOM | ||
| + | * **-** Net weight UOM | ||
| + | * **-** Gross weight UOM | ||
| + | * **-** Dimensions (Length, Width, Height) UOM | ||
| + | * **-** UoM enthält unerlaubten Wert | ||
| + | * **-** Customs Value UOM | ||
| + | * **-** Net weight UOM | ||
| + | * **-** Gross weight UOM | ||
| + | * **-** Dimensions (Length, Width, Height) UOM | ||
| + | * **-** Alle dimension UoMs enthalten gleichen Wert | ||
| + | * **-** Alle dimension UoMs enthalten gleichen Wert | ||
| + | * **-** Eins von dimension UoMs enthält einen anderen Wert | ||
| + | * **-** UoM Umrechnung | ||
| + | * **-** Implement | ||
| + | * **-** Test | ||
| + | * **-** Flags mit SO-Order (sellside) rausschicken | ||
| + | * **+** Implement | ||
| + | * **-** Test | ||
| + | * **-** Flags mit VMI (sellside) rausschicken | ||
| + | * **+** Implement | ||
| + | * **-** Test | ||
| + | |||
| + | ==== Original ==== | ||
| + | * **-** DA: | ||
| + | * **-** M2M Boost sellside validated against the CustomsRequired and or the UXDimensionRequired flag | ||
| + | * **-** M2M CSV sellside validated against the CustomsRequired and or the UXDimensionRequired flag | ||
| + | * **-** Upload CSV files are validated against the CustomsRequired and or the UXDimensionRequired flag | ||
| + | * **-** PO: | ||
| + | * **-** CustomsRequired and UXDimensionRequired flag are sent to the CSV suppliers | ||
| + | * **-** CustomsRequired and UXDimensionRequired flag are sent to the Boost XML suppliers | ||
| + | * **-** VMI Demand: | ||
| + | * **-** CustomsRequired and UXDimensionRequired flag are sent to the CSV suppliers | ||
| + | * **-** CustomsRequired and UXDimensionRequired flag are sent to the Boost XML suppliers | ||
| + | |||
| + | **Hints:** | ||
| + | * Unit of Measure for Customs Value should be checked if valid according to our definition | ||
| + | * Unit of Measure for length, width, height has to be checked: | ||
| + | * against the allowed values within AirSupply | ||
| + | * if consistent within one message, e.g. it is not allowed to send a mix (centimeters and meter or inch and centitmeters and so on) | ||
| + | |||
| + | Attention: mandatory fields for UX dimensions (fields above marked in blue) may vary depending on the customer configuration in the TAIRFIELDCONFIG. This has to be considered for the validation | ||
| + | ==== Misc ==== | ||
| + | |||
| + | === Tests reparieren === | ||
| + | |||
| + | Folgende Tests wurden von meinen Änderungen betroffen und müssen nun repariert werden: | ||
| + | * **-** ASNValidationsTest.testGetUxMandatoryFieldUxDimensionExcluded() | ||
| + | * **-** ASNValidationsTest.testGetUxMandatoryFieldsWithCsvUploadUxDeminsionIncluded() | ||
| + | |||
| + | === Default UoMs === | ||
| + | |||
| + | == Set proper UoMs after validation == | ||
| + | |||
| + | Nachdem die ASN importiert und validiert wurde, sollte man die richtige (interne!) UoMs setzen. | ||
| + | Davor muss aber geprüft werden, ob vom alten Code // | ||
| + | |||
| + | Hilfreich: | ||
| + | * Der Code in der Klasse '' | ||
| + | * Mein Code: | ||
| + | <code java> | ||
| + | BigDecimal uxWeightInXML = XMLToolbox.getSubTagValueAsBigDecimal(uxElement, | ||
| + | WeightUtil.UOM_CONVERTER_UNITS_WEIGHT targetWeightUoM = WeightUtil.UOM_CONVERTER_UNITS_WEIGHT.getUOMConverterUnit(uxModel.getUXWeightUOM()); | ||
| + | uxModel.setGrossWeight(DimensionsUtil.convertFromUIToModel(targetWeightUoM.name(), | ||
| + | </ | ||
| + | |||
| + | == Check if it works for "non UX Dimensions" | ||
| + | |||
| + | Im ASNXMLImportHandler: | ||
| + | <code java> | ||
| + | // TODO: check if it works for "non UX Dimensions" | ||
| + | // uxModel.setUXWeightUOM(WeightUtil.INTERNAL_GLOBAL_WEIGHT_UOM); | ||
| + | // uxModel.setDimensionsUom(DimensionsUtil.INTERNAL_GLOBAL_DEFAULT_LENGTH_UOM); | ||
| + | |||
| + | </ | ||
| + | |||
| + | ... | ||
| + | |||
| + | ===== CSV Upload ===== | ||
| + | |||
| + | Wichtige Klassen: | ||
| + | * ASNCSVUploadHandler | ||
| + | * ASNImportModelFactory | ||
| + | * ASNCSVLineValidationUtil | ||
| + | * validiert '' | ||
| + | |||
| + | ===== Änderungen, | ||
| + | |||
| + | * Export XML -> "UX Weight UoM" auf "Gross Weight UoM" umbiegen | ||
| + | |||
| + | |||
| + | ===== Nützliche SQL Befehle ===== | ||
| + | <code sql> | ||
| + | -- Flags abfragen | ||
| + | SELECT t.CCUSTOMSDECLARATIONREQUIRED, | ||
| + | |||
| + | -- Flags bei der Demand, die ich verwende, setzen | ||
| + | UPDATE TAIRDEMANDS set CCUSTOMSDECLARATIONREQUIRED=1, | ||
| + | |||
| + | -- Flag CENABLEUXDIMENSIONS bei dem Profile 1 setzen | ||
| + | update TCPPROFILES_SCD set CENABLEUXDIMENSIONS=0 where cProfileId=1; | ||
| + | |||
| + | -- Misc | ||
| + | SELECT t.CPROFILEID, | ||
| + | |||
| + | select t.CPROFILEID, | ||
| + | </ | ||
| + | |||
| + | ===== Misc ===== | ||
| + | |||
| + | Die Felder, die für die Validierung von UXs notwendig sind werden in '' | ||
| + | |||
| + | Die Felder, die für die Validierung von UEs notwendig sind werden in '' | ||
| + | |||
| + | ==== Gewicht UoMs ==== | ||
| + | Die Gewichte der UXs werden momentan "nicht konsequent" | ||
| + | |||
| + | |||
| + | ==== Merge 20190206 ==== | ||
| + | |||
| + | default_xx.properties | ||
| + | < | ||
| + | # Für AIRS-1472: | ||
| + | |||
| + | airsupply.asn.csv.error.uxlengthuom=$$P$$Empty or invalid UoM for UX length in line %s1, position %s2. | ||
| + | airsupply.asn.csv.error.uxheightuom=$$P$$Empty or invalid UoM for UX height in line %s1, position %s2. | ||
| + | airsupply.asn.csv.error.uxwidthuom=$$P$$Empty or invalid UoM for UX width in line %s1, position %s2. | ||
| + | airsupply.asn.csv.error.uxgrossweightuom=$$P$$Empty or invalid UoM for UX gross weight in line %s1, position %s2. | ||
| + | airsupply.asn.csv.error.uenetweightuom=$$P$$Empty or invalid UoM for UE net weight in line %s1, position %s2. | ||
| + | airsupply.asn.validation.business.c450.9=$$P$$C450.9 - CUST.MATNR\: | ||
| + | |||
| + | |||
| + | # Für AIRS- | ||
| + | |||
| + | airsupply.asn.ue.column.netweight.withoutuom=$$P$$Net weight | ||
| + | airsupply.asn.ue.column.netweightuom=$$P$$Net weight UoM | ||
| + | |||
| + | airsupply.asn.uxdimensions.column.weightuom=$$P$$Weight UoM | ||
| + | |||
| + | |||
| + | # Für AIRS-1532 Enhance DA full download | ||
| + | |||
| + | uoms.in=$$P$$in | ||
| + | uoms.ft=$$P$$ft | ||
| + | uoms.mm=$$P$$mm | ||
| + | uoms.cm=$$P$$cm | ||
| + | uoms.m=$$P$$m | ||
| + | uoms.kg=$$P$$kg | ||
| + | uoms.lb=$$P$$lb | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | SQL (es hat sich herausgestellt, | ||
| + | |||
| + | <code sql> | ||
| + | INSERT INTO TAIRFIELDCONFIG ( CCUSTOMERCPID, | ||
| + | SELECT ' | ||
| + | WHERE NOT EXISTS ( SELECT * FROM TAIRFIELDCONFIG WHERE CCUSTOMERCPID=-1000 AND CCUSTOMERCPPROFILEID=-1 AND cProcess=' | ||
| + | </ | ||
| + | |||
| + | ===== PI5 Sprint 2 TODO ===== | ||
| + | |||
| + | ==== UoMs ==== | ||
| + | Die UoMs berücksichtigen: | ||
| + | * **-** Beim Import | ||
| + | * **-** Beim Export | ||
| + | * **-** Auf der UI | ||
| + | |||
| + | ==== Tickets ==== | ||
| + | |||
| + | * **-** [[https:// | ||
| + | |||
| + | |||
| + | |||
| + | ===== Misc ===== | ||
| + | |||
| + | Der folgende Code wurde von mir geschrieben, | ||
| + | |||
| + | <code java> | ||
| + | // the same utility method is used on the UI too | ||
| + | String grossWeightUom = ASNWebUtil.getWeightUoM(sasUserContext, | ||
| + | WeightConverter converter = new WeightConverter.Builder() | ||
| + | .setSourceUom(WeightUtil.INTERNAL_GLOBAL_WEIGHT_UOM) | ||
| + | .setTargetUom(WeightUtil.getUnitOfMeasure(grossWeightUom)).build(); | ||
| + | BigDecimal converted = converter.convertAndRound(uxModel.getGrossWeight()); | ||
| + | csvModel.setGrossWeight(converted); | ||
| + | |||
| + | |||
| + | String translatedDimensionsUom = DimensionsUtil.getTranslatedUserDimensionUom(asnModel.getCustomerCPId(), | ||
| + | csvModel.setLength(DimensionsUtil.convertFromModelToUi(sasUserContext, | ||
| + | csvModel.setLengthUom(translatedDimensionsUom); | ||
| + | csvModel.setWidth(DimensionsUtil.convertFromModelToUi(sasUserContext, | ||
| + | csvModel.setWidthUom(translatedDimensionsUom); | ||
| + | csvModel.setHeight(DimensionsUtil.convertFromModelToUi(sasUserContext, | ||
| + | csvModel.setHeightUom(translatedDimensionsUom); | ||
| + | </ | ||
