Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

wangchangsheng 3 gadi atpakaļ
vecāks
revīzija
5998f71c5c

+ 83 - 0
src/main/java/com/gyee/frame/common/file/ClassUtil.java

@@ -0,0 +1,83 @@
+package com.gyee.frame.common.file;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Author:
+ * @Date:
+ * @Description:关于类的操作的工具类
+ */
+public final class ClassUtil {
+
+    private ClassUtil() {
+        throw new Error("工具类不允许实例化!");
+    }
+
+    /**
+     * 获取类属性
+     * @param targetObj 要获取属性的类
+     * @return 含有类属性的集合
+     */
+    public static Field[] getClassAttribute(Object targetObj){
+
+        Class<?> objectClass = targetObj.getClass();
+        return objectClass.getDeclaredFields();
+
+    }
+
+    /**
+     * 获取对象的所有get或set方法
+     * @param targetObj 要获取属性的类
+     * @param methodKeyword get或者set关键字
+     * @return 含有类get或set方法的集合
+     */
+    public static List<Method> getMethod(Object targetObj,String methodKeyword){
+        List<Method> methodList = new ArrayList<>();
+
+        Class<?> objectClass = targetObj.getClass();
+
+        Field[] field = objectClass.getDeclaredFields();
+        for (int i = 0;i<field.length;i++){
+
+            if(!field[i].getName().equals("serialVersionUID"))
+            {
+
+                //获取属性名并组装方法名
+                String fieldName = field[i].getName();
+                String getMethodName = methodKeyword
+                        + fieldName.substring(0, 1).toUpperCase()
+                        + fieldName.substring(1);
+
+                try {
+                    Method method = objectClass.getMethod(getMethodName,new Class[]{});
+                    methodList.add(method);
+                } catch (NoSuchMethodException e) {
+                    e.printStackTrace();
+                }
+
+            }
+        }
+        return methodList;
+    }
+
+    /**
+     * 获取对象的所有get方法
+     * @param targetObj 要获取属性的类
+     * @return 含有类方法的集合
+     */
+    public static List<Method> getMethodGet(Object targetObj){
+        return getMethod(targetObj,"get");
+    }
+
+    /**
+     * 获取对象的所有set方法
+     * @param targetObj 要获取属性的类
+     * @return 含有类方法的集合
+     */
+    public static List<Method> getMethodSet(Object targetObj){
+        return getMethod(targetObj,"set");
+    }
+}

+ 272 - 0
src/main/java/com/gyee/frame/common/file/ExcelExport.java

