0918优化-单站监控首页日期修改&点位模糊查询
This commit is contained in:
@ -147,9 +147,10 @@ public class EmsSiteConfigController extends BaseController{
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/getDevicePointList")
|
@GetMapping("/getDevicePointList")
|
||||||
public TableDataInfo getDevicePointList(@RequestParam String siteId,@RequestParam String deviceId,
|
public TableDataInfo getDevicePointList(@RequestParam String siteId,@RequestParam String deviceId,
|
||||||
@RequestParam String deviceCategory, String dataPointName)
|
@RequestParam String deviceCategory, String dataPointName,
|
||||||
|
String dataPoint)
|
||||||
{
|
{
|
||||||
List<PointQueryResponse> result = iEmsDeviceSettingService.getSingleSiteDevicePoints(siteId,deviceId,deviceCategory,dataPointName);
|
List<PointQueryResponse> result = iEmsDeviceSettingService.getSingleSiteDevicePoints(siteId,deviceId,deviceCategory,dataPointName,dataPoint);
|
||||||
return getDataTable2(result);
|
return getDataTable2(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -121,5 +121,6 @@ public interface EmsPointMatchMapper
|
|||||||
// 单个站点单个设备点位查询
|
// 单个站点单个设备点位查询
|
||||||
public List<PointQueryResponse> getSingleSiteDevicePoints(@Param("siteId")String siteId,
|
public List<PointQueryResponse> getSingleSiteDevicePoints(@Param("siteId")String siteId,
|
||||||
@Param("deviceCategory")String deviceCategory,
|
@Param("deviceCategory")String deviceCategory,
|
||||||
@Param("dataPointName")String dataPointName);
|
@Param("dataPointName")String dataPointName,
|
||||||
|
@Param("dataPoint")String dataPoint);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,5 +24,6 @@ public interface IEmsDeviceSettingService
|
|||||||
|
|
||||||
public List<DeviceCategory> getDeviceCategory();
|
public List<DeviceCategory> getDeviceCategory();
|
||||||
|
|
||||||
public List<PointQueryResponse> getSingleSiteDevicePoints(String siteId, String deviceId, String deviceCategory, String dataPointName);
|
public List<PointQueryResponse> getSingleSiteDevicePoints(String siteId, String deviceId, String deviceCategory,
|
||||||
|
String dataPointName, String dataPoint);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -120,8 +120,8 @@ public class EmsDeviceSettingServiceImpl implements IEmsDeviceSettingService
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<PointQueryResponse> getSingleSiteDevicePoints(String siteId, String deviceId,
|
public List<PointQueryResponse> getSingleSiteDevicePoints(String siteId, String deviceId,
|
||||||
String deviceCategory, String dataPointName) {
|
String deviceCategory, String dataPointName,String dataPoint) {
|
||||||
List<PointQueryResponse> response = emsPointMatchMapper.getSingleSiteDevicePoints(siteId,deviceCategory,dataPointName);
|
List<PointQueryResponse> response = emsPointMatchMapper.getSingleSiteDevicePoints(siteId,deviceCategory,dataPointName,dataPoint);
|
||||||
|
|
||||||
// 电动所的电池簇特殊处理-来源pcs+bmsd
|
// 电动所的电池簇特殊处理-来源pcs+bmsd
|
||||||
if (siteId.equals(DDS_SITE_ID) && DeviceCategory.CLUSTER.getCode().equals(deviceCategory)) {
|
if (siteId.equals(DDS_SITE_ID) && DeviceCategory.CLUSTER.getCode().equals(deviceCategory)) {
|
||||||
|
|||||||
@ -387,7 +387,7 @@
|
|||||||
|
|
||||||
<select id="getAvgTempByHour" parameterType="com.xzzn.ems.domain.vo.DateSearchRequest" resultType="java.util.Map">
|
<select id="getAvgTempByHour" parameterType="com.xzzn.ems.domain.vo.DateSearchRequest" resultType="java.util.Map">
|
||||||
SELECT latest.statisDate, avg(t.avg_cell_temp) as avgTemp
|
SELECT latest.statisDate, avg(t.avg_cell_temp) as avgTemp
|
||||||
FROM ( SELECT p.site_id, p.device_id, DATE_FORMAT( p.update_time, '%H:00') AS statisDate, MAX(p.update_time) AS max_update_time
|
FROM ( SELECT p.site_id, p.device_id, DATE_FORMAT( p.update_time, '%Y-%m-%d %H:00') AS statisDate, MAX(p.update_time) AS max_update_time
|
||||||
FROM ems_battery_cluster p
|
FROM ems_battery_cluster p
|
||||||
<include refid="statisCommonFilter"/>
|
<include refid="statisCommonFilter"/>
|
||||||
GROUP BY p.site_id, p.device_id, statisDate
|
GROUP BY p.site_id, p.device_id, statisDate
|
||||||
|
|||||||
@ -449,7 +449,7 @@
|
|||||||
avg(t.stack_soc) as avgSoc,
|
avg(t.stack_soc) as avgSoc,
|
||||||
avg(t.stack_soh) as avgSoh,
|
avg(t.stack_soh) as avgSoh,
|
||||||
avg(t.avg_temperature) as avgTemp
|
avg(t.avg_temperature) as avgTemp
|
||||||
from ( SELECT p.site_id, p.device_id, DATE_FORMAT(p.update_time, '%H:00') AS dateHour,MAX(p.update_time) as max_update_time
|
from ( SELECT p.site_id, p.device_id, DATE_FORMAT(p.update_time, '%Y-%m-%d %H:00') AS dateHour,MAX(p.update_time) as max_update_time
|
||||||
FROM ems_battery_stack p
|
FROM ems_battery_stack p
|
||||||
<include refid="statisCommonFilter"/>
|
<include refid="statisCommonFilter"/>
|
||||||
GROUP BY p.site_id,p.device_id,dateHour
|
GROUP BY p.site_id,p.device_id,dateHour
|
||||||
|
|||||||
@ -335,5 +335,8 @@
|
|||||||
<if test="dataPointName != null and dataPointName != ''">
|
<if test="dataPointName != null and dataPointName != ''">
|
||||||
and t.data_point_name like CONCAT('%', #{dataPointName}, '%')
|
and t.data_point_name like CONCAT('%', #{dataPointName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="dataPoint != null and dataPoint != ''">
|
||||||
|
and t.data_point like CONCAT('%', #{dataPoint}, '%')
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user