key 값
key = x.Fce_No + x.endDate.Substring(0, 14);
//가열로 번호 + endDate시간을 key로잡고
model에서는 받은 시간을 바탕으로 데이터를 뽑아낸다
foreach (var x in currentModelData._kPI3Items)
        {
            foreach (var item in dic_date)
            {
                if (string.Compare(x.Fce_No.ToString(), item.Key.Substring(0, 1)) ==0) // FceNo이 같고
                {
                    Debug.Log("key:" + item.Key);
                    CurrnetDate = DateTime.ParseExact(item.Key.Substring(1, 14), "yyyyMMddHHmmss",null);
                    prevDate = CurrnetDate.AddHours(-12);
                    //시작날짜가 이전날짜보다 크고
                    //끝날짜가 dictionary end데이트보다 작다면
                    //데이트 추가
                    if (DateTime.Compare(DateTime.ParseExact(x.startDate,"yyyyMMddHHmmss", null), prevDate) > 0
                        && DateTime.Compare(DateTime.ParseExact(x.endDate, "yyyyMMddHHmmss", null), CurrnetDate) < 0)
                    {
                        //
                        if (x.table_name == "TB_FUEL_KPI_MODEL")
                        {
                            item.Value.Gas_A = x.Gas_Flow;
                        }
                    }
                }
            }
        }
 
댓글 없음:
댓글 쓰기