1.算法调整
2.bug修改
This commit is contained in:
@@ -28,7 +28,6 @@ import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -93,14 +92,8 @@ public class RStatOrgBusbarVoltageMServiceImpl extends MppServiceImpl<RStatOrgBu
|
||||
//获取省级部门ids
|
||||
Dept dept = deptFeignClient.getRootDept().getData();
|
||||
String code = deptFeignClient.getDepSonDetailByDeptId(dept.getId()).getData().get(0).getCode();
|
||||
//添加省级数据
|
||||
List<RStatOrgBusbarVoltageM> provinceData = result .stream().map(object -> {
|
||||
RStatOrgBusbarVoltageM objectNew = new RStatOrgBusbarVoltageM();
|
||||
BeanUtils.copyProperties(object, objectNew);
|
||||
objectNew.setOrgNo(code);
|
||||
return objectNew;
|
||||
}).collect(Collectors.toList());
|
||||
result.addAll(provinceData);
|
||||
this.remove(new LambdaQueryWrapper<RStatOrgBusbarVoltageM>()
|
||||
.eq(RStatOrgBusbarVoltageM::getOrgNo,code));
|
||||
this.saveOrUpdateBatchByMultiId(result,1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -93,14 +92,8 @@ public class RStatOrgBusbarVoltageQServiceImpl extends MppServiceImpl<RStatOrgBu
|
||||
//获取省级部门ids
|
||||
Dept dept = deptFeignClient.getRootDept().getData();
|
||||
String code = deptFeignClient.getDepSonDetailByDeptId(dept.getId()).getData().get(0).getCode();
|
||||
//添加省级数据
|
||||
List<RStatOrgBusbarVoltageQ> provinceData = result .stream().map(object -> {
|
||||
RStatOrgBusbarVoltageQ objectNew = new RStatOrgBusbarVoltageQ();
|
||||
BeanUtils.copyProperties(object, objectNew);
|
||||
objectNew.setOrgNo(code);
|
||||
return objectNew;
|
||||
}).collect(Collectors.toList());
|
||||
result.addAll(provinceData);
|
||||
this.remove(new LambdaQueryWrapper<RStatOrgBusbarVoltageQ>()
|
||||
.eq(RStatOrgBusbarVoltageQ::getOrgNo,code));
|
||||
this.saveOrUpdateBatchByMultiId(result,1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -93,14 +92,8 @@ public class RStatOrgBusbarVoltageYServiceImpl extends MppServiceImpl<RStatOrgBu
|
||||
//获取省级部门ids
|
||||
Dept dept = deptFeignClient.getRootDept().getData();
|
||||
String code = deptFeignClient.getDepSonDetailByDeptId(dept.getId()).getData().get(0).getCode();
|
||||
//添加省级数据
|
||||
List<RStatOrgBusbarVoltageY> provinceData = result .stream().map(object -> {
|
||||
RStatOrgBusbarVoltageY objectNew = new RStatOrgBusbarVoltageY();
|
||||
BeanUtils.copyProperties(object, objectNew);
|
||||
objectNew.setOrgNo(code);
|
||||
return objectNew;
|
||||
}).collect(Collectors.toList());
|
||||
result.addAll(provinceData);
|
||||
this.remove(new LambdaQueryWrapper<RStatOrgBusbarVoltageY>()
|
||||
.eq(RStatOrgBusbarVoltageY::getOrgNo,code));
|
||||
this.saveOrUpdateBatchByMultiId(result,1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -620,7 +620,19 @@ public class PqTypicalSourceCreatePOServiceImpl extends ServiceImpl<PqTypicalSou
|
||||
pqTypicalSourceCreatePO.setVAvgOvRate(initialvalue);
|
||||
|
||||
//稳态指标是否超标(0:否 1:是)
|
||||
int ovNum = Integer.valueOf(rMpPartHarmonicDetailDS.stream().filter(temp ->temp.getIsHarmonic()==1).count()+"");
|
||||
Map<String, Integer> collect = rMpSurplusHarmonicDetailDS.stream().collect(Collectors.toMap(RMpSurplusHarmonicDetailD::getMeasurementPointId, RMpSurplusHarmonicDetailD::getIsFlicker));
|
||||
int ovNum=0;
|
||||
for (RMpPartHarmonicDetailD detailD : rMpPartHarmonicDetailDS) {
|
||||
Integer isFlicker=0;
|
||||
int num = detailD.getIsINeg() + detailD.getIsUnbalance() + detailD.getIsV() + detailD.getIsI();
|
||||
if(collect.containsKey(detailD.getMeasurementPointId())){
|
||||
isFlicker = collect.get(detailD.getMeasurementPointId());
|
||||
}
|
||||
if(num+isFlicker>0){
|
||||
ovNum++;
|
||||
}
|
||||
}
|
||||
|
||||
pqTypicalSourceCreatePO.setOvNum(ovNum);
|
||||
pqTypicalSourceCreatePO.setOvRate(divideAndRound(ovNum,count));
|
||||
if(ovNum>0){
|
||||
|
||||
Reference in New Issue
Block a user