Compare commits

...

2 Commits

Author SHA1 Message Date
duwenyuan
56bd405d8d 邮箱监控界面,添加和修改功能添加邮箱服务器类型,增加emailServerType字段 2025-05-15 10:55:13 +08:00
duwenyuan
9e65ca7493 MET、SOH普文件去重 2025-05-15 10:55:12 +08:00
5 changed files with 132 additions and 109 deletions

View File

@ -36,4 +36,6 @@ public class EmailDto implements Serializable {
private String username; // 邮箱用户名
private Integer isQiye; // 是否企业邮箱
private Integer emailServerType;
}

View File

@ -36,6 +36,7 @@
e.is_qiye,
e.enabled,
e.email_server_address,
e.email_server_type,
COUNT (l.id) AS alarms
FROM
sys_email e

View File

@ -9,6 +9,7 @@ import org.jeecg.common.util.DateUtils;
import org.jeecg.common.util.NumberFormatUtil;
import org.jeecg.modules.base.entity.configuration.GardsStations;
import org.jeecg.modules.base.entity.original.GardsMetData;
import org.jeecg.modules.base.entity.original.GardsSohData;
import org.jeecg.modules.file.FileOperation;
import org.jeecg.modules.mapper.GardsMetDataMapper;
import org.jeecg.modules.mapper.GardsStationsMapper;
@ -22,6 +23,7 @@ import org.springframework.util.CollectionUtils;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/**
* 处理气象谱
@ -36,6 +38,7 @@ public class MetSpectrumServiceImpl extends ServiceImpl<GardsMetDataMapper, Gard
/**
* 保存气象谱数据
*
* @param struct
* @param fileName
* @return
@ -50,6 +53,13 @@ public class MetSpectrumServiceImpl extends ServiceImpl<GardsMetDataMapper, Gard
final GardsStations station = stationsService.check(struct.station_code, fileName);
List<GardsMetData> list = Lists.newArrayList();
if (struct.record_count > 0) {
String finalFileName = FileOperation.separatorConvert(fileName);
LambdaQueryWrapper<GardsMetData> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.select(GardsMetData::getMetId);
queryWrapper.eq(GardsMetData::getInputFileName, finalFileName);
GardsMetData metDataOne= this.getOne(queryWrapper,false);
if (Objects.isNull(metDataOne)) {
for (int i = 0; i < struct.record_count; i++) {
GardsMetData metData = new GardsMetData();
metData.setStationId(station.getStationId());
@ -71,6 +81,8 @@ public class MetSpectrumServiceImpl extends ServiceImpl<GardsMetDataMapper, Gard
this.save(metData);
});
}
}
}
return list;
}

View File

@ -4,6 +4,7 @@ import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import lombok.val;
import org.apache.commons.compress.utils.Lists;
import org.jeecg.common.util.DateUtils;
import org.jeecg.common.util.NumberFormatUtil;
@ -22,6 +23,7 @@ import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/**
* 健康谱数据处理
@ -55,6 +57,11 @@ public class SOHSpectrumServiceImpl extends ServiceImpl<GardsSohDataMapper, Gard
List<GardsSohData> list = Lists.newArrayList();
if(struct.af_record_count > 0){
String finalFileName = FileOperation.separatorConvert(fileName);
LambdaQueryWrapper<GardsSohData> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(GardsSohData::getInputFileName,finalFileName);
GardsSohData sohDataOne= this.getOne(queryWrapper,false);
if(Objects.isNull(sohDataOne)){
for(int i=0;i<struct.af_record_count;i++){
GardsSohData sohData = new GardsSohData();
sohData.setStationId(station.getStationId());
@ -74,6 +81,7 @@ public class SOHSpectrumServiceImpl extends ServiceImpl<GardsSohDataMapper, Gard
});
}
}
}
return list;
}
}