|
@@ -172,7 +172,7 @@ public class HandleData {
|
|
|
insertReportMap.put("create_time_", Timestamp.valueOf(String.valueOf(formattedDateTime)));
|
|
insertReportMap.put("create_time_", Timestamp.valueOf(String.valueOf(formattedDateTime)));
|
|
|
String editUser = entityMap.get("CREATEBY").toString();
|
|
String editUser = entityMap.get("CREATEBY").toString();
|
|
|
String editUserInfo = ibpsRepository.getUserInfoByName(editUser);
|
|
String editUserInfo = ibpsRepository.getUserInfoByName(editUser);
|
|
|
- insertReportMap.put("bian_zhi_shi_jian", String.valueOf(formattedDateTime));
|
|
|
|
|
|
|
+ //insertReportMap.put("bian_zhi_shi_jian", String.valueOf(formattedDateTime));
|
|
|
String posID = ibpsRepository.getPosiByCode(entityMap.get("GROUPCODE").toString());
|
|
String posID = ibpsRepository.getPosiByCode(entityMap.get("GROUPCODE").toString());
|
|
|
if ((posID != "-1")&&(!editUserInfo.split("\\^")[0].equals("-1"))) {
|
|
if ((posID != "-1")&&(!editUserInfo.split("\\^")[0].equals("-1"))) {
|
|
|
insertReportMap.put("di_dian_", posID);
|
|
insertReportMap.put("di_dian_", posID);
|
|
@@ -202,7 +202,7 @@ public class HandleData {
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
String formattedDateTime = currentDateTime.format(formatter);
|
|
String formattedDateTime = currentDateTime.format(formatter);
|
|
|
Timestamp currentTimestamp = Timestamp.valueOf(currentDateTime);
|
|
Timestamp currentTimestamp = Timestamp.valueOf(currentDateTime);
|
|
|
-
|
|
|
|
|
|
|
+ long sequenceCounter = 0;
|
|
|
for (Map<String, Object> reportMap : reportList) {
|
|
for (Map<String, Object> reportMap : reportList) {
|
|
|
String reportID = getStringValue(reportMap, "id_");
|
|
String reportID = getStringValue(reportMap, "id_");
|
|
|
if (reportID == null || reportID.isEmpty()) {
|
|
if (reportID == null || reportID.isEmpty()) {
|
|
@@ -215,10 +215,15 @@ public class HandleData {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
List<Map<String, Object>> insertList = new ArrayList<>();
|
|
List<Map<String, Object>> insertList = new ArrayList<>();
|
|
|
-
|
|
|
|
|
|
|
+ // 在循环外部定义序列号计数器
|
|
|
for (Map<String, Object> entityMap : retList) {
|
|
for (Map<String, Object> entityMap : retList) {
|
|
|
Map<String, Object> insertMap = new HashMap<>();
|
|
Map<String, Object> insertMap = new HashMap<>();
|
|
|
- insertMap.put("id_", UUID.randomUUID().toString());
|
|
|
|
|
|
|
+ // 生成有序ID:时间戳+自增序列号
|
|
|
|
|
+ String orderedId = String.format("%d-%06d",
|
|
|
|
|
+ currentTimestamp.getTime(), // 使用时间戳
|
|
|
|
|
+ sequenceCounter++ // 自增序列号
|
|
|
|
|
+ );
|
|
|
|
|
+ insertMap.put("id_", orderedId);
|
|
|
insertMap.put("parent_id_", getStringValue(entityMap, "REPORTID"));
|
|
insertMap.put("parent_id_", getStringValue(entityMap, "REPORTID"));
|
|
|
insertMap.put("create_time_", currentTimestamp); // 直接使用Timestamp,避免字符串转换
|
|
insertMap.put("create_time_", currentTimestamp); // 直接使用Timestamp,避免字符串转换
|
|
|
|
|
|