Kaynağa Gözat

初次测试调整

tl 9 ay önce
ebeveyn
işleme
abf11c809e

+ 94 - 94
ipp-ap/src/views/homePage/shortTermAccuracy.vue

@@ -124,98 +124,98 @@
 
 </script>
 
-<style lang="scss" scoped>
-  .tableTitle {
-    width: 98%;
-    background-color: transparent;
-    border: 1px solid #dce1e6;
-    text-align: center;
-    line-height: 28px
-  }
-  .itemTableBox /deep/ .dv-scroll-ranking-board .ranking-info .rank {
-    font-size: 16px;
-  }
-
-  .itemTableBox /deep/ .dv-scroll-ranking-board .ranking-info .info-name {
-    font-size: 16px;
-  }
-  $TItemHeight: 65.5px;
-  .emptyItem {
-    width: 98%;
-    height: calc(34vh);
-    border: 1px solid #f0f0f0;
-    border-top: 0px;
-
-    .empty_default {
-      height: calc(34vh);
-      float: left;
-      font-size: 14px;
-      font-weight: 200;
-      line-height: calc(34vh);
-      text-align: center;
-      color: #b7b7b7;
-    }
-  }
-
-  .itemTableBox {
-    height: calc(34vh);
-    background: transparent;
-    overflow: hidden;
-
-    .TItem {
-      width: 98%;
-      height: $TItemHeight;
-      background: transparent;
-      padding: .5%;
-      border: 1px solid #f0f0f0;
-      border-top: 0px;
-
-      .TI_default {
-        height: $TItemHeight;
-        float: left;
-        font-size: 14px;
-        font-weight: 200;
-        line-height: $TItemHeight;
-        text-align: center;
-        color: #fff;
-      }
-
-      .TI_Dwidth {
-        width: 40%;
-        line-height: 20px;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        @extend .TI_default;
-      }
-
-      .TI_info {
-        width: 60%;
-        text-align: left;
-        border-left: 1px solid #f0f0f0;
-        padding-left: 1%;
-        @extend .TI_default;
-      }
-
-      @media screen and (max-width: 1600px) {
-        /*当屏幕尺寸小于600px时,应用下面的CSS样式*/
-        .TI_info {
-          font-size: 12px;
-          line-height: 12px;
-        }
-      }
-      /*当屏幕尺寸大于900px时,应用下面的CSS样式*/
-      @media screen and (min-width: 1600px) {
-        .TI_info {
-          line-height: 17px;
-          padding-top: 1%;
-        }
-      }
-    }
-
-    .animate-up {
-      transition: all 0.5s ease-in-out;
-      transform: translateY(-110px);
-    }
-  }
+//<style lang="scss" scoped>
+//  .tableTitle {
+//    width: 98%;
+//    background-color: transparent;
+//    border: 1px solid #dce1e6;
+//    text-align: center;
+//    line-height: 28px
+//  }
+//  .itemTableBox /deep/ .dv-scroll-ranking-board .ranking-info .rank {
+//    font-size: 16px;
+//  }
+//
+//  .itemTableBox /deep/ .dv-scroll-ranking-board .ranking-info .info-name {
+//    font-size: 16px;
+//  }
+//  $TItemHeight: 65.5px;
+//  .emptyItem {
+//    width: 98%;
+//    height: calc(34vh);
+//    border: 1px solid #f0f0f0;
+//    border-top: 0px;
+//
+//    .empty_default {
+//      height: calc(34vh);
+//      float: left;
+//      font-size: 14px;
+//      font-weight: 200;
+//      line-height: calc(34vh);
+//      text-align: center;
+//      color: #b7b7b7;
+//    }
+//  }
+//
+//  .itemTableBox {
+//    height: calc(34vh);
+//    background: transparent;
+//    overflow: hidden;
+//
+//    .TItem {
+//      width: 98%;
+//      height: $TItemHeight;
+//      background: transparent;
+//      padding: .5%;
+//      border: 1px solid #f0f0f0;
+//      border-top: 0px;
+//
+//      .TI_default {
+//        height: $TItemHeight;
+//        float: left;
+//        font-size: 14px;
+//        font-weight: 200;
+//        line-height: $TItemHeight;
+//        text-align: center;
+//        color: #fff;
+//      }
+//
+//      .TI_Dwidth {
+//        width: 40%;
+//        line-height: 20px;
+//        display: flex;
+//        align-items: center;
+//        justify-content: center;
+//        @extend .TI_default;
+//      }
+//
+//      .TI_info {
+//        width: 60%;
+//        text-align: left;
+//        border-left: 1px solid #f0f0f0;
+//        padding-left: 1%;
+//        @extend .TI_default;
+//      }
+//
+//      @media screen and (max-width: 1600px) {
+//        /*当屏幕尺寸小于600px时,应用下面的CSS样式*/
+//        .TI_info {
+//          font-size: 12px;
+//          line-height: 12px;
+//        }
+//      }
+//      /*当屏幕尺寸大于900px时,应用下面的CSS样式*/
+//      @media screen and (min-width: 1600px) {
+//        .TI_info {
+//          line-height: 17px;
+//          padding-top: 1%;
+//        }
+//      }
+//    }
+//
+//    .animate-up {
+//      transition: all 0.5s ease-in-out;
+//      transform: translateY(-110px);
+//    }
+//  }
 </style>

+ 96 - 96
ipp-ap/src/views/homePage/ultraShortTermAccuracy.vue

