|
@@ -69,10 +69,7 @@ public class UploadFileMatoushanJob extends BaseService {
|
|
|
public static int dayNum = 16;
|
|
|
|
|
|
public static String stationCodeStr = "J00307";
|
|
|
- //模板配置文件路径
|
|
|
- public static String modleParamFilePath = "/usr/local/singleFan/单风机法模板-all.xlsx";
|
|
|
|
|
|
- public static String overHaulFilePath = "/usr/local/singleFan/风机检修计划.xlsx";
|
|
|
|
|
|
/**
|
|
|
* 每天凌晨5点30执行 现场每日7点20开始执行文件生成定时任务
|
|
@@ -85,13 +82,13 @@ public class UploadFileMatoushanJob extends BaseService {
|
|
|
@Scheduled(cron = "30 10,25,30 5,17 * * ?")
|
|
|
public void createDqFile() {
|
|
|
log.info("时间 【" + DateTimeUtil.dateToStrLong(new Date()) + "】 马头山短期文件生成开始");
|
|
|
- //1.读取本地Excel配置
|
|
|
+ //1.读取配置
|
|
|
readExcelForParams();
|
|
|
- //2.查询mongodb中的nwp数据
|
|
|
+ //2.查询nwp数据
|
|
|
List<Nwp> listTemperature = getNwpDatas();
|
|
|
//3.计算短期预测
|
|
|
- List<ForecastPowerShortTerm> forecastPowerShortTermList = caculateDqs(listTemperature);
|
|
|
- //4.生成短期文件并上传minio,向v3请求文件记录写入
|
|
|
+ caculateDqs(listTemperature);
|
|
|
+
|
|
|
|
|
|
log.info("时间 【" + DateTimeUtil.dateToStrLong(new Date()) + "】 马头山短期文件生成完成");
|
|
|
|
|
@@ -161,23 +158,8 @@ public class UploadFileMatoushanJob extends BaseService {
|
|
|
continue;
|
|
|
}
|
|
|
//判断风速象限,不同风向获取不同风速列表
|
|
|
- String fengxiangId = "1"; // 北风
|
|
|
- Float wind = Convert.toFloat(nwp.getWd30());
|
|
|
- if(22.5 <= wind && wind < 67.5){
|
|
|
- fengxiangId = "2"; // 东北风
|
|
|
- }else if(67.5 <= wind && wind < 112.5){
|
|
|
- fengxiangId = "3"; // 东风
|
|
|
- }else if(112.5 <= wind && wind < 157.5){
|
|
|
- fengxiangId = "4"; // 东南风
|
|
|
- }else if(157.5 <= wind && wind < 202.5){
|
|
|
- fengxiangId = "5"; // 南风
|
|
|
- }else if(202.5 <= wind && wind < 247.5 ){
|
|
|
- fengxiangId = "6"; // 西南风
|
|
|
- }else if(247.5 <= wind && wind < 292.5){
|
|
|
- fengxiangId = "7"; // 西风
|
|
|
- }else if(292.5 <= wind && wind < 337.5){
|
|
|
- fengxiangId = "8"; // 西北风
|
|
|
- }
|
|
|
+ String fengxiangId = decideWind(nwp.getWd30()); // 北风
|
|
|
+
|
|
|
//累加对应的所有风机功率值
|
|
|
Float totalPower = 0f;
|
|
|
|
|
@@ -740,7 +722,31 @@ public class UploadFileMatoushanJob extends BaseService {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 判断风向
|
|
|
+ *
|
|
|
+ * @param bigDecimal
|
|
|
+ */
|
|
|
+ public String decideWind( BigDecimal bigDecimal){
|
|
|
+ Float wind = Convert.toFloat(bigDecimal);
|
|
|
+ String fengxiangId = "1"; // 北风
|
|
|
+ if(22.5 <= wind && wind < 67.5){
|
|
|
+ fengxiangId = "2"; // 东北风
|
|
|
+ }else if(67.5 <= wind && wind < 112.5){
|
|
|
+ fengxiangId = "3"; // 东风
|
|
|
+ }else if(112.5 <= wind && wind < 157.5){
|
|
|
+ fengxiangId = "4"; // 东南风
|
|
|
+ }else if(157.5 <= wind && wind < 202.5){
|
|
|
+ fengxiangId = "5"; // 南风
|
|
|
+ }else if(202.5 <= wind && wind < 247.5 ){
|
|
|
+ fengxiangId = "6"; // 西南风
|
|
|
+ }else if(247.5 <= wind && wind < 292.5){
|
|
|
+ fengxiangId = "7"; // 西风
|
|
|
+ }else if(292.5 <= wind && wind < 337.5){
|
|
|
+ fengxiangId = "8"; // 西北风
|
|
|
+ }
|
|
|
+ return fengxiangId;
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 今日凌晨 毫秒
|