parent
b491c976e5
commit
3563aaae96
|
@ -26,6 +26,7 @@ import java.math.BigDecimal;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -398,8 +399,16 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
|
||||||
|
|
||||||
String tartype = dynamicObject.getString("shkd_tartype");
|
String tartype = dynamicObject.getString("shkd_tartype");
|
||||||
|
|
||||||
if ("String".equals(tartype) || "Date".equals(tartype)) {
|
if ("String".equals(tartype)) {
|
||||||
jsonObject.put(key, value);
|
jsonObject.put(key, value);
|
||||||
|
} else if ("Date".equals(tartype)) {
|
||||||
|
// 将字符串时间戳转换为长整型
|
||||||
|
long timestamp = Long.parseLong((String) value);
|
||||||
|
// 创建一个Date对象
|
||||||
|
Date date = new Date(timestamp);
|
||||||
|
// 创建一个SimpleDateFormat对象,指定格式为"yyyy-MM-dd"
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
jsonObject.put(key, sdf.format(date));
|
||||||
} else if ("Integer".equals(tartype)) {
|
} else if ("Integer".equals(tartype)) {
|
||||||
jsonObject.put(key, Integer.parseInt(value.toString()));
|
jsonObject.put(key, Integer.parseInt(value.toString()));
|
||||||
} else if ("BigDecimal".equals(tartype)) {
|
} else if ("BigDecimal".equals(tartype)) {
|
||||||
|
|
Loading…
Reference in New Issue