kaiyu
2020-10-26 80ed4c1a5a0b8d5a87cf0e5a0885e9267c3d28a3
src/main/java/com/moral/service/impl/DeviceServiceImpl.java
@@ -212,6 +212,7 @@
            Integer orgId = Integer.parseInt(orgIdObj.toString());
            List<Integer> orgIds = orgMapper.selectLowerOrgIds(orgId);
            params.put("orgIds", orgIds);
            System.out.println(params);
            deviceList = deviceMapper.selectByMap(params);
            // loadDeviceState(deviceList);
        }
@@ -876,10 +877,10 @@
    @Override
    public List byMonitorIdGetDeviceAndWindSpecial(String id, String time, String tab) {
        MonitorPoint monitorPoint=monitorPointMapper.byIdGetMonitorPoint(Integer.parseInt(id));
        Integer areaCode=monitorPoint.getAreaCode();
        String townCode= monitorPoint.getTownCode()+"";
        int monitorPointId=monitorPoint.getId();
        Map<String, Object> parm=new HashMap<>();
        List<DeviceAndWind> deviceAndWinds=new ArrayList<>();
        Double  loma= 0.0;
@@ -913,6 +914,14 @@
            }
            length=2000;
            perdlen=280;
        }else if(monitorPointId==35){
         DeviceAndWind deviceAndWind=deviceMapper.getDeviceAndWindByMac("898607b0101730392253",time,tab);
         DeviceAndWind deviceAndWind1=deviceMapper.getDeviceAndWindByMac("p5dnd7a0392083",time,tab);
         deviceAndWinds.add(deviceAndWind);
         deviceAndWinds.add(deviceAndWind1);
            length=2000;
            perdlen=50;
        }else {
            deviceAndWinds=deviceMapper.byMonitorIdGetDeviceAndWind(Integer.parseInt(id),time,tab);
            length=2000;
@@ -990,7 +999,7 @@
                if (tvoc==null){
                    tvoc=0.0;
                }
                Double dir = (270.0 - windDir * Math.PI / 180.0);
                Double dir = (270.0 + windDir * Math.PI / 180.0);
                U = windSpeed * Math.cos(dir);
                V = windSpeed * Math.sin(dir);
@@ -1070,7 +1079,13 @@
    }
    @Override
    public DeviceAndWind getDeviceAndWindByMac(String mac,String time,String table) {
        return deviceMapper.getDeviceAndWindByMac(mac,time,table);
    public List<Device> getDeviceByCodeAndId(String code, String id) {
        return deviceMapper.getDeviceByCodeAndId(code,id);
    }
    @Override
    public String byMacGetOrgId(String mac) {
        return deviceMapper.byMacGetOrgId(mac);
    }
}