Переглянути джерело

新增飔合科技一体化(山东4个站),一体化内网更新

fanxiaoyu 1 місяць тому
батько
коміт
86175fecd2

+ 2 - 1
in-client-qn/src/main/java/com/jiayue/insu/inclientqn/permisson/com/BJZYYJYSDComPermisson.java

@@ -57,7 +57,8 @@ public class BJZYYJYSDComPermisson {
         // 密码
         String password = station.getPassword();
         // 身份验证
-        String auth = "Basic dGVzdDp0ZXN0";
+//        String auth = "Basic dGVzdDp0ZXN0";
+        String auth = "Basic cGlnOkpxbXkjRnpqY0AyMDI1a2V5";
         // token地址
         String tokenUrl = station.getComurl();
         String response;

+ 16 - 2
in-cloud/src/main/java/com/jiayue/insu/incloud/job/data/pull/SHKJPullCorrectDataJob.java

@@ -1,9 +1,12 @@
 package com.jiayue.insu.incloud.job.data.pull;
 
+import cn.hutool.core.date.LocalDateTimeUtil;
 import com.jiayue.insu.incloud.constants.CommonStant;
+import com.jiayue.insu.incloud.constants.enums.StatusEnum;
+import com.jiayue.insu.incloud.entity.Record;
 import com.jiayue.insu.incloud.entity.Station;
-import com.jiayue.insu.incloud.pulldata.PullCorrectDataForQNHL;
 import com.jiayue.insu.incloud.pulldata.PullCorrectDataForSH;
+import com.jiayue.insu.incloud.service.RecordService;
 import com.jiayue.insu.incloud.service.StationService;
 import lombok.extern.slf4j.Slf4j;
 import org.quartz.Job;
@@ -11,6 +14,8 @@ import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
 import org.springframework.beans.factory.annotation.Autowired;
 
+import java.time.LocalDateTime;
+
 /**
  * 飔合科技 拉取修正数据定时任务
  *
@@ -25,6 +30,8 @@ public class SHKJPullCorrectDataJob implements Job {
     private PullCorrectDataForSH pullCorrectDataForSH;
     @Autowired
     private StationService stationService;
+    @Autowired
+    private RecordService recordService;
 
     @Override
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
@@ -33,7 +40,14 @@ public class SHKJPullCorrectDataJob implements Job {
         Station station = stationService.checkAndFindStation(code,CommonStant.RECORD_TYPE_PULL_CORRECT);
         //没有成功记录进行业务
         if (station != null) {
-            pullCorrectDataForSH.pullDQData(station);
+            Record successRecord = recordService.findTimeAndTypeAndStateAndStation(
+                    LocalDateTimeUtil.beginOfDay(LocalDateTime.now()),
+                    CommonStant.RECORD_TYPE_PULL_CORRECT,
+                    StatusEnum.SUCCESS.getSign(), station.getStationCode());
+            if (successRecord == null){
+                pullCorrectDataForSH.pullDQData(station);
+            }
+
         }else{
             log.error("========== 一体化定时任务异常:  场站信息为空  {}==========",code);
         }

+ 1 - 1
in-cloud/src/main/java/com/jiayue/insu/incloud/job/data/push/SHKJLNPushInitDqDataJob.java

@@ -47,7 +47,7 @@ public class SHKJLNPushInitDqDataJob implements Job {
                         LocalDateTimeUtil.beginOfDay(LocalDateTime.now()),
                         CommonStant.RECORD_TYPE_PUSH_INIT,
                         StatusEnum.SUCCESS.getSign(), stationCode);
-                //没有成功记录进行业务
+//               没有成功记录进行业务
                 if(successRecord == null) {
                     pushDataForSH.pushDQData(one);
                 }

+ 188 - 135
in-cloud/src/main/java/com/jiayue/insu/incloud/pulldata/PullCorrectDataForSH.java

@@ -6,6 +6,7 @@ import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.date.LocalDateTimeUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.http.HttpRequest;
+import cn.hutool.http.HttpUtil;
 import cn.hutool.json.JSONObject;
 import cn.hutool.json.JSONUtil;
 import com.fasterxml.jackson.databind.JsonNode;
@@ -27,6 +28,7 @@ import com.jiayue.insu.incloud.service.ForecastDataService;
 import com.jiayue.insu.incloud.service.IntegrationCompanyService;
 import com.jiayue.insu.incloud.service.RecordService;
 import com.jiayue.insu.incloud.service.StationService;
+import com.jiayue.insu.incloud.utils.JsonResultUtil;
 import com.jiayue.insu.incloud.utils.SystermUtils;
 import com.jiayue.insu.minio.util.MinioUtilService;
 import lombok.extern.slf4j.Slf4j;
@@ -41,7 +43,9 @@ import org.springframework.stereotype.Component;
 import java.io.*;
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
+import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.time.LocalTime;
 import java.util.*;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -79,6 +83,9 @@ public class PullCorrectDataForSH implements IPullInitCorrectDataForSH {
     @Value("${minio.bucketname}")
     private String bucketName;
 
+    @Value("${minio.pushCorrFileUrl}")
+    private String pushCorrFileUrl;
+
     /**
      * 拉取修正预测数据并生成文件上送minio服务器
      *
@@ -96,11 +103,12 @@ public class PullCorrectDataForSH implements IPullInitCorrectDataForSH {
         record.setTime(localDateTime);
         record.setCreateTime(LocalDateTime.now());
 
-        Station st = stationService.findByStationCode(station.getStationCode());
+//        Station st = stationService.findByStationCode(station.getStationCode());
 
         IntegrationCompany integrationCompany = integrationCompanyService.findByCode(CompanyConstant.COMPANY_SHKJ_LN);
-//        String dataPullUrl = integrationCompany.getPullUrl();
-        String dataPullUrl = "https://dataservice.tradingthink.cn/api/thirdDatasourceSync/syjy/power_submit";
+        String dataPullUrl = integrationCompany.getPullUrl();
+        String stationId = station.getSignCode();
+//        String dataPullUrl = "https://127.0.0.1:9001/consoleOpenInterface/testSh";
 
         boolean result = false;
         boolean isUpload = false;
@@ -112,7 +120,7 @@ public class PullCorrectDataForSH implements IPullInitCorrectDataForSH {
             //https://dataservice.tradingthink.cn/api/thirdDatasourceSync/syjy/power_submit
             String day = tomorrow.toString("yyyy-MM-dd");
             Map<String, Object> map = new HashMap<>();
-            map.put("station_id", "2109001");
+            map.put("station_id",stationId);
             map.put("day", day);
             // 发送请求
             HttpRequest httpRequest = HttpRequest.post(dataPullUrl)
@@ -132,18 +140,16 @@ public class PullCorrectDataForSH implements IPullInitCorrectDataForSH {
                         long startTime = DateUtil.beginOfDay(DateUtil.tomorrow()).getTime() + 15 * 60 * 1000L;
                         long endTime = startTime + 24 * 3600 * 1000L-1;
                         aList = forecastDataService.findTimeByStation(station.getStationCode(), startTime, endTime);
-//                        log.info(station.getStationCode() + " 请求短期修正数据返回内容:{}", response);
+                        log.info(station.getStationCode() + " 请求短期修正数据返回内容:{}", response);
 
                         try {
                             list = correctWindData(responseSHLNVo.getData());
-
                             /**************检测解析数据完整性(飔合科技只修正96数据)*******************/
-                            BigDecimal one = new BigDecimal("1");
                             BigDecimal checkCount = new BigDecimal(96);
                             if (list.size() < checkCount.intValue()) {
                                 record.setState(StatusEnum.DATA_DEFICIENCY.getCode());
                                 record.setStateContent(StatusEnum.DATA_DEFICIENCY.getMsg());
-                                log.warn("========== {}:{} ==> 请求短期修正数据缺数: {}", integrationCompany.getName(), st.getStationCode(), list.size());
+                                log.warn("========== {}:{} ==> 请求短期修正数据缺数: {}", integrationCompany.getName(), station.getStationCode(), list.size());
                             } else {
                                 result = true;
                                 for (ForecastData a : aList) {
@@ -155,47 +161,74 @@ public class PullCorrectDataForSH implements IPullInitCorrectDataForSH {
                                     } else {
                                         record.setState(StatusEnum.DATA_DEFICIENCY.getCode());
                                         record.setStateContent(StatusEnum.DATA_DEFICIENCY.getMsg());
-                                        log.warn("========== {}:{} ==> 请求短期修正数据缺数: {}", integrationCompany.getName(), st.getStationCode(), list.size());
+                                        log.warn("========== {}:{} ==> 请求短期修正数据缺数: {}", integrationCompany.getName(), station.getStationCode(), list.size());
                                         break;
                                     }
                                 }
 
                             }
-                            /**************检测解析数据完整性*******************/
                         } catch (Exception e) {
                             record.setState(StatusEnum.CONNECT_RESPONSE_FORMAT_ERROR.getSign());
                             record.setStateContent("解析短期修正数据失败");
-                            log.error("=========={}:{} ==> 解析短期修正数据失败:{}", integrationCompany.getName(), st.getStationCode(),e);
+                            log.error("=========={}:{} ==> 解析短期修正数据失败:{}", integrationCompany.getName(), station.getStationCode(),e);
                         }
 
                         if (result) {
-                            log.info("=========={}:{} ==> 拉取短期修正数据成功! ==========", integrationCompany.getName(), st.getStationCode());
+                            log.info("=========={}:{} ==> 拉取短期修正数据成功! ==========", integrationCompany.getName(), station.getStationCode());
                             record.setState(StatusEnum.SUCCESS.getSign());
                             record.setStateContent(String.valueOf(list.size()));
-                            forecastDataService.saveOrUpdateBatch(aList);
+                            boolean b = forecastDataService.saveOrUpdateBatch(aList);
+
+                            if (b) {
+                                File file = genFile(station);
+                                if (file != null) {
+                                    JSONObject pushMinIoResult = pushFileToMinIo(file, station.getStationCode());
+                                    if (JsonResultUtil.Type.failure.value().equals(pushMinIoResult.get(JsonResultUtil.CODE_TAG))) {
+                                       log.error(pushMinIoResult.get(JsonResultUtil.DETAIL_TAG).toString());
+                                    }
+                                    // 获取推送到minIo的文件名
+                                    String minIoFileUrl = pushMinIoResult.getStr(JsonResultUtil.DATA_TAG);
+                                    String[] minIoFileUrlArr = minIoFileUrl.split(";");
+                                    String pushDate = DateUtil.format(new Date(), "yyyyMMdd");
+                                    if (minIoFileUrlArr.length > 1) {
+                                        for (String url : minIoFileUrlArr) {
+                                            if (url.contains(station.getStationCode())) {
+                                                pushCorr(station, file.getName(), pushDate, url);
+                                            } else {
+                                                station.setStationCode(station.getStationCode().replace("-A", "-B"));
+                                                pushCorr(station, file.getName(), pushDate, url);
+                                            }
+                                        }
+                                    } else {
+                                        // 如果文件放成功,回传文件生成信息到云端
+                                        pushCorr(station, file.getName(), pushDate, minIoFileUrl);
+                                    }
+
+                                }
+                            }
 
                         }
 
                     } else {
                         record.setState(StatusEnum.RESPONSE_FAIL.getSign());
                         record.setStateContent(StatusEnum.RESPONSE_FAIL.getMsg());
-                        log.error("=========={}:{} ==>拉取短期修正数据失败 响应码异常 ", integrationCompany.getName(), st.getStationCode());
+                        log.error("=========={}:{} ==>拉取短期修正数据失败 响应码异常 ", integrationCompany.getName(), station.getStationCode());
                     }
                 } else {
                     record.setState(StatusEnum.CONNECT_RESPONSE_FORMAT_ERROR.getSign());
                     record.setStateContent(StatusEnum.CONNECT_RESPONSE_FORMAT_ERROR.getMsg());
-                    log.error("=========={}:{} ==>拉取短期修正数据失败 接收响应字符串非json格式 ", integrationCompany.getName(), st.getStationCode());
+                    log.error("=========={}:{} ==>拉取短期修正数据失败 接收响应字符串非json格式 ", integrationCompany.getName(), station.getStationCode());
                 }
             } else {
                 record.setState(StatusEnum.CONNECT_RESPONSE_CONTENT_NULL.getSign());
                 record.setStateContent(StatusEnum.CONNECT_RESPONSE_CONTENT_NULL.getMsg());
-                log.error("=========={}:{} ==> 拉取短期修正数据失败  返回响应内容为空 ==========", integrationCompany.getName(), st.getStationCode());
+                log.error("=========={}:{} ==> 拉取短期修正数据失败  返回响应内容为空 ==========", integrationCompany.getName(), station.getStationCode());
             }
 
         } catch (Exception e) {
             record.setState(StatusEnum.CONNECT_ERROR.getSign());
             record.setStateContent(StatusEnum.CONNECT_ERROR.getMsg());
-            log.error("=========={}:{} ==>请求短期修正数据失败 连接断开或请求超时 ==========", integrationCompany.getName(), st.getStationCode());
+            log.error("=========={}:{} ==>请求短期修正数据失败 连接断开或请求超时 ==========", integrationCompany.getName(), station.getStationCode());
             e.printStackTrace();
 
         }