@@ -0,0 +1,272 @@
+package com.gyee.frame.common.file;
+
+import com.gyee.frame.util.StringUtils;
+import org.apache.poi.hssf.usermodel.HSSFCellStyle;
+import org.apache.poi.hssf.usermodel.HSSFFont;
+import org.apache.poi.hssf.usermodel.HSSFSheet;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
+import org.apache.poi.ss.usermodel.HorizontalAlignment;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.util.CellRangeAddress;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Author:
+ * @Date:
+ * @Description:Excel导出工具类,依赖于ClassUtil工具类
+ */
+public final class ExcelExport {
+
+    /**
+     * 将传入的数据导出excel表并下载
+     * @param response 返回的HttpServletResponse
+     * @param importlist 要导出的对象的集合
+     * @param attributeNames 含有每个对象属性在excel表中对应的标题字符串的数组(请按对象中属性排序调整字符串在数组中的位置)
+     * @param heardName 导出文件 标题名称
+     * @param cnt 合并单元格数 (一般标题字符串的数组长度-1)
+     */
+    public static void export(HttpServletResponse response, List<?> importlist, String[] attributeNames,
+                              String heardName, int cnt ) {
+        //获取数据集
+        List<?> datalist = importlist;
+
+        //声明一个工作薄
+        HSSFWorkbook workbook = new HSSFWorkbook();
+        //生成一个表格
+        HSSFSheet sheet = workbook.createSheet();
+        //设置表格默认列宽度为15个字节
+        sheet.setDefaultColumnWidth((short) 18);
+        //用于设置表格字体
+        HSSFCellStyle style = workbook.createCellStyle();
+
+        //获取字段名数组
+        String[] tableAttributeName = attributeNames;
+        //获取对象属性
+        Field[] fields = ClassUtil.getClassAttribute(importlist.get(0));
+        //获取对象get方法
+        List<Method> methodList = ClassUtil.getMethodGet(importlist.get(0));
+
+        //设置标题样式
+        HSSFCellStyle headerStyle = workbook.createCellStyle();
+        HSSFFont headerFont = workbook.createFont();
+        headerFont.setFontHeightInPoints((short) 14);
+        headerFont.setBold(true);
+        headerStyle.setAlignment(HorizontalAlignment.CENTER);
+        headerStyle.setFont(headerFont);
+        CellRangeAddress cra0 = new CellRangeAddress(0, 1, 0, cnt);// 合并单元格
+        sheet.addMergedRegion(cra0);
+        //创建标标题题
+        Row row = sheet.createRow(0);
+        Cell cell1 = row.createCell(0);
+        cell1.setCellValue(heardName);
+        cell1.setCellStyle(headerStyle);
+
+        // 设置字体样式
+        HSSFFont titleFont = workbook.createFont();
+        titleFont.setBold(true);
+        titleFont.setFontHeightInPoints((short) 10);
+
+        style.setFont(titleFont);
+        style.setAlignment(HorizontalAlignment.CENTER);
+        //循环字段名数组,创建标题行
+        row = sheet.createRow(2);
+        for (int j = 0; j< tableAttributeName.length; j++){
+            //创建列
+            Cell cell = row.createCell(j);
+            cell.setCellStyle(style);
+            //设置单元类型为String
+            cell.setCellType(CellType.STRING);
+            cell.setCellValue(transCellType(tableAttributeName[j]));
+        }
+        //创建普通行
+        for (int i = 0;i<datalist.size();i++){
+            //因为第一行已经用于创建标题行,故从第二行开始创建
+            row = sheet.createRow(i+3);
+            //如果是第一行就让其为标题行
+            Object targetObj = datalist.get(i);
+            for (int j = 0;j<fields.length;j++){
+                //创建列
+                Cell cell = row.createCell(j);
+                cell.setCellType(CellType.STRING);
+                //
+                try {
+                    Object value = methodList.get(j).invoke(targetObj, new Object[]{});
+                    cell.setCellValue(transCellType(value));
+                } catch (IllegalAccessException e) {
+                    e.printStackTrace();
+                } catch (InvocationTargetException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        response.setContentType("application/octet-stream");
+        //默认Excel名称
+        response.setHeader("Content-Disposition", "attachment;fileName="+"test.xls");
+        try {
+            OutputStream outputStream = response.getOutputStream();
+            workbook.write(outputStream);
+            outputStream.flush();
+            outputStream.close();
+
+//            response.flushBuffer();
+//            workbook.write(response.getOutputStream());
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+    }
+
+
+
+    /**
+     * 将传入的数据导出excel表并下载
+     * @param importlist 要导出的对象的集合
+     * @param attributeNames 含有每个对象属性在excel表中对应的标题字符串的数组(请按对象中属性排序调整字符串在数组中的位置)
+     * @param heardName 导出文件 标题名称
+     * @param cnt 合并单元格数 (一般标题字符串的数组长度-1)
+     * @param filename 文件名称
+     */
+    public static void exportToPath( List<?> importlist, String[] attributeNames,
+                              String heardName, int cnt,String filename ) throws IOException {
+        //获取数据集
+        List<?> datalist = importlist;
+
+        //声明一个工作薄
+        HSSFWorkbook workbook = new HSSFWorkbook();
+        //生成一个表格
+        HSSFSheet sheet = workbook.createSheet();
+        //设置表格默认列宽度为15个字节
+        sheet.setDefaultColumnWidth((short) 18*2);
+        //用于设置表格字体
+        HSSFCellStyle style = workbook.createCellStyle();
+
+        //获取字段名数组
+        String[] tableAttributeName = attributeNames;
+        //获取对象属性
+        Field[] fields = ClassUtil.getClassAttribute(importlist.get(0));
+        //获取对象get方法
+        List<Method> methodList = ClassUtil.getMethodGet(importlist.get(0));
+
+        //设置标题样式
+        HSSFCellStyle headerStyle = workbook.createCellStyle();
+        HSSFFont headerFont = workbook.createFont();
+        headerFont.setFontHeightInPoints((short) 14);
+        headerFont.setBold(true);
+        headerStyle.setAlignment(HorizontalAlignment.CENTER);
+        headerStyle.setFont(headerFont);
+//        CellRangeAddress cra0 = new CellRangeAddress(0, 1, 0, cnt);// 合并单元格
+//        sheet.addMergedRegion(cra0);
+//        //创建标标题题
+//        Row row = sheet.createRow(0);
+//        Cell cell1 = row.createCell(0);
+//        cell1.setCellValue(heardName);
+//        cell1.setCellStyle(headerStyle);
+
+        // 设置字体样式
+        HSSFFont titleFont = workbook.createFont();
+        titleFont.setBold(true);
+        titleFont.setFontHeightInPoints((short) 10);
+
+        style.setFont(titleFont);
+        style.setAlignment(HorizontalAlignment.CENTER);
+        //循环字段名数组,创建标题行
+        Row row = sheet.createRow(0);
+        for (int j = 0; j< tableAttributeName.length; j++){
+            //创建列
+            Cell cell = row.createCell(j);
+            cell.setCellStyle(style);
+            //设置单元类型为String
+            cell.setCellType(CellType.STRING);
+            cell.setCellValue(transCellType(tableAttributeName[j]));
+        }
+
+        int index = 0;
+        //创建普通行
+        for (int i = 0;i<datalist.size();i++){
+            //因为第一行已经用于创建标题行,故从第二行开始创建
+
+
+            if ((i + 1) % 65535 == 0) {
+                sheet = workbook.createSheet("sheet" + (index+1));
+                row = sheet.createRow(0);
+                for (int j = 0; j< tableAttributeName.length; j++){
+                    //创建列
+                    Cell cell = row.createCell(j);
+                    cell.setCellStyle(style);
+                    //设置单元类型为String
+                    cell.setCellType(CellType.STRING);
+                    cell.setCellValue(transCellType(tableAttributeName[j]));
+                }
+                index++;
+            }
+            row = sheet.createRow((i + 1) - (index * 65535));
+
+            //如果是第一行就让其为标题行
+            Object targetObj = datalist.get(i);
+            for (int j = 0;j<fields.length;j++){
+
+                if(!fields[j].getName().equals("serialVersionUID"))
+                {
+                    //创建列
+                    Cell cell = row.createCell(j);
+                    cell.setCellType(CellType.STRING);
+                    //
+                    try {
+                        Object value = methodList.get(j).invoke(targetObj, new Object[]{});
+                        cell.setCellValue(transCellType(value));
+                    } catch (IllegalAccessException e) {
+                        e.printStackTrace();
+                    } catch (InvocationTargetException e) {
+                        e.printStackTrace();
+                    }
+                }
+
+            }
+        }
+
+        if(StringUtils.notEmp(filename))
+        {
+            StringBuilder sb=new StringBuilder("D:\\");
+            sb.append(filename);
+            sb.append(".xls");
+
+            FileUtils.deleteFile(String.valueOf(sb));
+
+            FileOutputStream fileOutputStream = new FileOutputStream(String.valueOf(sb));
+
+            workbook.write(fileOutputStream);
+            fileOutputStream.close();
+
+        }
+
+    }
+    private static String transCellType(Object value){
+        String str = null;
+        if (value instanceof Date){
+            Date date = (Date) value;
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            str = sdf.format(date);
+        }else{
+            str = String.valueOf(value);
+            if (str == "null"){
+                str = "";
+            }
+        }
+
+        return str;
+    }
+
+
+}

+ 39 - 0
src/main/java/com/gyee/frame/controller/file/ExcelExportController.java

@@ -0,0 +1,39 @@
+package com.gyee.frame.controller.file;
+
+
+import com.gyee.frame.common.file.ExcelExport;
+import com.gyee.frame.model.auto.Alertrule2;
+import com.gyee.frame.service.Alertrule2ervice;
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+@RestController
+@RequestMapping("/excelexport")
+@Api(value = "excle数据导出功能",tags =  "excle数据导出功能")
+public class ExcelExportController {
+
+    @Resource
+    private Alertrule2ervice alertrule2ervice;
+
+    /**
+     * 信息导出
+     */
+    @GetMapping("/excelexport")
+    public void exprotExcel(HttpServletResponse response){
+
+        //将查询到的数据导出
+        List<Alertrule2> studentExportList=alertrule2ervice.getAlertruleAllList() ;
+        //创建一个数组用于设置表头
+        String[] arr = new String[]{"年级","学号","姓名","专业","二级学院","联系方式","性别"};
+        String heardName="学生信息表";
+        //调用Excel导出工具类
+        ExcelExport.export(response,studentExportList,arr,heardName,6);
+    }
+
+}

+ 6 - 1
src/main/java/com/gyee/frame/controller/health/ReliabilityAnalysisController.java

@@ -6,6 +6,7 @@ import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.common.exception.enums.QiNiuErrorEnum;
 import com.gyee.frame.common.feign.RemoteServiceBuilder;
 import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.mapper.auto.WindturbineMapper;
 import com.gyee.frame.model.auto.*;
 import com.gyee.frame.model.custom.export.TsPointData;
 import com.gyee.frame.model.custom.weather.Sys;
@@ -15,6 +16,7 @@ import com.gyee.frame.service.WindTurbineTestingPointDiService;
 import com.gyee.frame.service.health.MetricsService;
 import com.gyee.frame.service.health.MetricsUniformCodeService;
 import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
@@ -38,6 +40,8 @@ public class ReliabilityAnalysisController {
     private WindTurbineTestingPointAiService windAIService;
     @Resource
     private WindTurbineTestingPointDiService windDIService;
+    @Autowired
+    private WindturbineMapper windturbineMapper;
 
 
     /**
@@ -59,8 +63,9 @@ public class ReliabilityAnalysisController {
             @RequestParam(name = "interval", required = false) Optional<Integer> interval){
 
         List<Object> list = new ArrayList<>();
+        Windturbine wtmid = windturbineMapper.selectByPrimaryKey(wtId);
 
-        List<String> codes = alertrule2ervice.getUniformCodeByNameAndStation(name, station, wtId);
+        List<String> codes = alertrule2ervice.getUniformCodeByNameAndStation(name, station, wtmid.getModelid());
         if (codes == null || codes.size() == 0)
             return AjaxResult.successData(AjaxStatus.success.code, list);
 

+ 4 - 3
src/main/java/com/gyee/frame/service/Alertrule2ervice.java

@@ -242,14 +242,15 @@ public class Alertrule2ervice implements BaseService<Alertrule2, Alertrule2Examp
      * 解析规则表达式,提取出所有uniformCode
      * @param name
      * @param station
-     * @param wtId
+     * @param modelid
      * @return
      */
-    public List<String> getUniformCodeByNameAndStation(String name, String station, String wtId){
+    public List<String> getUniformCodeByNameAndStation(String name, String station, String modelid){
         Alertrule2Example example = new Alertrule2Example();
         example.createCriteria().andNameEqualTo(name)
                .andStationEqualTo(station)
-               .andWindturbineLike("%" + wtId + "%");
+        .andModelidEqualTo(modelid);
+//               .andWindturbineLike("%" + wtId + "%");
 
         List<Alertrule2> rules = alertrule2Mapper.selectByExample(example);
         if (rules == null || rules.size() == 0)

+ 1 - 1
src/main/java/com/gyee/frame/service/WindturbinestandardpointService.java

@@ -95,7 +95,7 @@ public class WindturbinestandardpointService implements BaseService<Windturbines
     public  List<Windturbinestandardpoint> findAllList() {
 
         WindturbinestandardpointExample example = new WindturbinestandardpointExample();
-
+        example.setOrderByClause("id ASC");
         List<Windturbinestandardpoint> vos = windturbinestandardpointMapper.selectByExample(example);
 
 

+ 3 - 2
src/main/java/com/gyee/frame/service/initialpoint/IinitialPoint.java

@@ -1,19 +1,20 @@
 package com.gyee.frame.service.initialpoint;
 
 
+import java.io.IOException;
 
 public interface IinitialPoint {
     /**
      * 初始化风机
      * @throws Exception
      */
-    public void initalFj();
+    public void initalFj() throws IOException;
     /**
      * 初始化场站
      * isGF 是否包含光伏
      * @throws Exception
      */
-    public void initalFc(boolean isGf);
+    public void initalFc(boolean isGf) throws IOException;
     /**
      * 初始化升压站
      * @throws Exception

+ 733 - 0
src/main/java/com/gyee/frame/service/initialpoint/InitialPointEdosService.java

@@ -0,0 +1,733 @@
+package com.gyee.frame.service.initialpoint;
+
+import com.gyee.frame.common.file.ExcelExport;
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.*;
+import com.gyee.frame.service.*;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+public class InitialPointEdosService implements  IinitialPoint{
+
+    @Resource
+    private RegionService regionService;
+    @Resource
+    private CompanysService companysService;
+    @Resource
+    private WindturbinestandardpointService windturbinestandardpointService;
+    @Resource
+    private WindpowerstationstandardpointService windpowerstationstandardpointService;
+    @Resource
+    private WindturbinetestingpointService windturbinetestingpointService;
+    @Resource
+    private WindPowerstationTestingPointService windPowerstationTestingPointService;
+
+    @Resource
+    private ForecaststationtandardpointService forecaststationtandardpointService;
+    @Resource
+    private WindsubstationService windsubstationService;
+    @Resource
+    private WindsubstationstandardpointService windsubstationstandardpointService;
+    @Resource
+    private Windsubstationtestingpoint2Service windsubstationtestingpoint2Service;
+    private final  String AI="AI";
+    private final  String DI="DI";
+    private final  String CI="CI";
+    private final String CFT="CFT";
+
+    @Override
+    public void initalFc(boolean isGf) throws IOException {
+
+
+
+        windPowerstationTestingPointService.deleteAll();
+
+        List<Windpowerstationstandardpoint>  stpointls=windpowerstationstandardpointService.findAllList();
+
+        List<Region> regions=regionService.findAllList();
+
+        List<WindPowerStationTestingPoint> allpoints=new ArrayList<>();
+
+        if(!regions.isEmpty())
+        {
+
+
+            for(Region re:regions)
+            {
+                List<Companys> companys= companysService.getCompanysListByRId(re.getId());
+                if(!companys.isEmpty())
+                {
+                    for(Companys cs:companys)
+                    {
+                        StringBuilder sba=new StringBuilder();
+                        sba.append(re.getId()).append("_").append(cs.getId()).append("_");
+/********************************************区域公司测点**************************************************/
+                        List<WindPowerStationTestingPoint> points=new ArrayList<>();
+                        for(int i=0;i<stpointls.size();i++)
+                        {
+
+
+                            Windpowerstationstandardpoint stp=stpointls.get(i);
+                            StringBuilder sb =new StringBuilder();
+                            sb.append(String.valueOf(sba));
+                            sb.append("XXX_XX_XX_XX_XXX_");
+                            sb.append(CI);
+                            sb.append(stp.getOrdernum());
+//                            if(stp.getCode().equals(CI))
+//                            {
+//                                sbtable.append("JSFW.");
+//                                sbtable.append(sb);
+//                            }
+                            WindPowerStationTestingPoint po=new WindPowerStationTestingPoint();
+                            po.setCode(String.valueOf(sb));
+                            sb =new StringBuilder();
+                            sb.append(re.getName()).append(stp.getName());
+                            po.setName(String.valueOf(sb));
+                            po.setModel(null);
+                            po.setModelid(null);
+                            if(regions.size()==1)
+                            {
+                                po.setWindpowerstationid("0");
+                            }else
+                            {
+                                StringBuilder tempsb=new StringBuilder();
+                                tempsb.append(re.getId()).append(0);
+                                po.setWindpowerstationid(String.valueOf(tempsb));
+                            }
+                            po.setUniformcode(stp.getUniformcode());
+
+                            if(stp.getCode().equals(CI))
+                            {
+                                StringBuilder tempsb=new StringBuilder();
+                                tempsb.append(cs.getId()).append(re.getId());
+                                tempsb.append(".JSFW");
+                                po.setRealtimeid(String.valueOf(tempsb));
+                            }
+                            points.add(po);
+                        }
+
+                        allpoints.addAll(points);
+                       // windPowerstationTestingPointService.insertBatch(points);
+
+                        /*******************************************风电测点生成*******************************************************/
+
+                        points=new ArrayList<>();
+                        for(int i=0;i<stpointls.size();i++)
+                        {
+                            StringBuilder sbtable =new StringBuilder();
+
+                            Windpowerstationstandardpoint stp=stpointls.get(i);
+                            StringBuilder sb =new StringBuilder();
+                            sb.append(String.valueOf(sba));
+                            sb.append("FDC_XX_XX_XX_XXX_");
+                            sb.append(CI);
+                            sb.append(stp.getOrdernum());
+//                            if(stp.getCode().equals(CI))
+//                            {
+//                                sbtable.append("JSFW.");
+//                                sbtable.append(sb);
+//                            }
+                            WindPowerStationTestingPoint po=new WindPowerStationTestingPoint();
+                            po.setCode(String.valueOf(sb));
+                            sb =new StringBuilder();
+                            sb.append(re.getName()).append(stp.getName());
+                            po.setName(String.valueOf(sb));
+                            po.setModel(null);
+                            po.setModelid(null);
+                            if(regions.size()==1)
+                            {
+                                po.setWindpowerstationid("-1");
+                            }else
+                            {
+                                StringBuilder tempsb=new StringBuilder();
+                                tempsb.append(re.getId()).append(1);
+                                po.setWindpowerstationid(String.valueOf(tempsb));
+                            }
+                            po.setUniformcode(stp.getUniformcode());
+
+                            if(stp.getCode().equals(CI))
+                            {
+                                StringBuilder tempsb=new StringBuilder();
+                                tempsb.append(cs.getId()).append(re.getId());
+                                tempsb.append(".JSFW");
+                                po.setRealtimeid(String.valueOf(tempsb));
+                            }
+                            points.add(po);
+                        }
+
+                        allpoints.addAll(points);
+                        //windPowerstationTestingPointService.insertBatch(points);
+
+                        if(isGf)
+                        {
+                            /*********************************************光伏测点生成*****************************************************/
+
+                            points=new ArrayList<>();
+                            for(int i=0;i<stpointls.size();i++)
+                            {
+
+
+                                Windpowerstationstandardpoint stp=stpointls.get(i);
+                                StringBuilder sb =new StringBuilder();
+                                sb.append(String.valueOf(sba));
+                                sb.append("GDC_XX_XX_XX_XXX_");
+                                sb.append(CI);
+                                sb.append(stp.getOrdernum());
+//                                if(stp.getCode().equals(CI))
+//                                {
+//                                    sbtable.append("JSFW.");
+//                                    sbtable.append(sb);
+//                                }
+                                WindPowerStationTestingPoint po=new WindPowerStationTestingPoint();
+                                po.setCode(String.valueOf(sb));
+                                sb =new StringBuilder();
+                                sb.append(re.getName()).append(stp.getName());
+                                po.setName(String.valueOf(sb));
+                                po.setModel(null);
+                                po.setModelid(null);
+                                if(regions.size()==1)
+                                {
+                                    po.setWindpowerstationid("-2");
+                                }else
+                                {
+                                    StringBuilder tempsb=new StringBuilder();
+                                    tempsb.append(re.getId()).append(2);
+                                    po.setWindpowerstationid(String.valueOf(tempsb));
+                                }
+                                po.setUniformcode(stp.getUniformcode());
+
+                                if(stp.getCode().equals(CI))
+                                {
+                                    StringBuilder tempsb=new StringBuilder();
+                                    tempsb.append(cs.getId()).append(re.getId());
+                                    tempsb.append(".JSFW");
+                                    po.setRealtimeid(String.valueOf(tempsb));
+                                }
+                                points.add(po);
+                            }
+
+                            allpoints.addAll(points);
+                           // windPowerstationTestingPointService.insertBatch(points);
+                        }
+                    }
+                }
+            }
+
+
+        }
+
+
+
+        /*********************************************场站、项目、线路测点生成*****************************************************/
+
+        for (Windpowerstation wp:InitialRunner.wpallls)
+        {
+
+            if(!stpointls.isEmpty())
+            {
+
+                createWpPoints(wp, stpointls,allpoints);
+                createPjPoints(wp, stpointls,allpoints);
+                createLnPoints(wp, stpointls,allpoints);
+            }
+        }
+
+        //创建一个数组用于设置表头
+        String[] arr = new String[]{"编码","名称","型号","单位","英文名称","类型编号","所属型号","最大值","最小值","合理最大值",
+                "合理最小值","统一编码","短ID","长ID","风场编号","实时配置编号"};
+        String heardName="风机测点表";
+        //调用Excel导出工具类
+        ExcelExport.exportToPath(allpoints,arr,heardName,6,"场站测点");
+    }
+
+    private void createWpPoints(Windpowerstation wp, List<Windpowerstationstandardpoint> stpointls,List<WindPowerStationTestingPoint> allpoints) {
+        List<WindPowerStationTestingPoint> points=new ArrayList<>();
+        for(int i=0;i<stpointls.size();i++)
+        {
+
+
+            Windpowerstationstandardpoint stp=stpointls.get(i);
+            StringBuilder sb =new StringBuilder();
+            sb.append(wp.getPhoto());
+            String temp=wp.getId().substring(0,wp.getId().indexOf("_"));
+
+            if(wp.getId().endsWith("FDC"))
+            {
+
+                sb.append(temp).append("F_").append("JS_XX_XX_XXX_");
+            }else   if(wp.getId().endsWith("GDC"))
+            {
+
+                sb.append(temp).append("G_").append("JS_XX_XX_XXX_");
+            }
+
+
+
+            sb.append(CI);
+
+            sb.append(stp.getOrdernum());
+
+//            if(stp.getCode().equals(CI))
+//            {
+//                sbtable.append("JSFW.");
+//                sbtable.append(sb);
+//            }
+
+            WindPowerStationTestingPoint po=new WindPowerStationTestingPoint();
+            po.setCode(String.valueOf(sb));
+            sb =new StringBuilder();
+            sb.append(wp.getName()).append(stp.getName());
+            po.setName(String.valueOf(sb));
+            po.setModel(null);
+            po.setModelid(null);
+            po.setWindpowerstationid(wp.getId());
+            po.setUniformcode(stp.getUniformcode());
+
+            if(stp.getCode().equals(CI))
+            {
+                sb =new StringBuilder();
+                temp=wp.getId().substring(0,wp.getId().indexOf("_"));
+                sb.append(temp).append(".JSFW");
+                po.setRealtimeid(String.valueOf(sb));
+            }
+            points.add(po);
+        }
+
+        allpoints.addAll(points);
+        //windPowerstationTestingPointService.insertBatch(points);
+    }
+
+    private void createPjPoints(Windpowerstation wp, List<Windpowerstationstandardpoint> stpointls,List<WindPowerStationTestingPoint> allpoints) {
+
+
+        for(Project pj:InitialRunner.pjls)
+        {
+            if(pj.getWindpowerstationid().equals(wp.getId()))
+            {
+                List<WindPowerStationTestingPoint> points=new ArrayList<>();
+                for(int i=0;i<stpointls.size();i++)
+                {
+
+
+                    Windpowerstationstandardpoint stp=stpointls.get(i);
+                    StringBuilder sb =new StringBuilder();
+                    sb.append(wp.getPhoto());
+                    String temp=wp.getId().substring(0,wp.getId().indexOf("_"));
+
+
+                    sb.append(temp).append("F_").append("JS_");
+                    temp=pj.getId().substring(0,pj.getId().lastIndexOf("_"));
+                    sb.append("P").append(Integer.valueOf(temp.substring(temp.length()-2))).append("_");
+                    sb.append("XX_XXX_");
+                    sb.append(CI);
+
+                    sb.append(stp.getOrdernum());
+
+//                    if(stp.getCode().equals(CI))
+//                    {
+//                        sbtable.append("JSFW.");
+//                        sbtable.append(sb);
+//                    }
+
+                    WindPowerStationTestingPoint po=new WindPowerStationTestingPoint();
+                    po.setCode(String.valueOf(sb));
+                    sb =new StringBuilder();
+                    sb.append(pj.getName()).append(stp.getName());
+                    po.setName(String.valueOf(sb));
+                    po.setModel(null);
+                    po.setModelid(null);
+                    po.setWindpowerstationid(pj.getId());
+                    po.setUniformcode(stp.getUniformcode());
+
+                    if(stp.getCode().equals(CI))
+                    {
+                        sb =new StringBuilder();
+                        temp=wp.getId().substring(0,wp.getId().indexOf("_"));
+                        sb.append(temp).append(".JSFW");
+                        po.setRealtimeid(String.valueOf(sb));
+                    }
+                    points.add(po);
+                }
+                allpoints.addAll(points);
+            }
+        }
+
+    }
+
+    private void createLnPoints(Windpowerstation wp, List<Windpowerstationstandardpoint> stpointls,List<WindPowerStationTestingPoint> allpoints) {
+
+        for(Line ln:InitialRunner.linels)
+        {
+            if(InitialRunner.pjmap.containsKey(ln.getProjectid()))
+            {
+                Project pj=InitialRunner.pjmap.get(ln.getProjectid());
+
+                if(pj.getWindpowerstationid().equals(wp.getId()))
+                {
+                    List<WindPowerStationTestingPoint> points=new ArrayList<>();
+                    for(int i=0;i<stpointls.size();i++)
+                    {
+
+
+                        Windpowerstationstandardpoint stp=stpointls.get(i);
+                        StringBuilder sb =new StringBuilder();
+                        sb.append(wp.getPhoto());
+                        String temp=wp.getId().substring(0,wp.getId().indexOf("_"));
+
+
+                        sb.append(temp).append("F_").append("JS_");
+                        temp=pj.getId().substring(0,pj.getId().lastIndexOf("_"));
+                        sb.append("P").append(Integer.valueOf(temp.substring(temp.length()-2))).append("_");
+                        temp=ln.getId().substring(0,ln.getId().lastIndexOf("_"));
+                        sb.append("L").append(Integer.valueOf(temp.substring(temp.length()-2))).append("_");
+                        sb.append("XXX_");
+                        sb.append(CI);
+
+                        sb.append(stp.getOrdernum());
+
+//                        if(stp.getCode().equals(CI))
+//                        {
+//                            sbtable.append("JSFW.");
+//                            sbtable.append(sb);
+//                        }
+
+                        WindPowerStationTestingPoint po=new WindPowerStationTestingPoint();
+                        po.setCode(String.valueOf(sb));
+                        sb =new StringBuilder();
+                        sb.append(ln.getName()).append(stp.getName());
+                        po.setName(String.valueOf(sb));
+                        po.setModel(null);
+                        po.setModelid(null);
+                        po.setWindpowerstationid(ln.getId());
+                        po.setUniformcode(stp.getUniformcode());
+
+                        if(stp.getCode().equals(CI))
+                        {
+                            sb =new StringBuilder();
+                            temp=wp.getId().substring(0,wp.getId().indexOf("_"));
+                            sb.append(temp).append(".JSFW");
+                            po.setRealtimeid(String.valueOf(sb));
+                        }
+                        points.add(po);
+                    }
+                    allpoints.addAll(points);
+
+
+                }
+            }
+
+        }
+
+    }
+
+    @Override
+    public void initalSyz() {
+
+    }
+
+    @Override
+    public void initalDd() {
+
+        windsubstationtestingpoint2Service.deleteAll();
+
+        List<Windsubstationtandardpoint> stpointls=windsubstationstandardpointService.findAllList();
+        List<Windsubstation> wsubls=windsubstationService.findAllList();
+
+        if(!wsubls.isEmpty() && !stpointls.isEmpty())
+        {
+            for(Windsubstation wsub:wsubls)
+            {
+
+                if(InitialRunner.wpmap.containsKey(wsub.getWindpowerstationid()))
+                {
+                    Windpowerstation wp=InitialRunner.wpmap.get(wsub.getWindpowerstationid());
+
+                    List<Windsubstationtestingpoint2> points=new ArrayList<>();
+                    for(int i=0;i<stpointls.size();i++)
+                    {
+                        StringBuilder sbtable =new StringBuilder();
+
+                        Windsubstationtandardpoint stp=stpointls.get(i);
+                        StringBuilder sb =new StringBuilder();
+                        sb.append(wp.getPhoto());
+                        String temp=wsub.getId().substring(0,wsub.getId().indexOf("_"));
+
+
+                        if(stp.getCode().endsWith("CI"))
+                        {
+                            if(wp.getId().endsWith("FDC"))
+                            {
+                                sbtable.append(temp).append("FC");
+                                sb.append(temp).append("F_").append("XX_XX_XX_XXX_");
+                            }else   if(wp.getId().endsWith("GDC"))
+                            {
+                                sbtable.append(temp).append("GC");
+                                sb.append(temp).append("G_").append("XX_XX_XX_XXX_");
+                            }
+
+                        }else
+                        {
+                            sbtable.append(temp).append("DQ");
+                            if(wp.getId().endsWith("FDC"))
+                            {
+
+                                sb.append(temp).append("F_").append("DQ_P1_L1_001_");
+                            }else   if(wp.getId().endsWith("GDC"))
+                            {
+                                sb.append(temp).append("G_").append("DQ_P1_L1_001_");
+                            }
+                        }
+
+
+
+                        if(stp.getCode().equals(AI))
+                        {
+                            sb.append(AI);
+                        }else if(stp.getCode().equals(DI))
+                        {
+                            sb.append(DI);
+                        }else if(stp.getCode().equals(CI))
+                        {
+                            sb.append(CI);
+                        }
+
+                        sb.append(stp.getOrdernum());
+
+//                        if(stp.getCode().equals(CI))
+//                        {
+//                            sbtable.append("JSFW.");
+//                            sbtable.append(sb);
+//                        }else
+//                        {
+//                            sbtable.append(".").append(sb);
+//                        }
+                        Windsubstationtestingpoint2 po=new Windsubstationtestingpoint2();
+                        po.setCode(String.valueOf(sb));
+                        sb =new StringBuilder();
+                        sb.append(wsub.getAname()).append(stp.getName());
+                        po.setName(String.valueOf(sb));
+                        po.setModel(null);
+                        po.setModelid(null);
+                        po.setWindsubstationid(wsub.getId());
+                        po.setUniformcode(stp.getUniformcode());
+                        if(stp.getCode().equals(CI))
+                        {
+                            sb =new StringBuilder();
+                            temp=wsub.getId().substring(0,wsub.getId().indexOf("_"));
+                            sb.append(temp).append(".JSFW");
+                            po.setRealtimeid(String.valueOf(sb));
+                        }
+                        points.add(po);
+//                                windturbinetestingpointService.insertSelective(po);
+                    }
+
+                    windsubstationtestingpoint2Service.insertBatch(points);
+                }
+
+            }
+        }
+
+
+
+    }
+
+    @Override
+    public void initalFgl() {
+
+
+        windPowerstationTestingPointService.deleteYc();
+
+        List<Forecaststationtandardpoint>  stpointls=forecaststationtandardpointService.findAllList();
+
+
+        /*********************************************风功率测点生成*****************************************************/
+
+        for (Windpowerstation wp:InitialRunner.wpallls)
+        {
+
+            if(!stpointls.isEmpty())
+            {
+
+                List<WindPowerStationTestingPoint> points=new ArrayList<>();
+                for(int i=0;i<stpointls.size();i++)
+                {
+
+
+                    Forecaststationtandardpoint stp=stpointls.get(i);
+                    StringBuilder sb =new StringBuilder();
+                    sb.append(wp.getPhoto());
+                    String temp=wp.getId().substring(0,wp.getId().indexOf("_"));
+
+                    if(wp.getId().endsWith("FDC"))
+                    {
+
+                        sb.append(temp).append("F_").append("YC_XX_XX_XXX_");
+                    }else   if(wp.getId().endsWith("GDC"))
+                    {
+
+                        sb.append(temp).append("G_").append("YC_XX_XX_XXX_");
+                    }
+
+
+
+                   if(!stp.getCode().equals(CFT))
+                    {
+                        sb.append(stp.getCode());
+                    }
+
+                    sb.append(stp.getOrdernum());
+
+
+                    WindPowerStationTestingPoint po=new WindPowerStationTestingPoint();
+                    po.setCode(String.valueOf(sb));
+                    sb =new StringBuilder();
+                    sb.append(wp.getName()).append(stp.getName());
+                    po.setName(String.valueOf(sb));
+                    po.setModel(null);
+                    po.setModelid(null);
+                    po.setWindpowerstationid(wp.getId());
+                    po.setUniformcode(stp.getUniformcode());
+
+                    if(stp.getCode().equals(CI))
+                    {
+                        sb =new StringBuilder();
+                        temp=wp.getId().substring(0,wp.getId().indexOf("_"));
+
+
+                        if(wp.getId().endsWith("FDC"))
+                        {
+                            sb.append(temp).append(".FGL");
+                        }else   if(wp.getId().endsWith("GDC"))
+                        {
+                            sb.append(temp).append(".GGL");
+                        }
+
+                        po.setRealtimeid(String.valueOf(sb));
+                    }
+                    points.add(po);
+                }
+                windPowerstationTestingPointService.insertBatch(points);
+            }
+        }
+    }
+
+
+    public void initalFj() throws IOException {
+
+        windturbinetestingpointService.deleteAll();
+
+        List<Windturbinestandardpoint>  stpointls=windturbinestandardpointService.findAllList();
+
+
+        List<Windturbinetestingpoint> allpoints=new ArrayList<>();
+            for (Windpowerstation wp:InitialRunner.wpls)
+            {
+
+
+//                if(wp.getId().endsWith("FDC"))
+//                {
+                    List<Windturbine> wtls=InitialRunner.wp_wtmap.get(wp.getId());
+
+
+                    if(!stpointls.isEmpty())
+                    {
+                        for(Windturbine wt:wtls)
+                        {
+                            List<Windturbinetestingpoint> points=new ArrayList<>();
+                            for(int i=0;i<stpointls.size();i++)
+                            {
+
+
+                                Windturbinestandardpoint stp=stpointls.get(i);
+                                StringBuilder sb =new StringBuilder();
+                                sb.append(wp.getPhoto());
+                                String temp=wp.getId().substring(0,wp.getId().indexOf("_"));
+
+
+                              //  sb.append(temp).append("F_").append("FJ_");
+
+                                if(stp.getCode().equals(CI))
+                                {
+                                    sb.append(temp).append("F_").append("JS_");
+                                }else
+                                {
+                                    sb.append(temp).append("F_").append("FJ_");
+                                }
+                                temp=wt.getProjectid().substring(0,wt.getProjectid().lastIndexOf("_"));
+                                sb.append("P").append(Integer.valueOf(temp.substring(temp.length()-2))).append("_");
+                                temp=wt.getLineid().substring(0,wt.getProjectid().lastIndexOf("_"));
+                                sb.append("L").append(Integer.valueOf(temp.substring(temp.length()-2))).append("_");
+
+                                temp=wt.getId().substring(wt.getId().lastIndexOf("_")+1);
+
+                                if(temp.length()==1)
+                                {
+                                    sb.append("00").append(temp).append("_");
+                                }else if(temp.length()==2)
+                                {
+                                    sb.append("0").append(temp).append("_");
+                                }else
+                                {
+                                    sb.append(temp).append("_");
+                                }
+
+
+                                sb.append(stp.getCode());
+
+                                sb.append(stp.getOrdernum());
+
+
+                                Windturbinetestingpoint po=new Windturbinetestingpoint();
+                                po.setId(String.valueOf(sb));
+                                po.setCode(String.valueOf(sb));
+                                sb =new StringBuilder();
+                                sb.append(wt.getName()).append(stp.getName());
+                                po.setName(String.valueOf(sb));
+                                po.setModel(wt.getModelid());
+                                po.setModelid(wt.getModelid());
+                                po.setWindturbineid(wt.getId());
+                                po.setUniformcode(stp.getUniformcode());
+                                po.setWindpowerstationid(wt.getWindpowerstationid());
+
+                                if(stp.getCode().equals(CI))
+                                {
+                                    sb =new StringBuilder();
+                                    temp=wp.getId().substring(0,wp.getId().indexOf("_"));
+                                    sb.append(temp).append(".JSFW");
+                                    po.setRealtimeid(String.valueOf(sb));
+                                }
+                                points.add(po);
+
+
+//                                windturbinetestingpointService.insertSelective(po);
+                            }
+                            allpoints.addAll(points);
+//                            windturbinetestingpointService.insertBatch(points);
+
+
+                        }
+                    }
+
+
+
+ //               }
+
+
+
+            }
+
+        //创建一个数组用于设置表头
+        String[] arr = new String[]{"编号","编码","名称","型号","单位","英文名称","类型编号","所属型号","最大值","最小值","合理最大值",
+                "合理最小值","风机编号","统一编码","短ID","长ID","风场编号","实时配置编号"};
+        String heardName="风机测点表";
+        //调用Excel导出工具类
+        ExcelExport.exportToPath(allpoints,arr,heardName,6,"风机测点");
+
+    }
+
+}

+ 25 - 16
src/main/java/com/gyee/frame/service/initialpoint/InitialPointGoldenService.java

@@ -235,11 +235,11 @@ public class InitialPointGoldenService implements  IinitialPoint{
             if(wp.getId().endsWith("FDC"))
             {
                 sbtable.append(temp).append("FC");
-                sb.append(temp).append("F_").append("XX_XXX_XXX_XXX_");
+                sb.append(temp).append("F_").append("JS_XX_XX_XXX_");
             }else   if(wp.getId().endsWith("GDC"))
             {
                 sbtable.append(temp).append("GC");
-                sb.append(temp).append("G_").append("XX_XXX_XXX_XXX_");
+                sb.append(temp).append("G_").append("JS_XX_XX_XXX_");
             }
 
 
@@ -296,8 +296,8 @@ public class InitialPointGoldenService implements  IinitialPoint{
                     sbtable.append(temp).append("FC");
                     sb.append(temp).append("F_").append("FJ_");
                     temp=pj.getId().substring(0,pj.getId().lastIndexOf("_"));
-                    sb.append("P").append(temp.substring(temp.length()-2)).append("_");
-                    sb.append("XXX_XXX_");
+                    sb.append("P").append(Integer.valueOf(temp.substring(temp.length()-2))).append("_");
+                    sb.append("XX_XXX_");
                     sb.append(CI);
 
                     sb.append(stp.getOrdernum());
@@ -356,9 +356,9 @@ public class InitialPointGoldenService implements  IinitialPoint{
                         sbtable.append(temp).append("FC");
                         sb.append(temp).append("F_").append("FJ_");
                         temp=pj.getId().substring(0,pj.getId().lastIndexOf("_"));
-                        sb.append("P").append(temp.substring(temp.length()-2)).append("_");
+                        sb.append("P").append(Integer.valueOf(temp.substring(temp.length()-2))).append("_");
                         temp=ln.getId().substring(0,ln.getId().lastIndexOf("_"));
-                        sb.append("L").append(temp.substring(temp.length()-2)).append("_");
+                        sb.append("L").append(Integer.valueOf(temp.substring(temp.length()-2))).append("_");
                         sb.append("XXX_");
                         sb.append(CI);
 
@@ -435,11 +435,11 @@ public class InitialPointGoldenService implements  IinitialPoint{
                             if(wp.getId().endsWith("FDC"))
                             {
                                 sbtable.append(temp).append("FC");
-                                sb.append(temp).append("F_").append("XX_XXX_XXX_XXX_");
+                                sb.append(temp).append("F_").append("XX_XX_XX_XXX_");
                             }else   if(wp.getId().endsWith("GDC"))
                             {
                                 sbtable.append(temp).append("GC");
-                                sb.append(temp).append("G_").append("XX_XXX_XXX_XXX_");
+                                sb.append(temp).append("G_").append("XX_XX_XX_XXX_");
                             }
 
                         }else
@@ -448,10 +448,10 @@ public class InitialPointGoldenService implements  IinitialPoint{
                             if(wp.getId().endsWith("FDC"))
                             {
 
-                                sb.append(temp).append("F_").append("DQ_P01_L01_001_");
+                                sb.append(temp).append("F_").append("DQ_P1_L1_001_");
                             }else   if(wp.getId().endsWith("GDC"))
                             {
-                                sb.append(temp).append("G_").append("DQ_P01_L01_001_");
+                                sb.append(temp).append("G_").append("DQ_P1_L1_001_");
                             }
                         }
 
@@ -538,11 +538,11 @@ public class InitialPointGoldenService implements  IinitialPoint{
                     if(wp.getId().endsWith("FDC"))
                     {
                         sbtable.append(temp).append("FGL");
-                        sb.append(temp).append("F_").append("YC_XXX_XXX_XXX_");
+                        sb.append(temp).append("F_").append("YC_XX_XX_XXX_");
                     }else   if(wp.getId().endsWith("GDC"))
                     {
                         sbtable.append(temp).append("GGL");
-                        sb.append(temp).append("G_").append("YC_XXX_XXX_XXX_");
+                        sb.append(temp).append("G_").append("YC_XX_XX_XXX_");
                     }
 
 
@@ -620,12 +620,21 @@ public class InitialPointGoldenService implements  IinitialPoint{
                                 sb.append(wp.getPhoto());
                                 String temp=wp.getId().substring(0,wp.getId().indexOf("_"));
 
-                                sbtable.append(temp).append("FJ");
-                                sb.append(temp).append("F_").append("FJ_");
+
+
+                                if(stp.getCode().equals(CI))
+                                {
+                                    sbtable.append(temp).append("JS");
+                                    sb.append(temp).append("F_").append("JS_");
+                                }else
+                                {
+                                    sbtable.append(temp).append("FJ");
+                                    sb.append(temp).append("F_").append("FJ_");
+                                }
                                 temp=wt.getProjectid().substring(0,wt.getProjectid().lastIndexOf("_"));
-                                sb.append("P").append(temp.substring(temp.length()-2)).append("_");
+                                sb.append("P").append(Integer.valueOf(temp.substring(temp.length()-2))).append("_");
                                 temp=wt.getLineid().substring(0,wt.getProjectid().lastIndexOf("_"));
-                                sb.append("L").append(temp.substring(temp.length()-2)).append("_");
+                                sb.append("L").append(Integer.valueOf(temp.substring(temp.length()-2))).append("_");
 
                                 temp=wt.getId().substring(wt.getId().lastIndexOf("_")+1);
 

+ 12 - 0
src/main/java/com/gyee/frame/service/websocket/WpInfoPushService.java

@@ -1901,11 +1901,17 @@ public class WpInfoPushService {
         WindPowerStationTestingPoint2 rfdlai = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_RFDL);
 
         WindPowerStationTestingPoint2 fsai = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
+
+        WindPowerStationTestingPoint2 swai = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SWDL);
+        WindPowerStationTestingPoint2 gwai = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_GWDL);
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
         List<PointData> rfdlls = realApiUtil.getHistoryDatasSnap(rfdlai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
         List<PointData> fsls = realApiUtil.getHistoryDatasSnap(fsai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
 
+        List<PointData> swls = realApiUtil.getHistoryDatasSnap(swai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
+        List<PointData> gwls = realApiUtil.getHistoryDatasSnap(gwai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
+
         if (!rfdlls.isEmpty()) {
             Calendar cal = Calendar.getInstance();
             int today = c.get(Calendar.DAY_OF_MONTH);
@@ -1925,9 +1931,15 @@ public class WpInfoPushService {
                 Double ycrfdl = MathUtil.twoBit(rfdl * YCFDLXS);
                 //风速
                 Double fs = MathUtil.twoBit(fsls.get(i).getPointValueInDouble());
+                //风速
+                Double sw = MathUtil.twoBit(swls.get(i).getPointValueInDouble());
+                //风速
+                Double gw = MathUtil.twoBit(gwls.get(i).getPointValueInDouble());
                 vo.setValue1(rfdl);
                 vo.setValue2(ycrfdl);
                 vo.setValue3(fs);
+                vo.setValue4(sw);
+                vo.setValue5(gw);
                 vos.add(vo);
             }
         }

+ 2 - 2
src/main/resources/application-dev.yml

@@ -11,7 +11,7 @@ spring:
 #        username: root
 #        password: 123456
 
-        #url: jdbc:oracle:thin:@49.4.50.80:1521:gdnxfd
+        #url: jdbc:oracle:thin:@123.60.213.70:1521:gdnxfd
         url: jdbc:oracle:thin:@192.168.1.105:1521:gdnxfd
         username: nxfdprod
         password: gdnxfd123
@@ -24,7 +24,7 @@ spring:
         password: root
       #两票数据源
      ticket:
-       #url: jdbc:sqlserver://49.4.50.80:1433;DatabaseName=fdeam
+       #url: jdbc:sqlserver://123.60.213.70:1433;DatabaseName=fdeam
        url: jdbc:sqlserver://10.155.32.2:1433;DatabaseName=fdeam
        username: sa
        password: Gyee@321#!

+ 6 - 6
src/main/resources/application.yml

@@ -26,8 +26,8 @@ gyee:
   #漂亮得拖动验证码 默认false普通验证码、true滚动验证码
   rollVerification: true
   #实时数据库Url
-  #baseurl: http://49.4.50.80:8011/ts
-  baseurl: http://10.155.32.4:8011/ts
+  baseurl: http://49.4.50.80:8011/ts
+  #baseurl: http://10.155.32.4:8011/ts
   #API访问ip
   #swaggerip: 49.4.50.80:8082
   swaggerip: 10.155.32.4:8082
@@ -91,16 +91,16 @@ spring :
     date-format: yyyy-MM-dd HH:mm:ss
   redis:
     database: 1
-#    host: 49.4.50.80
-    host: 10.155.32.4
+    host: 123.60.213.70
+#   host: 10.155.32.4
     password: gdnxfd123
     pool:
       maxTotal: 20
       maxIdle: 20
-      maxwait: 60000
+      maxwait: 600000
       minIdle: 10
     port: 6379
-    timeout: 60000
+    timeout: 600000
 #mybatis:
 #  #配置mapper的扫描,找到所有的mapper.xml映射文件
 #  mapperLocations : classpath*:mybatis/*/*.xml

+ 8 - 8
src/test/java/test/InitialPointServiceTest.java

@@ -2,7 +2,7 @@ package test;
 
 import com.gyee.SpringbootStart;
 import com.gyee.frame.common.spring.SpringUtils;
-import com.gyee.frame.service.initialpoint.InitialPointGoldenService;
+import com.gyee.frame.service.initialpoint.InitialPointEdosService;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 
@@ -18,15 +18,15 @@ public class InitialPointServiceTest {
 
 
 
-        InitialPointGoldenService initialPointGoldenService= SpringUtils.getBean("initialPointGoldenService");
+        InitialPointEdosService initialPointEdosService= SpringUtils.getBean("initialPointEdosService");
 
-        initialPointGoldenService.initalFj();
+        initialPointEdosService.initalFj();
 
-        initialPointGoldenService.initalFc(true);
-
-        initialPointGoldenService.initalDd();
-
-        initialPointGoldenService.initalFgl();
+        initialPointEdosService.initalFc(true);
+//
+//        initialPointEdosService.initalDd();
+//
+//        initialPointEdosService.initalFgl();
 
         System.out.println("初始化结束!");
     }