|
|
@@ -273,11 +273,11 @@ public class DataUtil {
|
|
|
data.setId(item.getString("id"));
|
|
|
data.setLc(item.getString("lc"));
|
|
|
data.setBc(item.getString("bc"));
|
|
|
- data.setYzl(item.getString("yzl"));
|
|
|
- data.setHzl(item.getString("hzl"));
|
|
|
- data.setYQpZl(item.getString("yQpZl"));
|
|
|
- data.setHQpZl(item.getString("hQpZl"));
|
|
|
- data.setHlBl(item.getString("hlBl"));
|
|
|
+ data.setYzl(firstJsonString(item, "yzl", "Yzl", "y_zl"));
|
|
|
+ data.setHzl(firstJsonString(item, "hzl", "Hzl", "h_zl"));
|
|
|
+ data.setYQpZl(firstJsonString(item, "yQpZl", "YQpZl", "yqpZl", "y_qp_zl"));
|
|
|
+ data.setHQpZl(firstJsonString(item, "hQpZl", "HQpZl", "hqpZl", "h_qp_zl"));
|
|
|
+ data.setHlBl(firstJsonString(item, "hlBl", "HlBl", "hl_bl"));
|
|
|
String updateBy = item.getString("remarks");
|
|
|
if (updateBy == null || updateBy.isEmpty()) {
|
|
|
Object createBy = item.get("createBy");
|
|
|
@@ -355,4 +355,17 @@ public class DataUtil {
|
|
|
}
|
|
|
return String.format("%.2f", numer / denom);
|
|
|
}
|
|
|
+
|
|
|
+ private static String firstJsonString(JSONObject item, String... keys) {
|
|
|
+ if (item == null || keys == null) {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ for (String key : keys) {
|
|
|
+ String value = item.getString(key);
|
|
|
+ if (value != null && !value.trim().isEmpty()) {
|
|
|
+ return value;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return "";
|
|
|
+ }
|
|
|
}
|