Commit c2a1a717 by wuzhe

camt10700101修改59域

parent 597fe678
...@@ -22,21 +22,21 @@ public class Field59Generate extends AbstractMx2MtTagsGenerate { ...@@ -22,21 +22,21 @@ public class Field59Generate extends AbstractMx2MtTagsGenerate {
context.set(Mx2MtContextIdentifier.MX_TO_MT_ERROR_LOCATION, "Block4/59a"); context.set(Mx2MtContextIdentifier.MX_TO_MT_ERROR_LOCATION, "Block4/59a");
SwiftMessage swiftMessage = context.get(SwiftMessage.class); SwiftMessage swiftMessage = context.get(SwiftMessage.class);
List<Tag> tags = swiftMessage.getBlock4().getTags(); 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"); int chePyeePstLine = getXmlNodeCounts(bodyHdrParentElementName, document, "Chq.Pyee.PstlAdr.AdrLine");
String partyPath = bodyHdrParentElementName + ".Chq.Pyee"; String partyPath = bodyHdrParentElementName + ".Chq.Pyee";
if (StringUtil.isNotEmpty(ptsCtry)){ if (ptsCtry > 0){
String nameAddress = mx_to_mtPartyNameAndAddressLEI1(partyPath); String nameAddress = mx_to_mtPartyNameAndAddressLEI1(partyPath);
tags.add(new Tag(name_59F, nameAddress)); tags.add(new Tag(name_59F, nameAddress));
} else if (chePyeePstLine>0) { } else if (chePyeePstLine > 0) {
boolean structuredAddressIndicator = mx_to_mtAddressLineType(partyPath); boolean structuredAddressIndicator = mx_to_mtAddressLineType(partyPath);
if (structuredAddressIndicator){ if (structuredAddressIndicator){
String nameAddress = mx_to_mtPartyNameAndAddressLEI2(partyPath, "3/"); String nameAddress = mx_to_mtPartyNameAndAddressLEI2(partyPath, "3/");
tags.add(new Tag(name_59F, nameAddress)); tags.add(new Tag(name_59F, nameAddress));
} else {
String nameAddress = mx_to_mtPartyNameAndUnstructuredAddress(partyPath);
tags.add(new Tag(name, nameAddress));
} }
} else {
String nameAddress = mx_to_mtPartyNameAndUnstructuredAddress(partyPath);
tags.add(new Tag(name, nameAddress));
} }
} }
} }
...@@ -67,10 +67,11 @@ ...@@ -67,10 +67,11 @@
</DrwrAgtAcct> </DrwrAgtAcct>
<Pyee> <Pyee>
<Nm>EWQ</Nm> <Nm>EWQ</Nm>
<PstlAdr> <!--59F-->
<Ctry>OOOOO</Ctry> <!-- <PstlAdr>-->
<AdrLine>PPPPPP</AdrLine> <!-- <Ctry>OOOOO</Ctry>-->
</PstlAdr> <!-- <AdrLine>PPPPPP</AdrLine>-->
<!-- </PstlAdr>-->
</Pyee> </Pyee>
</Chq> </Chq>
</ChqPresntmntNtfctn> </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