| | |
| | | public static PowerInf infoToPower(InfoDto info) { |
| | | PowerInf pinf = new PowerInf(); |
| | | pinf.setCompany(info.getCompany()) |
| | | .setPowerType(info.getPowerType()) |
| | | .setPowerModel(info.getPowerModel()) |
| | | .setProtocol(info.getProtocol()) |
| | | .setPowerIp(info.getPowerIp()); |
| | | .setPowerIp(info.getPowerIp()) |
| | | .setModelCfg(info.getModelCfg()) |
| | | .setPowerInuseTime(info.getPowerInuseTime()) |
| | | .setAcvolHighLimit(info.getAcvolHighLimit()) |
| | | .setAcvolLowLimit(info.getAcvolLowLimit()) |
| | | .setDcoutvolLowLimit(info.getDcoutvolLowLimit()); |
| | | if(info.getPowerId()!=null){ |
| | | pinf.setPowerId(info.getPowerId()); |
| | | } |
| | | if(info.getPowerName()!=null){ |
| | | pinf.setPowerName(info.getPowerName()); |
| | | } |
| | | StationInf sinf=new StationInf(); |
| | | sinf.setProvice(info.getProvice()) |
| | | .setCity(info.getCity()) |
| | |
| | | .setStationName(info.getStationName()) |
| | | .setStationType(info.getStationType()) |
| | | .setLatitude(info.getLatitude()) |
| | | .setLongitude(info.getLongitude()); |
| | | .setLongitude(info.getLongitude()) |
| | | .setNodeStation(info.getNodeStation()); |
| | | if(info.getProvice()!=null){ |
| | | sinf.setProvice(info.getProvice()); |
| | | } |
| | | if(info.getCity()!=null){ |
| | | sinf.setCity(info.getCity()); |
| | | } |
| | | if(info.getCountry()!=null){ |
| | | sinf.setCountry(info.getCountry()); |
| | | } |
| | | if(info.getStationName()!=null){ |
| | | sinf.setStationName(info.getStationName()); |
| | | } |
| | | if(info.getStationId()!=null){ |
| | | sinf.setStationId(info.getStationId()); |
| | | } |
| | | pinf.setSinf(sinf); |
| | | return pinf; |
| | | } |
| | | //将info对象转为电池组对象 |
| | | public static BattInf infoToBatt(InfoDto info) { |
| | | BattInf binf = new BattInf(); |
| | | binf.setDevIp(info.getDevIp()) |
| | | .setDevType(info.getDevType()) |
| | | .setMoncapstd(info.getMoncapstd()) |
| | | .setMoncount(info.getMoncount()) |
| | | .setMonresstd(info.getMonresstd()) |
| | | .setMonvolstd(info.getMonvolstd()) |
| | | .setProduct(info.getProduct()) |
| | | .setBattModel(info.getBattModel()); |
| | | if(info.getDevType()!=null){ |
| | | binf.setDevType(info.getDevType()); |
| | | } |
| | | if(info.getMoncapstd()!=null){ |
| | | binf.setMoncapstd(info.getMoncapstd()); |
| | | } |
| | | if(info.getMoncount()!=null){ |
| | | binf.setMoncount(info.getMoncount()); |
| | | } |
| | | if(info.getMonresstd()!=null){ |
| | | binf.setMonresstd(info.getMonresstd()); |
| | | } |
| | | if(info.getMonvolstd()!=null){ |
| | | binf.setMonvolstd(info.getMonvolstd()); |
| | | } |
| | | if(info.getProduct()!=null){ |
| | | binf.setProduct(info.getProduct()); |
| | | } |
| | | if(info.getBattModel()!=null){ |
| | | binf.setBattModel(info.getBattModel()); |
| | | } |
| | | if(info.getDevIp()!=null){ |
| | | binf.setDevIp(info.getDevIp()); |
| | | } |
| | | if(info.getBattgroupId()!=null){ |
| | | binf.setBattgroupId(info.getBattgroupId()); |
| | | } |
| | | if(info.getBattgroupName()!=null){ |
| | | binf.setBattgroupName(info.getBattgroupName()); |
| | | } |
| | | if(info.getDevId()!=null){ |
| | | binf.setDevId(info.getDevId()); |
| | | } |
| | | if(info.getDevName()!=null){ |
| | | binf.setDevName(info.getDevName()); |
| | | } |
| | | if(info.getInuseTime()!=null){ |
| | | binf.setInuseTime(info.getInuseTime()); |
| | | } |
| | | if(info.getFloatVolLevel()!=null){ |
| | | binf.setFloatVolLevel(info.getFloatVolLevel()); |
| | | } |
| | | if(info.getOfflinelineVolLevel()!=null){ |
| | | binf.setOfflinelineVolLevel(info.getOfflinelineVolLevel()); |
| | | } |
| | | if(info.getFloatCurrLevel()!=null){ |
| | | binf.setFloatCurrLevel(info.getFloatCurrLevel()); |
| | | } |
| | | if(info.getMaxDisCurr()!=null){ |
| | | binf.setMaxDisCurr(info.getMaxDisCurr()); |
| | | } |
| | | if(info.getSignType()!=null){ |
| | | binf.setSignType(info.getSignType()); |
| | | } |
| | | if(info.getCommPort()!=null){ |
| | | binf.setCommPort(info.getCommPort()); |
| | | } |
| | | if(info.getLoadCurr()!=null){ |
| | | binf.setLoadCurr(info.getLoadCurr()); |
| | | } |
| | | if(info.getVideoUrl()!=null){ |
| | | binf.setVideoUrl(info.getVideoUrl()); |
| | | } |
| | | return binf; |
| | | } |
| | | } |