|
@@ -3237,11 +3237,22 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
}).collect(Collectors.toList());
|
|
|
pdsZsglMap.put(wtId, zsglSnap);
|
|
|
});
|
|
|
- List<PointData> agcc = agcInfo.getPointDatas().stream().peek(agc -> {
|
|
|
- agc.setDoubleValue(agc.getValue() * agcInfo.getCoef());
|
|
|
- agc.setLongValue(0L);
|
|
|
- }).collect(Collectors.toList());
|
|
|
- agcInfo.setPointDatas(agcc);
|
|
|
+ boolean b = agcInfo.getPointDatas().stream().allMatch(ad -> ad.getValue() == 0);
|
|
|
+ if(b){
|
|
|
+ PointInfo info = new PointInfo();
|
|
|
+ info.setPointKey(agcInfo.getPointKey());
|
|
|
+ getLatestByEntity(Collections.singletonList(info));
|
|
|
+ double agcd = info.getPointDatas().get(0).getValue();
|
|
|
+ agcInfo.getPointDatas().forEach(agc -> {
|
|
|
+ agc.setDoubleValue(agcd * agcInfo.getCoef());
|
|
|
+ agc.setLongValue(0L);
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ agcInfo.getPointDatas().forEach(agc -> {
|
|
|
+ agc.setDoubleValue(agc.getValue() * agcInfo.getCoef());
|
|
|
+ agc.setLongValue(0L);
|
|
|
+ });
|
|
|
+ }
|
|
|
List<PointData> cxc = cxInfo.getPointDatas().stream().peek(cx -> {
|
|
|
cx.setDoubleValue(cx.getValue() * cxInfo.getCoef());
|
|
|
cx.setLongValue(0L);
|