Esempio n. 1
0
 public ParseResult ParseInto(Workbook workbook, TDetail detail)
 {
     if (!string.IsNullOrEmpty(SheetName))
     {
         var       sheetName = SheetName;
         Worksheet sheet     = null;
         foreach (Worksheet s in workbook.Worksheets)
         {
             if (s.Name == sheetName)
             {
                 sheet = s;
                 break;
             }
         }
         if (sheet == null)
         {
             return(ParseResult.ReportName_ParseFailure);
         }
         return(ParseSheetInto(sheet, detail));
     }
     else
     {
         return(ParseBookInto(workbook, detail));
     }
 }
Esempio n. 2
0
        public override ParseResult ParseSheetInto(Worksheet sheet, TDetail detail)
        {
            throw new NotImplementedException("该类型文档采用ParseBookInto()方法解析");

            ////ReportName
            //detail.ReportName = sheet.GetCellValueAsString(1, 1).Trim() + sheet.GetCellValueAsString(2, 1).Trim();
            ////Contractor,Supervisor,Monitor
            //Regex regex = new Regex(@"\s?承包单位:(.+)\s+监理单位:(.+)\s+监测单位:(.+)\s?");
            //var match = regex.Match(sheet.GetCellValueAsString(3, 1));
            //if (match.Groups.Count != 4)
            //    return ParseResult.Participants_ParseFailure;
            //detail.Contractor = match.Groups[1].ToString().Trim();
            //detail.Supervisor = match.Groups[2].ToString().Trim();
            //detail.Monitor = match.Groups[3].ToString().Trim();
            ////IssueDateTime,IssueTimeRange
            //regex = new Regex(@"\s?监测日期:(.+)\s+监测时间:(.+)-(.+)\s?");
            //match = regex.Match(sheet.GetCellValueAsString(4, 1));
            //if (match.Groups.Count != 4)
            //    return ParseResult.DateTime_ParseFailure;
            //var dateArgs = match.Groups[1].ToString().Split('.').Select(c => int.Parse(c)).ToArray();
            //var startTimeArgs = match.Groups[2].ToString().Split(':').Select(c => int.Parse(c)).ToArray();
            //var endTimeArgs = match.Groups[3].ToString().Split(':').Select(c => int.Parse(c)).ToArray();
            //var startTime = new DateTime(dateArgs[0], dateArgs[1], dateArgs[2], startTimeArgs[0], startTimeArgs[1], 0);
            //var endTime = new DateTime(dateArgs[0], dateArgs[1], dateArgs[2], endTimeArgs[0], endTimeArgs[1], 0);
            //if (endTime < startTime)//如23:00-1:00认为跨天 但是跨天不支持10:00-11:00(第二天的11:00),这种情况跨天比较特殊,甚至跨多天,这个需要另提需求处理
            //    endTime.AddDays(1);
            ////检测:监测时间的日期需与列表一致
            //if (startTime.Date != detail.IssueDateTime.Date)
            //    return ParseResult.DateTime_Invalid;
            //detail.IssueDateTime = startTime;
            //detail.IssueTimeRange = (short)(endTime - startTime).TotalMinutes;
            ////InstrumentName,InstrumentCode
            //regex = new Regex(@"\s?仪器名称:(.+)\s+仪器编号:(.+)\s?");
            //match = regex.Match(sheet.GetCellValueAsString(5, 1));
            //if (match.Groups.Count != 3)
            //    return ParseResult.Instrument_ParseFailure;
            //detail.InstrumentName = match.Groups[1].ToString().Trim();
            //detail.InstrumentCode = match.Groups[2].ToString().Trim();
            ////定位点集合 默认从9,1开始
            //int dataColumns = 8;//数据列数
            //int rowSpan = 30;//上下分段间隔不超过30行
            //int startRow = 9;
            //var dataRanges = GetDataRangesFromMultipleTwoParagraphsContent(sheet, startRow, dataColumns, rowSpan);
            ////节点解析
            //List<TNode> nodes;
            //int emptyCountToStop = 2;//2即空两行则跳过
            //nodes = GetNodes(detail, sheet, dataRanges, emptyCountToStop, (s, r, range) =>
            //{
            //    return new SkewBackDataV1(
            //         s.GetCellValueAsString(r, range.StartColumn).Trim(),
            //         s.GetCellValueAsString(r, range.StartColumn + 1).Trim(),
            //         s.GetCellValueAsString(r, range.StartColumn + 2).Trim(),
            //         s.GetCellValueAsString(r, range.StartColumn + 6).Trim(),
            //         s.GetCellValueAsString(r, range.StartColumn + 7).Trim());
            //});
            //detail.Nodes.AddRange(nodes);
            //return ParseResult.Success;
        }
