Commit 76f905e1 by huangshunlin

调整截取方式

parent 2beb1ed5
...@@ -141,7 +141,8 @@ public class Utils { ...@@ -141,7 +141,8 @@ public class Utils {
// 根据选择的账户类型返回账户类型代码 // 根据选择的账户类型返回账户类型代码
// //
// ----------------------------- // -----------------------------
String dsp = type.substring(0, 2); // String dsp = type.substring(0, 2);
String dsp = Strings.mid(type, 0, 2);
if (MdaUtils.compareTo(dsp, "PA") == 0) { if (MdaUtils.compareTo(dsp, "PA") == 0) {
dsp = "SP"; dsp = "SP";
} }
...@@ -626,8 +627,8 @@ public class Utils { ...@@ -626,8 +627,8 @@ public class Utils {
return amtStr.replace(pointSuffiex, ","); return amtStr.replace(pointSuffiex, ",");
} else { } else {
// JPY1300 -> JPY1300, // JPY1300 -> JPY1300,
if (amtStr.indexOf(".") == -1){ if (amtStr.indexOf(".") == -1) {
return amtStr+","; return amtStr + ",";
} else { } else {
return amtStr.replace(".", ",");//like 1000.01 -> 1000,01 return amtStr.replace(".", ",");//like 1000.01 -> 1000,01
} }
...@@ -660,7 +661,7 @@ public class Utils { ...@@ -660,7 +661,7 @@ public class Utils {
//! Corresponding functions: AddExtensionToName, AddNodeToPath, GetLastNode, Basename (TradeDesign function), GetFileExtension, GetNormalizedNodename //! Corresponding functions: AddExtensionToName, AddNodeToPath, GetLastNode, Basename (TradeDesign function), GetFileExtension, GetNormalizedNodename
// search for a backslash starting at the end // search for a backslash starting at the end
String chr = NULLSTR; String chr = NULLSTR;
for (int idx = Strings.len(argPth); idx >= 1; idx --) { for (int idx = Strings.len(argPth); idx >= 1; idx--) {
chr = Strings.mid(argPth, idx, 1); chr = Strings.mid(argPth, idx, 1);
if (MdaUtils.compareTo(chr, "\\") == 0 || MdaUtils.compareTo(chr, "/") == 0) { if (MdaUtils.compareTo(chr, "\\") == 0 || MdaUtils.compareTo(chr, "/") == 0) {
if (idx > 1) { if (idx > 1) {
...@@ -1236,10 +1237,10 @@ public class Utils { ...@@ -1236,10 +1237,10 @@ public class Utils {
field.setAccessible(true); field.setAccessible(true);
if (idx > 0) { if (idx > 0) {
Object subObject = field.get(object); Object subObject = field.get(object);
if(subObject instanceof Collection){ if (subObject instanceof Collection) {
subObject = CollectionUtils.get(subObject, 0); subObject = CollectionUtils.get(subObject, 0);
}else if(subObject instanceof Object[]){ } else if (subObject instanceof Object[]) {
subObject = Array.get(subObject,0); subObject = Array.get(subObject, 0);
} }
return getTargetFieldByPath(subObject, path.substring(idx + 1)); return getTargetFieldByPath(subObject, path.substring(idx + 1));
} else { } else {
......
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