|
|
|
@ -56,11 +56,16 @@ public class TotalElectricMeterController { |
|
|
|
|
@RequestMapping(value = "/sel1/{deviceId}", method = RequestMethod.GET) |
|
|
|
|
public AjaxResult selzdb1(@PathVariable(value = "deviceId", required = false) Integer deviceId) { |
|
|
|
|
PsdcDevicePowerRes devicePowerRes = psdcThermometerHtdataService.selTotalElectricityInfo(deviceId); |
|
|
|
|
Map map = psdcElectricHtdataService.selTotalElectricityInfo(); |
|
|
|
|
devicePowerRes.setEDay((Double) map.get("eday")); |
|
|
|
|
devicePowerRes.setEMonth((Double) map.get("emonth")); |
|
|
|
|
AjaxResult ajax = AjaxResult.success(devicePowerRes); |
|
|
|
|
return ajax; |
|
|
|
|
if (null != devicePowerRes){ |
|
|
|
|
Map map = psdcElectricHtdataService.selTotalElectricityInfo(); |
|
|
|
|
devicePowerRes.setEDay((Double) map.get("eday")); |
|
|
|
|
devicePowerRes.setEMonth((Double) map.get("emonth")); |
|
|
|
|
AjaxResult ajax = AjaxResult.success(devicePowerRes); |
|
|
|
|
return ajax; |
|
|
|
|
} else { |
|
|
|
|
return AjaxResult.success("该设备今日暂无数据!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('emonitor:db')") |
|
|
|
|