Esempio n. 3
0
        /// <summary>
        /// 从多段区间里面解析数据
        /// </summary>
        /// <param name="sheet"></param>
        /// <param name="dataRanges"></param>
        /// <param name="emptyCountToStop"></param>
        /// <returns></returns>
        protected List <TNode> GetNodes(TDetail detail, Worksheet sheet, List <DataRange> dataRanges, int emptyCountToStop, Func <Worksheet, int, DataRange, ITNodeData> parseData)
        {
            List <TNode> nodes = new List <TNode>();
            bool         isEnd = false;
            short        index = 1;

            foreach (var dataRange in dataRanges)
            {
                if (isEnd)
                {
                    break;
                }

                int emptyCount = 0;
                for (int i = dataRange.StartRow; i <= dataRange.EndRow - 1; i++)
                {
                    //空行检测
                    var nodeCode = sheet.GetCellValueAsString(i, dataRange.StartColumn);
                    if (string.IsNullOrEmpty(nodeCode))
                    {
                        emptyCount++;
                        if (emptyCount > emptyCountToStop)                      //空一行+1,若实际超出设定的空行数3>2则认为超限,超限有两种情况(后续无数据,后续继续检测段)
                        {
                            if (i == dataRange.StartRow + emptyCountToStop - 1) //空两行发生在段首,则认为后续无内容,结束节点读取(认为后面为空段,无视后面的段)
                            {
                                isEnd = true;
                            }
                            break;
                        }
                        continue;
                    }
                    else
                    {
                        emptyCount = 0;
                    }
                    //非空行数据加载
                    TNode node = new TNode();
                    node.IssueType     = detail.IssueType;
                    node.IssueDateTime = detail.IssueDateTime;
                    node.NodeCode      = nodeCode;
                    node.Data          = parseData(sheet, i, dataRange).SerializeToString();
                    node.Index         = index;
                    nodes.Add(node);
                    index++;
                }
            }
            return(nodes);
        }
Esempio n. 4
0
        protected override TDetail Clone()
        {
            var memo = new TDetail()
            {
                IssueType       = Data.IssueType,
                IssueDateTime   = Data.IssueDateTime,
                IssueTimeRange  = Data.IssueTimeRange,
                ReportName      = Data.ReportName,
                Contractor      = Data.Contractor,
                Supervisor      = Data.Supervisor,
                Monitor         = Data.Monitor,
                InstrumentName  = Data.InstrumentName,
                InstrumentCode  = Data.InstrumentCode,
                CloseCTSettings = Data.CloseCTSettings,
                OverCTSettings  = Data.OverCTSettings,
                IsLoad          = Data.IsLoad,
                List            = Data.List,//List可以拷贝引用
                ExtraValue1     = Data.ExtraValue1,
                ExtraValue2     = Data.ExtraValue2,
                ExtraValue3     = Data.ExtraValue3,
                //Nodes需重建Copy
            };

            memo.Nodes.AddRange(Data.Nodes.Select(c => new TNode()
            {
                IssueType     = c.IssueType,
                IssueDateTime = c.IssueDateTime,
                NodeCode      = c.NodeCode,
                Data          = c.Data,
                ElementIds    = c.GetElementIds(),//2017/05/09 09:59  ElementIds总是以ElementIds_Int为修改对象,ElementIds_Int是ElementIds的活动的修改对象,ElementIds是静态的存储对象
                Index         = c.Index,
            }));
            memo.DepthNodes.AddRange(Data.DepthNodes.Select(c => new TDepthNode()
            {
                IssueType     = c.IssueType,
                IssueDateTime = c.IssueDateTime,
                NodeCode      = c.NodeCode,
                Depth         = c.Depth,
                Data          = c.Data,
                ElementIds    = c.GetElementIds(),//2017/05/09 09:59  ElementIds总是以ElementIds_Int为修改对象,ElementIds_Int是ElementIds的活动的修改对象,ElementIds是静态的存储对象
                Index         = c.Index,
            }));
            return(memo);
        }