@@ -128,100 +128,100 @@ export default {
 
 </script>
 
-<style lang="scss" scoped>
-.tableTitle {
-  width: 98%;
-  background-color: transparent;
-  border: 1px solid #dce1e6;
-  text-align: center;
-  line-height: 28px
-}
-
-.itemTableBox /deep/ .dv-scroll-ranking-board .ranking-info .rank {
-  font-size: 16px;
-}
-
-.itemTableBox /deep/ .dv-scroll-ranking-board .ranking-info .info-name {
-  font-size: 16px;
-}
-
-$TItemHeight: 65.5px;
-.emptyItem {
-  width: 98%;
-  height: calc(34vh);
-  border: 1px solid #f0f0f0;
-  border-top: 0px;
-
-  .empty_default {
-    height: calc(34vh);
-    float: left;
-    font-size: 14px;
-    font-weight: 200;
-    line-height: calc(34vh);
-    text-align: center;
-    color: #b7b7b7;
-  }
-}
-
-.itemTableBox {
-  height: calc(34vh);
-  background: transparent;
-  overflow: hidden;
-
-  .TItem {
-    width: 98%;
-    height: $TItemHeight;
-    background: transparent;
-    padding: .5%;
-    border: 1px solid #f0f0f0;
-    border-top: 0px;
-
-    .TI_default {
-      height: $TItemHeight;
-      float: left;
-      font-size: 14px;
-      font-weight: 200;
-      line-height: $TItemHeight;
-      text-align: center;
-      color: #fff;
-    }
-
-    .TI_Dwidth {
-      width: 40%;
-      line-height: 20px;
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      @extend .TI_default;
-    }
-
-    .TI_info {
-      width: 60%;
-      text-align: left;
-      border-left: 1px solid #f0f0f0;
-      padding-left: 1%;
-      @extend .TI_default;
-    }
-
-    @media screen and (max-width: 1600px) {
-      /*当屏幕尺寸小于600px时,应用下面的CSS样式*/
-      .TI_info {
-        font-size: 12px;
-        line-height: 12px;
-      }
-    }
-    /*当屏幕尺寸大于900px时,应用下面的CSS样式*/
-    @media screen and (min-width: 1600px) {
-      .TI_info {
-        line-height: 17px;
-        padding-top: 1%;
-      }
-    }
-  }
-
-  .animate-up {
-    transition: all 0.5s ease-in-out;
-    transform: translateY(-110px);
-  }
-}
+//<style lang="scss" scoped>
+//.tableTitle {
+//  width: 98%;
+//  background-color: transparent;
+//  border: 1px solid #dce1e6;
+//  text-align: center;
+//  line-height: 28px
+//}
+//
+//.itemTableBox /deep/ .dv-scroll-ranking-board .ranking-info .rank {
+//  font-size: 16px;
+//}
+//
+//.itemTableBox /deep/ .dv-scroll-ranking-board .ranking-info .info-name {
+//  font-size: 16px;
+//}
+//
+//$TItemHeight: 65.5px;
+//.emptyItem {
+//  width: 98%;
+//  height: calc(34vh);
+//  border: 1px solid #f0f0f0;
+//  border-top: 0px;
+//
+//  .empty_default {
+//    height: calc(34vh);
+//    float: left;
+//    font-size: 14px;
+//    font-weight: 200;
+//    line-height: calc(34vh);
+//    text-align: center;
+//    color: #b7b7b7;
+//  }
+//}
+//
+//.itemTableBox {
+//  height: calc(34vh);
+//  background: transparent;
+//  overflow: hidden;
+//
+//  .TItem {
+//    width: 98%;
+//    height: $TItemHeight;
+//    background: transparent;
+//    padding: .5%;
+//    border: 1px solid #f0f0f0;
+//    border-top: 0px;
+//
+//    .TI_default {
+//      height: $TItemHeight;
+//      float: left;
+//      font-size: 14px;
+//      font-weight: 200;
+//      line-height: $TItemHeight;
+//      text-align: center;
+//      color: #fff;
+//    }
+//
+//    .TI_Dwidth {
+//      width: 40%;
+//      line-height: 20px;
+//      display: flex;
+//      align-items: center;
+//      justify-content: center;
+//      @extend .TI_default;
+//    }
+//
+//    .TI_info {
+//      width: 60%;
+//      text-align: left;
+//      border-left: 1px solid #f0f0f0;
+//      padding-left: 1%;
+//      @extend .TI_default;
+//    }
+//
+//    @media screen and (max-width: 1600px) {
+//      /*当屏幕尺寸小于600px时,应用下面的CSS样式*/
+//      .TI_info {
+//        font-size: 12px;
+//        line-height: 12px;
+//      }
+//    }
+//    /*当屏幕尺寸大于900px时,应用下面的CSS样式*/
+//    @media screen and (min-width: 1600px) {
+//      .TI_info {
+//        line-height: 17px;
+//        padding-top: 1%;
+//      }
+//    }
+//  }
+//
+//  .animate-up {
+//    transition: all 0.5s ease-in-out;
+//    transform: translateY(-110px);
+//  }
+//}
 </style>

+ 3 - 3
ipp-client/src/main/java/com/jiayue/ipfcst/client/Schedule/Task.java

@@ -326,14 +326,14 @@ public class Task {
         if (null == Constant.cacheClientConfig.getDownLoadFileChoose() || "0".equals(Constant.cacheClientConfig.getDownLoadFileChoose())) {
             return list;
         } else if ("1".equals(Constant.cacheClientConfig.getDownLoadFileChoose())) {//只下载短期文件
-            log.debug("云端配置只下载短期文件");
+            log.info("云端配置只下载短期文件");
             list.stream().forEach(fileCreateLog -> {
                 if (fileCreateLog.getFileName().contains("DQ")) {
                     resultList.add(fileCreateLog);
                 }
             });
         } else if ("2".equals(Constant.cacheClientConfig.getDownLoadFileChoose())) { //只下载nwp文件
-            log.debug("云端配置只下载NWP文件");
+            log.info("云端配置只下载NWP文件");
             list.stream().forEach(fileCreateLog -> {
                 if (fileCreateLog.getFileName().contains("NWP")) {
                     resultList.add(fileCreateLog);
@@ -516,7 +516,7 @@ public class Task {
                                 HttpUtil.get(val);
 
                                 moveFile(new File(filePath + file.getName()), filePath + File.separator + "bak" + File.separator);
-                                log.debug(file.getName() + "文件解析成功,移动到:" + filePath + File.separator + "bak" + File.separator);
+                                log.info(file.getName() + "文件解析成功,移动到:" + filePath + File.separator + "bak" + File.separator);
                             } else {
                                 file.delete();
                                 log.error(file.getName() + "文件名不符合要求,删除。");

+ 7 - 7
ipp-client/src/main/java/com/jiayue/ipfcst/client/controller/HomeController.java

@@ -56,12 +56,12 @@ public class HomeController {
 		String message = "500";
 
 		String requestUrl = Constant.cacheClientConfig.getCloudAddr();
-		log.debug("V3云预测文件下载地址:"+requestUrl);
+		log.info("V3云预测文件下载地址:"+requestUrl);
 		Map postParms = new HashMap<>(2);
 		postParms.put("stationCode",stationCode);
 		postParms.put("sign", Md5Util.makeMd5(stationCode));
 		String body = HttpUtil.post(requestUrl+"/getCurentDayAllFiles",postParms,5000);
-		log.debug("请求V3云预测文件下载获得响应:{}",body);
+		log.info("请求V3云预测文件下载获得响应:{}",body);
 		JSONObject json = JSONUtil.parseObj(body);
 		String code = json.get("code").toString();
 		String data = json.get("data").toString();
@@ -80,7 +80,7 @@ public class HomeController {
 			// 从minio下载失败,从云端下载补下载
 			if (downFileInfoMap.size()>0) {
 
-				log.debug("从minio下载失败,从云端下载");
+				log.info("从minio下载失败,从云端下载");
 				// 从云平台补下载 从minio下载失败的文件
 				for(Map.Entry<String,String> map: downFileInfoMap.entrySet()){
 					String url = requestUrl + "/downloadFileById?id=" + map.getKey() + "&sign=" + Md5Util.makeMd5(map.getKey());
@@ -132,7 +132,7 @@ public class HomeController {
 
 		StringBuffer fileName = new StringBuffer();
 		String requestUrl = Constant.cacheClientConfig.getCloudAddr();
-		log.debug("V3云预测文件下载地址:"+requestUrl);
+		log.info("V3云预测文件下载地址:"+requestUrl);
 
 		Map<String, Object> stringObjectMap = downFilePathByStationCode(stationCode, requestUrl, downFilePath, filePathList, message, status);
 		if("J00192".equals(stationCode)){
@@ -166,7 +166,7 @@ public class HomeController {
 		postParms.put("stationCode",stationCode);
 		postParms.put("sign", Md5Util.makeMd5(stationCode));
 		String body = HttpUtil.post(requestUrl+"/getCurentDayAllFiles",postParms,5000);
-		log.debug("请求V3云预测文件下载获得响应:{}",body);
+		log.info("请求V3云预测文件下载获得响应:{}",body);
 		JSONObject json = JSONUtil.parseObj(body);
 		String code = json.get("code").toString();
 		String data = json.get("data").toString();
@@ -175,7 +175,7 @@ public class HomeController {
 				JSONArray array = JSONUtil.parseArray(data);
 				List<FileCreateLog> list = array.toList(FileCreateLog.class);
 				for (FileCreateLog fileCreateLog : list) {
-					log.debug("下载文件:{}",fileCreateLog.toString());
+					log.info("下载文件:{}",fileCreateLog.toString());
 					String url = requestUrl + "/downloadFileById?id=" + fileCreateLog.getId()+"&sign="+ Md5Util.makeMd5(fileCreateLog.getId());
 					HttpUtil.downloadFile(url, new File(downFilePath + File.separatorChar + fileCreateLog.getFileName()),60000);
 					filePathList.append(downFilePath + File.separatorChar + fileCreateLog.getFileName()+"<br>");
@@ -202,7 +202,7 @@ public class HomeController {
 	public Map<String,String> getFileFromMinio(List<FileCreateLog> list,String downFilePath,StringBuffer filePathList,Map<String,String> downFileInfoMap){
 
 		for (FileCreateLog fileCreateLog : list) {
-			log.debug("从minio下载文件:{}", fileCreateLog.toString());
+			log.info("从minio下载文件:{}", fileCreateLog.toString());
 			try {
 				// 从minio下载
 				HttpUtil.downloadFile(fileCreateLog.getFileDownloadUrl(), new File(downFilePath + File.separatorChar

+ 1 - 1
ipp-client/src/main/java/com/jiayue/ipfcst/client/protocol2file/ModbusRtuMasterWithTcpServerHandler.java

@@ -34,7 +34,7 @@ public class ModbusRtuMasterWithTcpServerHandler extends SimpleChannelInboundHan
 	@Override
 	public void channelRead0(ChannelHandlerContext ctx, ByteBuf byteBuf) throws Exception {
 		//收数据
-		log.debug("re <== " + DataConvertor.ByteBuf2String(byteBuf));
+		log.info("re <== " + DataConvertor.ByteBuf2String(byteBuf));
 		((ModbusMasterBuilderInterface) this.builder).getOrCreateSynchronousWaitingRoom().setData(byteBuf.nioBuffer());
 	}
 

+ 4 - 4
ipp-client/src/main/java/com/jiayue/ipfcst/client/utils/UtilTools.java

@@ -110,12 +110,12 @@ public class UtilTools {
 
             if (file.exists()) {
                 if (file.isDirectory()) {
-                    log.debug("dir exists");
+                    log.info("dir exists");
                 } else {
-                    log.debug("the same name file exists, can not create dir");
+                    log.info("the same name file exists, can not create dir");
                 }
             } else {
-                log.debug("dir not exists, create it ...");
+                log.info("dir not exists, create it ...");
                 File parent = file.getParentFile(); // 获取父文件
                 if (!parent.exists()) {
                     parent.mkdirs(); //创建所有父文件夹
@@ -126,7 +126,7 @@ public class UtilTools {
                     Runtime.getRuntime().exec("chmod 777 -R " + path);//ftp服务器在linux环境中,生成的文件涉及到读写权限问题,直接给777权限
                 }
             }
-            log.debug("判断路径path:{} 是否存在", path);
+            log.info("判断路径path:{} 是否存在", path);
         } catch (IOException e) {
             log.error("系统错误:" + e.getMessage(), e);
         } finally {

+ 1 - 1
ipp-common/ipp-common-core/src/main/java/com/jiayue/ipfcst/common/core/util/SpringContextHolder.java

@@ -55,7 +55,7 @@ public class SpringContextHolder implements ApplicationContextAware, DisposableB
      */
     public static void clearHolder() {
         if (log.isDebugEnabled()) {
-            log.debug("清除SpringContextHolder中的ApplicationContext:" + applicationContext);
+            log.info("清除SpringContextHolder中的ApplicationContext:" + applicationContext);
         }
         applicationContext = null;
     }

+ 1 - 4
ipp-idp/pom.xml

@@ -43,17 +43,14 @@
         <dependency>
             <groupId>com.syjy</groupId>
             <artifactId>calculation-spring-boot-starter</artifactId>
-            <version>0.0.32</version>
+            <version>0.0.36</version>
         </dependency>
-
-
         <!--必备:安全模块-->
         <dependency>
             <groupId>com.jiayue</groupId>
             <artifactId>ipp-common-security</artifactId>
             <version>1.0.0</version>
         </dependency>
-
         <dependency>
             <groupId>com.jiayue</groupId>
             <artifactId>ipp-common-mybatis</artifactId>

+ 2 - 2
ipp-idp/src/main/java/com/jiayue/ipp/idp/api/CallForecastPowerUltraShortTermApi.java

@@ -336,9 +336,9 @@ public class CallForecastPowerUltraShortTermApi {
                 } else {
                     BigDecimal xzjdq = deviationValue.add(stPower).setScale(2, BigDecimal.ROUND_HALF_UP);
                     String cdqjsfsZbxz = sysParameterService.getSysParameterAndStationCode("cdqjsfsZbxz", "0.4", stationCode);
-                    log.debug("参数cdqjsfsZbxz值为:" + cdqjsfsZbxz + ",超短期计算方式,可用和短期的差值加短期占比。");
+                    log.info("参数cdqjsfsZbxz值为:" + cdqjsfsZbxz + ",超短期计算方式,可用和短期的差值加短期占比。");
                     String cdqjsfsZbdq = sysParameterService.getSysParameterAndStationCode("cdqjsfsZbdq", "0.6", stationCode);
-                    log.debug("参数cdqjsfsZbdq值为:" + cdqjsfsZbdq + ",超短期计算方式,短期占比。");
+                    log.info("参数cdqjsfsZbdq值为:" + cdqjsfsZbdq + ",超短期计算方式,短期占比。");
                     ustPower = xzjdq.multiply(new BigDecimal(cdqjsfsZbxz)).setScale(2, BigDecimal.ROUND_HALF_UP).add(stPower.multiply(new BigDecimal(cdqjsfsZbdq)).setScale(2, BigDecimal.ROUND_HALF_UP));
                     if (ustPower.doubleValue() > capacity.doubleValue()) {
                         // 如果超短期结果超出装机容量,则超短期结果为装机容量

+ 2 - 2
ipp-idp/src/main/java/com/jiayue/ipp/idp/job/AccuracyCalculationJob.java

@@ -33,12 +33,12 @@ public class AccuracyCalculationJob {
 
     @Scheduled(cron = "0 0/15 * * * *")
     public void accuracyCalculation() {
-        log.debug("准确率定时计算任务开始执行");
+        log.info("准确率定时计算任务开始执行");
         List<ElectricField> electricFieldList = electricFieldService.list();
         for (ElectricField e : electricFieldList) {
             accuracyCalculationService.calculate(e);
         }
-        log.debug("准确率定时计算任务执行完毕");
+        log.info("准确率定时计算任务执行完毕");
 
     }
 

+ 1 - 1
ipp-idp/src/main/java/com/jiayue/ipp/idp/job/ApiJob.java

@@ -25,7 +25,7 @@ public class ApiJob {
     @Autowired
     private CallPowerStationStatusDataApi callPowerStationStatusDataApi;
 
-    @Scheduled(cron = "30 0,15,30,45 * * * ? ")
+//    @Scheduled(cron = "30 0,15,30,45 * * * ? ")
     public void ultraShortTermApi(){
         callForecastPowerUltraShortTermApi.executeForecast();
     }

+ 17 - 17
ipp-idp/src/main/java/com/jiayue/ipp/idp/service/an/DownloadService.java

@@ -81,7 +81,7 @@ public class DownloadService {
                 dirFile.mkdirs();
             }
             File[] files = dirFile.listFiles();
-            log.info("扫描路径:{},文件数:{}",path,files.length);
+            log.info("扫描路径:{},文件数:{}", path, files.length);
             //遍历文件
             for (File file : files) {
                 String fileName = file.getName();
@@ -92,7 +92,7 @@ public class DownloadService {
 
                 if (!fileName.contains(dayStr)) {
                     file.delete();
-                    log.warn(parsingUrl.getStationCode()+"下"+fileName + "云端文件不是当天的文件,删除!");
+                    log.warn(parsingUrl.getStationCode() + "下" + fileName + "云端文件不是当天的文件,删除!");
                     break;
                 }
 
@@ -124,33 +124,33 @@ public class DownloadService {
                                             stf.setForecastTime(sdf.parse(string_arr[2]));
                                             stf.setGenDate(new Date());
                                             stf.setStationCode(parsingUrl.getStationCode());
-                                            stf.setForecastManufactor("SYJY");
+                                            stf.setForecastManufactor(parsingUrl.getForecastManufactor());
                                             forecastPowerShortTermList.add(stf);
 
                                             // 历史表
                                             //过滤当天的数据
-                                            long secondDayTime = com.jiayue.ipp.idp.util.DateMomentUtil.getDayStartTime(systemTime)+1000*60*60*24;
+                                            long secondDayTime = com.jiayue.ipp.idp.util.DateMomentUtil.getDayStartTime(systemTime) + 1000 * 60 * 60 * 24;
                                             if (sdf.parse(string_arr[2]).getTime() >= secondDayTime) {
                                                 ForecastPowerShortTermHis forecastPowerShortTermHis = new ForecastPowerShortTermHis();
                                                 forecastPowerShortTermHis.setGenDate(new Date());
                                                 forecastPowerShortTermHis.setStationCode(parsingUrl.getStationCode());
                                                 forecastPowerShortTermHis.setAbleValue(new BigDecimal(string_arr[3]));
                                                 forecastPowerShortTermHis.setForecastTime(sdf.parse(string_arr[2]));
-                                                forecastPowerShortTermHis.setForecastHowLongAgo(DateMomentUtil.getDaysBetweenTwoDate(systemTime,sdf.parse(string_arr[2]).getTime()));
-                                                forecastPowerShortTermHis.setForecastManufactor("SYJY");
+                                                forecastPowerShortTermHis.setForecastHowLongAgo(DateMomentUtil.getDaysBetweenTwoDate(systemTime, sdf.parse(string_arr[2]).getTime()));
+                                                forecastPowerShortTermHis.setForecastManufactor(parsingUrl.getForecastManufactor());
                                                 forecastPowerShortTermHisList.add(forecastPowerShortTermHis);
                                             }
                                         }
                                     }
                                 }
 
-                                if (forecastPowerShortTermList.size()>0 && forecastPowerShortTermHisList.size()>0){
+                                if (forecastPowerShortTermList.size() > 0 && forecastPowerShortTermHisList.size() > 0) {
                                     // 保存短期实时
                                     Date startTime = forecastPowerShortTermList.get(0).getForecastTime();
                                     Date endTime = forecastPowerShortTermList.get(forecastPowerShortTermList.size() - 1).getForecastTime();
                                     LambdaQueryWrapper<ForecastPowerShortTerm> lambdaQueryWrapper = new LambdaQueryWrapper<>();
                                     lambdaQueryWrapper.eq(ForecastPowerShortTerm::getStationCode, parsingUrl.getStationCode());
-                                    lambdaQueryWrapper.eq(ForecastPowerShortTerm::getForecastManufactor, "SYJY");
+                                    lambdaQueryWrapper.eq(ForecastPowerShortTerm::getForecastManufactor, parsingUrl.getForecastManufactor());
                                     lambdaQueryWrapper.between(ForecastPowerShortTerm::getForecastTime, startTime, endTime);
                                     forecastPowerShortTermService.remove(lambdaQueryWrapper);
                                     forecastPowerShortTermService.saveBatch(forecastPowerShortTermList);
@@ -158,14 +158,14 @@ public class DownloadService {
                                     // 保存短期历史
                                     LambdaQueryWrapper<ForecastPowerShortTermHis> forecastPowerShortTermHisLambdaQueryWrapper = new LambdaQueryWrapper<>();
                                     forecastPowerShortTermHisLambdaQueryWrapper.eq(ForecastPowerShortTermHis::getStationCode, parsingUrl.getStationCode());
-                                    forecastPowerShortTermHisLambdaQueryWrapper.eq(ForecastPowerShortTermHis::getForecastManufactor, "SYJY");
-                                    forecastPowerShortTermHisLambdaQueryWrapper.eq(ForecastPowerShortTermHis::getGenDate, DateUtil.format(new Date(),"yyyy-MM-dd"));
+                                    forecastPowerShortTermHisLambdaQueryWrapper.eq(ForecastPowerShortTermHis::getForecastManufactor, parsingUrl.getForecastManufactor());
+                                    forecastPowerShortTermHisLambdaQueryWrapper.eq(ForecastPowerShortTermHis::getGenDate, DateUtil.format(new Date(), "yyyy-MM-dd"));
                                     forecastPowerShortTermHisService.remove(forecastPowerShortTermHisLambdaQueryWrapper);
                                     forecastPowerShortTermHisService.saveBatch(forecastPowerShortTermHisList);
-                                    log.info(parsingUrl.getStationCode()+"下"+fileName + "嘉越云端文件解析成功!");
+                                    log.info(parsingUrl.getStationCode() + "下" + fileName + "嘉越云端文件解析成功!");
                                     try {
                                         File file1 = new File(success + File.separator + fileName);
-                                        if(file1.exists()){
+                                        if (file1.exists()) {
                                             file1.delete();
                                         }
                                         FileUtils.moveFile(file, new File(success + File.separator + fileName));
@@ -177,27 +177,27 @@ public class DownloadService {
                                 log.error("嘉越云端文件解析失败:", e);
                                 try {
                                     File file1 = new File(failDir + File.separator + fileName);
-                                    if(file1.exists()){
+                                    if (file1.exists()) {
                                         file1.delete();
                                     }
                                     FileUtils.moveFile(file, new File(failDir + File.separator + fileName));
                                 } catch (IOException ex) {
-                                    log.error(parsingUrl.getStationCode()+"下"+fileName + "嘉越云端文件解析失败1", ex);
+                                    log.error(parsingUrl.getStationCode() + "下" + fileName + "嘉越云端文件解析失败1", ex);
                                 }
                             } finally {
                                 close(bufferedReader, read);
                             }
                         }
                     } catch (Exception e) {
-                        log.error(parsingUrl.getStationCode()+"下"+fileName + "解析嘉越云端DQ文件失败", e);
+                        log.error(parsingUrl.getStationCode() + "下" + fileName + "解析嘉越云端DQ文件失败", e);
                         try {
                             File file1 = new File(failDir + File.separator + fileName);
-                            if(file1.exists()){
+                            if (file1.exists()) {
                                 file1.delete();
                             }
                             FileUtils.moveFile(file, new File(failDir + File.separator + fileName));
                         } catch (IOException ex) {
-                            log.error(parsingUrl.getStationCode()+"下"+fileName + "嘉越云端文件解析失败1", ex);
+                            log.error(parsingUrl.getStationCode() + "下" + fileName + "嘉越云端文件解析失败1", ex);
                         }
                     }
                 }

+ 16 - 13
ipp-idp/src/main/java/com/jiayue/ipp/idp/service/impl/AccuracyCalculationServiceImpl.java

@@ -1254,7 +1254,9 @@ public class AccuracyCalculationServiceImpl extends ServiceImpl<AccuracyCalculat
      * @return
      */
     public List<CalculationInfo> loopMatching(long startTime, long endTime, String type, Integer howLongAgo, boolean doubleListFlag, String stationCode, String forecastManufactor) {
-
+        ElectricField electricField = electricFieldService.findByStationCode(stationCode);
+        //解析中目前不带 开机和装机容量,无法计算准确率,先用场站容量代替
+        BigDecimal cap = electricField.getCapacity();
         List<CalculationInfo> resultList = new ArrayList<>();
         // 获取实际功率
         List<PowerStationStatusData> powerStationStatusDataList = powerStationStatusDataService.findByTimeBetweenAndStationCode(new Date(startTime), new Date(endTime), stationCode);
@@ -1278,11 +1280,11 @@ public class AccuracyCalculationServiceImpl extends ServiceImpl<AccuracyCalculat
                     calculationInfo.setTime(finalTime);
                     calculationInfo.setForecastAbleValue(shortFilter.get(0).getAbleValue());
                     calculationInfo.setForecastTheoryValue(shortFilter.get(0).getTheoryValue());
-                    calculationInfo.setForecastCapacity(shortFilter.get(0).getCapacity());
-                    calculationInfo.setForecastSuCapacity(shortFilter.get(0).getSuCapacity());
+                    calculationInfo.setForecastCapacity(cap);
+                    calculationInfo.setForecastSuCapacity(cap);
                     //实际
-                    calculationInfo.setCapacity(pFilter.get(0).getCapacity());
-                    calculationInfo.setOpenCapacity(pFilter.get(0).getOpenCapacity());
+                    calculationInfo.setCapacity(cap);
+                    calculationInfo.setOpenCapacity(cap);
                     calculationInfo.setAbleValue(pFilter.get(0).getAbleValue());
                     calculationInfo.setRealValue(pFilter.get(0).getRealValue());
                     calculationInfo.setTheoryValue(pFilter.get(0).getTheoryValue());
@@ -1297,17 +1299,18 @@ public class AccuracyCalculationServiceImpl extends ServiceImpl<AccuracyCalculat
                         for (ForecastPowerUltraShortTermHis ultraShort : ultraList) {
                             calculationInfo = new CalculationInfo();
                             // 设置实际功率、可用功率信息
-                            calculationInfo.setCapacity(pFilter.get(0).getCapacity());
-                            calculationInfo.setOpenCapacity(pFilter.get(0).getOpenCapacity());
+                            calculationInfo.setCapacity(cap);
+                            calculationInfo.setOpenCapacity(cap);
                             calculationInfo.setAbleValue(pFilter.get(0).getAbleValue());
                             calculationInfo.setRealValue(pFilter.get(0).getRealValue());
                             calculationInfo.setTheoryValue(pFilter.get(0).getTheoryValue());
                             // 设置超短期信息
                             calculationInfo.setTime(finalTime);
-                            calculationInfo.setForecastSuCapacity(ultraShort.getSuCapacity());
+                            calculationInfo.setForecastSuCapacity(cap);
                             calculationInfo.setForecastAbleValue(ultraShort.getAbleValue());
                             calculationInfo.setForecastTheoryValue(ultraShort.getTheoryValue());
-                            calculationInfo.setForecastCapacity(ultraShort.getCapacity());
+                            calculationInfo.setForecastCapacity(cap);
+                            calculationInfo.setGenTime(ultraShort.getGenDate());
                         }
                         continue;
                     }
@@ -1317,10 +1320,10 @@ public class AccuracyCalculationServiceImpl extends ServiceImpl<AccuracyCalculat
                     // 如果超短期预测功率不为空且站场功率不为空
                     if (!ultraFilter.isEmpty()) {
                         // 超短期预测功率
-                        calculationInfo.setForecastSuCapacity(ultraFilter.get(0).getSuCapacity());
+                        calculationInfo.setForecastSuCapacity(cap);
                         calculationInfo.setForecastAbleValue(ultraFilter.get(0).getAbleValue());
                         calculationInfo.setForecastTheoryValue(ultraFilter.get(0).getTheoryValue());
-                        calculationInfo.setForecastCapacity(ultraFilter.get(0).getCapacity());
+                        calculationInfo.setForecastCapacity(cap);
                     }
                 }
             }
@@ -1330,8 +1333,8 @@ public class AccuracyCalculationServiceImpl extends ServiceImpl<AccuracyCalculat
                 calculationInfo.setAbleValue(pFilter.get(0).getAbleValue());
                 calculationInfo.setRealValue(pFilter.get(0).getRealValue());
                 calculationInfo.setTheoryValue(pFilter.get(0).getTheoryValue());
-                calculationInfo.setOpenCapacity(pFilter.get(0).getOpenCapacity());
-                calculationInfo.setCapacity(pFilter.get(0).getCapacity());
+                calculationInfo.setOpenCapacity(cap);
+                calculationInfo.setCapacity(cap);
                 calculationInfo.setTime(finalTime);
             }
             // 预测功率或实际功率为空的时候,不放入result中

+ 3 - 2
ipp-idp/src/main/java/com/jiayue/ipp/idp/service/impl/WindTowerStatusDataServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.jiayue.ipp.common.data.entity.WindTowerStatusData;
 import com.jiayue.ipp.common.data.entity.an.ParsingCftInfo;
 import com.jiayue.ipp.idp.mapper.WindTowerStatusDataMapper;
+import com.jiayue.ipp.idp.mapper.an.ParsingCftInfoMapper;
 import com.jiayue.ipp.idp.service.WindTowerStatusDataService;
 import com.jiayue.ipp.idp.service.an.ParsingCftInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -30,7 +31,7 @@ public class WindTowerStatusDataServiceImpl extends ServiceImpl<WindTowerStatusD
 
 //    private final EquipmentAttributeService equipmentAttributeService;
     @Autowired
-    ParsingCftInfoService parsingCftInfoService;
+    ParsingCftInfoMapper parsingCftInfoMapper;
 
 
     @Override
@@ -76,7 +77,7 @@ public class WindTowerStatusDataServiceImpl extends ServiceImpl<WindTowerStatusD
 //        List<String> thList = this.getTableHead(stationCode, tunnelGatherDataPointList);
         //List<String> wsList = thList.stream().filter(t -> t.contains("wsInst")).collect(Collectors.toList());
         //List<String> wdList = thList.stream().filter(t -> t.contains("wdInst")).collect(Collectors.toList());
-        List<ParsingCftInfo> list = parsingCftInfoService.list();
+        List<ParsingCftInfo> list = parsingCftInfoMapper.selectList(null);
         //根据场站编号过滤
         List<ParsingCftInfo> parsingCftInfoList = list.stream().filter(p -> p.getStationCode().contains(stationCode)).collect(Collectors.toList());
         //风速

+ 2 - 2
ipp-idp/src/main/java/com/jiayue/ipp/idp/util/GzipUtil.java

@@ -49,8 +49,8 @@ public class GzipUtil {
     }
 
     public static String zip(String result) throws IOException {
-        log.debug("qrCode默认编码:"+Charset.defaultCharset().name());
-        log.debug("file.encoding:"+System.getProperty("file.encoding"));
+        log.info("qrCode默认编码:"+Charset.defaultCharset().name());
+        log.info("file.encoding:"+System.getProperty("file.encoding"));
         byte[] bytes = result.getBytes("utf-8");
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         Base64OutputStream b64os = new Base64OutputStream(bos);

+ 4 - 3
ipp-idp/src/main/resources/bootstrap.yml

@@ -21,8 +21,8 @@ spring:
     type: com.zaxxer.hikari.HikariDataSource
     driver-class-name: com.mysql.cj.jdbc.Driver
     username: root
-    password: '!QAZ2root'
-    url: jdbc:mysql://192.168.1.205:3306/ipp-tl?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
+    password: root
+    url: jdbc:mysql://192.168.1.23:3306/ipp-tl?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
   # 模板引擎
   thymeleaf:
     prefix: classpath:/templates/
@@ -34,6 +34,7 @@ spring:
 calculate:
   service:
     enabled: true
-    version: 0.0.1-SNAPSHOT
+    version: 0.0.36
+    dbType: mysql
 
 dqForecastDays: 10

+ 63 - 64
ipp-idp/src/main/resources/logback-spring.xml

@@ -1,79 +1,78 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ /*
-  ~  *  Copyright (c) 2019-2020, 冷冷 (wangiegie@gmail.com).
-  ~  *  <p>
-  ~  *  Licensed under the GNU Lesser General Public License 3.0 (the "License");
-  ~  *  you may not use this file except in compliance with the License.
-  ~  *  You may obtain a copy of the License at
-  ~  *  <p>
-  ~  * https://www.gnu.org/licenses/lgpl.html
-  ~  *  <p>
-  ~  * Unless required by applicable law or agreed to in writing, software
-  ~  * distributed under the License is distributed on an "AS IS" BASIS,
-  ~  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~  * See the License for the specific language governing permissions and
-  ~  * limitations under the License.
-  ~  */
-  -->
 
-<configuration debug="false" scan="false">
-	<springProperty scop="context" name="spring.application.name" source="spring.application.name" defaultValue=""/>
-	<property name="log.path" value="logs/${spring.application.name}"/>
-	<!-- 彩色日志格式 -->
-	<property name="CONSOLE_LOG_PATTERN"
-			  value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
-	<!-- 彩色日志依赖的渲染类 -->
-	<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
-	<conversionRule conversionWord="wex"
-					converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
-	<conversionRule conversionWord="wEx"
-					converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
-	<!-- Console log output -->
-	<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+<configuration scan="false" scanPeriod="60 seconds" debug="false"><!-- 这个是根配置文件,一定要有的
+                            scan:
+                                是当配置文件被修改后会被重新加载
+                            scanPeriod:
+                                设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,
+                                默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。
+                            debug:
+                                当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。
+                                默认值为false。
+                             -->
+	<!-- 日志存放路径
+        下面的标签可以自己定义
+        name:相当于Map的key
+        value:就是map的value
+        ${catalina.base}是tomcat的当前路径
+        /logs:就是tomcat下的日志路径,
+        /ehrlog:如果没有目录会默认创建
+    -->
+	<property name="logbase" value="../logs/"/>
+	<!-- 时间戳:这个时间戳可以作为每日日志的名称 -->
+	<timestamp key="bySecond" datePattern="yyyy-MM-dd"/>
+	<!-- appender:
+        name相当于一个名称
+        class:确定要加载哪个类
+        encoder:一定要加 encoder ,
+        默认配置为PatternLayoutEncoder
+        patter:必填
+        ConsoleAppender:也明白是什么意思,就是输出在控制台上-->
+	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
 		<encoder>
-			<pattern>${CONSOLE_LOG_PATTERN}</pattern>
+			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+			<charset>UTF-8</charset>
 		</encoder>
 	</appender>
-
-	<!-- Log file debug output -->
-	<appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
-		<file>${log.path}/debug.log</file>
-		<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-			<fileNamePattern>${log.path}/%d{yyyy-MM, aux}/debug.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
-			<maxFileSize>50MB</maxFileSize>
-			<maxHistory>30</maxHistory>
-		</rollingPolicy>
-		<encoder>
-			<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
-		</encoder>
-	</appender>
-
-	<!-- Log file error output -->
-	<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
-		<file>${log.path}/error.log</file>
+	<!-- 把日志存储
+        encoding:日志的编码
+        file:指定当前生成的日志文件名称
+        rollingPolicy:滚动策略
+        FileNamePattern:移动文件最后的名称,跟file标签结合使用,
+        比如file里面的内容是  1.txt
+        那么,FileNamePattern里面写的是2.txt,那么最后文件名就为2.txt
+        如果最后结尾是gz或者zip,那么,就会自动打成压缩包
+        -->
+	<appender name="logFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<!-- 编码 -->
+		<!--<Encoding>UTF-8</Encoding>-->
+		<!-- 按照时间来 -->
 		<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-			<fileNamePattern>${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
-			<maxFileSize>50MB</maxFileSize>
-			<maxHistory>30</maxHistory>
+			<!--日志文件输出的文件名-->
+			<FileNamePattern>${logbase}/%d{yyyy-MM-dd}/ipp-idp.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
+			<!--日志文件保留天数-->
+			<MaxHistory>180</MaxHistory>
+			<maxFileSize>10MB</maxFileSize>
+			<totalSizeCap>1024MB</totalSizeCap>
+			<cleanHistoryOnStart>true</cleanHistoryOnStart>
 		</rollingPolicy>
+		<!-- 布局 -->
 		<encoder>
-			<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
+			<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
+			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+			<charset>UTF-8</charset>
 		</encoder>
-		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-			<level>ERROR</level>
-		</filter>
+		<append>false</append>
 	</appender>
 
-	<!--nacos 心跳 INFO 屏蔽-->
-	<logger name="com.alibaba.nacos" level="OFF">
-		<appender-ref ref="error"/>
+	<logger name="com.jiayue" level="info" additivity="true">
+		<appender-ref ref="logFile"/>
+	</logger>
+	<logger name="org" level="info" additivity="true">
+		<appender-ref ref="logFile"/>
 	</logger>
 
-	<!-- Level: FATAL 0  ERROR 3  WARN 4  INFO 6  DEBUG 7 -->
-	<root level="INFO">
-		<appender-ref ref="console"/>
-		<appender-ref ref="debug"/>
-		<appender-ref ref="error"/>
+	<root level="info">
+		<appender-ref ref="STDOUT"/>
 	</root>
 </configuration>

+ 1 - 1
pom.xml

@@ -19,7 +19,7 @@
 		<javajwt.version>3.4.0</javajwt.version>
 		<commons-lang3.version>3.9</commons-lang3.version>
 		<jasypt-boot.version>2.1.1</jasypt-boot.version>
-		<hutool.version>5.8.12</hutool.version>
+		<hutool.version>5.3.5</hutool.version>
 		<ttl.version>2.11.2</ttl.version>
 		<mybatis-plus.version>3.4.2</mybatis-plus.version>
 		<swagger.core.version>1.5.24</swagger.core.version>