Commit c2a1a717 by wuzhe

camt10700101修改59域

parent 597fe678
......@@ -22,21 +22,21 @@ public class Field59Generate extends AbstractMx2MtTagsGenerate {
context.set(Mx2MtContextIdentifier.MX_TO_MT_ERROR_LOCATION, "Block4/59a");
SwiftMessage swiftMessage = context.get(SwiftMessage.class);
List<Tag> tags = swiftMessage.getBlock4().getTags();
String ptsCtry = getXmlNodeValue(bodyHdrParentElementName, document, "Chq.Pyee.PstlAdr.Ctry");
int ptsCtry = getXmlNodeCounts(bodyHdrParentElementName, document, "Chq.Pyee.PstlAdr.Ctry");
int chePyeePstLine = getXmlNodeCounts(bodyHdrParentElementName, document, "Chq.Pyee.PstlAdr.AdrLine");
String partyPath = bodyHdrParentElementName + ".Chq.Pyee";
if (StringUtil.isNotEmpty(ptsCtry)){
if (ptsCtry > 0){
String nameAddress = mx_to_mtPartyNameAndAddressLEI1(partyPath);
tags.add(new Tag(name_59F, nameAddress));
} else if (chePyeePstLine>0) {
} else if (chePyeePstLine > 0) {
boolean structuredAddressIndicator = mx_to_mtAddressLineType(partyPath);
if (structuredAddressIndicator){
String nameAddress = mx_to_mtPartyNameAndAddressLEI2(partyPath, "3/");
tags.add(new Tag(name_59F, nameAddress));
}
} else {
String nameAddress = mx_to_mtPartyNameAndUnstructuredAddress(partyPath);
tags.add(new Tag(name, nameAddress));
}
}
}
}
......@@ -67,10 +67,11 @@
</DrwrAgtAcct>
<Pyee>
<Nm>EWQ</Nm>
<PstlAdr>
<Ctry>OOOOO</Ctry>
<AdrLine>PPPPPP</AdrLine>
</PstlAdr>
<!--59F-->
<!-- <PstlAdr>-->
<!-- <Ctry>OOOOO</Ctry>-->
<!-- <AdrLine>PPPPPP</AdrLine>-->
<!-- </PstlAdr>-->
</Pyee>
</Chq>
</ChqPresntmntNtfctn>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment