Commit 857a3d61 by chengzhuoshen

0822swift官网MX2MT更新-5

parent b7b62617
......@@ -388,16 +388,17 @@ public abstract class AbstractMx2MtTagsGenerate implements Mx2MtTagsGenerate {
int addressRemainLine = 3;//address剩余的行数
if (mxName.length() > 35) addressRemainLine = 2;
String mtNameAddress = StringUtil.getStringByEnter(mxName, 35, 4-addressRemainLine);
String mxAddress = "";
if (addressLineCount > 0) {
for (int i=0; i<addressLineCount; i++) {
if (i == addressRemainLine) break;
mxAddress += getXmlNodeValue(null, document, nameAddressPrefixPath + ".PstlAdr.AdrLine("+i+")");
String mxAddress = getXmlNodeValue(null, document, nameAddressPrefixPath + ".PstlAdr.AdrLine("+i+")");
if (mxAddress.length() > 35) {
buildSTErrorInfo(12, null, mxAddress);
mxAddress = mxAddress.substring(0, 34) + "+";
}
mtNameAddress += Mx2MtConstants.NEW_LINE + mxAddress;
}
}
if (mxAddress.length() > 0) {
mtNameAddress += Mx2MtConstants.NEW_LINE + StringUtil.getStringByEnter(mxAddress, 35, addressRemainLine);
}
return mtNameAddress;
}
......@@ -950,16 +951,17 @@ public abstract class AbstractMx2MtTagsGenerate implements Mx2MtTagsGenerate {
int addressRemainLine = 3;//address剩余的行数
if (mxName.length() > 35) addressRemainLine = 2;
String mtNameAddress = StringUtil.getStringByEnter(mxName, 35, 4-addressRemainLine);
String mxAddress = "";
if (addressLineCount > 0) {
for (int i=0; i<addressLineCount; i++) {
if (i == addressRemainLine) break;
mxAddress += getXmlNodeValue(null, document, nameAddressPrefixPath + ".PstlAdr.AdrLine("+i+")");
String mxAddress = getXmlNodeValue(null, document, nameAddressPrefixPath + ".PstlAdr.AdrLine("+i+")");
if (mxAddress.length() > 35) {
buildSTErrorInfo(12, null, mxAddress);
mxAddress = mxAddress.substring(0, 34) + "+";
}
mtNameAddress += Mx2MtConstants.NEW_LINE + mxAddress;
}
}
if (mxAddress.length() > 0) {
mtNameAddress += Mx2MtConstants.NEW_LINE + StringUtil.getStringByEnter(mxAddress, 35, addressRemainLine);
}
return mtNameAddress;
}
/**
......
......@@ -32,9 +32,9 @@ public class Field28CGenerate extends AbstractMx2MtTagsGenerate {
}
String pageNumber = getXmlNodeValue(bodyHdrParentElementName, document, "Stmt.StmtPgntn.PgNb");
if (StringUtil.isNotEmpty(lglSeqNbStr)) {
value = lglSeqNbStr + "/" + pageNumber;
value = lglSeqNbStr + "/" + Integer.parseInt(pageNumber);
} else {
value = elctrncSeqNbStr + "/" + pageNumber;
value = elctrncSeqNbStr + "/" + Integer.parseInt(pageNumber);
}
tags.add(new Tag(name, value));
}
......
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