diff --git a/iot-analysis/analysis-zl-event/zl-event-boot/src/main/java/com/njcn/zlevent/service/impl/EventServiceImpl.java b/iot-analysis/analysis-zl-event/zl-event-boot/src/main/java/com/njcn/zlevent/service/impl/EventServiceImpl.java index 53bf629..6cf8b86 100644 --- a/iot-analysis/analysis-zl-event/zl-event-boot/src/main/java/com/njcn/zlevent/service/impl/EventServiceImpl.java +++ b/iot-analysis/analysis-zl-event/zl-event-boot/src/main/java/com/njcn/zlevent/service/impl/EventServiceImpl.java @@ -35,6 +35,7 @@ import lombok.extern.slf4j.Slf4j; import org.influxdb.InfluxDB; import org.influxdb.dto.BatchPoints; import org.influxdb.dto.Point; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -200,7 +201,8 @@ public class EventServiceImpl implements IEventService { if (!Objects.isNull(record)) { if (!Objects.equals(item.getPrjTimeEnd(),-1L)) { WlRecordParam.UpdateRecord wlRecord = new WlRecordParam.UpdateRecord(); - wlRecord.setId(record.getId()); + BeanUtils.copyProperties(record,wlRecord); + wlRecord.setProStartTime(timestampToDatetime(item.getPrjTimeStart())); wlRecord.setProEndTime(timestampToDatetime((item.getPrjTimeEnd() - 8*3600))); wlRecordFeignClient.updateTestRecord(wlRecord); }