Esempio n. 5
0
        public override ParseResult ParseSheetInto(Worksheet sheet, TDetail detail)
        {
            //ReportName
            detail.ReportName = sheet.GetCellValueAsString(1, 1).Trim() + sheet.GetCellValueAsString(2, 1).Trim();
            //Contractor,Supervisor,Monitor
            Regex regex = new Regex(@"\s?承包单位:(.+)\s+监理单位:(.+)\s+监测单位:(.+)\s?");
            var   match = regex.Match(sheet.GetCellValueAsString(3, 1));

            if (match.Groups.Count != 4)
            {
                return(ParseResult.Participants_ParseFailure);
            }
            detail.Contractor = match.Groups[1].ToString().Trim();
            detail.Supervisor = match.Groups[2].ToString().Trim();
            detail.Monitor    = match.Groups[3].ToString().Trim();
            //ReportName
            detail.ReportName = sheet.GetCellValueAsString(1, 1) + sheet.GetCellValueAsString(2, 1);
            //IssueDateTime,IssueTimeRange
            regex = new Regex(@"\s?监测日期:(.+)\s+监测时间:(.+)-(.+)\s?");
            match = regex.Match(sheet.GetCellValueAsString(4, 1));
            if (match.Groups.Count != 4)
            {
                return(ParseResult.DateTime_ParseFailure);
            }
            var dateArgs      = match.Groups[1].ToString().Split('.').Select(c => int.Parse(c)).ToArray();
            var startTimeArgs = match.Groups[2].ToString().Split(':').Select(c => int.Parse(c)).ToArray();
            var endTimeArgs   = match.Groups[3].ToString().Split(':').Select(c => int.Parse(c)).ToArray();
            var startTime     = new DateTime(dateArgs[0], dateArgs[1], dateArgs[2], startTimeArgs[0], startTimeArgs[1], 0);
            var endTime       = new DateTime(dateArgs[0], dateArgs[1], dateArgs[2], endTimeArgs[0], endTimeArgs[1], 0);

            if (endTime < startTime)//如23:00-1:00认为跨天 但是跨天不支持10:00-11:00(第二天的11:00),这种情况跨天比较特殊,甚至跨多天,这个需要另提需求处理
            {
                endTime.AddDays(1);
            }
            //检测:监测时间的日期需与列表一致
            if (startTime.Date != detail.IssueDateTime.Date)
            {
                return(ParseResult.Date_Invalid);
            }
            if (!string.IsNullOrEmpty(detail.InstrumentCode) && startTime.Hour != detail.IssueDateTime.Hour)
            {
                return(ParseResult.Time_Invalid);
            }
            detail.IssueDateTime  = startTime;
            detail.IssueTimeRange = (short)(endTime - startTime).TotalMinutes;
            //InstrumentName,InstrumentCode
            regex = new Regex(@"\s?仪器名称:(.+)\s+仪器编号:(.+)\s?");
            match = regex.Match(sheet.GetCellValueAsString(5, 1));
            if (match.Groups.Count != 3)
            {
                return(ParseResult.Instrument_ParseFailure);
            }
            detail.InstrumentName = match.Groups[1].ToString().Trim();
            detail.InstrumentCode = match.Groups[2].ToString().Trim();
            //定位点集合 默认从9,1开始
            int dataColumns = 8;  //数据列数
            int rowSpan     = 30; //上下分段间隔不超过30行
            int startRow    = 9;
            var dataRanges  = GetDataRangesFromMultipleTwoParagraphsContent(sheet, startRow, dataColumns, rowSpan);
            //节点解析
            List <TNode> nodes;
            int          emptyCountToStop = 2;//2即空两行则跳过

            nodes = GetNodes(detail, sheet, dataRanges, emptyCountToStop, (s, r, range) =>
            {
                return(new PressedPipeLineSubsidenceDataV1(
                           s.GetCellValueAsString(r, range.StartColumn).Trim(),
                           s.GetCellValueAsString(r, range.StartColumn + 1).Trim(),
                           s.GetCellValueAsString(r, range.StartColumn + 2).Trim(),
                           s.GetCellValueAsString(r, range.StartColumn + 6).Trim(),
                           s.GetCellValueAsString(r, range.StartColumn + 7).Trim()));
            });
            detail.Nodes.AddRange(nodes);
            return(ParseResult.Success);
        }
