public ActionResult PlantData(int plantId) { Plant plant = PlantService.GetInstance().GetPlantInfoById(plantId); Cn.Loosoft.Zhisou.SunPower.Common.vo.PlantVO plantVO = new Cn.Loosoft.Zhisou.SunPower.Common.vo.PlantVO(); User user = UserService.GetInstance().Get((int)plant.userID); plantVO.plantName = plant.name; plantVO.CQ2reduce = plant.Reductiong.ToString(); plantVO.CQ2reduceUnit = plant.ReductiongUnit; plantVO.curPower = plant.DisplayTodayTotalPower; plantVO.curPowerUnit = plant.TodayTotalPowerUnit; plantVO.dayEnergy = plant.DisplayTotalDayEnergy; plantVO.dayEnergyUnit = plant.TotalDayEnergyUnit; plantVO.solarIntensity = plant.Sunstrength == null ? "" : plant.Sunstrength.ToString(); plantVO.solarIntensityUnit = MonitorType.getMonitorTypeByCode(MonitorType.PLANT_MONITORITEM_LINGT_CODE).unit; //add by qhb in 20120106 for 增加逆变器数量 IList <Device> inverterDevices = plant.typeDevices(DeviceData.INVERTER_CODE); plantVO.inverterCount = inverterDevices.Count.ToString(); plantVO.inverterTypeStr = getMainType(inverterDevices, 3); plantVO.installDate = plant.installdate.ToString("yyyy-MM-dd"); plantVO.DesignPower = plant.design_power + " kWp"; plantVO.Country = plant.country; plantVO.City = plant.city; plantVO.organize = user.organize; plantVO.totalEnergy = plant.DisplayTotalEnergy; plantVO.totalEnergyUnit = plant.TotalEnergyUnit; plantVO.imageArray = "http://" + Request.Url.Authority + (string.IsNullOrEmpty(plant.onePic) ? "/bigscreen/images/plant_img.jpg":"/ufile/" + plant.onePic); plantVO.temprature = getPlantTemp(plant).ToString(); plantVO.tempratureUnit = user.TemperatureType.ToUpper(); return(Json(plantVO, JsonRequestBehavior.AllowGet)); }
public ActionResult PlantData(int plantId) { Plant plant = PlantService.GetInstance().GetPlantInfoById(plantId); Cn.Loosoft.Zhisou.SunPower.Common.vo.PlantVO plantVO = new Cn.Loosoft.Zhisou.SunPower.Common.vo.PlantVO(); User user = UserService.GetInstance().Get((int)plant.userID); plantVO.plantName = plant.name; plantVO.CQ2reduce = plant.Reductiong.ToString(); plantVO.CQ2reduceUnit = plant.ReductiongUnit; plantVO.curPower = plant.DisplayTodayTotalPower; plantVO.curPowerUnit = plant.TodayTotalPowerUnit; plantVO.dayEnergy = plant.DisplayTotalDayEnergy; plantVO.dayEnergyUnit = plant.TotalDayEnergyUnit; plantVO.solarIntensity = plant.Sunstrength == null ? "" : plant.Sunstrength.ToString(); plantVO.solarIntensityUnit = MonitorType.getMonitorTypeByCode(MonitorType.PLANT_MONITORITEM_LINGT_CODE).unit; //add by qhb in 20120106 for 增加逆变器数量 IList<Device> inverterDevices = plant.typeDevices(DeviceData.INVERTER_CODE); plantVO.inverterCount = inverterDevices.Count.ToString(); plantVO.inverterTypeStr = getMainType(inverterDevices, 3); plantVO.installDate = plant.installdate.ToString("yyyy-MM-dd"); plantVO.DesignPower = plant.design_power + " kWp"; plantVO.Country = plant.country; plantVO.City = plant.city; plantVO.organize = user.organize; plantVO.totalEnergy = plant.DisplayTotalEnergy; plantVO.totalEnergyUnit = plant.TotalEnergyUnit; plantVO.imageArray = "http://" + Request.Url.Authority + (string.IsNullOrEmpty(plant.onePic) ? "/bigscreen/images/plant_img.jpg":"/ufile/"+plant.onePic); plantVO.temprature = getPlantTemp(plant).ToString(); plantVO.tempratureUnit = user.TemperatureType.ToUpper(); return Json(plantVO, JsonRequestBehavior.AllowGet); }