| | |
| | | private WorkstationCache workstationCache; |
| | | @Autowired |
| | | private TimeSliceCache timeSliceCache; |
| | | @Autowired |
| | | private WorkstationDatapointsService dpService; |
| | | |
| | | static { |
| | | PROCESS_PARAM_MAP.put(1, "STATE"); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 数据填充,(calendarCode,factoryYear,month,date,week) |
| | | * 数据填充,日历代码之类的统计相关字段初始化(calendarCode,factoryYear,month,date,week) |
| | | * |
| | | * @param telemetryDataList |
| | | * @return |
| | |
| | | * |
| | | * @param pdata |
| | | */ |
| | | void fillByCalendar(PackedTelemetryData pdata) { |
| | | public void fillByCalendar(PackedTelemetryData pdata) { |
| | | //原来在TelemetryPropertyWrapper.packWorkstationCalendarInfo中完成 |
| | | //FIXME: 填写实际的数据还需要后续处理 |
| | | |
| | |
| | | //telemetryData.setCalendarCode(calendarCode); |
| | | } else { |
| | | //telemetryData.setCalendarCode("#default#"); |
| | | pdata.setCalendarCode("#default#"); |
| | | pdata.setCalendarCode(CommonConstant.DEFAULT_CODE); |
| | | } |
| | | |
| | | //pdata.setShiftIndex(1);//临时 |
| | | //pdata.setShiftTimeType(1);//临时 |
| | | |
| | | // TelemetryPropertyWrapper中packWorkstationCalendarInfo |
| | | //------------start |
| | | boolean isDefaultCalendar = true; |
| | | if (!"#default#".equals(pdata.getCalendarCode())) { |
| | | if (!CommonConstant.DEFAULT_CODE.equals(pdata.getCalendarCode())) { |
| | | CalendarShiftTimeSlicesDTO calendarShiftTimeSlicesDTO = timeSliceCache.getTimeSliceShift(pdata.getCalendarCode(), collectTime);//从redis中获得日历的时间切片 |
| | | if (ObjectUtil.isEmpty(calendarShiftTimeSlicesDTO)) {//如果没有时间切片,则使用TimeSliceCache.build(cacheBuildDTO);构建 |
| | | LocalDate targetDate = Instant.ofEpochMilli(pdata.getTime()).atZone(ZoneOffset.systemDefault()).toLocalDate(); |