| | |
| | | /** |
| | | * 加入固定点,原workStationStateFixPoint |
| | | * @param dateTime 打固定点的日期 |
| | | * @param includeWorkstationIds |
| | | * @param includeWorkstationIds 指定打固定点的工位id,全都打点传null |
| | | */ |
| | | public void deviceStateFixPoint(DateTime dateTime, List<String> includeWorkstationIds) { |
| | | List<DeviceState> result; |
| | | |
| | | Map<Long, WorkstationDTO> workStations = workstationCache.getWorkStations(); |
| | | Map<Long, WorkstationDTO> workStations = workstationCache.getWorkstations(); |
| | | if (ObjectUtil.isEmpty(workStations)) { |
| | | return; |
| | | } |
| | |
| | | tablet.addValue("rps", i, state.getRps()); |
| | | tablet.addValue("is_fix_point", i, state.getIsFixPoint()); |
| | | tablet.addValue("is_sync", i, state.getIsSync()); |
| | | tablet.addValue("is_plan", i, state.getIsPlan()); |
| | | tablet.addValue("is_plan", i, state.getIsPlan()==null ? -1 : state.getIsPlan()); |
| | | tablet.addValue("feedback_point_type", i, state.getFeedbackPointType()); |
| | | tablet.addValue("feedback_id", i, state.getFeedbackId()); |
| | | tablet.addValue("feedback_id", i, state.getFeedbackId() == null?0:state.getFeedbackId()); |
| | | tablet.addValue("is_deleted", i, state.getIsDeleted()); |
| | | tablet.addValue("employee_id", i, state.getEmployeeId()); |
| | | tablet.addValue("employee_id", i, state.getEmployeeId() == null?0:state.getEmployeeId()); |
| | | |
| | | } |
| | | try { |
| | | this.iotdbConfig.getSessionPool().insertAlignedTablet(tablet); |
| | | } catch (Exception e) { |
| | | log.error("保存固定点数据异常",e); |
| | | log.error("保存state固定点数据异常",e); |
| | | } |
| | | |
| | | } |