fix(监控平台):修复切换场景获取定位设备数量问题;修复传感器汇总,点击获取最新数据index问题
master
xs 5 days ago
parent 78c956c31e
commit 0826fbf812

@ -21,6 +21,16 @@ public class RemoteBusinessFallbackFactory implements FallbackFactory<RemoteBusi
public R<?> computeOnlineDevicecCount(int days, String source) {
return R.fail("获取租户信息失败:" + throwable.getMessage());
}
@Override
public R<?> modbusDataProcess(String source) {
return R.fail("ModbusTcpNet协议处理信息失败:" + throwable.getMessage());
}
@Override
public R<?> mcDataProcess(String source) {
return R.fail("三菱MelsecMcNet协议处理信息失败:" + throwable.getMessage());
}
};
}
}

@ -196,7 +196,8 @@ public class HwDictConstants {
intervalMap.put(INTERVAL_HOUR, "1m");
intervalMap.put(INTERVAL_DAY, "1h");
intervalMap.put(INTERVAL_WEEK, "1d");
intervalMap.put(INTERVAL_MONTH, "1w");
// intervalMap.put(INTERVAL_MONTH, "1w");
intervalMap.put(INTERVAL_MONTH, "1d");
intervalMap.put(INTERVAL_YEAR, "30d");
}

@ -26,7 +26,6 @@ public class PlcDeviceModeFunctionController extends BaseController {
*/
@Resource
private PlcDeviceModeFunctionService plcDeviceModeFunctionService;
/**
*
*

@ -39,7 +39,7 @@ public class DeviceHistoryGroupDataVo {
private String interval;//1小时2日3周4月5年
//此字段暂时不用
private int intervalValue;//小时默认1按照分钟展示2日按照24小时展示,周按照7天展示,月按照30天展示,年按照12个月展示
private int intervalValue;//小时默认1按照分钟展示2日按照小时展示,周按照天展示默认7,月按照天展示默认30,年按照月展示
@NotNull(message = "intervalType cannot be null")
private String intervalType;//1agv平均值2sum累计值3max最大值4min最小值

@ -825,7 +825,7 @@ public class HwDeviceServiceImpl implements IHwDeviceService {
/**
* @return String
* @param: sceneId
* @description 线
* @description 线
* @author xins
* @date 2023-09-21 9:09
*/
@ -1435,7 +1435,12 @@ public class HwDeviceServiceImpl implements IHwDeviceService {
list2.addAll(strings);
for (int i = 0; i < list2.size(); i++) {
//查询类型的字段名
String s = hwDeviceMapper.selectFunctionNameByFunctionIdentifier(list2.get(i),modeId);
String s = "";
if (list2.get(i).equals("value1")){
s = hwDeviceMapper.selectFunctionNameByFunctionIdentifier("value",modeId);
}else {
s = hwDeviceMapper.selectFunctionNameByFunctionIdentifier(list2.get(i),modeId);
}
mapName.put(list2.get(i),s);
}
list.add(mapName);

@ -123,11 +123,11 @@ public class HwMonitorPlatformServiceImpl implements IHwMonitorPlatformService {
}
}
deviceDataColumnVos.remove(3);
DeviceDataColumnVo deviceDataColumnVo = deviceDataColumnVos.get(5);
DeviceDataColumnVo deviceDataColumnVo1 = deviceDataColumnVos.get(deviceDataColumnVos.size() - 1);
deviceDataColumnVos.set(5, deviceDataColumnVo1);
deviceDataColumnVos.set(deviceDataColumnVos.size() - 1, deviceDataColumnVo);
// deviceDataColumnVos.remove(3);
// DeviceDataColumnVo deviceDataColumnVo = deviceDataColumnVos.get(5);
// DeviceDataColumnVo deviceDataColumnVo1 = deviceDataColumnVos.get(deviceDataColumnVos.size() - 1);
// deviceDataColumnVos.set(5, deviceDataColumnVo1);
// deviceDataColumnVos.set(deviceDataColumnVos.size() - 1, deviceDataColumnVo1);
returnObj.put("deviceDataColumns", deviceDataColumnVos);
returnObj.put("latestData", latestDataMaps);
return returnObj;

@ -63,6 +63,8 @@ public class HwSceneServiceImpl implements IHwSceneService {
@DataScope(tenantAlias = "hs")
public List<HwScene> selectHwSceneList(HwScene hwScene) {
hwScene.setSceneStatus(HwDictConstants.SCENE_STATUS_NORMAL);
Long tenantId = SecurityUtils.getTenantId();
hwScene.setTenantId(tenantId);
List<HwScene> scenes = hwSceneMapper.selectHwSceneList(hwScene);
boolean defaultFlag = false;
for (HwScene scene : scenes) {

@ -175,8 +175,8 @@ select a.device_mode_name,sum(a.sum) sum from (select
<if test="onlineStatus != null and onlineStatus != ''"> and hd.online_status = #{onlineStatus}</if>
<if test="deviceCode != null and deviceCode != ''"> and device_code like concat('%', #{deviceCode}, '%')</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="sceneId != null "> and scene_id = #{sceneId}</if>
<if test="monitorUnitId != null "> and monitor_unit_id = #{monitorUnitId}</if>
<if test="sceneId != null "> and hd.scene_id = #{sceneId}</if>
<if test="monitorUnitId != null "> and hd.monitor_unit_id = #{monitorUnitId}</if>
<if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
<if test="networkingMode != null and networkingMode != ''"> and networking_mode = #{networkingMode}</if>
<if test="accessProtocol != null "> and access_protocol = #{accessProtocol}</if>

@ -325,7 +325,7 @@
</delete>
<select id="selectBeaconDeviceNums" parameterType="Long" resultType="int">
select count(1) from hw_device where device_mode_id =
select count(1) from hw_device where device_mode_id in
(select device_mode_id from hw_device_mode where gps_flag = 1 and scene_id = #{sceneId}
) and scene_id = #{sceneId}
</select>

Loading…
Cancel
Save