@@ -278,141 +311,161 @@ public class PullCorrectDataForSH implements IPullInitCorrectDataForSH {
 
         return bigDecimal;
     }
-
-
-//    /**
-//     * 生成文件
-//     *
-//     * @return
-//     */
-//    public File genFile(Station station) {
-//
-//        String vmsPath = SystermUtils.getResourceBasePath() + "/vms/DQ.vm";
-//        File file = null;
-//        Template template = this.velocityEngine.getTemplate(vmsPath);
-//        if (template != null) {
-//            VelocityContext velocityContext;
-//            StringWriter writer;
-//
-//            long startTime = DateUtil.beginOfDay(new Date()).getTime();
-//            long endTime = DateUtil.offsetDay(DateUtil.beginOfDay(DateUtil.tomorrow()), station.getDays()).getTime();
-//            List<ForecastData> aList = new ArrayList<>();
-//            aList = forecastDataService.findTimeByStation(station.getStationCode(), startTime, endTime);
-//            aList.sort(Comparator.comparing(ForecastData::getForecastTime));
-//            List<Map<String, Object>> vList = new ArrayList<>();
-//
-//            for (ForecastData a : aList) {
-//                Map<String, Object> map = new HashMap<>();
-//                map.put("id", a.getId());
-//                map.put("stationName", station.getName());
-//                map.put("forecastTime", DateUtil.format(new Date(a.getForecastTime()), "yyyy-MM-dd HH:mm:ss"));
-//                map.put("fpValue", a.getFpValue() == null ? "-99" : a.getFpValue());
-//                vList.add(map);
-//
-//            }
-//
-//            velocityContext = new VelocityContext();
-//            velocityContext.put("stationName", station.getName());
-//
-//            velocityContext.put("date", DateUtil.format(new Date(), "yyyy-MM-dd"));
-//            velocityContext.put("vList", vList);
-//
-//            writer = new StringWriter();
-//            template.merge(velocityContext, writer);
-//
-//            String fUrl = fileurl + File.separatorChar + "correct" + File.separatorChar + station.getStationCode();
-//            log.info(fUrl);
-//            File fileUrl = new File(fUrl);
-//            if (!fileUrl.exists()) {// 判断目录是否存在
-//                fileUrl.mkdirs();
-//            }
-//
-//            String fileName = "DQ_" + DateUtil.format(DateUtil.beginOfDay(new Date()), "yyyyMMddHHmmss") + "0.RB";
-//
-//            file = new File(fUrl + File.separatorChar + fileName);
-//
-//
-//            FileOutputStream os = null;
-//
-//            try {
-//                boolean res = file.createNewFile();
-//                if (res) {
-//                    os = new FileOutputStream(file);
-//                    // 采用UTF-8字符集
-//                    os.write(writer.toString().getBytes("UTF-8"));
-//                    os.flush();
-//                } else {
-//                    log.warn(station.getStationCode() + " 生成DQ文件失败");
-//                }
-//            } catch (IOException e) {
-//                e.printStackTrace();
-//                log.warn(station.getStationCode() + " 创建DQ文件失败");
-//            } finally {
-//                if (os != null) {
-//                    try {
-//                        os.close();
-//                    } catch (IOException e) {
-//                        log.error("文件生成关闭流失败", e);
-//                    }
-//                }
-//            }
-//
-//        }
-//
-//        return file;
-//    }
-
+    /**
+     * @param station
+     * @param fileName
+     * @param url
+     */
+    public void pushCorr(Station station, String fileName, String pushDate, String url) {
+        // 如果场站信息为空或者 不推送修正数据
+        if (station == null || "0".equals(station.getIsPushCorr())) {
+            return;
+        }
+        Map params = new HashMap(5);
+        params.put("stationCode", station.getStationCode());
+        params.put("forecastDay", pushDate);
+        params.put("forecastFileName", fileName);
+        String fileDownloadUrl = url.split("\\?")[0];
+        params.put("fileDownloadPath", fileDownloadUrl);
+        params.put("remark", "数源:一体化修正");
+        log.info("发送下发修正文件请求");
+        String repose = HttpUtil.post(pushCorrFileUrl, params, 10000);
+        log.info("发送下发修正文件请求,请求响应 {}", repose);
+    }
 
     /**
-     * 上传文件
+     * 生成文件
      *
      * @return
      */
