去掉定位日志

This commit is contained in:
ZLI263
2025-09-24 13:16:33 +08:00
parent 2b04df3b7d
commit ae5035e5d0

View File

@@ -28,6 +28,8 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
@@ -211,7 +213,6 @@ public class TmNameplateCorpusServiceImpl extends ServiceImpl<TmNameplateCorpusM
// 获取许可 - 如果没有可用许可会阻塞等待
// 修改为带超时的获取许可方式超时时间为1分钟
if (!semaphore.tryAcquire(5, TimeUnit.MINUTES)) {
log.info("istimeout画像业务场景");
log.warn("获取许可超时,跳过执行任务");
return;
}
@@ -226,26 +227,21 @@ public class TmNameplateCorpusServiceImpl extends ServiceImpl<TmNameplateCorpusM
}else {
try {
log.info("getNameplateEndTime is not null");
// 定义原始字符串的格式注意CST 在这里是中国标准时间,对应 Asia/Shanghai
SimpleDateFormat inputFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss 'CST' yyyy");
inputFormat.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai")); // 设置时区为 CST (China Standard Time)
ZonedDateTime zonedDateTime = ZonedDateTime.parse(item.getNameplateEndTime().toString());
// 定义目标格式
SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// 解析原始字符串为 Date 对象
Date date = inputFormat.parse(item.getNameplateEndTime().toString());
// 格式化为目标格式
String formattedDate = outputFormat.format(date);
// 解析为 LocalDateTime假设 CST 是 Asia/Shanghai
LocalDateTime ldt = LocalDateTime.parse(item.getNameplateEndTime().toString().replace(" CST ", " "),
DateTimeFormatter.ofPattern("EEE MMM dd HH:mm:ss yyyy", Locale.ENGLISH));
// 转为带时区的时间(可选)
java.time.ZonedDateTime zonedDateTime = ldt.atZone(ZoneId.of("Asia/Shanghai"));
// 格式化输出
DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
String formattedDate = zonedDateTime.format(outputFormatter);
inputMap2.put("communicateDate", formattedDate);
}catch (Exception e){
log.info("getNameplateEndTime {}", e.getMessage());
}
}
log.info("getNameplateEndTime,inputMap2,",inputMap2);
diFyImageReq2.setUser(ConstantStr.corpus_user);
inputMap2.put("businessId", item.getCustomerFlowId());
inputMap2.put("analysisScene", "3");
inputMap2.put("version", 2);