コード例 #1
0
        public IActionResult Search(Int16 buildingId, byte objectDataId, byte dataFieldId, DateTime startDate, DateTime endDate)
        {
            List <ReadingDataVM> model = new List <ReadingDataVM>();

            _readingService.SearchData(buildingId, objectDataId, dataFieldId, startDate, endDate).ToList().ForEach(u =>
            {
                ReadingDataVM readingData = new ReadingDataVM
                {
                    BuildingId  = u.BuildingId,
                    ObjectId    = u.ObjectId,
                    DataFieldId = u.DataFieldId,
                    Value       = u.Value,
                    Timestamp   = u.Timestamp
                };
                model.Add(readingData);
            });
            return(Ok(model));
        }