-   /* public boolean uploadFile(String filePath, File file, String stationCode) {
-        boolean status = false;
-        try {
-            MinioClient minioClient = new MinioClient(minloHost, minloUser, minloPwd, false);
+    public File genFile(Station station) {
+
+        String vmsPath = SystermUtils.getResourceBasePath() + "/vms/DQ.vm";
+        File file = null;
+        Template template = this.velocityEngine.getTemplate(vmsPath);
+        if (template != null) {
+            VelocityContext velocityContext;
+            StringWriter writer;
+
+            long startTime = DateUtil.beginOfDay(new Date()).getTime();
+            long endTime = DateUtil.offsetDay(DateUtil.beginOfDay(DateUtil.tomorrow()), station.getDays()).getTime();
+            List<ForecastData> aList = new ArrayList<>();
+            aList = forecastDataService.findTimeByStation(station.getStationCode(), startTime, endTime);
+            aList.sort(Comparator.comparing(ForecastData::getForecastTime));
+            List<Map<String, Object>> vList = new ArrayList<>();
+
+            for (ForecastData a : aList) {
+                Map<String, Object> map = new HashMap<>();
+                map.put("id", a.getId());
+                map.put("stationName", station.getName());
+                map.put("forecastTime", DateUtil.format(new Date(a.getForecastTime()), "yyyy-MM-dd HH:mm:ss"));
+                map.put("fpValue", a.getFpValueCorrect() == null ? a.getFpValue() : a.getFpValueCorrect());
+                vList.add(map);
 
-            // 检查存储桶是否已经存在
-            boolean isExist = minioClient.bucketExists("forcast");
-            if (!isExist) {
-                // 创建一个名为asiatrip的存储桶,用于存储照片的zip文件。
-                minioClient.makeBucket("forcast");
             }
 
-            // 使用putObject上传一个文件到存储桶中。
-            minioClient.putObject("forcast", filePath, FileUtil.getInputStream(file), new PutObjectOptions(file.length(), -1));
+            velocityContext = new VelocityContext();
+            velocityContext.put("stationName", station.getName());
 
-            Map<String, Object> parmer = new HashMap<>();
-            parmer.put("stationCode", stationCode);
-            parmer.put("fileName", file.getName());
-            String s = JSONUtil.toJsonStr(parmer);
-            String response = "";
+            velocityContext.put("date", DateUtil.format(new Date(), "yyyy-MM-dd"));
+            velocityContext.put("vList", vList);
 
-            response = HttpUtil.post(logurl, parmer);
-            if (StringUtils.isNotEmpty(response)) {
-                boolean isJson = JSONUtil.isJsonObj(response);
-                if (isJson) {
-                    JSONObject jsonObject = JSONUtil.parseObj(response);
-                    String code = jsonObject.getStr("code");
-                    if (code.equals("0")) {
-                        status = true;
-                    } else {
-                        log.warn(stationCode + " minlo上送日志响应不为0");
-                    }
+            writer = new StringWriter();
+            template.merge(velocityContext, writer);
+
+            String fUrl = fileurl + File.separatorChar + "correct" + File.separatorChar + station.getStationCode();
+            log.info(fUrl);
+            File fileUrl = new File(fUrl);
+            if (!fileUrl.exists()) {// 判断目录是否存在
+                fileUrl.mkdirs();
+            }
+            String fileName = "";
+
+            //根据时间区分上送minio文件名
+            LocalTime noon = LocalTime.NOON;
+            LocalDateTime noonToday = LocalDateTime.of(LocalDate.now(), noon);
+            // 文件名区分(上午、下午)
+            if (LocalDateTime.now().isBefore(noonToday)) {
+                fileName = "DQ_" + DateUtil.format(DateUtil.beginOfDay(new Date()), "yyyyMMddHHmmss") + "0.RB";
+            } else {
+                fileName = "DQ_" + new SimpleDateFormat("yyyyMMdd").format(new Date())+"1200000.RB";
+            }
+
+            file = new File(fUrl + File.separatorChar + fileName);
+
+
+            FileOutputStream os = null;
+
+            try {
+                boolean res = file.createNewFile();
+                if (res) {
+                    os = new FileOutputStream(file);
+                    // 采用UTF-8字符集
+                    os.write(writer.toString().getBytes("UTF-8"));
+                    os.flush();
                 } else {
-                    log.warn(stationCode + " minlo上送日志响应格式不对");
+                    log.warn(station.getStationCode() + " 生成DQ文件失败");
+                }
+            } catch (IOException e) {
+                e.printStackTrace();
+                log.warn(station.getStationCode() + " 创建DQ文件失败");
+            } finally {
+                if (os != null) {
+                    try {
+                        os.close();
+                    } catch (IOException e) {
+                        log.error("文件生成关闭流失败", e);
+                    }
                 }
-
             }
 
+        }
+
+        return file;
+    }
+
+
+    public JSONObject pushFileToMinIo(File file, String stationCode) {
+        // 存放完文件后返回的文件路径
+        String minIoFileUrl;
+        InputStream in = null;
+        InputStream inB = null;
+        try {
+            // 查看桶名称是否存在
+            boolean flag = minioUtilService.bucketExists(bucketName);
+            if (!flag) {
+                return JsonResultUtil.failure("MinIo桶不存在");
+            }
+            // 向minIo中放入文件
+            in = new FileInputStream(file);
+            String fileName = "/" + stationCode + "/" + file.getName();
+            minIoFileUrl = minioUtilService.putObject(bucketName, fileName, in);
+            // 如果是AB机,向B中也放入文件
+            if (stationCode.indexOf("-A") > 0) {
+                // InputStream 在被读取后,指针已经移动到了流的末尾,第二次上传B时就已经没有数据了,故新建一个输入流
+                inB = new FileInputStream(file);
+                String fileNameB = "/" + stationCode.replace("-A", "-B") + "/" + file.getName();
+                minIoFileUrl = minIoFileUrl + ";" + minioUtilService.putObject(bucketName, fileNameB, inB);
+            }
         } catch (Exception e) {
             e.printStackTrace();
-            log.error("文件上传存储服务器失败" + filePath, e);
+            return JsonResultUtil.failure("推送MinIo失败");
+        }finally {
+            close(in);
+            close(inB);
         }
+        return JsonResultUtil.success(minIoFileUrl);
+    }
 
-        return status;
-    }*/
-
+    // 封装一个安全的关闭方法
+    private static void close(InputStream inputStream) {
+        if (inputStream != null) {
+            try {
+                inputStream.close();
+            } catch (IOException e) {
+                e.printStackTrace(); // 可选:日志记录
+            }
+        }
+    }
 
 }

