fix: 修正时间去掉秒后面的

main
huangfeng 7 months ago
parent affeda91d2
commit bbe6b5d389

@ -10,6 +10,7 @@ import com.xydl.cac.repository.*;
import com.xydl.cac.service.DataService;
import com.xydl.cac.service.IedDlRecordService;
import com.xydl.cac.socket.WebSocketServer;
import com.xydl.cac.util.DateUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.CollectionUtils;
@ -117,6 +118,8 @@ public class IEDCollectService {
String time = iecClient.getValue(paramindexT, fc);
log.info("采集到" + fc + " " + paramindexNew + "=" + value + ", t=" + time);
time = time.replace("T", " ").replace("Z", "").replace("z", "");
Date date = DateUtil.parse(time);
time = DateUtil.format(date);
_dataService.insertData(rpt.getTablename(), rpt.getEqmid(), time, rpt.getColname(), value);
// 更新最新数据缓存

Loading…
Cancel
Save