|
|
|
@ -114,30 +114,30 @@ public class ChargerService
|
|
|
|
|
SetPeakValleyTime setPeakValleyTime = new SetPeakValleyTime()
|
|
|
|
|
{
|
|
|
|
|
NumberTime = Convert.ToByte(elecPriceModelVersionDetails.Count),
|
|
|
|
|
StartHH1 = Convert.ToByte(elecPriceModelVersionDetails[0].StartHour),
|
|
|
|
|
StartHH2 = Convert.ToByte(elecPriceModelVersionDetails[1].StartHour),
|
|
|
|
|
StartHH3 = Convert.ToByte(elecPriceModelVersionDetails[2].StartHour),
|
|
|
|
|
StartHH4 = Convert.ToByte(elecPriceModelVersionDetails[3].StartHour),
|
|
|
|
|
StartHH5 = Convert.ToByte(elecPriceModelVersionDetails[4].StartHour),
|
|
|
|
|
StartHH6 = Convert.ToByte(elecPriceModelVersionDetails[5].StartHour),
|
|
|
|
|
StartHH7 = Convert.ToByte(elecPriceModelVersionDetails[6].StartHour),
|
|
|
|
|
StartHH8 = Convert.ToByte(elecPriceModelVersionDetails[7].StartHour),
|
|
|
|
|
StartMM1 = Convert.ToByte(elecPriceModelVersionDetails[0].StartMinute),
|
|
|
|
|
StartMM2 = Convert.ToByte(elecPriceModelVersionDetails[1].StartMinute),
|
|
|
|
|
StartMM3 = Convert.ToByte(elecPriceModelVersionDetails[2].StartMinute),
|
|
|
|
|
StartMM4 = Convert.ToByte(elecPriceModelVersionDetails[3].StartMinute),
|
|
|
|
|
StartMM5 = Convert.ToByte(elecPriceModelVersionDetails[4].StartMinute),
|
|
|
|
|
StartMM6 = Convert.ToByte(elecPriceModelVersionDetails[5].StartMinute),
|
|
|
|
|
StartMM7 = Convert.ToByte(elecPriceModelVersionDetails[6].StartMinute),
|
|
|
|
|
StartMM8 = Convert.ToByte(elecPriceModelVersionDetails[7].StartMinute),
|
|
|
|
|
TimePeak1 = Convert.ToByte(elecPriceModelVersionDetails[0].Type),
|
|
|
|
|
TimePeak2 = Convert.ToByte(elecPriceModelVersionDetails[1].Type),
|
|
|
|
|
TimePeak3 = Convert.ToByte(elecPriceModelVersionDetails[2].Type),
|
|
|
|
|
TimePeak4 = Convert.ToByte(elecPriceModelVersionDetails[3].Type),
|
|
|
|
|
TimePeak5 = Convert.ToByte(elecPriceModelVersionDetails[4].Type),
|
|
|
|
|
TimePeak6 = Convert.ToByte(elecPriceModelVersionDetails[5].Type),
|
|
|
|
|
TimePeak7 = Convert.ToByte(elecPriceModelVersionDetails[6].Type),
|
|
|
|
|
TimePeak8 = Convert.ToByte(elecPriceModelVersionDetails[7].Type)
|
|
|
|
|
StartHH1 = (byte)(elecPriceModelVersionDetails.Count > 0?Convert.ToByte(elecPriceModelVersionDetails[0].StartHour) :0),
|
|
|
|
|
StartHH2 = (byte)(elecPriceModelVersionDetails.Count > 1?Convert.ToByte(elecPriceModelVersionDetails[1].StartHour) : 0),
|
|
|
|
|
StartHH3 = (byte)(elecPriceModelVersionDetails.Count > 2?Convert.ToByte(elecPriceModelVersionDetails[2].StartHour):0),
|
|
|
|
|
StartHH4 = (byte)(elecPriceModelVersionDetails.Count > 3?Convert.ToByte(elecPriceModelVersionDetails[3].StartHour):0),
|
|
|
|
|
StartHH5 = (byte)(elecPriceModelVersionDetails.Count > 4?Convert.ToByte(elecPriceModelVersionDetails[4].StartHour):0),
|
|
|
|
|
StartHH6 = (byte)(elecPriceModelVersionDetails.Count > 5?Convert.ToByte(elecPriceModelVersionDetails[5].StartHour):0),
|
|
|
|
|
StartHH7 = (byte)(elecPriceModelVersionDetails.Count > 6?Convert.ToByte(elecPriceModelVersionDetails[6].StartHour):0),
|
|
|
|
|
StartHH8 = (byte)(elecPriceModelVersionDetails.Count > 7?Convert.ToByte(elecPriceModelVersionDetails[7].StartHour) : 0),
|
|
|
|
|
StartMM1 = (byte)(elecPriceModelVersionDetails.Count > 0?Convert.ToByte(elecPriceModelVersionDetails[0].StartMinute):0),
|
|
|
|
|
StartMM2 = (byte)(elecPriceModelVersionDetails.Count > 1?Convert.ToByte(elecPriceModelVersionDetails[1].StartMinute):0),
|
|
|
|
|
StartMM3 = (byte)(elecPriceModelVersionDetails.Count > 2?Convert.ToByte(elecPriceModelVersionDetails[2].StartMinute):0),
|
|
|
|
|
StartMM4 = (byte)(elecPriceModelVersionDetails.Count > 3?Convert.ToByte(elecPriceModelVersionDetails[3].StartMinute):0),
|
|
|
|
|
StartMM5 = (byte)(elecPriceModelVersionDetails.Count > 4?Convert.ToByte(elecPriceModelVersionDetails[4].StartMinute):0),
|
|
|
|
|
StartMM6 = (byte)(elecPriceModelVersionDetails.Count > 5?Convert.ToByte(elecPriceModelVersionDetails[5].StartMinute):0),
|
|
|
|
|
StartMM7 = (byte)(elecPriceModelVersionDetails.Count > 6?Convert.ToByte(elecPriceModelVersionDetails[6].StartMinute) : 0),
|
|
|
|
|
StartMM8 = (byte)(elecPriceModelVersionDetails.Count > 7 ? Convert.ToByte(elecPriceModelVersionDetails[7].StartMinute) : 0),
|
|
|
|
|
TimePeak1 = (byte)(elecPriceModelVersionDetails.Count > 0 ? Convert.ToByte(elecPriceModelVersionDetails[0].Type):0),
|
|
|
|
|
TimePeak2 = (byte)(elecPriceModelVersionDetails.Count > 1?Convert.ToByte(elecPriceModelVersionDetails[1].Type):0),
|
|
|
|
|
TimePeak3 = (byte)(elecPriceModelVersionDetails.Count > 2?Convert.ToByte(elecPriceModelVersionDetails[2].Type):0),
|
|
|
|
|
TimePeak4 = (byte)(elecPriceModelVersionDetails.Count > 3?Convert.ToByte(elecPriceModelVersionDetails[3].Type):0),
|
|
|
|
|
TimePeak5 = (byte)(elecPriceModelVersionDetails.Count > 4?Convert.ToByte(elecPriceModelVersionDetails[4].Type):0),
|
|
|
|
|
TimePeak6 = (byte)(elecPriceModelVersionDetails.Count > 5?Convert.ToByte(elecPriceModelVersionDetails[5].Type):0),
|
|
|
|
|
TimePeak7 = (byte)(elecPriceModelVersionDetails.Count > 6?Convert.ToByte(elecPriceModelVersionDetails[6].Type):0),
|
|
|
|
|
TimePeak8 = (byte)(elecPriceModelVersionDetails.Count > 7?Convert.ToByte(elecPriceModelVersionDetails[7].Type):0)
|
|
|
|
|
};
|
|
|
|
|
return setPeakValleyTime;
|
|
|
|
|
}
|
|
|
|
|