+ 6 - 4
in-cloud/src/main/java/com/jiayue/insu/incloud/pushdata/PushDataForSH.java

@@ -167,15 +167,17 @@ public class PushDataForSH implements IPushInitForecastData {
                 }
             }
         }
-
-        SHKJLNPushDqDataParamsDto dto = new SHKJLNPushDqDataParamsDto("2109001", dateFormat.format(new Date()), list);
+        String stationId = station.getSignCode();
+        SHKJLNPushDqDataParamsDto dto = new SHKJLNPushDqDataParamsDto(stationId, dateFormat.format(new Date()), list);
+//        SHKJLNPushDqDataParamsDto dto = new SHKJLNPushDqDataParamsDto("2109001", dateFormat.format(new Date()), list);
 
         JSONObject json = JSONUtil.parseObj(dto, false);
         String body = json.toString();
-
+        String dataPushUrl = integrationCompany.getPushUrl();
+//        String dataPushUrl = "http://127.0.0.1:4523/m1/3002439-0-default/dataservice.tradingthink.cn/api/thirdDatasourceSync/syjy/push_power_forecast";
         try {
             String response;
-            HttpRequest httpRequest = HttpRequest.post("https://dataservice.tradingthink.cn/api/thirdDatasourceSync/syjy/push_power_forecast")
+            HttpRequest httpRequest = HttpRequest.post(dataPushUrl)
                     .header("Content-Type", "application/json")
                     .header("DATA_SERVICE_TOKEN","eed451be-fe36-4d2a-a3b0-85cc440b406f");
             httpRequest.setGlobalTimeout(20000);

+ 1 - 1
in-passback/src/main/java/com/jiayue/passback/entity/WeatherStationStatusData.java

@@ -23,7 +23,7 @@ public class WeatherStationStatusData extends AbstractEquipmentStatusData {
 	/**
 	 * 总辐射(W/㎡)
 	 */
-	@TableField("C_EQUIPMENT_NO")
+	@TableField("C_GLOBALR")
 	private BigDecimal globalR;
 
 	/**

+ 1 - 1
in-passback/src/main/java/com/jiayue/passback/service/impl/ForecastPowerUltraShortTermHisServiceImpl.java

@@ -23,7 +23,7 @@ public class ForecastPowerUltraShortTermHisServiceImpl extends ServiceImpl<Forec
 
         Date startTime = new Date(date.getTime() - cdqUpMin * 15 * 60 * 1000);
 
-        Date endTime = new Date(date.getTime() + 15 * 60 * 1000 - 1);
+        Date endTime = new Date(startTime.getTime() + 15 * 60 * 1000 - 1);
 
         List<ForecastPowerUltraShortTermHis> forecastPowerUltraShortTermHisList = list(lambdaQuery().between(ForecastPowerUltraShortTermHis::getGenDate, startTime, endTime).getWrapper());