Commit c4da6a98 by lixinyi

金额处理修改

parent 9e53a111
......@@ -20,6 +20,7 @@ import org.dom4j.DocumentHelper;
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.Map;
import java.util.Optional;
import java.util.regex.Matcher;
......@@ -345,7 +346,14 @@ public class SwiftTransfer {
}
public static Map<String, Object> mx2ElementMaps(String xmlStr) {
return new Mx2ElementCreatorManager().mx2ElementMaps(xmlStr);
Map<String, Object> map = new Mx2ElementCreatorManager().mx2ElementMaps(xmlStr);
for (Map.Entry<String, Object> entry : map.entrySet()){
if (entry.getKey().contains("Amt")&&!entry.getKey().contains("Ccy")){
BigDecimal amt = (BigDecimal) entry.getValue();
entry.setValue(amt.toPlainString());
}
}
return map;
}
/**
......
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