| | |
| | | |
| | | String[] keys = map.keySet().toArray(new String[0]); |
| | | for (int j = 0; j < keys.length; j++) { |
| | | //TODO: 这里,原系统进行了过滤。WorkstationCollectDataServiceImpl.handlerWorkstationCollectData里 |
| | | |
| | | PackedTelemetryData pkData = new PackedTelemetryData(); |
| | | pkData.setWorkstationId(tdata.getWorkstationId()); |
| | |
| | | pkData.setName(keys[j]);//数据点名称 |
| | | |
| | | fillByCalendar(pkData); |
| | | |
| | | |
| | | result.add(pkData); |
| | | } |
| | |
| | | |
| | | // TelemetryPropertyWrapper中packWorkstationCalendarInfo |
| | | //------------start |
| | | Boolean isDefaultCalendar = true; |
| | | boolean isDefaultCalendar = true; |
| | | if (!"#default#".equals(pdata.getCalendarCode())) { |
| | | CalendarShiftTimeSlicesDTO calendarShiftTimeSlicesDTO = timeSliceCache.getTimeSliceShift(pdata.getCalendarCode(), collectTime);//从redis中获得日历的时间切片 |
| | | if (ObjectUtil.isEmpty(calendarShiftTimeSlicesDTO)) {//如果没有时间切片,则使用TimeSliceCache.build(cacheBuildDTO);构建 |
| | |
| | | } |
| | | |
| | | //无日历切片,使用采集时间填充factoryYear,month,date,week几个属性 |
| | | if (isDefaultCalendar.booleanValue()) { |
| | | if (isDefaultCalendar) { |
| | | log.info("无日历切片"); |
| | | LocalDate localDate = Instant.ofEpochMilli(pdata.getTime().longValue()).atZone(ZoneOffset.systemDefault()).toLocalDate(); |
| | | pdata.setFactoryDate(Integer.valueOf(DatePattern.PURE_DATE_FORMAT.format(collectTime))) |