Esempio n. 6
0
        private IEnumerable <T> getWarnResult(WarnSettings warnSettings, TDetail detail, double warnCoefficientMin)//, double warnCoefficientMax = double.NaN)
        {
            List <T> result = new List <T>();
            var      d      = Datas.FirstOrDefault();

            if (d == null)
            {
                return(result);
            }

            var totalHourRange = warnSettings.PressedPipeLineSubsidence_Day * 24;//检测项
            var endTime        = detail.IssueDateTime;
            var details        = Facade.GetDetailsByTimeRange(detail.IssueType, endTime.AddHours(-totalHourRange), endTime);
            var orderedDetails = details.OrderByDescending(c => c.IssueDateTime).ToList();
            var currentDetail  = detail;
            //需预警的节点
            //监测 warnSettings.PressedPipeLineSubsidence_SumMillimeter;
            var sumMillimeter = warnSettings.PressedPipeLineSubsidence_SumMillimeter;//检测项

            foreach (var data in Datas)
            {
                if (data.SumChanges_Float >= sumMillimeter * warnCoefficientMin)
                {
                    result.Add(data);
                }

                //if (double.IsNaN(overCoefficientMax))
                //{
                //    if (data.SumChanges_Float >= sumMillimeter * warnCoefficientMin)
                //        result.Add(data);
                //}
                //else
                //{
                //    if (data.SumChanges_Float >= sumMillimeter * warnCoefficientMin)
                //        && data.SumChanges_Float < sumMillimeter * overCoefficientMax)
                //        result.Add(data);
                //}
            }
            //监测 warnSettings.PressedPipeLineSubsidence_DailyMillimeter;
            //数据天数达标监测
            if (totalHourRange != 0)
            {
                var    dailyMillimeter        = warnSettings.PressedPipeLineSubsidence_PipelineMillimeter;//检测项
                double warnDailyMillimeterMin = dailyMillimeter * warnCoefficientMin;
                //double warnDailyMillimeterMax = 0;
                //if (!double.IsNaN(warnCoefficientMax))
                //{
                //    warnDailyMillimeterMax = dailyMillimeter * warnCoefficientMax;
                //}
                var tempTotalTimeRange = totalHourRange;
                int detailIndex        = 0;
                while (tempTotalTimeRange > 0)
                {
                    if (detailIndex == orderedDetails.Count())
                    {
                        throw new NotImplementedException("未满足监测报警要求的天数");
                    }
                    var nextDetail       = orderedDetails[detailIndex];
                    var currentTimeRange = (int)(currentDetail.IssueDateTime.AddMinutes(currentDetail.IssueTimeRange) - nextDetail.IssueDateTime.AddMinutes(nextDetail.IssueTimeRange)).TotalHours;
                    if (currentTimeRange <= tempTotalTimeRange)
                    {
                        tempTotalTimeRange -= currentTimeRange;
                    }
                    else
                    {
                        tempTotalTimeRange -= currentTimeRange;
                    }
                    currentDetail = nextDetail;
                    detailIndex++;
                }
                foreach (var data in Datas)
                {
                    if (result.Contains(data))
                    {
                        continue;
                    }

                    detailIndex   = 0;
                    currentDetail = detail;
                    int    days       = warnSettings.PressedPipeLineSubsidence_PipelineMillimeter;
                    double overHours  = 0;
                    double overValues = 0;
                    while (days > 0)
                    {
                        double dailyValue  = 0;
                        double hoursToDeal = 0;
                        if (overHours >= 24)
                        {
                            dailyValue  = overValues * 24 / overHours;
                            overValues -= dailyValue;
                            overHours  -= 24;
                        }
                        else
                        {
                            dailyValue  = overValues;
                            hoursToDeal = 24 - overHours;
                            while (hoursToDeal > 0)
                            {
                                var currentNodeData = currentDetail.NodeDatas.Datas.FirstOrDefault(c => c.NodeCode == data.NodeCode);
                                if (currentNodeData == null) //信息缺失,不作提醒处理  当前所需的节点数据不存在
                                {
                                    days        = -1;        //-1表信息缺失
                                    hoursToDeal = 0;
                                    break;
                                }
                                var    nextDetail       = orderedDetails[detailIndex];
                                double currentTimeRange = (currentDetail.IssueDateTime.AddMinutes(currentDetail.IssueTimeRange) - nextDetail.IssueDateTime.AddMinutes(nextDetail.IssueTimeRange)).TotalHours;
                                if (currentTimeRange <= hoursToDeal)
                                {
                                    dailyValue += (currentNodeData as T).CurrentChanges_Float;
                                }
                                else
                                {
                                    dailyValue += (currentNodeData as T).CurrentChanges_Float * (hoursToDeal / currentTimeRange);
                                    overHours   = currentTimeRange - hoursToDeal;
                                    overValues  = (currentNodeData as T).CurrentChanges_Float * (overHours / currentTimeRange);
                                }
                                hoursToDeal -= currentTimeRange;
                                detailIndex++;
                                currentDetail = nextDetail;
                            }
                        }
                        //时间已尽 检测是否到达预期值
                        if (days == -1)
                        {
                            break;
                        }
                        if (dailyValue >= warnDailyMillimeterMin)
                        {
                            days--;
                        }
                        else
                        {
                            days = -2;//-2表信息未到连续标准
                            break;
                        }
                        //if (!double.IsNaN(overCoefficientMax) && dailyValue > warnDailyMillimeterMax)
                        //{
                        //    days = -3;//-3表信息已过高限
                        //    break;
                        //}
                        //else if (dailyValue >= warnDailyMillimeterMin)
                        //    days--;
                        //else
                        //{
                        //    days = -2;//-2表信息未到连续标准
                        //    break;
                        //}
                    }
                    if (days == 0)//处理结束 认为按照标准的到达了日期0则各天检测通过
                    {
                        result.Add(data);
                    }
                }
            }
            return(result);
        }
