暂态严重度计算

This commit is contained in:
hzj
2025-03-12 11:39:08 +08:00
parent 21035dc71b
commit 7f6aa6f683
2 changed files with 39 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.event.utils.EventUtil;
import com.njcn.event.mapper.majornetwork.EventDetailMapper;
import com.njcn.event.pojo.dto.EventDeatilDTO;
import com.njcn.event.pojo.po.EventDetail;
@@ -137,7 +138,8 @@ public class EventDetailServiceImpl extends ServiceImpl<EventDetailMapper, RmpEv
rmpEventDetailPO.setPhase(deatilDTO.getPhase());
rmpEventDetailPO.setWavePath(deatilDTO.getWavePath());
rmpEventDetailPO.setEventDescribe(" ");
rmpEventDetailPO.setSeverity(0.00);
String severity = EventUtil.getYzd(deatilDTO.getDuration().floatValue(),(deatilDTO.getAmplitude().floatValue()/100));
rmpEventDetailPO.setSeverity(Double.valueOf(severity));
rmpEventDetailPO.setCreateTime(LocalDateTime.now());
RmpEventDetailPO one = this.lambdaQuery().eq(RmpEventDetailPO::getLineId, rmpEventDetailPO.getLineId()).eq(RmpEventDetailPO::getStartTime, rmpEventDetailPO.getStartTime()).one();