1.技术监督调整

This commit is contained in:
cdf
2024-03-12 16:33:17 +08:00
parent 209393ad3c
commit bef44e6d96
3 changed files with 124 additions and 114 deletions

View File

@@ -54,7 +54,7 @@ public class ThsSuperviseController extends BaseController {
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
/* @OperateInfo(info = LogEnum.BUSINESS_COMMON)
@ApiOperation("预警/告警事务生成手动")
@ApiImplicitParam(name = "superviseParam", value = "创建技术监督参数", required = true)
@PostMapping("/initSuperviseHand")
@@ -63,7 +63,7 @@ public class ThsSuperviseController extends BaseController {
SuperviceRunLogVo result = thsSuperviseService.initSuperviseHand(superviseParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
*/
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@ApiOperation("预警/告警事务生成自动")

View File

@@ -116,7 +116,7 @@ public interface ThsSuperviseService extends IService<ThsSupervise> {
SuperviceRunLogVo initSupervise(@RequestBody @Validated SuperviseParam superviseParam);
SuperviceRunLogVo initSuperviseHand(@RequestBody @Validated SuperviseParam superviseParam);
//SuperviceRunLogVo initSuperviseHand(@RequestBody @Validated SuperviseParam superviseParam);
Page<ThsSupervise> queryPage(ThsSuperviseParam thsSuperviseParam);

View File

@@ -26,6 +26,7 @@ import com.njcn.harmonic.pojo.vo.ThsStrategyVo;
import com.njcn.oss.constant.OssPath;
import com.njcn.oss.utils.FileStorageUtil;
import com.njcn.prepare.harmonic.pojo.dto.SuperviseDto;
import com.njcn.process.api.FlowableDefineFeignClient;
import com.njcn.process.pojo.param.SuperviseParam;
import com.njcn.process.pojo.po.ThsOverRunLog;
import com.njcn.process.pojo.po.ThsSupervise;
@@ -95,9 +96,6 @@ import static com.njcn.process.enums.SteadyIndicatorEnum.Negative_Voltage;
public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, ThsSupervise> implements ThsSuperviseService {
private final ThsWarnStrategyMapper thsWarnStrategyMapper;
private final ThsWarnStrategyAssMapper thsWarnStrategyAssMapper;
@@ -125,6 +123,8 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
private final FlowableAssMapper flowableAssMapper;
private final IFlowDefinitionService flowDefinitionService;
private final ThsDeptMonitorMapper thsDeptMonitorMapper;
private final CommTerminalGeneralClient commTerminalGeneralClient;
@@ -167,12 +167,12 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
//TODO 解决工作流写死问题
Map<String, Object> mapParam = new HashMap<>();
String proInId = "";
if(thsSupervise.getType() == 0){
if (thsSupervise.getType() == 0) {
proInId = "flow_yzep99kb:1:a100b48b-da75-11ed-8335-b07b253cdad9";
}else {
} else {
proInId = "flow_yzep99kb:2:6358e099-dcba-11ed-8026-b07b253cdad9";
}
iFlowDefinitionService.startProcessInstanceById(proInId,thsSupervise.getSupIndex(),mapParam);
iFlowDefinitionService.startProcessInstanceById(proInId, thsSupervise.getSupIndex(), mapParam);
for (ThsOverRunLog thsOverRunLog : superviceRunLogVo.getOverRunLog()) {
@@ -188,7 +188,7 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
Integer pageNum = PageFactory.getPageNum(superviseDto);
Integer pageSize = PageFactory.getPageSize(superviseDto);
Page<SuperviseVo> superviseVoPage = new Page<>(pageNum, pageSize);
Page<SuperviseVo> page = thsSuperviseMapper.querySupervisePage(superviseVoPage,superviseDto);
Page<SuperviseVo> page = thsSuperviseMapper.querySupervisePage(superviseVoPage, superviseDto);
List<SuperviseVo> pageRecords = page.getRecords();
if (CollectionUtil.isNotEmpty(pageRecords)) {
for (SuperviseVo superviseVo : pageRecords) {
@@ -232,7 +232,7 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
//删除同时删除工作流程
FlowableAss flowableAss = flowableAssMapper.selectById(id);
if(Objects.nonNull(flowableAss)) {
if (Objects.nonNull(flowableAss)) {
iFlowDefinitionService.deleteInstance(flowableAss.getExecIndex(), "");
flowableAssMapper.deleteById(id);
}
@@ -255,18 +255,18 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
thsOverRunLog.setId(id);
String path = fileStorageUtil.uploadMultipart(files[0], OssPath.ELECTRICITY_QUALITY);
this.updateSuperviesData(path, thsOverRunLog, ticketType, thsSupervise);
this.updateProcess(thsSupervise, ticketType,thsSuperObj.getType());
this.updateProcess(thsSupervise, ticketType, thsSuperObj.getType());
}
if (files != null && files.length > 1) {
List<ThsOverRunLog> thsOverRunLogs = thsOverRunLogService.list(new LambdaQueryWrapper<ThsOverRunLog>().eq(ThsOverRunLog::getSupIndex, supIndex));
this.batchUploadFile(thsSupervise, thsOverRunLogs, files, ticketType);
this.updateProcess(thsSupervise, ticketType,thsSuperObj.getType());
this.updateProcess(thsSupervise, ticketType, thsSuperObj.getType());
}
//判断当监督单下面的监测点报告都被上传则认为流程完成
List<ThsOverRunLog> thsOverRunLogs = thsOverRunLogService.list(new LambdaQueryWrapper<ThsOverRunLog>().eq(ThsOverRunLog::getSupIndex, supIndex));
List<String> fileNames = thsOverRunLogs.stream().filter(item-> StrUtil.isNotBlank(item.getFeedback())).map(ThsOverRunLog::getFileName).distinct().collect(Collectors.toList());
if(fileNames.size() == thsOverRunLogs.size()){
List<String> fileNames = thsOverRunLogs.stream().filter(item -> StrUtil.isNotBlank(item.getFeedback())).map(ThsOverRunLog::getFileName).distinct().collect(Collectors.toList());
if (fileNames.size() == thsOverRunLogs.size()) {
FlowableAss flowableAss = flowableAssMapper.selectById(supIndex);
Task task = iFlowTaskService.getTask(flowableAss.getExecIndex());
@@ -285,7 +285,7 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
* @param ticketType
* @param type
*/
private void updateProcess(ThsSupervise thsSupervise, Integer ticketType,Integer type) {
private void updateProcess(ThsSupervise thsSupervise, Integer ticketType, Integer type) {
TicketTypeEnum ticketTypeEnum = TicketTypeEnum.getTicketTypeEnumByCode(ticketType);
if (ticketTypeEnum == null) {
throw new BusinessException("上传单据参数类型错误!");
@@ -295,9 +295,9 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
thsSupervise.setProgress(ProgressEnum.TEST_REPORT.getCode());
break;
case TEST_REPORT:
if(AlarmTypeEnum.EARLY_WARN.getCode().equals(type)){
if (AlarmTypeEnum.EARLY_WARN.getCode().equals(type)) {
thsSupervise.setProgress(ProgressEnum.END.getCode());
}else {
} else {
thsSupervise.setProgress(ProgressEnum.REVISE_NOTICE_ISSUE.getCode());
}
break;
@@ -411,8 +411,6 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
thsAlarmFormworkMapper.insert(alarmFormwork);
}
@Override
@@ -424,8 +422,11 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
throw new BusinessException("请先上传下发单模板单据!");
}
String fileUrl = fileStorageUtil.getFileUrl(thsAlarmFormwork.getPath());
ThsSupervise thsSupervise = new ThsSupervise();
thsSupervise.setModifyTime(new Date());
thsSupervise.setModifyUser(RequestUtil.getUserIndex());
ThsOverRunLog thsOverRunLog = new ThsOverRunLog();
thsOverRunLog.setSupIndex(supIndex);
if (FormworkTypeEnum.ALARM_TICKET.getCode().equals(formworkType)) {
@@ -439,6 +440,7 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
thsOverRunLogService.update(thsOverRunLog, new LambdaQueryWrapper<ThsOverRunLog>().eq(ThsOverRunLog::getSupIndex, supIndex));
thsSuperviseMapper.update(thsSupervise, new LambdaQueryWrapper<ThsSupervise>().eq(ThsSupervise::getSupIndex, supIndex));
FlowableAss flowableAss = flowableAssMapper.selectById(supIndex);
Task task = iFlowTaskService.getTask(flowableAss.getExecIndex());
@@ -565,9 +567,9 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
}
/**
* 生成预警单告警单(自动)
*
* @author cdf
* @date 2024/1/29
*/
@@ -613,44 +615,44 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
monitorGetParam.setDeptIds(deptAllIds);
//TODO 需要校验
List<CommMonitorInfoDTO> commMonitorInfoDTOList = commTerminalGeneralClient.tagOrIdGetMonitorList(monitorGetParam).getData();
Map<String,CommMonitorInfoDTO> monitorInfoDTOMap = commMonitorInfoDTOList.stream().collect(Collectors.toMap(CommMonitorInfoDTO::getId,Function.identity()));
Map<String, CommMonitorInfoDTO> monitorInfoDTOMap = commMonitorInfoDTOList.stream().collect(Collectors.toMap(CommMonitorInfoDTO::getId, Function.identity()));
List<String> temIds= commMonitorInfoDTOList.stream().map(CommMonitorInfoDTO::getId).distinct().collect(Collectors.toList());
List<String> temIds = commMonitorInfoDTOList.stream().map(CommMonitorInfoDTO::getId).distinct().collect(Collectors.toList());
List<RStatLimitRateDPO> rStatLimitRateDPOList = rStatLimitRateDClient.monitorIdsGetLimitInfo(RStatLimitQueryParam.builder().ids(temIds).date(yesterday).build()).getData();
//TODO 数据中心和pms这边稳态指标没用一个需要考虑兼容问题
dictTargetList = dictTargetList.stream().filter(item->targetIds.contains(item.getId())).collect(Collectors.toList());
dictTargetList = dictTargetList.stream().filter(item -> targetIds.contains(item.getId())).collect(Collectors.toList());
//判断指标是否在策略中
if(CollectionUtil.isNotEmpty(rStatLimitRateDPOList)){
for(RStatLimitRateDPO rStatLimitRateDPO :rStatLimitRateDPOList ){
if (CollectionUtil.isNotEmpty(rStatLimitRateDPOList)) {
for (RStatLimitRateDPO rStatLimitRateDPO : rStatLimitRateDPOList) {
List<String> descriptionList = new ArrayList<>();
Integer[] count = {0};
Map<String,Boolean> limitBoolMap = verifyLimit(rStatLimitRateDPO,dictTargetList,descriptionList,count);
Map<String, Boolean> limitBoolMap = verifyLimit(rStatLimitRateDPO, dictTargetList, descriptionList, count);
if(oneStrategyVo.getOperation().equals(OperationEnum.AND.getCode()) ){
if (oneStrategyVo.getOperation().equals(OperationEnum.AND.getCode())) {
//与
boolean res = limitBoolMap.containsValue(false);
if(res){
if (res) {
continue;
}
}else {
} else {
//或
boolean res = limitBoolMap.containsValue(true);
if(!res){
if (!res) {
continue;
}
}
//到这一步说明符合策略保留该条数据,开始组装实体
if(Objects.isNull(thsSupervise)){
if (Objects.isNull(thsSupervise)) {
thsSupervise = new ThsSupervise();
buildSuperviseData(yesterday,dept,superviseParam,oneStrategyVo,superviseParam.getInitType(),thsSupervise);
buildSuperviseData(yesterday, dept, superviseParam, oneStrategyVo, superviseParam.getInitType(), thsSupervise);
thsSuperviseListPO.add(thsSupervise);
}
buildOverRunLog(thsSupervise,monitorInfoDTOMap.get(rStatLimitRateDPO.getLineId()),descriptionList,thsOverRunLogList,count);
buildOverRunLog(thsSupervise, monitorInfoDTOMap.get(rStatLimitRateDPO.getLineId()), descriptionList, thsOverRunLogList, count);
}
allThsLogPO.addAll(thsOverRunLogList);
@@ -658,19 +660,30 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
}
if(superviseParam.getInitType().equals(InitTypeEnum.AUTO.getCode())){
if(CollectionUtil.isNotEmpty(thsSuperviseListPO)){
if (superviseParam.getInitType().equals(InitTypeEnum.AUTO.getCode())) {
if (CollectionUtil.isNotEmpty(thsSuperviseListPO)) {
//处理flowable
for(ThsSupervise ths:thsSuperviseListPO){
Map<String, Object> mapParam = new HashMap<>();
String proInId = "";
if (ths.getType() == 0) {
proInId = "flow_yzep99kb:1:a100b48b-da75-11ed-8335-b07b253cdad9";
} else {
proInId = "flow_yzep99kb:2:6358e099-dcba-11ed-8026-b07b253cdad9";
}
flowDefinitionService.startProcessInstanceById(proInId, thsSupervise.getSupIndex(), mapParam);
}
this.saveBatch(thsSuperviseListPO);
thsOverRunLogService.saveBatch(allThsLogPO);
return null;
}
}else {
} else {
superviceRunLogVo.setOverRunLog(allThsLogPO);
return superviceRunLogVo;
}
}
@@ -680,7 +693,7 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
return superviceRunLogVo;
}
@Override
/*@Override
public SuperviceRunLogVo initSuperviseHand(SuperviseParam superviseParam) {
SuperviceRunLogVo superviceRunLogVo = new SuperviceRunLogVo();
List<ThsOverRunLog> thsOverRunLogList = new ArrayList<>();
@@ -704,7 +717,6 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
Dept dept = deptFeignClient.getDeptById(oneStrategyVo.getDeptId()).getData();
List<ThsWarnStrategyAss> oneInterferenceSourceAsses = this.queryWarnStrategyAss(oneStrategyVo.getId(), TypeEnum.SOURCE_TYPE);//干扰源列表
List<ThsWarnStrategyAss> oneSteadyIndicatorAsses = this.queryWarnStrategyAss(oneStrategyVo.getId(), TypeEnum.INTERFERENCE_TYPE);//指标类型列表
List<ThsWarnStrategyAss> oneMonitorAsses = this.queryWarnStrategyAss(oneStrategyVo.getId(), TypeEnum.MONITOR_TYPE);//监测点列表
@@ -721,43 +733,43 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
monitorGetParam.setDeptIds(deptAllIds);
//TODO 需要校验
List<CommMonitorInfoDTO> commMonitorInfoDTOList = commTerminalGeneralClient.tagOrIdGetMonitorList(monitorGetParam).getData();
Map<String,CommMonitorInfoDTO> monitorInfoDTOMap = commMonitorInfoDTOList.stream().collect(Collectors.toMap(CommMonitorInfoDTO::getId,Function.identity()));
Map<String, CommMonitorInfoDTO> monitorInfoDTOMap = commMonitorInfoDTOList.stream().collect(Collectors.toMap(CommMonitorInfoDTO::getId, Function.identity()));
List<String> temIds= commMonitorInfoDTOList.stream().map(CommMonitorInfoDTO::getId).distinct().collect(Collectors.toList());
List<String> temIds = commMonitorInfoDTOList.stream().map(CommMonitorInfoDTO::getId).distinct().collect(Collectors.toList());
List<RStatLimitRateDPO> rStatLimitRateDPOList = rStatLimitRateDClient.monitorIdsGetLimitInfo(RStatLimitQueryParam.builder().ids(temIds).date(yesterday).build()).getData();
//TODO 数据中心和pms这边稳态指标没用一个需要考虑兼容问题
dictTargetList = dictTargetList.stream().filter(item->targetIds.contains(item.getId())).collect(Collectors.toList());
dictTargetList = dictTargetList.stream().filter(item -> targetIds.contains(item.getId())).collect(Collectors.toList());
//判断指标是否在策略中
if(CollectionUtil.isNotEmpty(rStatLimitRateDPOList)){
for(RStatLimitRateDPO rStatLimitRateDPO :rStatLimitRateDPOList ){
if (CollectionUtil.isNotEmpty(rStatLimitRateDPOList)) {
for (RStatLimitRateDPO rStatLimitRateDPO : rStatLimitRateDPOList) {
List<String> descriptionList = new ArrayList<>();
Integer[] count = {0};
Map<String,Boolean> limitBoolMap = verifyLimit(rStatLimitRateDPO,dictTargetList,descriptionList,count);
Map<String, Boolean> limitBoolMap = verifyLimit(rStatLimitRateDPO, dictTargetList, descriptionList, count);
if(oneStrategyVo.getOperation().equals(OperationEnum.AND.getCode()) ){
if (oneStrategyVo.getOperation().equals(OperationEnum.AND.getCode())) {
//与
boolean res = limitBoolMap.containsValue(false);
if(res){
if (res) {
continue;
}
}else {
} else {
//或
boolean res = limitBoolMap.containsValue(true);
if(!res){
if (!res) {
continue;
}
}
//到这一步说明符合策略保留该条数据,开始组装实体
if(Objects.isNull(thsSupervise)){
if (Objects.isNull(thsSupervise)) {
thsSupervise = new ThsSupervise();
buildSuperviseData(yesterday,dept,superviseParam,oneStrategyVo,superviseParam.getInitType(),thsSupervise);
buildSuperviseData(yesterday, dept, superviseParam, oneStrategyVo, superviseParam.getInitType(), thsSupervise);
}
buildOverRunLog(thsSupervise,monitorInfoDTOMap.get(rStatLimitRateDPO.getLineId()),descriptionList,thsOverRunLogList,count);
buildOverRunLog(thsSupervise, monitorInfoDTOMap.get(rStatLimitRateDPO.getLineId()), descriptionList, thsOverRunLogList, count);
}
@@ -770,18 +782,18 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
}
superviceRunLogVo.setOverRunLog(thsOverRunLogList);
return superviceRunLogVo;
}
}*/
@Override
public Page<ThsSupervise> queryPage(ThsSuperviseParam thsSuperviseParam) {
return this.page(new Page<>(thsSuperviseParam.getPageNum(),thsSuperviseParam.getPageSize()),new LambdaQueryWrapper<ThsSupervise>()
.between(ThsSupervise::getCreateTime,DateUtil.beginOfDay(DateUtil.parse(thsSuperviseParam.getStartTime())),DateUtil.endOfDay(DateUtil.parse(thsSuperviseParam.getEndTime())))
.eq(ThsSupervise::getDeptId,thsSuperviseParam.getDeptId()));
return this.page(new Page<>(thsSuperviseParam.getPageNum(), thsSuperviseParam.getPageSize()), new LambdaQueryWrapper<ThsSupervise>()
.between(ThsSupervise::getCreateTime, DateUtil.beginOfDay(DateUtil.parse(thsSuperviseParam.getStartTime())), DateUtil.endOfDay(DateUtil.parse(thsSuperviseParam.getEndTime())))
.eq(ThsSupervise::getDeptId, thsSuperviseParam.getDeptId()));
}
public void buildSuperviseData(String yesterday,Dept dept ,SuperviseParam superviseParam,ThsStrategyVo steady,Integer initType, ThsSupervise thsSupervise) {
public void buildSuperviseData(String yesterday, Dept dept, SuperviseParam superviseParam, ThsStrategyVo steady, Integer initType, ThsSupervise thsSupervise) {
if (thsSupervise != null && StringUtils.isBlank(thsSupervise.getSupIndex())) {
thsSupervise.setName(yesterday+dept.getName()+AlarmTypeEnum.getAlarmTypeEnumByCode(superviseParam.getType()).getMessage());
thsSupervise.setName(yesterday + dept.getName() + AlarmTypeEnum.getAlarmTypeEnumByCode(superviseParam.getType()).getMessage());
thsSupervise.setSupIndex(IdUtil.simpleUUID());
thsSupervise.setDeptId(steady.getDeptId());
thsSupervise.setCreateTime(new Date());
@@ -792,7 +804,7 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
}
}
public void buildOverRunLog(ThsSupervise thsSupervise, CommMonitorInfoDTO monitor,List<String> descriptionList,List<ThsOverRunLog> thsOverRunLogs,Integer[] count) {
public void buildOverRunLog(ThsSupervise thsSupervise, CommMonitorInfoDTO monitor, List<String> descriptionList, List<ThsOverRunLog> thsOverRunLogs, Integer[] count) {
ThsOverRunLog thsOverRunLog = new ThsOverRunLog();
thsOverRunLog.setId(IdUtil.simpleUUID());
thsOverRunLog.setSupIndex(thsSupervise.getSupIndex());
@@ -815,8 +827,6 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
}
/**
* 批量下载.zip文件
*
@@ -889,18 +899,18 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
* @param rStatLimitRateDPO
* @param dictTargetList
*/
private Map<String, Boolean> verifyLimit(RStatLimitRateDPO rStatLimitRateDPO,List<DictData> dictTargetList,List<String> descriptionList,Integer[] count) {
private Map<String, Boolean> verifyLimit(RStatLimitRateDPO rStatLimitRateDPO, List<DictData> dictTargetList, List<String> descriptionList, Integer[] count) {
Map<String, Boolean> limitBoolMap = new HashMap<>();
for(DictData dic : dictTargetList){
for (DictData dic : dictTargetList) {
SteadyIndicatorEnum steadyIndicatorEnum = SteadyIndicatorEnum.getSteadyIndicatorEnumByCode(dic.getCode());
switch (steadyIndicatorEnum) {
case Negative_Voltage://负序电压不平衡度
if (rStatLimitRateDPO.getUbalanceOvertime() > 0) {
limitBoolMap.put(Negative_Voltage.getCode(), true);
descriptionList.add(Negative_Voltage.getMessage().concat(rStatLimitRateDPO.getUbalanceOvertime() + ""));
count[0] = count[0]+rStatLimitRateDPO.getUbalanceOvertime();
count[0] = count[0] + rStatLimitRateDPO.getUbalanceOvertime();
} else {
limitBoolMap.put(Negative_Voltage.getCode(), false);
}
@@ -910,7 +920,7 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
if (interharVoltageOvertime > 0) {
limitBoolMap.put(SteadyIndicatorEnum.Interhar_Voltage.getCode(), true);
descriptionList.add(SteadyIndicatorEnum.Interhar_Voltage.getMessage().concat(interharVoltageOvertime + ""));
count[0] = count[0]+interharVoltageOvertime;
count[0] = count[0] + interharVoltageOvertime;
} else {
limitBoolMap.put(SteadyIndicatorEnum.Interhar_Voltage.getCode(), false);
}
@@ -919,7 +929,7 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
if (rStatLimitRateDPO.getINegOvertime() > 0) {
limitBoolMap.put(SteadyIndicatorEnum.Neg_Current.getCode(), true);
descriptionList.add(SteadyIndicatorEnum.Neg_Current.getMessage().concat(rStatLimitRateDPO.getINegOvertime() + ""));
count[0] = count[0]+rStatLimitRateDPO.getINegOvertime();
count[0] = count[0] + rStatLimitRateDPO.getINegOvertime();
} else {
limitBoolMap.put(SteadyIndicatorEnum.Neg_Current.getCode(), false);
}
@@ -928,7 +938,7 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
if (rStatLimitRateDPO.getFreqDevOvertime() > 0) {
limitBoolMap.put(SteadyIndicatorEnum.Fre_Deviation.getCode(), true);
descriptionList.add(SteadyIndicatorEnum.Fre_Deviation.getMessage().concat(rStatLimitRateDPO.getFreqDevOvertime() + ""));
count[0] = count[0]+rStatLimitRateDPO.getFreqDevOvertime();
count[0] = count[0] + rStatLimitRateDPO.getFreqDevOvertime();
} else {
limitBoolMap.put(SteadyIndicatorEnum.Fre_Deviation.getCode(), false);
}
@@ -937,7 +947,7 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
if (rStatLimitRateDPO.getVoltageDevOvertime() > 0) {
limitBoolMap.put(SteadyIndicatorEnum.Voltage_Dev.getCode(), true);
descriptionList.add(SteadyIndicatorEnum.Voltage_Dev.getMessage().concat(rStatLimitRateDPO.getVoltageDevOvertime() + ""));
count[0] = count[0]+rStatLimitRateDPO.getVoltageDevOvertime();
count[0] = count[0] + rStatLimitRateDPO.getVoltageDevOvertime();
} else {
limitBoolMap.put(SteadyIndicatorEnum.Voltage_Dev.getCode(), false);
}
@@ -947,7 +957,7 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
if (harCurrentOvertime > 0) {
limitBoolMap.put(SteadyIndicatorEnum.Har_Current.getCode(), true);
descriptionList.add(SteadyIndicatorEnum.Har_Current.getMessage().concat(harCurrentOvertime + ""));
count[0] = count[0]+harCurrentOvertime;
count[0] = count[0] + harCurrentOvertime;
} else {
@@ -958,7 +968,7 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
if (rStatLimitRateDPO.getFlickerOvertime() > 0) {
limitBoolMap.put(SteadyIndicatorEnum.Voltage_Fluc.getCode(), true);
descriptionList.add(SteadyIndicatorEnum.Voltage_Fluc.getMessage().concat(rStatLimitRateDPO.getFlickerOvertime() + ""));
count[0] = count[0]+rStatLimitRateDPO.getFlickerOvertime();
count[0] = count[0] + rStatLimitRateDPO.getFlickerOvertime();
} else {
limitBoolMap.put(SteadyIndicatorEnum.Voltage_Fluc.getCode(), false);
}
@@ -968,7 +978,7 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
if (harVoltageOvertime > 0) {
limitBoolMap.put(SteadyIndicatorEnum.Har_Voltage.getCode(), true);
descriptionList.add(SteadyIndicatorEnum.Har_Voltage.getMessage().concat(harVoltageOvertime + ""));
count[0] = count[0]+harVoltageOvertime;
count[0] = count[0] + harVoltageOvertime;
} else {
limitBoolMap.put(SteadyIndicatorEnum.Har_Voltage.getCode(), false);
}
@@ -977,7 +987,7 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
if (rStatLimitRateDPO.getUaberranceOvertime() > 0) {
limitBoolMap.put(SteadyIndicatorEnum.Thd_V.getCode(), true);
descriptionList.add(SteadyIndicatorEnum.Thd_V.getMessage().concat(rStatLimitRateDPO.getUaberranceOvertime() + ""));
count[0] = count[0]+rStatLimitRateDPO.getUaberranceOvertime();
count[0] = count[0] + rStatLimitRateDPO.getUaberranceOvertime();
} else {
limitBoolMap.put(SteadyIndicatorEnum.Thd_V.getCode(), false);
}