|
@@ -83,9 +83,9 @@ public class OpcTaskService {
|
|
|
// 查询当天是否已经存在了,存在则追加,否则则更新
|
|
|
Weekend<RemoteOpcLog> weekend = new Weekend<>(RemoteOpcLog.class);
|
|
|
WeekendCriteria<RemoteOpcLog, Object> weekendCriteria = weekend.weekendCriteria();
|
|
|
- OpcResult log = resultList.get(0);
|
|
|
- LocalDateTime time = DateUtils.strToLocalDateTime(log.getTime(), DateUtils.PATTERN_YMD_HMS);
|
|
|
- weekendCriteria.andEqualTo(RemoteOpcLog::getPositionNum, log.getId());
|
|
|
+ OpcResult opcResult = resultList.get(0);
|
|
|
+ LocalDateTime time = DateUtils.strToLocalDateTime(opcResult.getTime(), DateUtils.PATTERN_YMD_HMS);
|
|
|
+ weekendCriteria.andEqualTo(RemoteOpcLog::getPositionNum, opcResult.getId());
|
|
|
weekendCriteria.andEqualTo(RemoteOpcLog::getYear, time.getYear());
|
|
|
weekendCriteria.andEqualTo(RemoteOpcLog::getMonth, time.getMonthValue());
|
|
|
weekendCriteria.andEqualTo(RemoteOpcLog::getDay, time.getDayOfMonth());
|
|
@@ -108,6 +108,7 @@ public class OpcTaskService {
|
|
|
}
|
|
|
|
|
|
// TODO:判断remoteOpcLogList是否大于5000,大于5000,就分多次存入
|
|
|
+ log.info("count:" + count);
|
|
|
if (count > 0) {
|
|
|
remoteOpcLogMapper.updateBatch(remoteOpcLogList);
|
|
|
} else {
|