修复时间格式化报错

This commit is contained in:
zy 2026-03-20 15:55:52 +08:00
parent dc6cd97c95
commit 892adffabe
1 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
@ -73,7 +74,7 @@ public class DataExamineTask {
}
//开始处理
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
DateTimeFormatter sdf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
for (SurvDeviceDeploy deploy : deployList) {
log.warn("=================new处理设备:{}====================",deploy.getDeployCode());
if(deploy.getDeployType().equals(PollutionConstants.WATER_LIVE)){