Esempio n. 7
0
 public IEnumerable <T> GetOverWarn(WarnSettings warnSettings, TDetail detail)
 {
     return(getWarnResult(warnSettings, detail, WarnSettings.OverCoefficient));
 }
Esempio n. 8
0
 public override ParseResult ParseBookInto(Workbook workbook, TDetail detail)
 {
     throw new NotImplementedException();
 }
Esempio n. 9
0
 private IEnumerable <T> getWarnResult(WarnSettings warnSettings, TDetail detail, double warnCoefficientMin)//, double warnCoefficientMax = double.NaN)
 {
     throw new NotImplementedException("该类型无可查看的构件内容");
 }
Esempio n. 10
0
        public override ParseResult ParseBookInto(Workbook workbook, TDetail detail)
        {
            //通用信息
            Worksheet sheet = workbook.Sheets[1] as Worksheet;

            //ReportName
            detail.ReportName = sheet.GetCellValueAsString(1, 1).Trim() + sheet.GetCellValueAsString(2, 1).Trim();
            //Contractor,Supervisor,Monitor
            Regex regex = new Regex(@"\s?承包单位:(.+)\s+监理单位:(.+)\s+监测单位:(.+)\s?");
            var   match = regex.Match(sheet.GetCellValueAsString(3, 1));

            if (match.Groups.Count != 4)
            {
                return(ParseResult.Participants_ParseFailure);
            }
            detail.Contractor = match.Groups[1].ToString().Trim();
            detail.Supervisor = match.Groups[2].ToString().Trim();
            detail.Monitor    = match.Groups[3].ToString().Trim();
            //IssueDateTime,IssueTimeRange
            regex = new Regex(@"\s?监测日期:(.+)\s+监测时间:(.+)-(.+)\s?");
            match = regex.Match(sheet.GetCellValueAsString(5, 1));
            if (match.Groups.Count != 4)
            {
                return(ParseResult.DateTime_ParseFailure);
            }
            var dateArgs      = match.Groups[1].ToString().Split('.').Select(c => int.Parse(c)).ToArray();
            var startTimeArgs = match.Groups[2].ToString().Split(':').Select(c => int.Parse(c)).ToArray();
            var endTimeArgs   = match.Groups[3].ToString().Split(':').Select(c => int.Parse(c)).ToArray();
            var startTime     = new DateTime(dateArgs[0], dateArgs[1], dateArgs[2], startTimeArgs[0], startTimeArgs[1], 0);
            var endTime       = new DateTime(dateArgs[0], dateArgs[1], dateArgs[2], endTimeArgs[0], endTimeArgs[1], 0);

            if (endTime < startTime)//如23:00-1:00认为跨天 但是跨天不支持10:00-11:00(第二天的11:00),这种情况跨天比较特殊,甚至跨多天,这个需要另提需求处理
            {
                endTime.AddDays(1);
            }
            //检测:监测时间的日期需与列表一致
            if (startTime.Date != detail.IssueDateTime.Date)
            {
                return(ParseResult.Date_Invalid);
            }
            if (!string.IsNullOrEmpty(detail.InstrumentCode) && startTime.Hour != detail.IssueDateTime.Hour)
            {
                return(ParseResult.Time_Invalid);
            }
            detail.IssueDateTime  = startTime;
            detail.IssueTimeRange = (short)(endTime - startTime).TotalMinutes;
            //InstrumentName,InstrumentCode
            regex = new Regex(@"\s?仪器名称:(.+)\s+仪器编号:(.+)\s?");
            match = regex.Match(sheet.GetCellValueAsString(6, 1));
            if (match.Groups.Count != 3)
            {
                return(ParseResult.Instrument_ParseFailure);
            }
            detail.InstrumentName = match.Groups[1].ToString().Trim();
            detail.InstrumentCode = match.Groups[2].ToString().Trim();
            //节点解析
            detail.DepthNodes = new List <TDepthNode>();
            foreach (Worksheet subSheet in workbook.Sheets)
            {
                int    currentRow = 9;
                string cellValue  = sheet.GetCellValueAsString(currentRow, 1);
                while (!string.IsNullOrEmpty(cellValue) && !cellValue.Contains("备注"))
                {
                    var data = new SkewBackDataV1(
                        subSheet.Name,
                        sheet.GetCellValueAsString(currentRow, 1),
                        sheet.GetCellValueAsString(currentRow, 2),
                        sheet.GetCellValueAsString(currentRow, 3),
                        sheet.GetCellValueAsString(currentRow, 4),
                        sheet.GetCellValueAsString(currentRow, 5)
                        );
                    var depthNode = new TDepthNode(detail.IssueType, detail.IssueDateTime, subSheet.Name, data.Depth);
                    depthNode.Data = data.SerializeToString();
                    detail.DepthNodes.Add(depthNode);
                    currentRow++;
                    cellValue = sheet.GetCellValueAsString(currentRow, 1);
                }
            }
            return(ParseResult.Success);
        }
