Commit 53eb12c6 authored by jichao's avatar jichao

弹出设备窗口的bug

parent b7a39715
...@@ -24,9 +24,9 @@ public interface DeviceParamRepository { ...@@ -24,9 +24,9 @@ public interface DeviceParamRepository {
*/ */
@Select("<script>select d.PARAM,p.PARAM_NM,p.P_SOURCE,p.P_MIN,p.P_MAX,p.SYMBOL,p.FLAG,p.PARAM_UNIT,d.PARAM_CODE " + @Select("<script>select d.PARAM,p.PARAM_NM,p.P_SOURCE,p.P_MIN,p.P_MAX,p.SYMBOL,p.FLAG,p.PARAM_UNIT,d.PARAM_CODE " +
"from bus_device_param d,bus_devicetp_param p " + "from bus_device_param d,bus_devicetp_param p " +
"where d.PARAM_CODE=p.PARAM_CODE and d.DEV_NUM=#{devNum} order by p.PARAM_NM</script>") "where d.PARAM_CODE=p.PARAM_CODE and d.DEV_NUM=#{devNum} and p.PRO_ID=#{proId} order by p.PARAM_NM</script>")
@ResultMap("BaseResultMap") @ResultMap("BaseResultMap")
List<DeviceParam> selectDeviceParamList(@Param("devNum") String devNum); List<DeviceParam> selectDeviceParamList(@Param("devNum") String devNum, @Param("proId") String proId);
@Select("<script>select OTHER_PARAM from bus_param_refer where PRO_ID=#{proId} and OWN_PARAM='sensor'</script>") @Select("<script>select OTHER_PARAM from bus_param_refer where PRO_ID=#{proId} and OWN_PARAM='sensor'</script>")
@ResultType(String.class) @ResultType(String.class)
......
...@@ -148,7 +148,6 @@ public class SystemServiceImpl implements SystemService { ...@@ -148,7 +148,6 @@ public class SystemServiceImpl implements SystemService {
@Override @Override
public Map<String, Object> selectDeviceParamList(String devNum) { public Map<String, Object> selectDeviceParamList(String devNum) {
List<DeviceParam> list = deviceParamRepository.selectDeviceParamList(devNum);
// 表具的键 // 表具的键
String devCode = ""; String devCode = "";
// 电量的键 // 电量的键
...@@ -162,6 +161,7 @@ public class SystemServiceImpl implements SystemService { ...@@ -162,6 +161,7 @@ public class SystemServiceImpl implements SystemService {
devParam = deviceMap.get("devParam"); devParam = deviceMap.get("devParam");
proId = deviceMap.get("proId"); proId = deviceMap.get("proId");
} }
List<DeviceParam> list = deviceParamRepository.selectDeviceParamList(devNum, proId);
// 如果不为空,需要将devCode截取一下 // 如果不为空,需要将devCode截取一下
if (StringUtils.isNotEmpty(devCode) && StringUtils.isNotEmpty(devParam) && StringUtils.isNotEmpty(proId)) if (StringUtils.isNotEmpty(devCode) && StringUtils.isNotEmpty(devParam) && StringUtils.isNotEmpty(proId))
devCode = devCode.split(proId + "_")[1]; devCode = devCode.split(proId + "_")[1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment