|
@@ -15,6 +15,8 @@ import com.gyee.generation.model.auto.*;
|
|
import com.gyee.generation.service.auto.IWindturbinepowerService;
|
|
import com.gyee.generation.service.auto.IWindturbinepowerService;
|
|
import com.gyee.generation.util.realtimesource.IEdosUtil;
|
|
import com.gyee.generation.util.realtimesource.IEdosUtil;
|
|
import com.gyee.generation.util.redis.RedisService;
|
|
import com.gyee.generation.util.redis.RedisService;
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.apache.commons.codec.language.bm.BeiderMorseEncoder;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
@@ -29,6 +31,7 @@ import java.util.stream.Collectors;
|
|
* @Description : 理论功率,保证功率
|
|
* @Description : 理论功率,保证功率
|
|
*/
|
|
*/
|
|
@Service
|
|
@Service
|
|
|
|
+@Slf4j
|
|
public class TheorypowerService {
|
|
public class TheorypowerService {
|
|
@Resource
|
|
@Resource
|
|
private IEdosUtil edosUtil;
|
|
private IEdosUtil edosUtil;
|
|
@@ -62,6 +65,7 @@ public class TheorypowerService {
|
|
* 理论功率,保证功率
|
|
* 理论功率,保证功率
|
|
*/
|
|
*/
|
|
public void theropower() throws Exception {
|
|
public void theropower() throws Exception {
|
|
|
|
+ long begin = System.currentTimeMillis();
|
|
init();
|
|
init();
|
|
Map<String, Map<Double, Double>> zbzglMap = CacheContext.zbzglMap;
|
|
Map<String, Map<Double, Double>> zbzglMap = CacheContext.zbzglMap;
|
|
Map<String, Map<Double, Double>> zzsglMap = CacheContext.zzsglMap;
|
|
Map<String, Map<Double, Double>> zzsglMap = CacheContext.zzsglMap;
|
|
@@ -85,10 +89,10 @@ public class TheorypowerService {
|
|
Windpowerstationpointnew linebzglpoint = linepointnewMap.get(Contant.ZBZGL);
|
|
Windpowerstationpointnew linebzglpoint = linepointnewMap.get(Contant.ZBZGL);
|
|
Windpowerstationpointnew linezsglpoint = linepointnewMap.get(Contant.ZZSGL);
|
|
Windpowerstationpointnew linezsglpoint = linepointnewMap.get(Contant.ZZSGL);
|
|
linewtmap.get(line.getId()).stream().forEach(wt->{
|
|
linewtmap.get(line.getId()).stream().forEach(wt->{
|
|
- String zzsglString = redisService.get("ZZSGL");
|
|
|
|
- Map<String,Map<Double, Double>> zszglMap = JSONObject.parseObject(zzsglString, new TypeReference<Map<String,Map<Double,Double>>>() {
|
|
|
|
- });
|
|
|
|
- Map<Double, Double> zsglMap = zszglMap.get(wt.getId());
|
|
|
|
|
|
+// String zzsglString = redisService.get("ZZSGL");
|
|
|
|
+// Map<String,Map<Double, Double>> zszglMap = JSONObject.parseObject(zzsglString, new TypeReference<Map<String,Map<Double,Double>>>() {
|
|
|
|
+// });
|
|
|
|
+ Map<Double, Double> zsglMap = zzsglMap.get(wt.getId());
|
|
Map<String, Windturbinetestingpointnew> windturbinetestingpointnewMap = wtpAimap.get(wt.getId());
|
|
Map<String, Windturbinetestingpointnew> windturbinetestingpointnewMap = wtpAimap.get(wt.getId());
|
|
Windturbinetestingpointnew speedPointnew = windturbinetestingpointnewMap.get(Contant.AI022);
|
|
Windturbinetestingpointnew speedPointnew = windturbinetestingpointnewMap.get(Contant.AI022);
|
|
Windturbinetestingpointnew ztmxPointnew = windturbinetestingpointnewMap.get(Contant.FJ5T);
|
|
Windturbinetestingpointnew ztmxPointnew = windturbinetestingpointnewMap.get(Contant.FJ5T);
|
|
@@ -152,6 +156,8 @@ public class TheorypowerService {
|
|
resultList.add(wpzsglpointdata);
|
|
resultList.add(wpzsglpointdata);
|
|
});
|
|
});
|
|
edosUtil.sendMultiPoint(resultList);
|
|
edosUtil.sendMultiPoint(resultList);
|
|
|
|
+ long end = System.currentTimeMillis();
|
|
|
|
+ log.info("用时:"+(end-begin));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -219,6 +225,7 @@ public class TheorypowerService {
|
|
});
|
|
});
|
|
zzsglMap.put(wt.getId(),doubleMap);
|
|
zzsglMap.put(wt.getId(),doubleMap);
|
|
});
|
|
});
|
|
|
|
+ CacheContext.zzsglMap = zzsglMap;
|
|
redisService.set("ZZSGL", JSONObject.toJSONString(zzsglMap));
|
|
redisService.set("ZZSGL", JSONObject.toJSONString(zzsglMap));
|
|
|
|
|
|
}
|
|
}
|