Esempio n. 11
0
        /// <summary>
        /// 只有warnCoefficientMin,表只有下界,过界则录入
        /// 有min和max则有上下界,界内录入
        /// </summary>
        /// <param name="warnSettings"></param>
        /// <param name="detail"></param>
        /// <param name="warnCoefficientMin"></param>
        /// <param name="warnCoefficientMax"></param>
        /// <returns></returns>
        private IEnumerable <T> getWarnResult(WarnSettings warnSettings, TDetail detail, double warnCoefficientMin)//, double warnCoefficientMax = double.NaN)
        {
            //算法
            List <T> result = new List <T>();
            var      d      = Datas.FirstOrDefault();

            if (d == null)
            {
                return(result);
            }

            var totalHourRange = 24;
            var endTime        = detail.IssueDateTime;
            var details        = Facade.GetDetailsByTimeRange(detail.IssueType, endTime.AddHours(-totalHourRange), endTime);
            var orderedDetails = details.OrderByDescending(c => c.IssueDateTime).ToList();
            var currentDetail  = detail;
            //需预警的节点
            var maxAxle = warnSettings.STBAP_MaxAxle;

            foreach (var data in Datas)
            {
                if (data.AxialForce_Float >= maxAxle * warnCoefficientMin)
                {
                    result.Add(data);
                }

                //if (double.IsNaN(warnCoefficientMax))
                //{
                //    if (data.AxialForce_Float >= maxAxle * warnCoefficientMin)
                //        result.Add(data);
                //}
                //else
                //{
                //    if (data.AxialForce_Float >= maxAxle * warnCoefficientMin
                //        && data.AxialForce_Float < maxAxle * warnCoefficientMax)
                //        result.Add(data);
                //}
            }
            var minAxle = warnSettings.STBAP_MinAxle;

            foreach (var data in Datas)
            {
                if (data.AxialForce_Float <= minAxle / warnCoefficientMin)
                {
                    result.Add(data);
                }

                //if (double.IsNaN(warnCoefficientMax))
                //{
                //    if (data.AxialForce_Float <= minAxle / warnCoefficientMin)
                //        result.Add(data);
                //}
                //else
                //{
                //    if (data.AxialForce_Float <= minAxle / warnCoefficientMin
                //        && data.AxialForce_Float > minAxle / warnCoefficientMax)
                //        result.Add(data);
                //}
            }
            return(result);
        }
Esempio n. 12
0
 public MemorableDetail(Document storage, TDetail data) : base(storage, data)
 {
 }
Esempio n. 13
0
 public abstract ParseResult ParseBookInto(Workbook workbook, TDetail detail);
Esempio n. 14
0
 public abstract ParseResult ParseSheetInto(Worksheet sheet, TDetail detail);