瀏覽代碼

解析调整,新增和删除了解析相关的配置表,初步移植了配置页面

tl 7 月之前
父節點
當前提交
609f0160a2
共有 45 個文件被更改,包括 6472 次插入442 次删除
  1. 57 0
      cpp-admin/src/main/java/com/cpp/web/controller/configManager/FtpChannelController.java
  2. 54 0
      cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingCdqController.java
  3. 55 0
      cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingCftController.java
  4. 55 0
      cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingDqController.java
  5. 54 0
      cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingFjController.java
  6. 26 0
      cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingInfoController.java
  7. 40 0
      cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingLogController.java
  8. 56 0
      cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingNbqController.java
  9. 56 0
      cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingNwpController.java
  10. 56 0
      cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingQxzController.java
  11. 56 0
      cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingRpController.java
  12. 12 20
      cpp-admin/src/main/java/com/cpp/web/domain/BaseCppEntity.java
  13. 87 0
      cpp-admin/src/main/java/com/cpp/web/domain/datafactory/FtpChannel.java
  14. 0 54
      cpp-admin/src/main/java/com/cpp/web/domain/datafactory/ParsingFileUrl.java
  15. 16 0
      cpp-admin/src/main/java/com/cpp/web/domain/station/ElectricField.java
  16. 2 2
      cpp-admin/src/main/java/com/cpp/web/mapper/datafactory/FtpChannelMapper.java
  17. 0 18
      cpp-admin/src/main/java/com/cpp/web/service/cloud/CloudFileParsing.java
  18. 2 2
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/FtpChannelService.java
  19. 45 45
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/FtpFileParsing.java
  20. 0 2
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/ParsingInterface.java
  21. 16 0
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/ParsingTypeService.java
  22. 18 0
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/FtpChannelServiceImpl.java
  23. 3 11
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingCdqServiceImpl.java
  24. 2 7
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingCftServiceImpl.java
  25. 3 11
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingDqServiceImpl.java
  26. 0 18
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingFileUrlServiceImpl.java
  27. 43 53
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingFjServiceImpl.java
  28. 3 10
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingNbqServiceImpl.java
  29. 81 93
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingNwpServiceImpl.java
  30. 42 50
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingQxzServiceImpl.java
  31. 6 15
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingRcdqServiceImpl.java
  32. 6 14
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingRdqServiceImpl.java
  33. 2 11
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingRpServiceImpl.java
  34. 0 6
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingStatusServiceImpl.java
  35. 18 0
      cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingTypeServiceImpl.java
  36. 218 0
      cpp-ui/src/views/configManager/ftpChannel/index.vue
  37. 457 0
      cpp-ui/src/views/configManager/parsingConf/cdqparsing.vue
  38. 907 0
      cpp-ui/src/views/configManager/parsingConf/cftparsing.vue
  39. 457 0
      cpp-ui/src/views/configManager/parsingConf/dqparsing.vue
  40. 723 0
      cpp-ui/src/views/configManager/parsingConf/fjparsing.vue
  41. 172 0
      cpp-ui/src/views/configManager/parsingConf/index.vue
  42. 631 0
      cpp-ui/src/views/configManager/parsingConf/nbqparsing.vue
  43. 866 0
      cpp-ui/src/views/configManager/parsingConf/nwpparsing.vue
  44. 612 0
      cpp-ui/src/views/configManager/parsingConf/qxzparsing.vue
  45. 457 0
      cpp-ui/src/views/configManager/parsingConf/rpparsing.vue

+ 57 - 0
cpp-admin/src/main/java/com/cpp/web/controller/configManager/FtpChannelController.java

@@ -0,0 +1,57 @@
+package com.cpp.web.controller.configManager;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.cpp.common.core.domain.R;
+import com.cpp.web.domain.datafactory.FtpChannel;
+import com.cpp.web.service.datafactory.FtpChannelService;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@Slf4j
+@RequestMapping("/ftpChannel")
+@AllArgsConstructor
+public class FtpChannelController {
+
+    private final FtpChannelService ftpChannelService;
+
+
+    @ApiOperation(value = "添加ftp通道", notes = "添加ftp通道")
+    @PostMapping()
+    public Boolean add(@RequestBody FtpChannel ftpChannel) {
+        return ftpChannelService.save(ftpChannel);
+    }
+
+    @ApiOperation(value = "修改ftp通道", notes = "修改ftp通道")
+    @PutMapping()
+    public Boolean update(@RequestBody FtpChannel ftpChannel) {
+        return ftpChannelService.updateById(ftpChannel);
+
+    }
+
+
+    @ApiOperation(value = "根据id删除ftp通道", notes = "根据id删除ftp通道")
+    @DeleteMapping("/{id}")
+    public Boolean delete(@PathVariable String id) {
+        return ftpChannelService.removeById(id);
+
+    }
+
+    @ApiOperation(value = "查询所有ftp通道", notes = "查询所有ftp通道")
+    @GetMapping()
+    public List<FtpChannel> getAll() {
+         return ftpChannelService.list();
+    }
+
+    @ApiOperation(value = "分页查询", notes = "分页查询")
+    @GetMapping("/page")
+    public R page(FtpChannel ftpChannel, Page page) {
+
+        return R.ok(ftpChannelService.page(page, Wrappers.query(ftpChannel)));
+    }
+}

+ 54 - 0
cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingCdqController.java

@@ -0,0 +1,54 @@
+package com.cpp.web.controller.configManager;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.cpp.common.core.domain.R;
+import com.cpp.web.domain.datafactory.ParsingCdq;
+import com.cpp.web.service.datafactory.ParsingCdqService;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.*;
+
+
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/parsingCdq")
+public class ParsingCdqController {
+    private final ParsingCdqService parsingCdqService;
+
+    @ApiOperation(value = "添加超短期配置", notes = "添加超短期配置")
+    @PostMapping()
+    public R add(@RequestBody ParsingCdq parsingCdq) {
+        if (parsingCdqService.save(parsingCdq)) {
+            return R.ok("添加成功!");
+        } else {
+            return R.fail("添加失败!");
+        }
+    }
+
+    @ApiOperation(value = "修改超短期配置", notes = "修改超短期配置")
+    @PutMapping()
+    public R update(@RequestBody ParsingCdq parsingCdq) {
+        if (parsingCdqService.updateById(parsingCdq)) {
+            return R.ok("修改成功!");
+        } else {
+            return R.fail("修改失败!");
+        }
+    }
+
+    @ApiOperation(value = "根据id删除超短期配置", notes = "根据id删除超短期配置")
+    @DeleteMapping("/{id}")
+    public R delete(@PathVariable String id) {
+        if (parsingCdqService.removeById(id)) {
+            return R.ok("删除成功!");
+        } else {
+            return R.fail("删除失败!");
+        }
+    }
+
+    @ApiOperation(value = "分页查询超短期配置", notes = "分页查询超短期配置")
+    @GetMapping("/page")
+    public R page(ParsingCdq parsingCdq, Page page) {
+        return R.ok(parsingCdqService.page(page, Wrappers.query(parsingCdq)));
+    }
+}

+ 55 - 0
cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingCftController.java

@@ -0,0 +1,55 @@
+package com.cpp.web.controller.configManager;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.cpp.common.core.domain.R;
+import com.cpp.web.domain.datafactory.ParsingCft;
+import com.cpp.web.service.datafactory.ParsingCftService;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/parsingCft")
+public class ParsingCftController {
+    private final ParsingCftService parsingCftService;
+
+    @ApiOperation(value = "添加Cft配置", notes = "添加Cft配置")
+    @PostMapping()
+    public R add(@RequestBody ParsingCft parsingCft) {
+        if (parsingCftService.save(parsingCft)) {
+            return R.ok("添加成功!");
+        } else {
+            return R.fail("添加失败!");
+        }
+    }
+
+    @ApiOperation(value = "修改Cft配置", notes = "修改Cft配置")
+    @PutMapping()
+    public R update(@RequestBody ParsingCft parsingCft) {
+        if (parsingCftService.updateById(parsingCft)) {
+            return R.ok("修改成功!");
+        } else {
+            return R.fail("修改失败!");
+        }
+    }
+
+    @ApiOperation(value = "根据id删除Cft配置", notes = "根据id删除Cft配置")
+    @DeleteMapping("/{id}")
+    public R delete(@PathVariable String id) {
+        if (parsingCftService.removeById(id)) {
+            return R.ok("删除成功!");
+        } else {
+            return R.fail("删除失败!");
+        }
+    }
+
+    @ApiOperation(value = "分页查询Cft配置", notes = "分页查询Cft配置")
+    @GetMapping("/page")
+    public R page(ParsingCft parsingCft, Page page) {
+        return R.ok(parsingCftService.page(page, Wrappers.query(parsingCft)));
+    }
+}

+ 55 - 0
cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingDqController.java

@@ -0,0 +1,55 @@
+package com.cpp.web.controller.configManager;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.cpp.common.core.domain.R;
+import com.cpp.web.domain.datafactory.ParsingDq;
+import com.cpp.web.service.datafactory.ParsingDqService;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.*;
+
+
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/parsingDq")
+public class ParsingDqController {
+    
+    private final ParsingDqService parsingDqService;
+
+    @ApiOperation(value = "添加短期配置", notes = "添加短期配置")
+    @PostMapping()
+    public R add(@RequestBody ParsingDq parsingDq) {
+        if (parsingDqService.save(parsingDq)) {
+            return R.ok("添加成功!");
+        } else {
+            return R.fail("添加失败!");
+        }
+    }
+
+    @ApiOperation(value = "修改短期配置", notes = "修改短期配置")
+    @PutMapping()
+    public R update(@RequestBody ParsingDq parsingDq) {
+        if (parsingDqService.updateById(parsingDq)) {
+            return R.ok("修改成功!");
+        } else {
+            return R.fail("修改失败!");
+        }
+    }
+
+    @ApiOperation(value = "根据id删除短期配置", notes = "根据id删除短期配置")
+    @DeleteMapping("/{id}")
+    public R delete(@PathVariable String id) {
+        if (parsingDqService.removeById(id)) {
+            return R.ok("删除成功!");
+        } else {
+            return R.fail("删除失败!");
+        }
+    }
+
+    @ApiOperation(value = "分页查询短期配置", notes = "分页查询短期配置")
+    @GetMapping("/page")
+    public R page(ParsingDq parsingDq, Page page) {
+        return R.ok(parsingDqService.page(page, Wrappers.query(parsingDq)));
+    }
+}

+ 54 - 0
cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingFjController.java

@@ -0,0 +1,54 @@
+package com.cpp.web.controller.configManager;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.cpp.common.core.domain.R;
+import com.cpp.web.domain.datafactory.ParsingFj;
+import com.cpp.web.service.datafactory.ParsingFjService;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.*;
+
+
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/parsingFj")
+public class ParsingFjController {
+    private final ParsingFjService parsingFjService;
+
+    @ApiOperation(value = "添加Fj配置", notes = "添加Fj配置")
+    @PostMapping()
+    public R add(@RequestBody ParsingFj parsingFj) {
+        if (parsingFjService.save(parsingFj)) {
+            return R.ok("添加成功!");
+        } else {
+            return R.fail("添加失败!");
+        }
+    }
+
+    @ApiOperation(value = "修改Fj配置", notes = "修改Fj配置")
+    @PutMapping()
+    public R update(@RequestBody ParsingFj parsingFj) {
+        if (parsingFjService.updateById(parsingFj)) {
+            return R.ok("修改成功!");
+        } else {
+            return R.fail("修改失败!");
+        }
+    }
+
+    @ApiOperation(value = "根据id删除Fj配置", notes = "根据id删除Fj配置")
+    @DeleteMapping("/{id}")
+    public R delete(@PathVariable String id) {
+        if (parsingFjService.removeById(id)) {
+            return R.ok("删除成功!");
+        } else {
+            return R.fail("删除失败!");
+        }
+    }
+
+    @ApiOperation(value = "分页查询Fj配置", notes = "分页查询Fj配置")
+    @GetMapping("/page")
+    public R page(ParsingFj parsingFj, Page page) {
+        return R.ok(parsingFjService.page(page, Wrappers.query(parsingFj)));
+    }
+}

+ 26 - 0
cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingInfoController.java

@@ -0,0 +1,26 @@
+package com.cpp.web.controller.configManager;
+
+import com.cpp.common.core.domain.R;
+import com.cpp.web.service.station.ElectricFieldService;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/parsingInfo")
+public class ParsingInfoController {
+
+    private final ElectricFieldService electricFieldService;
+
+
+    @ApiOperation(value = "获取场站", notes = "获取场站")
+    @GetMapping("/getElectricField")
+    public R getElectricField(){
+        return R.ok(electricFieldService.list());
+    }
+
+}

+ 40 - 0
cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingLogController.java

@@ -0,0 +1,40 @@
+package com.cpp.web.controller.configManager;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.cpp.common.core.domain.R;
+import com.cpp.web.service.datafactory.ParsingLogService;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+
+
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/parsingLog")
+public class ParsingLogController {
+    @Autowired
+    ParsingLogService parsingLogService;
+
+    /**
+     * 根据场站编号 解析时间 文件状态 分页查询
+     *
+     * @param currentPage
+     * @param pageSize
+     * @param stationCode
+     * @param time
+     * @param fileStatus
+     * @return
+     */
+    @ApiOperation(value = "根据场站编号分页查询", notes = "分页查询")
+    @PostMapping("/getByStationCodeAndCreateTimeAndFileStatusAndFileType")
+    public R getByStationCodeAndCreateTimeAndFileStatusAndFileType(Long currentPage, Long pageSize, String stationCode, Long time, String fileStatus, String fileType) {
+        Page page = new Page(currentPage, pageSize);
+        page.setMaxLimit((long) -1);
+        return R.ok(parsingLogService.page(page, parsingLogService.getByStationCodeAndCreateTimeAndFileStatusAndFileType(stationCode, new Date(time), new Date(time + 60 * 60 * 24 * 1000 - 1000), fileStatus, fileType)));
+    }
+}

+ 56 - 0
cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingNbqController.java

@@ -0,0 +1,56 @@
+package com.cpp.web.controller.configManager;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.cpp.common.core.domain.R;
+import com.cpp.web.domain.datafactory.ParsingNbq;
+import com.cpp.web.service.datafactory.ParsingNbqService;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/parsingNbq")
+public class ParsingNbqController {
+    @Autowired
+    ParsingNbqService parsingNbqService;
+
+    @ApiOperation(value = "添加Nbq配置", notes = "添加Nbq配置")
+    @PostMapping()
+    public R add(@RequestBody ParsingNbq parsingNbq) {
+        if (parsingNbqService.save(parsingNbq)) {
+            return R.ok("添加成功!");
+        } else {
+            return R.fail("添加失败!");
+        }
+    }
+
+    @ApiOperation(value = "修改Nbq配置", notes = "修改Nbq配置")
+    @PutMapping()
+    public R update(@RequestBody ParsingNbq parsingNbq) {
+        if (parsingNbqService.updateById(parsingNbq)) {
+            return R.ok("修改成功!");
+        } else {
+            return R.fail("修改失败!");
+        }
+    }
+
+    @ApiOperation(value = "根据id删除Nbq配置", notes = "根据id删除Nbq配置")
+    @DeleteMapping("/{id}")
+    public R delete(@PathVariable String id) {
+        if (parsingNbqService.removeById(id)) {
+            return R.ok("删除成功!");
+        } else {
+            return R.fail("删除失败!");
+        }
+    }
+
+    @ApiOperation(value = "分页查询Nbq配置", notes = "分页查询Nbq配置")
+    @GetMapping("/page")
+    public R page(ParsingNbq parsingNbq, Page page) {
+        return R.ok(parsingNbqService.page(page, Wrappers.query(parsingNbq)));
+    }
+}

+ 56 - 0
cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingNwpController.java

@@ -0,0 +1,56 @@
+package com.cpp.web.controller.configManager;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.cpp.common.core.domain.R;
+import com.cpp.web.domain.datafactory.ParsingNwp;
+import com.cpp.web.service.datafactory.ParsingNwpService;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/parsingNwp")
+public class ParsingNwpController {
+    @Autowired
+    ParsingNwpService parsingNwpService;
+
+    @ApiOperation(value = "添加Nwp配置", notes = "添加Nwp配置")
+    @PostMapping()
+    public R add(@RequestBody ParsingNwp parsingNwp) {
+        if (parsingNwpService.save(parsingNwp)) {
+            return R.ok("添加成功!");
+        } else {
+            return R.fail("添加失败!");
+        }
+    }
+
+    @ApiOperation(value = "修改Nwp配置", notes = "修改Nwp配置")
+    @PutMapping()
+    public R update(@RequestBody ParsingNwp parsingNwp) {
+        if (parsingNwpService.updateById(parsingNwp)) {
+            return R.ok("修改成功!");
+        } else {
+            return R.fail("修改失败!");
+        }
+    }
+
+    @ApiOperation(value = "根据id删除Nwp配置", notes = "根据id删除Nwp配置")
+    @DeleteMapping("/{id}")
+    public R delete(@PathVariable String id) {
+        if (parsingNwpService.removeById(id)) {
+            return R.ok("删除成功!");
+        } else {
+            return R.fail("删除失败!");
+        }
+    }
+
+    @ApiOperation(value = "分页查询Nwp配置", notes = "分页查询Nwp配置")
+    @GetMapping("/page")
+    public R page(ParsingNwp parsingNwp, Page page) {
+        return R.ok(parsingNwpService.page(page, Wrappers.query(parsingNwp)));
+    }
+}

+ 56 - 0
cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingQxzController.java

@@ -0,0 +1,56 @@
+package com.cpp.web.controller.configManager;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.cpp.common.core.domain.R;
+import com.cpp.web.domain.datafactory.ParsingQxz;
+import com.cpp.web.service.datafactory.ParsingQxzService;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/parsingQxz")
+public class ParsingQxzController {
+    @Autowired
+    ParsingQxzService parsingQxzService;
+
+    @ApiOperation(value = "添加Qxz配置", notes = "添加Qxz配置")
+    @PostMapping()
+    public R add(@RequestBody ParsingQxz parsingQxz) {
+        if (parsingQxzService.save(parsingQxz)) {
+            return R.ok("添加成功!");
+        } else {
+            return R.fail("添加失败!");
+        }
+    }
+
+    @ApiOperation(value = "修改Qxz配置", notes = "修改Qxz配置")
+    @PutMapping()
+    public R update(@RequestBody ParsingQxz parsingQxz) {
+        if (parsingQxzService.updateById(parsingQxz)) {
+            return R.ok("修改成功!");
+        } else {
+            return R.fail("修改失败!");
+        }
+    }
+
+    @ApiOperation(value = "根据id删除Qxz配置", notes = "根据id删除Qxz配置")
+    @DeleteMapping("/{id}")
+    public R delete(@PathVariable String id) {
+        if (parsingQxzService.removeById(id)) {
+            return R.ok("删除成功!");
+        } else {
+            return R.fail("删除失败!");
+        }
+    }
+
+    @ApiOperation(value = "分页查询Qxz配置", notes = "分页查询Qxz配置")
+    @GetMapping("/page")
+    public R page(ParsingQxz parsingQxz, Page page) {
+        return R.ok(parsingQxzService.page(page, Wrappers.query(parsingQxz)));
+    }
+}

+ 56 - 0
cpp-admin/src/main/java/com/cpp/web/controller/configManager/ParsingRpController.java

@@ -0,0 +1,56 @@
+package com.cpp.web.controller.configManager;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.cpp.common.core.domain.R;
+import com.cpp.web.domain.datafactory.ParsingRp;
+import com.cpp.web.service.datafactory.ParsingRpService;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/parsingRp")
+public class ParsingRpController {
+    @Autowired
+    ParsingRpService parsingRpService;
+
+    @ApiOperation(value = "添加实际功率配置", notes = "添加实际功率配置")
+    @PostMapping()
+    public R add(@RequestBody ParsingRp parsingRp) {
+        if (parsingRpService.save(parsingRp)) {
+            return R.ok("添加成功!");
+        } else {
+            return R.fail("添加失败!");
+        }
+    }
+
+    @ApiOperation(value = "修改实际功率配置", notes = "修改实际功率配置")
+    @PutMapping()
+    public R update(@RequestBody ParsingRp parsingRp) {
+        if (parsingRpService.updateById(parsingRp)) {
+            return R.ok("修改成功!");
+        } else {
+            return R.fail("修改失败!");
+        }
+    }
+
+    @ApiOperation(value = "根据id删除实际功率配置", notes = "根据id删除实际功率配置")
+    @DeleteMapping("/{id}")
+    public R delete(@PathVariable String id) {
+        if (parsingRpService.removeById(id)) {
+            return R.ok("删除成功!");
+        } else {
+            return R.fail("删除失败!");
+        }
+    }
+
+    @ApiOperation(value = "分页查询实际功率配置", notes = "分页查询实际功率配置")
+    @GetMapping("/page")
+    public R page(ParsingRp parsingRp, Page page) {
+        return R.ok(parsingRpService.page(page, Wrappers.query(parsingRp)));
+    }
+}

+ 12 - 20
cpp-admin/src/main/java/com/cpp/web/domain/BaseCppEntity.java

@@ -4,11 +4,13 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
 import java.time.LocalDateTime;
+import java.util.Date;
 
 /**
  * cpp_electric_field
@@ -31,29 +33,19 @@ public class BaseCppEntity implements Serializable {
     @ApiModelProperty(value = "场站编号")
     private String stationCode;
 
-    /**
-     * 创建者
-     */
-    @TableField(fill = FieldFill.INSERT)
-    private String creator;
-    /**
-     * 创建时间
-     */
+    /** 创建者 */
+    private String createBy;
 
-    @TableField( fill = FieldFill.INSERT)
-    private LocalDateTime createTime;
-    /**
-     * 最后修改者
-     */
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
 
-    @TableField(fill = FieldFill.INSERT_UPDATE)
-    private String lastModifier;
-    /**
-     * 最后修改时间
-     */
+    /** 更新者 */
+    private String updateBy;
 
-    @TableField(fill = FieldFill.INSERT_UPDATE)
-    private LocalDateTime lastModifyTime;
+    /** 更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
 
 
 

+ 87 - 0
cpp-admin/src/main/java/com/cpp/web/domain/datafactory/FtpChannel.java

@@ -0,0 +1,87 @@
+package com.cpp.web.domain.datafactory;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.cpp.common.core.domain.BaseEntity;
+import com.cpp.web.domain.BaseCppEntity;
+import com.cpp.web.domain.datafactory.enums.FileTypeEnum;
+import com.cpp.web.domain.enums.DataSourcesEnum;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+/**
+ * ftp解析文件
+ * Parse file
+ *
+ * @author tl
+ * @version 1.0
+ */
+@TableName("cpp_ftp_channel")
+@ApiModel(value = "cpp_ftp_channel")
+@Data
+public class FtpChannel implements Serializable {
+
+    /**
+     * Id
+     */
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "主键ID")
+    private Long id;
+
+
+    /**
+     * 通道名称
+     */
+    @ApiModelProperty(value = "通道名称")
+    private String name;
+
+
+    /**
+     * ip
+     */
+    @ApiModelProperty(value = "ip")
+    private String ip;
+
+
+    /**
+     * 端口
+     */
+    @ApiModelProperty(value = "端口")
+    private Integer port;
+
+    /**
+     * 用户名
+     */
+    @ApiModelProperty(value = "用户名")
+    private String username;
+
+    /**
+     * 密码
+     */
+    @ApiModelProperty(value = "密码")
+    private String password;
+
+
+
+    /** 创建者 */
+    private String createBy;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /** 更新者 */
+    private String updateBy;
+
+    /** 更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+
+}

+ 0 - 54
cpp-admin/src/main/java/com/cpp/web/domain/datafactory/ParsingFileUrl.java

@@ -1,54 +0,0 @@
-package com.cpp.web.domain.datafactory;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.cpp.common.core.domain.BaseEntity;
-import com.cpp.web.domain.BaseCppEntity;
-import com.cpp.web.domain.datafactory.enums.FileTypeEnum;
-import com.cpp.web.domain.enums.DataSourcesEnum;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * ftp解析文件
- * Parse file
- *
- * @author tl
- * @version 1.0
- */
-@TableName("cpp_parsing_file_url")
-@EqualsAndHashCode(callSuper = true)
-@ApiModel(value = "cpp_parsing_file_url")
-@Data
-public class ParsingFileUrl extends BaseCppEntity {
-
-    /**
-     * Id
-     */
-    @TableId(type = IdType.AUTO)
-    @ApiModelProperty(value = "主键ID")
-    private Long id;
-
-
-    /**
-     * 解析分类(云端预测,站端上报)
-     */
-    @ApiModelProperty(value = "解析分类")
-    private DataSourcesEnum parsingDataSources;
-
-    /**
-     * 文件类型
-     */
-    @ApiModelProperty(value = "文件类型")
-    private FileTypeEnum fileType;
-
-    /**
-     * 文件扫描路径
-     */
-    @ApiModelProperty(value = "文件扫描路径")
-    private String url;
-
-}

+ 16 - 0
cpp-admin/src/main/java/com/cpp/web/domain/station/ElectricField.java

@@ -99,4 +99,20 @@ public class ElectricField extends BaseCppEntity {
 //    @Enumerated(EnumType.STRING)
     @ApiModelProperty(value = "省份")
     private String provinceEnum;
+
+
+    /**
+     * ftp通道id
+     */
+    @ApiModelProperty(value = "ftp通道id")
+    private Long ftpChanelId;
+
+
+
+    /**
+     * ftp扫描路径
+     */
+//    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "ftp扫描路径")
+    private String ftpUrl;
 }

+ 2 - 2
cpp-admin/src/main/java/com/cpp/web/mapper/datafactory/ParsingFileUrlMapper.java → cpp-admin/src/main/java/com/cpp/web/mapper/datafactory/FtpChannelMapper.java

@@ -2,7 +2,7 @@ package com.cpp.web.mapper.datafactory;
 
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.cpp.web.domain.datafactory.ParsingFileUrl;
+import com.cpp.web.domain.datafactory.FtpChannel;
 import org.apache.ibatis.annotations.Mapper;
 
 /**
@@ -12,6 +12,6 @@ import org.apache.ibatis.annotations.Mapper;
  * @date 2022-05-11 09:47:21
  */
 @Mapper
-public interface ParsingFileUrlMapper extends BaseMapper<ParsingFileUrl> {
+public interface FtpChannelMapper extends BaseMapper<FtpChannel> {
 
 }

+ 0 - 18
cpp-admin/src/main/java/com/cpp/web/service/cloud/CloudFileParsing.java

@@ -1,32 +1,16 @@
 package com.cpp.web.service.cloud;
 
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.NumberUtil;
-import cn.hutool.core.util.ObjectUtil;
-import cn.hutool.core.util.RuntimeUtil;
-import cn.hutool.core.util.StrUtil;
-import cn.hutool.extra.ftp.Ftp;
-import cn.hutool.extra.ftp.FtpConfig;
-import cn.hutool.extra.ftp.FtpMode;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.cpp.common.utils.StringUtils;
 import com.cpp.web.domain.AbnormalAlarm;
 import com.cpp.web.domain.cloud.ForecastPowerShortTermCloud;
 import com.cpp.web.domain.cloud.NwpCloud;
-import com.cpp.web.domain.datafactory.ParsingFileUrl;
 import com.cpp.web.domain.datafactory.ParsingLog;
-import com.cpp.web.domain.datafactory.ParsingType;
-import com.cpp.web.domain.datafactory.dto.ParsingResultDto;
 import com.cpp.web.domain.datafactory.enums.FileTypeEnum;
 import com.cpp.web.domain.enums.AlarmEnum;
 import com.cpp.web.domain.enums.DataSourcesEnum;
-import com.cpp.web.mapper.datafactory.ParsingTypeMapper;
 import com.cpp.web.service.AbnormalAlarmService;
-import com.cpp.web.service.datafactory.ParsingFileUrlService;
-import com.cpp.web.service.datafactory.ParsingInterface;
 import com.cpp.web.service.datafactory.ParsingLogService;
 import com.cpp.web.utils.DateTimeUtil;
-import com.cpp.web.utils.MessageUtils;
 import com.cpp.web.utils.NumberUtils;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -39,13 +23,11 @@ import org.springframework.stereotype.Service;
 import java.io.*;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
-import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
-import java.util.stream.Collectors;
 
 /**
  * ftp文件解析

+ 2 - 2
cpp-admin/src/main/java/com/cpp/web/service/datafactory/ParsingFileUrlService.java → cpp-admin/src/main/java/com/cpp/web/service/datafactory/FtpChannelService.java

@@ -1,7 +1,7 @@
 package com.cpp.web.service.datafactory;
 
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.cpp.web.domain.datafactory.ParsingFileUrl;
+import com.cpp.web.domain.datafactory.FtpChannel;
 
 /**
  * 解析ftp路径业务层接口
@@ -9,6 +9,6 @@ import com.cpp.web.domain.datafactory.ParsingFileUrl;
  * @author tl
  * @date 2022-05-11 09:51:21
  */
-public interface ParsingFileUrlService extends IService<ParsingFileUrl> {
+public interface FtpChannelService extends IService<FtpChannel> {
 
 }

+ 45 - 45
cpp-admin/src/main/java/com/cpp/web/service/datafactory/FtpFileParsing.java

@@ -3,17 +3,16 @@ package com.cpp.web.service.datafactory;
 import cn.hutool.extra.ftp.Ftp;
 import cn.hutool.extra.ftp.FtpConfig;
 import cn.hutool.extra.ftp.FtpMode;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.cpp.web.domain.AbnormalAlarm;
-import com.cpp.web.domain.datafactory.ParsingFileUrl;
+import com.cpp.web.domain.datafactory.FtpChannel;
 import com.cpp.web.domain.datafactory.ParsingLog;
 import com.cpp.web.domain.datafactory.ParsingType;
 import com.cpp.web.domain.datafactory.dto.ParsingResultDto;
-import com.cpp.web.domain.datafactory.enums.FileTypeEnum;
 import com.cpp.web.domain.enums.AlarmEnum;
 import com.cpp.web.domain.enums.DataSourcesEnum;
-import com.cpp.web.mapper.datafactory.ParsingTypeMapper;
+import com.cpp.web.domain.station.ElectricField;
 import com.cpp.web.service.AbnormalAlarmService;
+import com.cpp.web.service.station.ElectricFieldService;
 import com.cpp.web.utils.MessageUtils;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -41,11 +40,13 @@ import java.util.stream.Collectors;
 @Service
 public class FtpFileParsing {
 
-    private final ParsingTypeMapper parsingTypeMapper;
+    private final ParsingTypeService parsingTypeService;
 
     private final Map<String, ParsingInterface> parsingInterfaceMap;
 
-    private final ParsingFileUrlService parsingFileUrlService;
+    private final FtpChannelService ftpChannelService;
+
+    private final ElectricFieldService electricFieldService;
 
     private final ParsingLogService parsingLogService;
 
@@ -77,29 +78,31 @@ public class FtpFileParsing {
 
         log.info("-----------------开始执行FTP文件解析任务----------------------");
 
-        List<ParsingType> parsingTypes = parsingTypeMapper.selectList(null);
+        List<ParsingType> parsingTypes = parsingTypeService.list();
 
         if (parsingTypes.size() > 0) {
 
-            List<ParsingFileUrl> fileUrls = parsingFileUrlService.list(Wrappers.lambdaQuery(ParsingFileUrl.class).eq(ParsingFileUrl::getParsingDataSources, DataSourcesEnum.E1));
+            List<FtpChannel> channels = ftpChannelService.list();
 
-            if (fileUrls.size() > 0) {
-                Map<FileTypeEnum, List<ParsingFileUrl>> fileTypeEnumListMap = fileUrls.stream().collect(Collectors.groupingBy(ParsingFileUrl::getFileType, Collectors.toList()));
+            List<ElectricField> electricFields = electricFieldService.list();
+            for (FtpChannel channel : channels) {
 
-                Ftp ftp = createParsingFtp();
-                if (ftp != null) {
-                    List<ParsingLog> parsingLogs = new ArrayList<>();
-                    List<AbnormalAlarm> abnormalAlarms = new ArrayList<>();
-                    for (ParsingType parsingType : parsingTypes) {
-                        if (fileTypeEnumListMap.containsKey(parsingType.getFileType())) {
+                List<ElectricField> channelElectricFields = electricFields.stream().filter(e->e.getFtpChanelId()!=null&&e.getFtpChanelId().equals(channel.getId())).collect(Collectors.toList());
+
+                if (channelElectricFields.size() > 0) {
+                    Ftp ftp = createParsingFtp(channel);
+                    if (ftp != null) {
+                        List<ParsingLog> parsingLogs = new ArrayList<>();
+                        List<AbnormalAlarm> abnormalAlarms = new ArrayList<>();
+                        for (ParsingType parsingType : parsingTypes) {
                             executor.execute(new Runnable() {
                                 @Override
                                 public void run() {
                                     ParsingInterface parsingInterface = parsingInterfaceMap.get(parsingType.getFileType().name() + "Parsing");
                                     parsingInterface.activationParsingConf();//初始化解析配置
-                                    List<ParsingFileUrl> fileUrlList = fileTypeEnumListMap.get(parsingType.getFileType());
-                                    for (ParsingFileUrl parsingFileUrl : fileUrlList) {
-                                        String ftpUrl = parsingFileUrl.getUrl();
+                                    for (ElectricField electricField : channelElectricFields) {
+
+                                        String ftpUrl = electricField.getFtpUrl();
                                         List<String> fileNames = ftp.ls(ftpUrl).stream().filter(f -> f.contains(parsingType.getFileName())).collect(Collectors.toList());
                                         if (fileNames.size() > 0) {
                                             for (String fileName : fileNames) {
@@ -110,7 +113,7 @@ public class FtpFileParsing {
                                                     ParsingLog parsingLog = new ParsingLog();
                                                     Date now = new Date();
                                                     parsingLog.setParsingTime(now);
-                                                    ParsingResultDto parsingResultDto = parsingInterface.parsing(file, parsingFileUrl.getStationCode());
+                                                    ParsingResultDto parsingResultDto = parsingInterface.parsing(file, electricField.getStationCode());
                                                     parsingLog.setParsingDescribe(parsingResultDto.getMessage());
                                                     parsingLog.setFileType(parsingType.getFileType());
                                                     parsingLog.setDataSources(DataSourcesEnum.E1);
@@ -120,18 +123,18 @@ public class FtpFileParsing {
                                                             File failFile = new File(failFileDir.getPath() + File.separator + fileName);
                                                             if (failFile.exists()) {
                                                                 failFile.delete();
-                                                                log.error("已有过解析失败文件,错误文件将覆盖!场站编号:{},文件名称:{}", parsingFileUrl.getStationCode(), fileName);
+                                                                log.error("已有过解析失败文件,错误文件将覆盖!场站编号:{},文件名称:{}", electricField.getStationCode(), fileName);
                                                             }
 
                                                             FileUtils.moveFile(file, failFileDir);
                                                         } catch (IOException e) {
-                                                            log.error("解析文件失败后文件移动失败!场站编号:{},文件名称:{}", parsingFileUrl.getStationCode(), fileName, e);
+                                                            log.error("解析文件失败后文件移动失败!场站编号:{},文件名称:{}", electricField.getStationCode(), fileName, e);
                                                             e.printStackTrace();
                                                         }
                                                         file.delete();//失败删除本地文件,等待下次下载
                                                         parsingLog.setParsingFileStatus("失败");
 
-                                                        abnormalAlarms.add(new AbnormalAlarm(DataSourcesEnum.E3, AlarmEnum.E4, MessageUtils.format("无法解析场站端文件:{}",fileName), parsingFileUrl.getStationCode()));
+                                                        abnormalAlarms.add(new AbnormalAlarm(DataSourcesEnum.E3, AlarmEnum.E4, MessageUtils.format("无法解析场站端文件:{}", fileName), electricField.getStationCode()));
 
                                                     } else {
                                                         ftp.delFile(ftpUrl + "/" + fileName);//成功删除ftp上的文件
@@ -141,12 +144,12 @@ public class FtpFileParsing {
                                                             File successFile = new File(successFileDir.getPath() + File.separator + fileName);
                                                             if (successFile.exists()) {
                                                                 successFile.delete();
-                                                                log.error("已有过解析成功文件,成功文件将覆盖!场站编号:{},文件名称:{}", parsingFileUrl.getStationCode(), fileName);
+                                                                log.error("已有过解析成功文件,成功文件将覆盖!场站编号:{},文件名称:{}", electricField.getStationCode(), fileName);
                                                             }
 
                                                             FileUtils.moveFile(file, successFileDir);
                                                         } catch (IOException e) {
-                                                            log.error("解析文件成功后文件移动失败!场站编号:{},文件名称:{}", parsingFileUrl.getStationCode(), fileName, e);
+                                                            log.error("解析文件成功后文件移动失败!场站编号:{},文件名称:{}", electricField.getStationCode(), fileName, e);
                                                             e.printStackTrace();
                                                         }
                                                         file.delete();//失败删除本地文件,等待下次下载
@@ -154,7 +157,7 @@ public class FtpFileParsing {
                                                     }
                                                     parsingLogs.add(parsingLog);
                                                 } catch (Exception e) {
-                                                    abnormalAlarms.add(new AbnormalAlarm(DataSourcesEnum.E3, AlarmEnum.E4, MessageUtils.format("无法解析场站端文件:{}",fileName), parsingFileUrl.getStationCode()));
+                                                    abnormalAlarms.add(new AbnormalAlarm(DataSourcesEnum.E3, AlarmEnum.E4, MessageUtils.format("无法解析场站端文件:{}", fileName), electricField.getStationCode()));
                                                     log.error("下载并解析文件{}时异常", fileName, e);
                                                 }
 
@@ -163,21 +166,24 @@ public class FtpFileParsing {
                                     }
                                 }
                             });
+
                         }
-                    }
 
-                    parsingLogService.saveBatch(parsingLogs);
+                        parsingLogService.saveBatch(parsingLogs);
 
-                    try {
-                        ftp.close();
-                    } catch (IOException e) {
-                        e.printStackTrace();
+                        try {
+                            ftp.close();
+                        } catch (IOException e) {
+                            e.printStackTrace();
+                        }
+
+                        abnormalAlarmService.saveBatch(abnormalAlarms);
                     }
 
-                    abnormalAlarmService.saveBatch(abnormalAlarms);
                 }
-
             }
+
+
         } else {
             log.info("未配置文件识别类型标识,无法进行下载解析");
         }
@@ -185,23 +191,17 @@ public class FtpFileParsing {
         log.info("-----------------执行FTP文件解析任务完成----------------------");
     }
 
-    public Ftp createParsingFtp() {
+    public Ftp createParsingFtp(FtpChannel ftpChannel) {
         Ftp ftp = null;
-        Properties prop = new Properties();
         try {
-            prop.load(new FileInputStream("ftpConfig.properties"));
-            String host = prop.getProperty("ftp.server.host");
-            String port = prop.getProperty("ftp.server.port");
-            String user = prop.getProperty("ftp.server.username");
-            String password = prop.getProperty("ftp.server.password");
 
             FtpConfig ftpConfig = new FtpConfig();
             try {
                 //创建ftp配置
-                ftpConfig.setHost(host);
-                ftpConfig.setPort(Integer.parseInt(port));
-                ftpConfig.setPassword(password);
-                ftpConfig.setUser(user);
+                ftpConfig.setHost(ftpChannel.getIp());
+                ftpConfig.setPort(ftpChannel.getPort());
+                ftpConfig.setPassword(ftpChannel.getPassword());
+                ftpConfig.setUser(ftpChannel.getUsername());
                 //字符集使用UTF-8
                 ftpConfig.setCharset(Charset.forName("UTF-8"));
                 ftpConfig.setConnectionTimeout(5 * 1000L);

+ 0 - 2
cpp-admin/src/main/java/com/cpp/web/service/datafactory/ParsingInterface.java

@@ -30,8 +30,6 @@ public interface ParsingInterface {
 
     boolean activationParsingConf();
 
-    List selectByStationCode(String stationCode);
-
     default Date parsingTime(String sign, List<String> fileContent) {
         Date time = null;
         try {

+ 16 - 0
cpp-admin/src/main/java/com/cpp/web/service/datafactory/ParsingTypeService.java

@@ -0,0 +1,16 @@
+package com.cpp.web.service.datafactory;
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.cpp.web.domain.datafactory.ParsingType;
+
+/**
+ * 测风塔解析信息业务层接口
+ *
+ * @author tl
+ * @date 2022-05-11 09:51:21
+ */
+public interface ParsingTypeService extends IService<ParsingType> {
+
+
+}

+ 18 - 0
cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/FtpChannelServiceImpl.java

@@ -0,0 +1,18 @@
+package com.cpp.web.service.datafactory.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.cpp.web.domain.datafactory.FtpChannel;
+import com.cpp.web.mapper.datafactory.FtpChannelMapper;
+import com.cpp.web.service.datafactory.FtpChannelService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 解析ftp路径业务层实现类
+ *
+ * @author tl
+ * @date 2022-05-11 18:07:03
+ */
+@Service
+public class FtpChannelServiceImpl extends ServiceImpl<FtpChannelMapper, FtpChannel> implements FtpChannelService {
+
+}

+ 3 - 11
cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingCdqServiceImpl.java

@@ -25,7 +25,6 @@ import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
-import java.util.stream.Collectors;
 
 /**
  * 超短期解析业务层实现类
@@ -61,12 +60,10 @@ public class ParsingCdqServiceImpl extends ServiceImpl<ParsingCdqMapper, Parsing
         parsingResultDto.setFileType(FileTypeEnum.cdq.name());
 
         try {
-            List<ForecastPowerUltraShortTermStation> forecastPowerUltraShortTermStationList = new ArrayList();
 
-            List<ParsingCdq> parsingCdqList = selectByStationCode(stationCode);
 
-            if (!parsingCdqList.isEmpty()) {
-                ParsingCdq parsingCdq = parsingCdqList.get(0);
+            if (!this.parsingCdqs.isEmpty()) {
+                ParsingCdq parsingCdq = this.parsingCdqs.get(0);
                 List<String> fileContent = ParsingFileUtil.getFileContent(file);
                 if (parsingCdq.getDataType().equals(ParsingFieldUtil.MULTI)) {//多行操作
                     Date forecastTime = parsingForecastTime(parsingCdq.getForecastTime(), fileContent);
@@ -75,6 +72,7 @@ public class ParsingCdqServiceImpl extends ServiceImpl<ParsingCdqMapper, Parsing
                         if (parsingCdq.getFpValue() != null) {
                             List<BigDecimal> fpValues = parsingFpValue(parsingCdq.getFpValue(), fileContent);
                             if (fpValues.size() > 0) {
+                                List<ForecastPowerUltraShortTermStation> forecastPowerUltraShortTermStationList = new ArrayList();
                                 BigDecimal openCapacity = parsingValue(parsingCdq.getOpenCapacity(),fileContent);
                                 for (BigDecimal fpValue : fpValues) {
                                     ForecastPowerUltraShortTermStation forecastPowerUltraShortTermStation = new ForecastPowerUltraShortTermStation();
@@ -206,10 +204,4 @@ public class ParsingCdqServiceImpl extends ServiceImpl<ParsingCdqMapper, Parsing
         return ((int) (time.getTime() - baseTime.getTime() % 900000L)) + 1;
     }
 
-
-    public List<ParsingCdq> selectByStationCode(String stationCode) {
-        return this.parsingCdqs.stream().filter(p -> p.getStationCode().equals(stationCode)).collect(Collectors.toList());
-    }
-
-
 }

+ 2 - 7
cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingCftServiceImpl.java

@@ -66,10 +66,9 @@ public class ParsingCftServiceImpl extends ServiceImpl<ParsingCftMapper, Parsing
             parsingResultDto.setFileType(FileTypeEnum.cft.name());
 
             try {
-                List<ParsingCft> parsingCfts = selectByStationCode(stationCode);
-                if (!parsingCfts.isEmpty()) {
+                if (!this.parsingCfts.isEmpty()) {
                     List<WindTowerInfo> windTowerInfoList = this.windTowerInfos.stream().filter(w -> w.getStationCode().equals(stationCode)).collect(Collectors.toList());
-                    ParsingCft parsingCft = parsingCfts.get(0);
+                    ParsingCft parsingCft = this.parsingCfts.get(0);
                     if (windTowerInfoList.size() > 0) {
                         Long eqId = windTowerInfoList.get(0).getId();//通常每个场站只上报一个测风塔数据,所有配置多个的情况下只取第一个存储
                         List<String> fileContent = ParsingFileUtil.getFileContent(file);
@@ -143,8 +142,4 @@ public class ParsingCftServiceImpl extends ServiceImpl<ParsingCftMapper, Parsing
     }
 
 
-    @Override
-    public List<ParsingCft> selectByStationCode(String stationCode) {
-        return this.parsingCfts.stream().filter(p -> p.getStationCode().equals(stationCode)).collect(Collectors.toList());
-    }
 }

+ 3 - 11
cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingDqServiceImpl.java

@@ -25,7 +25,6 @@ import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
-import java.util.stream.Collectors;
 
 /**
  * 短期解析业务层实现类
@@ -67,12 +66,10 @@ public class ParsingDqServiceImpl extends ServiceImpl<ParsingDqMapper, ParsingDq
         parsingResultDto.setFileName(file.getName());
 
         try {
-            List<ForecastPowerShortTermStation> forecastPowerShortTermStationList = new ArrayList();
 
-            List<ParsingDq> parsingDqList = selectByStationCode(stationCode);
 
-            if (!parsingDqList.isEmpty()) {
-                ParsingDq parsingDqInfo = parsingDqList.get(0);
+            if (!this.parsingDqs.isEmpty()) {
+                ParsingDq parsingDqInfo = this.parsingDqs.get(0);
                 List<String> fileContent = ParsingFileUtil.getFileContent(file);
                 if (parsingDqInfo.getDataType().equals(ParsingFieldUtil.MULTI)) {//多行操作
                     Date forecastTime = parsingForecastTime(parsingDqInfo.getForecastTime(), fileContent);
@@ -81,6 +78,7 @@ public class ParsingDqServiceImpl extends ServiceImpl<ParsingDqMapper, ParsingDq
                         if (parsingDqInfo.getFpValue() != null) {
                             List<BigDecimal> fpValues = parsingFpValue(parsingDqInfo.getFpValue(), fileContent);
                             if (fpValues.size() > 0) {
+                                List<ForecastPowerShortTermStation> forecastPowerShortTermStationList = new ArrayList();
                                 BigDecimal capacity = parsingValue(parsingDqInfo.getCapacity(), fileContent);
                                 for (BigDecimal fpValue : fpValues) {
                                     ForecastPowerShortTermStation forecastPowerShortTermStation = new ForecastPowerShortTermStation();
@@ -225,12 +223,6 @@ public class ParsingDqServiceImpl extends ServiceImpl<ParsingDqMapper, ParsingDq
         }
     }
 
-
-    public List<ParsingDq> selectByStationCode(String stationCode) {
-        return this.parsingDqs.stream().filter(p -> p.getStationCode().equals(stationCode)).collect(Collectors.toList());
-    }
-
-
     /**
      * 计算D+x中的x
      *

+ 0 - 18
cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingFileUrlServiceImpl.java

@@ -1,18 +0,0 @@
-package com.cpp.web.service.datafactory.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.cpp.web.domain.datafactory.ParsingFileUrl;
-import com.cpp.web.mapper.datafactory.ParsingFileUrlMapper;
-import com.cpp.web.service.datafactory.ParsingFileUrlService;
-import org.springframework.stereotype.Service;
-
-/**
- * 解析ftp路径业务层实现类
- *
- * @author tl
- * @date 2022-05-11 18:07:03
- */
-@Service
-public class ParsingFileUrlServiceImpl extends ServiceImpl<ParsingFileUrlMapper, ParsingFileUrl> implements ParsingFileUrlService {
-
-}

+ 43 - 53
cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingFjServiceImpl.java

@@ -65,62 +65,57 @@ public class ParsingFjServiceImpl extends ServiceImpl<ParsingFjMapper, ParsingFj
         try {
 
 
-            List<ParsingFj> parsingFjInfos = selectByStationCode(stationCode);
-            if (parsingFjInfos.size() > 0) {
-
+            if (!this.parsingFjs.isEmpty()) {
                 List<String> fileContent = ParsingFileUtil.getFileContent(file);
-
-                for (ParsingFj parsingFjInfo : parsingFjInfos) {
-                    if (parsingFjInfo.getDataType().equals(ParsingFieldUtil.SINGLE)) {
-
-                        String fjName = parsingName(parsingFjInfo.getEquipmentName(), fileContent);
-
-                        List<WindTurbineInfo> filterWindTurbineInfos = windTurbineInfos.stream().filter(i -> i.getName().equals(fjName)).collect(Collectors.toList());
-
-                        if (filterWindTurbineInfos.size() > 0) {
-                            Long eqId = filterWindTurbineInfos.get(0).getId();
-
-                            Date time = parsingTime(parsingFjInfo.getTime(), fileContent);
-                            if (time != null) {
-                                WindTurbineStatusData windTurbineStatusData = new WindTurbineStatusData();
-                                windTurbineStatusData.setTime(time);
-                                windTurbineStatusData.setEquipmentId(eqId);
-                                windTurbineStatusData.setActivePower(parsingValue(parsingFjInfo.getActivePower(), fileContent));
-                                windTurbineStatusData.setCumulativeGeneratedEnergy(parsingValue(parsingFjInfo.getCumulativeGeneratedEnergy(), fileContent));
-                                windTurbineStatusData.setDayGridConnectedHours(parsingValue(parsingFjInfo.getDayGridConnectedHours(), fileContent));
-                                windTurbineStatusData.setWindWheelRatedSpeed(parsingValue(parsingFjInfo.getWindWheelRatedSpeed(), fileContent));
-                                windTurbineStatusData.setDayElectricQuantity(parsingValue(parsingFjInfo.getDayElectricQuantity(), fileContent));
-                                windTurbineStatusData.setElectricalCurrent(parsingValue(parsingFjInfo.getElectricalCurrent(), fileContent));
-                                windTurbineStatusData.setPitchAngle(parsingValue(parsingFjInfo.getPitchAngle(), fileContent));
-                                windTurbineStatusData.setPowerFactor(parsingValue(parsingFjInfo.getPowerFactor(), fileContent));
-                                windTurbineStatusData.setReactivePower(parsingValue(parsingFjInfo.getReactivePower(), fileContent));
-                                windTurbineStatusData.setVoltage(parsingValue(parsingFjInfo.getVoltage(), fileContent));
-                                windTurbineStatusData.setWd(parsingValue(parsingFjInfo.getWd(), fileContent));
-                                windTurbineStatusData.setWs(parsingValue(parsingFjInfo.getWs(), fileContent));
-                                windTurbineStatusData.setT(parsingValue(parsingFjInfo.getT(), fileContent));
-
-                                windTurbineStatusData.setStatus(parsingStatus(parsingFjInfo.getStatus(), fileContent));
-                                windTurbineStatusData.setStationCode(parsingFjInfo.getStationCode());
-
-                                windTurbineStatusDataService.save(windTurbineStatusData);
-                                log.info("解析FJ文件:" + file.getName() + " 成功! O(∩_∩)O");
-                                parsingResultDto.setStatus("success");
-                            } else {
-                                parsingResultDto.setMessage("解析风机文件时间错误");
-                                log.error("解析FJ文件时间错误");
-                            }
+                ParsingFj parsingFjInfo = this.parsingFjs.get(0);
+                if (parsingFjInfo.getDataType().equals(ParsingFieldUtil.SINGLE)) {
+                    String fjName = parsingName(parsingFjInfo.getEquipmentName(), fileContent);
+                    List<WindTurbineInfo> filterWindTurbineInfos = windTurbineInfos.stream().filter(i -> i.getName().equals(fjName)).collect(Collectors.toList());
+
+                    if (filterWindTurbineInfos.size() > 0) {
+                        Long eqId = filterWindTurbineInfos.get(0).getId();
+
+                        Date time = parsingTime(parsingFjInfo.getTime(), fileContent);
+                        if (time != null) {
+                            WindTurbineStatusData windTurbineStatusData = new WindTurbineStatusData();
+                            windTurbineStatusData.setTime(time);
+                            windTurbineStatusData.setEquipmentId(eqId);
+                            windTurbineStatusData.setActivePower(parsingValue(parsingFjInfo.getActivePower(), fileContent));
+                            windTurbineStatusData.setCumulativeGeneratedEnergy(parsingValue(parsingFjInfo.getCumulativeGeneratedEnergy(), fileContent));
+                            windTurbineStatusData.setDayGridConnectedHours(parsingValue(parsingFjInfo.getDayGridConnectedHours(), fileContent));
+                            windTurbineStatusData.setWindWheelRatedSpeed(parsingValue(parsingFjInfo.getWindWheelRatedSpeed(), fileContent));
+                            windTurbineStatusData.setDayElectricQuantity(parsingValue(parsingFjInfo.getDayElectricQuantity(), fileContent));
+                            windTurbineStatusData.setElectricalCurrent(parsingValue(parsingFjInfo.getElectricalCurrent(), fileContent));
+                            windTurbineStatusData.setPitchAngle(parsingValue(parsingFjInfo.getPitchAngle(), fileContent));
+                            windTurbineStatusData.setPowerFactor(parsingValue(parsingFjInfo.getPowerFactor(), fileContent));
+                            windTurbineStatusData.setReactivePower(parsingValue(parsingFjInfo.getReactivePower(), fileContent));
+                            windTurbineStatusData.setVoltage(parsingValue(parsingFjInfo.getVoltage(), fileContent));
+                            windTurbineStatusData.setWd(parsingValue(parsingFjInfo.getWd(), fileContent));
+                            windTurbineStatusData.setWs(parsingValue(parsingFjInfo.getWs(), fileContent));
+                            windTurbineStatusData.setT(parsingValue(parsingFjInfo.getT(), fileContent));
+
+                            windTurbineStatusData.setStatus(parsingStatus(parsingFjInfo.getStatus(), fileContent));
+                            windTurbineStatusData.setStationCode(parsingFjInfo.getStationCode());
+
+                            windTurbineStatusDataService.save(windTurbineStatusData);
+                            log.info("解析FJ文件:" + file.getName() + " 成功! O(∩_∩)O");
+                            parsingResultDto.setStatus("success");
                         } else {
-                            parsingResultDto.setMessage("风机在本地无配置无法解析");
-                            log.error("fj {} 在本地无配置无法解析", fjName);
+                            parsingResultDto.setMessage("解析风机文件时间错误");
+                            log.error("解析FJ文件时间错误");
                         }
                     } else {
-                        parsingResultDto.setMessage("风机暂无多行解析方式");
-                        log.error("fj暂无多行解析方式");
+                        parsingResultDto.setMessage("风机在本地无配置无法解析");
+                        log.error("fj {} 在本地无配置无法解析", fjName);
                     }
-
+                } else {
+                    parsingResultDto.setMessage("风机暂无多行解析方式");
+                    log.error("fj暂无多行解析方式");
                 }
+
             }
 
+
         } catch (Exception e) {
             parsingResultDto.setMessage("解析风机数据错误!");
             log.error("解析风机数据错误", e);
@@ -136,9 +131,4 @@ public class ParsingFjServiceImpl extends ServiceImpl<ParsingFjMapper, ParsingFj
         this.windTurbineInfos = windTurbineInfoService.list();
         return true;
     }
-
-    @Override
-    public List selectByStationCode(String stationCode) {
-        return parsingFjs.stream().filter(p -> p.getStationCode().equals(stationCode)).collect(Collectors.toList());
-    }
 }

+ 3 - 10
cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingNbqServiceImpl.java

@@ -68,16 +68,15 @@ public class ParsingNbqServiceImpl extends ServiceImpl<ParsingNbqMapper, Parsing
         try {
 
             //查询符合该场站的nbq配置信息
-            List<ParsingNbq> parsingNbqInfos = selectByStationCode(stationCode);
-            if (parsingNbqInfos.size() > 0) {
+            if (!this.parsingNbqs.isEmpty()) {
 
+                ParsingNbq parsingNbqInfo = this.parsingNbqs.get(0);
                 //解析文件内容以行为单位的 List<String>
                 List<String> fileContent = ParsingFileUtil.getFileContent(file);
 
                 //查询对应该场站路径下的逆变器信息
                 List<InverterInfo> inverterInfoList = inverterInfos.stream().filter(i->i.getStationCode().equals(stationCode)).collect(Collectors.toList());
                 //因为有可能该场站有多种解析配置,例如多个逆变器数据情况,需要循环解析信息
-                for (ParsingNbq parsingNbqInfo : parsingNbqInfos) {
                         //判断数据类型是单行还是多行
                         if (parsingNbqInfo.getDataType().equals(ParsingFieldUtil.SINGLE)) {
                             /**
@@ -122,7 +121,7 @@ public class ParsingNbqServiceImpl extends ServiceImpl<ParsingNbqMapper, Parsing
                         }
                     
                 }
-            }
+
         } catch (Exception e) {
             parsingResultDto.setMessage("解析逆变器数据失败!");
             log.error("解析逆变器数据失败! /(ㄒoㄒ)/~~", e);
@@ -138,10 +137,4 @@ public class ParsingNbqServiceImpl extends ServiceImpl<ParsingNbqMapper, Parsing
         this.inverterInfos = inverterInfoService.list();
         return true;
     }
-
-    @Override
-    public List selectByStationCode(String stationCode) {
-        return parsingNbqs.stream().filter(p->p.getStationCode().equals(stationCode)).collect(Collectors.toList());
-    }
-
 }

+ 81 - 93
cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingNwpServiceImpl.java

@@ -8,7 +8,6 @@ import com.cpp.web.domain.datafactory.dto.ParsingResultDto;
 import com.cpp.web.domain.datafactory.enums.FileTypeEnum;
 import com.cpp.web.domain.station.NwpStation;
 import com.cpp.web.mapper.datafactory.ParsingNwpMapper;
-import com.cpp.web.service.cloud.NwpCloudService;
 import com.cpp.web.service.datafactory.ParsingInterface;
 import com.cpp.web.service.datafactory.ParsingNwpService;
 import com.cpp.web.service.station.NwpStationService;
@@ -25,7 +24,6 @@ import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
-import java.util.stream.Collectors;
 
 /**
  * 测风塔解析业务层实现类
@@ -41,8 +39,6 @@ public class ParsingNwpServiceImpl extends ServiceImpl<ParsingNwpMapper, Parsing
 
     private final NwpStationService nwpStationService;
 
-    private final NwpCloudService nwpCloudService;
-
     private List<ParsingNwp> parsingNwps = new ArrayList<>();
 
     @Override
@@ -64,90 +60,89 @@ public class ParsingNwpServiceImpl extends ServiceImpl<ParsingNwpMapper, Parsing
 
         try {
 
-            List<ParsingNwp> parsingNwpInfos = selectByStationCode(stationCode);
-            if (!parsingNwpInfos.isEmpty()) {
-                for (ParsingNwp parsingNwpInfo : parsingNwpInfos) {
-                        List<String> fileContent = ParsingFileUtil.getFileContent(file);
-                        if (parsingNwpInfo.getDataType().equals(ParsingFieldUtil.MULTI)) {
-                            Date forecastTime = parsingTime(parsingNwpInfo.getPreTime(), fileContent);
-                            Date time = forecastTime;
-                            if (time != null) {
-                                List<BigDecimal> ws10s = parsingNwpValue(parsingNwpInfo.getWs10(), fileContent);
-                                List<BigDecimal> wd10s = parsingNwpValue(parsingNwpInfo.getWd10(), fileContent);
-                                List<BigDecimal> ws30s = parsingNwpValue(parsingNwpInfo.getWs30(), fileContent);
-                                List<BigDecimal> wd30s = parsingNwpValue(parsingNwpInfo.getWd30(), fileContent);
-                                List<BigDecimal> ws50s = parsingNwpValue(parsingNwpInfo.getWs50(), fileContent);
-                                List<BigDecimal> wd50s = parsingNwpValue(parsingNwpInfo.getWd50(), fileContent);
-                                List<BigDecimal> ws70s = parsingNwpValue(parsingNwpInfo.getWs70(), fileContent);
-                                List<BigDecimal> wd70s = parsingNwpValue(parsingNwpInfo.getWd70(), fileContent);
-                                List<BigDecimal> ws80s = parsingNwpValue(parsingNwpInfo.getWs80(), fileContent);
-                                List<BigDecimal> wd80s = parsingNwpValue(parsingNwpInfo.getWd80(), fileContent);
-                                List<BigDecimal> ws90s = parsingNwpValue(parsingNwpInfo.getWs90(), fileContent);
-                                List<BigDecimal> wd90s = parsingNwpValue(parsingNwpInfo.getWd90(), fileContent);
-                                List<BigDecimal> ws100s = parsingNwpValue(parsingNwpInfo.getWs100(), fileContent);
-                                List<BigDecimal> wd100s = parsingNwpValue(parsingNwpInfo.getWd100(), fileContent);
-                                List<BigDecimal> ws170s = parsingNwpValue(parsingNwpInfo.getWs170(), fileContent);
-                                List<BigDecimal> wd170s = parsingNwpValue(parsingNwpInfo.getWd170(), fileContent);
-                                List<BigDecimal> directRadiations = parsingNwpValue(parsingNwpInfo.getDirectRadiation(), fileContent);
-                                List<BigDecimal> lwrs = parsingNwpValue(parsingNwpInfo.getLwr(), fileContent);
-                                List<BigDecimal> diffuseRadiations = parsingNwpValue(parsingNwpInfo.getDiffuseRadiation(), fileContent);
-                                List<BigDecimal> rhs = parsingNwpValue(parsingNwpInfo.getRh(), fileContent);
-                                List<BigDecimal> pressures = parsingNwpValue(parsingNwpInfo.getPressure(), fileContent);
-                                List<BigDecimal> senfs = parsingNwpValue(parsingNwpInfo.getSenf(), fileContent);
-                                List<BigDecimal> swrs = parsingNwpValue(parsingNwpInfo.getSwr(), fileContent);
-                                List<BigDecimal> ts = parsingNwpValue(parsingNwpInfo.getT(), fileContent);
-
-                                List<NwpStation> nwpStationList = new ArrayList<>();
-                                //以十米风速为基准
-                                for (int i = 0; i < ws10s.size(); i++) {
-                                    NwpStation nwpStation = new NwpStation();
-                                    nwpStation.setTime(time);
-                                    nwpStation.setDirectRadiation(valueSet(directRadiations, i));
-                                    nwpStation.setDiffuseRadiation(valueSet(diffuseRadiations, i));
-                                    nwpStation.setForecastHowLongAgo(calcHowLongAgo(forecastTime,time));
-                                    nwpStation.setLwr(valueSet(lwrs, i));
-                                    nwpStation.setPressure(valueSet(pressures, i));
-                                    nwpStation.setRh(valueSet(rhs, i));
-                                    nwpStation.setSenf(valueSet(senfs, i));
-                                    nwpStation.setSwr(valueSet(swrs, i));
-                                    nwpStation.setT(valueSet(ts, i));
-                                    nwpStation.setWs10(valueSet(ws10s, i));
-                                    nwpStation.setWd10(valueSet(wd10s, i));
-                                    nwpStation.setWs30(valueSet(ws30s, i));
-                                    nwpStation.setWd30(valueSet(wd30s, i));
-                                    nwpStation.setWs50(valueSet(ws50s, i));
-                                    nwpStation.setWd50(valueSet(wd50s, i));
-                                    nwpStation.setWs70(valueSet(ws70s, i));
-                                    nwpStation.setWd70(valueSet(wd70s, i));
-                                    nwpStation.setWs80(valueSet(ws80s, i));
-                                    nwpStation.setWd80(valueSet(wd80s, i));
-                                    nwpStation.setWs90(valueSet(ws90s, i));
-                                    nwpStation.setWd90(valueSet(wd90s, i));
-                                    nwpStation.setWs100(valueSet(ws100s, i));
-                                    nwpStation.setWd100(valueSet(wd100s, i));
-                                    nwpStation.setWs170(valueSet(ws170s, i));
-                                    nwpStation.setWd170(valueSet(wd170s, i));
-                                    nwpStation.setStationCode(stationCode);
-
-                                    nwpStationList.add(nwpStation);
-
-                                    time = new Date(time.getTime() + 900000L);
-                                }
-
-                                nwpStationService.saveBatch(nwpStationList);
-
-                                parsingResultDto.setStatus("success");
-                                log.info("解析Nwp文件:{} 成功! O(∩_∩)O", file.getName());
-                            } else {
-                                parsingResultDto.setMessage("解析Nwp文件时间错误");
-                                log.error("解析Nwp文件时间错误");
-                            }
-                        } else {
-                            parsingResultDto.setMessage("Nwp暂无单行解析方式");
-                            log.error("nwp暂无单行解析方式");
+            if (!this.parsingNwps.isEmpty()) {
+                ParsingNwp parsingNwpInfo = this.parsingNwps.get(0);
+                List<String> fileContent = ParsingFileUtil.getFileContent(file);
+                if (parsingNwpInfo.getDataType().equals(ParsingFieldUtil.MULTI)) {
+                    Date forecastTime = parsingTime(parsingNwpInfo.getPreTime(), fileContent);
+                    Date time = forecastTime;
+                    if (time != null) {
+                        List<BigDecimal> ws10s = parsingNwpValue(parsingNwpInfo.getWs10(), fileContent);
+                        List<BigDecimal> wd10s = parsingNwpValue(parsingNwpInfo.getWd10(), fileContent);
+                        List<BigDecimal> ws30s = parsingNwpValue(parsingNwpInfo.getWs30(), fileContent);
+                        List<BigDecimal> wd30s = parsingNwpValue(parsingNwpInfo.getWd30(), fileContent);
+                        List<BigDecimal> ws50s = parsingNwpValue(parsingNwpInfo.getWs50(), fileContent);
+                        List<BigDecimal> wd50s = parsingNwpValue(parsingNwpInfo.getWd50(), fileContent);
+                        List<BigDecimal> ws70s = parsingNwpValue(parsingNwpInfo.getWs70(), fileContent);
+                        List<BigDecimal> wd70s = parsingNwpValue(parsingNwpInfo.getWd70(), fileContent);
+                        List<BigDecimal> ws80s = parsingNwpValue(parsingNwpInfo.getWs80(), fileContent);
+                        List<BigDecimal> wd80s = parsingNwpValue(parsingNwpInfo.getWd80(), fileContent);
+                        List<BigDecimal> ws90s = parsingNwpValue(parsingNwpInfo.getWs90(), fileContent);
+                        List<BigDecimal> wd90s = parsingNwpValue(parsingNwpInfo.getWd90(), fileContent);
+                        List<BigDecimal> ws100s = parsingNwpValue(parsingNwpInfo.getWs100(), fileContent);
+                        List<BigDecimal> wd100s = parsingNwpValue(parsingNwpInfo.getWd100(), fileContent);
+                        List<BigDecimal> ws170s = parsingNwpValue(parsingNwpInfo.getWs170(), fileContent);
+                        List<BigDecimal> wd170s = parsingNwpValue(parsingNwpInfo.getWd170(), fileContent);
+                        List<BigDecimal> directRadiations = parsingNwpValue(parsingNwpInfo.getDirectRadiation(), fileContent);
+                        List<BigDecimal> lwrs = parsingNwpValue(parsingNwpInfo.getLwr(), fileContent);
+                        List<BigDecimal> diffuseRadiations = parsingNwpValue(parsingNwpInfo.getDiffuseRadiation(), fileContent);
+                        List<BigDecimal> rhs = parsingNwpValue(parsingNwpInfo.getRh(), fileContent);
+                        List<BigDecimal> pressures = parsingNwpValue(parsingNwpInfo.getPressure(), fileContent);
+                        List<BigDecimal> senfs = parsingNwpValue(parsingNwpInfo.getSenf(), fileContent);
+                        List<BigDecimal> swrs = parsingNwpValue(parsingNwpInfo.getSwr(), fileContent);
+                        List<BigDecimal> ts = parsingNwpValue(parsingNwpInfo.getT(), fileContent);
+
+                        List<NwpStation> nwpStationList = new ArrayList<>();
+                        //以十米风速为基准
+                        for (int i = 0; i < ws10s.size(); i++) {
+                            NwpStation nwpStation = new NwpStation();
+                            nwpStation.setTime(time);
+                            nwpStation.setDirectRadiation(valueSet(directRadiations, i));
+                            nwpStation.setDiffuseRadiation(valueSet(diffuseRadiations, i));
+                            nwpStation.setForecastHowLongAgo(calcHowLongAgo(forecastTime, time));
+                            nwpStation.setLwr(valueSet(lwrs, i));
+                            nwpStation.setPressure(valueSet(pressures, i));
+                            nwpStation.setRh(valueSet(rhs, i));
+                            nwpStation.setSenf(valueSet(senfs, i));
+                            nwpStation.setSwr(valueSet(swrs, i));
+                            nwpStation.setT(valueSet(ts, i));
+                            nwpStation.setWs10(valueSet(ws10s, i));
+                            nwpStation.setWd10(valueSet(wd10s, i));
+                            nwpStation.setWs30(valueSet(ws30s, i));
+                            nwpStation.setWd30(valueSet(wd30s, i));
+                            nwpStation.setWs50(valueSet(ws50s, i));
+                            nwpStation.setWd50(valueSet(wd50s, i));
+                            nwpStation.setWs70(valueSet(ws70s, i));
+                            nwpStation.setWd70(valueSet(wd70s, i));
+                            nwpStation.setWs80(valueSet(ws80s, i));
+                            nwpStation.setWd80(valueSet(wd80s, i));
+                            nwpStation.setWs90(valueSet(ws90s, i));
+                            nwpStation.setWd90(valueSet(wd90s, i));
+                            nwpStation.setWs100(valueSet(ws100s, i));
+                            nwpStation.setWd100(valueSet(wd100s, i));
+                            nwpStation.setWs170(valueSet(ws170s, i));
+                            nwpStation.setWd170(valueSet(wd170s, i));
+                            nwpStation.setStationCode(stationCode);
+
+                            nwpStationList.add(nwpStation);
+
+                            time = new Date(time.getTime() + 900000L);
                         }
+
+                        nwpStationService.saveBatch(nwpStationList);
+
+                        parsingResultDto.setStatus("success");
+                        log.info("解析Nwp文件:{} 成功! O(∩_∩)O", file.getName());
+                    } else {
+                        parsingResultDto.setMessage("解析Nwp文件时间错误");
+                        log.error("解析Nwp文件时间错误");
                     }
+                } else {
+                    parsingResultDto.setMessage("Nwp暂无单行解析方式");
+                    log.error("nwp暂无单行解析方式");
                 }
+            }
+
 
         } catch (Exception e) {
             parsingResultDto.setMessage("解析Nwp数据失败");
@@ -165,13 +160,6 @@ public class ParsingNwpServiceImpl extends ServiceImpl<ParsingNwpMapper, Parsing
         return true;
     }
 
-    @Override
-    public List selectByStationCode(String stationCode) {
-        return this.parsingNwps.stream().filter(p->p.getStationCode().equals(stationCode)).collect(Collectors.toList());
-    }
-
-
-
     protected List<BigDecimal> parsingNwpValue(String sign, List<String> fileContent) {
         List<BigDecimal> fpValues = new ArrayList<>();
 
@@ -183,7 +171,7 @@ public class ParsingNwpServiceImpl extends ServiceImpl<ParsingNwpMapper, Parsing
                     int startLine = Integer.parseInt(lineNumber[0]) - 1;
                     int endLine = Integer.parseInt(lineNumber[1]) - 1;
                     int size = Integer.parseInt(lineNumber[2]);
-                    int no = Integer.parseInt(lineNumber[3]) - 1 ;
+                    int no = Integer.parseInt(lineNumber[3]) - 1;
 
                     for (int i = startLine + no; i <= endLine; i += size) {
                         String[] strings = ParsingUtil.splitLineWithSpace(fileContent.get(i));

+ 42 - 50
cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingQxzServiceImpl.java

@@ -1,6 +1,5 @@
 package com.cpp.web.service.datafactory.impl;
 
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.cpp.web.domain.datafactory.BaseParsing;
 import com.cpp.web.domain.datafactory.ParsingQxz;
@@ -63,56 +62,54 @@ public class ParsingQxzServiceImpl extends ServiceImpl<ParsingQxzMapper, Parsing
         parsingResultDto.setFileName(file.getName());
         parsingResultDto.setFileType(FileTypeEnum.qxz.name());
         try {
-
-            List<ParsingQxz> parsingQxzInfos = selectByStationCode(stationCode);
-            if (parsingQxzInfos.size() > 0) {
-                List<WeatherStationInfo> weatherStationInfoList = weatherStationInfos.stream().filter(w->w.getStationCode().equals(stationCode)).collect(Collectors.toList());
+            if (!this.parsingQxzs.isEmpty()) {
+                ParsingQxz parsingQxzInfo = this.parsingQxzs.get(0);
+                List<WeatherStationInfo> weatherStationInfoList = weatherStationInfos.stream().filter(w -> w.getStationCode().equals(stationCode)).collect(Collectors.toList());
                 if (weatherStationInfoList.size() > 0) {
                     Long eqId = weatherStationInfoList.get(0).getId();
                     List<String> fileContent = ParsingFileUtil.getFileContent(file);
-                    for (ParsingQxz parsingQxzInfo : parsingQxzInfos) {
-                        //判断文件名是否符合配置
-                            if (parsingQxzInfo.getDataType().equals(ParsingFieldUtil.SINGLE)) {
-                                Date time = parsingTime(parsingQxzInfo.getTime(), fileContent);
-                                if (time != null) {
-                                    WeatherStationStatusData w = new WeatherStationStatusData();
-                                    w.setTime(time);
-                                    w.setAirT(parsingValue(parsingQxzInfo.getAirT(), fileContent));
-                                    w.setCellT(parsingValue(parsingQxzInfo.getCellT(), fileContent));
-                                    w.setDiffuseR(parsingValue(parsingQxzInfo.getDiffuseR(), fileContent));
-                                    w.setDiffuseRDA(parsingValue(parsingQxzInfo.getDiffuseRDA(), fileContent));
-                                    w.setDirectR(parsingValue(parsingQxzInfo.getDirectR(), fileContent));
-                                    w.setDirectRDA(parsingValue(parsingQxzInfo.getDirectRDA(), fileContent));
-                                    w.setGlobalR(parsingValue(parsingQxzInfo.getGlobalR(), fileContent));
-                                    w.setGlobalRDA(parsingValue(parsingQxzInfo.getGlobalRDA(), fileContent));
-                                    w.setHourDA(parsingValue(parsingQxzInfo.getHourDA(), fileContent));
-                                    w.setObliqueR(parsingValue(parsingQxzInfo.getObliqueR(), fileContent));
-                                    w.setObliqueRDA(parsingValue(parsingQxzInfo.getObliqueRDA(), fileContent));
-                                    w.setP(parsingValue(parsingQxzInfo.getP(), fileContent));
-                                    w.setRh(parsingValue(parsingQxzInfo.getRh(), fileContent));
-                                    w.setWd(parsingValue(parsingQxzInfo.getWd(), fileContent));
-                                    w.setWs(parsingValue(parsingQxzInfo.getWs(), fileContent));
-                                    w.setStatus(parsingStatus(parsingQxzInfo.getStatus(), fileContent));
-                                    w.setStationCode(parsingQxzInfo.getStationCode());
-                                    w.setEquipmentId(eqId);
-                                    weatherStationStatusDataService.save(w);
-                                    parsingResultDto.setStatus("success");
-                                    log.info("解析QXZ文件:{} 成功! O(∩_∩)O", file.getName());
-                                } else {
-                                    parsingResultDto.setMessage("解析气象站文件时间错误");
-                                    log.error("解析QXZ文件时间错误");
-                                }
-                            } else {
-                                parsingResultDto.setMessage("气象站暂无多行解析方式");
-                                log.error("qxz暂无多行解析方式");
-                            }
-
+                    //判断文件名是否符合配置
+                    if (parsingQxzInfo.getDataType().equals(ParsingFieldUtil.SINGLE)) {
+                        Date time = parsingTime(parsingQxzInfo.getTime(), fileContent);
+                        if (time != null) {
+                            WeatherStationStatusData w = new WeatherStationStatusData();
+                            w.setTime(time);
+                            w.setAirT(parsingValue(parsingQxzInfo.getAirT(), fileContent));
+                            w.setCellT(parsingValue(parsingQxzInfo.getCellT(), fileContent));
+                            w.setDiffuseR(parsingValue(parsingQxzInfo.getDiffuseR(), fileContent));
+                            w.setDiffuseRDA(parsingValue(parsingQxzInfo.getDiffuseRDA(), fileContent));
+                            w.setDirectR(parsingValue(parsingQxzInfo.getDirectR(), fileContent));
+                            w.setDirectRDA(parsingValue(parsingQxzInfo.getDirectRDA(), fileContent));
+                            w.setGlobalR(parsingValue(parsingQxzInfo.getGlobalR(), fileContent));
+                            w.setGlobalRDA(parsingValue(parsingQxzInfo.getGlobalRDA(), fileContent));
+                            w.setHourDA(parsingValue(parsingQxzInfo.getHourDA(), fileContent));
+                            w.setObliqueR(parsingValue(parsingQxzInfo.getObliqueR(), fileContent));
+                            w.setObliqueRDA(parsingValue(parsingQxzInfo.getObliqueRDA(), fileContent));
+                            w.setP(parsingValue(parsingQxzInfo.getP(), fileContent));
+                            w.setRh(parsingValue(parsingQxzInfo.getRh(), fileContent));
+                            w.setWd(parsingValue(parsingQxzInfo.getWd(), fileContent));
+                            w.setWs(parsingValue(parsingQxzInfo.getWs(), fileContent));
+                            w.setStatus(parsingStatus(parsingQxzInfo.getStatus(), fileContent));
+                            w.setStationCode(parsingQxzInfo.getStationCode());
+                            w.setEquipmentId(eqId);
+                            weatherStationStatusDataService.save(w);
+                            parsingResultDto.setStatus("success");
+                            log.info("解析QXZ文件:{} 成功! O(∩_∩)O", file.getName());
+                        } else {
+                            parsingResultDto.setMessage("解析气象站文件时间错误");
+                            log.error("解析QXZ文件时间错误");
+                        }
+                    } else {
+                        parsingResultDto.setMessage("气象站暂无多行解析方式");
+                        log.error("qxz暂无多行解析方式");
                     }
-                } else {
-                    parsingResultDto.setMessage("气象站未配置作为解析使用设备");
-                    log.error("qxz未配置作为解析使用设备");
+
                 }
+            } else {
+                parsingResultDto.setMessage("气象站未配置作为解析使用设备");
+                log.error("qxz未配置作为解析使用设备");
             }
+
         } catch (Exception e) {
             parsingResultDto.setMessage("解析气象站数据失败!");
             log.error("解析气象站数据失败! /(ㄒoㄒ)/~~", e);
@@ -128,9 +125,4 @@ public class ParsingQxzServiceImpl extends ServiceImpl<ParsingQxzMapper, Parsing
         return true;
     }
 
-    @Override
-    public List selectByStationCode(String stationCode) {
-        return null;
-    }
-
 }

+ 6 - 15
cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingRcdqServiceImpl.java

@@ -1,13 +1,11 @@
 package com.cpp.web.service.datafactory.impl;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.cpp.web.domain.datafactory.BaseParsing;
 import com.cpp.web.domain.datafactory.ParsingCdq;
 import com.cpp.web.domain.datafactory.dto.ParsingConfParam;
 import com.cpp.web.domain.datafactory.dto.ParsingResultDto;
 import com.cpp.web.domain.datafactory.enums.FileTypeEnum;
 import com.cpp.web.domain.station.ForecastPowerUltraShortTermStation;
-import com.cpp.web.mapper.datafactory.ParsingCdqMapper;
 import com.cpp.web.service.datafactory.ParsingCdqService;
 import com.cpp.web.service.datafactory.ParsingInterface;
 import com.cpp.web.service.station.ForecastPowerUltraShortTermStationService;
@@ -25,7 +23,6 @@ import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
-import java.util.stream.Collectors;
 
 /**
  * 超短期解析业务层实现类
@@ -37,10 +34,12 @@ import java.util.stream.Collectors;
 @AllArgsConstructor
 @Slf4j
 @Transactional
-public class ParsingRcdqServiceImpl extends ServiceImpl<ParsingCdqMapper, ParsingCdq> implements ParsingCdqService, ParsingInterface {
+public class ParsingRcdqServiceImpl implements ParsingInterface {
 
     private final ForecastPowerUltraShortTermStationService forecastPowerUltraShortTermStationService;
 
+    private final ParsingCdqService parsingCdqService;
+
     private List<ParsingCdq> parsingCdqs = new ArrayList<>();
 
     @Override
@@ -63,10 +62,8 @@ public class ParsingRcdqServiceImpl extends ServiceImpl<ParsingCdqMapper, Parsin
         try {
             List<ForecastPowerUltraShortTermStation> forecastPowerUltraShortTermStationList = new ArrayList();
 
-            List<ParsingCdq> parsingCdqList = selectByStationCode(stationCode);
-
-            if (!parsingCdqList.isEmpty()) {
-                ParsingCdq parsingCdq = parsingCdqList.get(0);
+            if (!this.parsingCdqs.isEmpty()) {
+                ParsingCdq parsingCdq = this.parsingCdqs.get(0);
 
                 List<String> fileContent = ParsingFileUtil.getFileContent(file);
                 if (parsingCdq.getDataType().equals(ParsingFieldUtil.MULTI)) {//多行操作
@@ -119,7 +116,7 @@ public class ParsingRcdqServiceImpl extends ServiceImpl<ParsingCdqMapper, Parsin
 
     @Override
     public boolean activationParsingConf() {
-        this.parsingCdqs = list();
+        this.parsingCdqs = parsingCdqService.list();
         return true;
     }
 
@@ -208,10 +205,4 @@ public class ParsingRcdqServiceImpl extends ServiceImpl<ParsingCdqMapper, Parsin
         return ((int) (time.getTime() - baseTime.getTime() % 900000L)) + 1;
     }
 
-
-    public List<ParsingCdq> selectByStationCode(String stationCode) {
-        return this.parsingCdqs.stream().filter(p -> p.getStationCode().equals(stationCode)).collect(Collectors.toList());
-    }
-
-
 }

+ 6 - 14
cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingRdqServiceImpl.java

@@ -1,13 +1,11 @@
 package com.cpp.web.service.datafactory.impl;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.cpp.web.domain.datafactory.BaseParsing;
 import com.cpp.web.domain.datafactory.ParsingDq;
 import com.cpp.web.domain.datafactory.dto.ParsingConfParam;
 import com.cpp.web.domain.datafactory.dto.ParsingResultDto;
 import com.cpp.web.domain.datafactory.enums.FileTypeEnum;
 import com.cpp.web.domain.station.ForecastPowerShortTermRegulation;
-import com.cpp.web.mapper.datafactory.ParsingDqMapper;
 import com.cpp.web.service.datafactory.ParsingDqService;
 import com.cpp.web.service.datafactory.ParsingInterface;
 import com.cpp.web.service.station.ForecastPowerShortTermRegulationService;
@@ -25,7 +23,6 @@ import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
-import java.util.stream.Collectors;
 
 /**
  * 调控后短期解析业务层实现类 开头r代表调控后
@@ -37,10 +34,12 @@ import java.util.stream.Collectors;
 @Slf4j
 @AllArgsConstructor
 @Transactional
-public class ParsingRdqServiceImpl extends ServiceImpl<ParsingDqMapper, ParsingDq> implements ParsingDqService, ParsingInterface {
+public class ParsingRdqServiceImpl implements ParsingInterface {
 
     private final ForecastPowerShortTermRegulationService forecastPowerShortTermRegulationService;
 
+    private final ParsingDqService parsingDqService;
+
     private List<ParsingDq> parsingDqs = new ArrayList<>();
 
     @Override
@@ -55,7 +54,7 @@ public class ParsingRdqServiceImpl extends ServiceImpl<ParsingDqMapper, ParsingD
 
     @Override
     public boolean activationParsingConf() {
-        this.parsingDqs = list();
+        this.parsingDqs = parsingDqService.list();
         return true;
     }
 
@@ -68,10 +67,8 @@ public class ParsingRdqServiceImpl extends ServiceImpl<ParsingDqMapper, ParsingD
         try {
             List<ForecastPowerShortTermRegulation> forecastPowerShortTermRegulationList = new ArrayList();
 
-            List<ParsingDq> parsingDqList = selectByStationCode(stationCode);
-
-            if (!parsingDqList.isEmpty()) {
-                ParsingDq parsingDqInfo = parsingDqList.get(0);
+            if (!this.parsingDqs.isEmpty()) {
+                ParsingDq parsingDqInfo = this.parsingDqs.get(0);
                 List<String> fileContent = ParsingFileUtil.getFileContent(file);
                 if (parsingDqInfo.getDataType().equals(ParsingFieldUtil.MULTI)) {//多行操作
                     Date forecastTime = parsingForecastTime(parsingDqInfo.getForecastTime(), fileContent);
@@ -225,11 +222,6 @@ public class ParsingRdqServiceImpl extends ServiceImpl<ParsingDqMapper, ParsingD
     }
 
 
-    public List<ParsingDq> selectByStationCode(String stationCode) {
-        return this.parsingDqs.stream().filter(p -> p.getStationCode().equals(stationCode)).collect(Collectors.toList());
-    }
-
-
     /**
      * 计算D+x中的x
      *

+ 2 - 11
cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingRpServiceImpl.java

@@ -1,7 +1,6 @@
 package com.cpp.web.service.datafactory.impl;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.cpp.web.domain.BaseCppEntity;
 import com.cpp.web.domain.datafactory.BaseParsing;
 import com.cpp.web.domain.datafactory.ParsingRp;
 import com.cpp.web.domain.datafactory.dto.ParsingConfParam;
@@ -21,12 +20,10 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.io.File;
-import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
-import java.util.stream.Collectors;
 
 /**
  * 实际功率解析业务层实现类
@@ -62,9 +59,8 @@ public class ParsingRpServiceImpl extends ServiceImpl<ParsingRpMapper, ParsingRp
         parsingResultDto.setFileType(FileTypeEnum.rp.name());
 
         try {
-            List<ParsingRp> parsingRpInfos = selectByStationCode(stationCode);
-            if (!parsingRpInfos.isEmpty()) {
-                ParsingRp parsingRpInfo = parsingRpInfos.get(0);
+            if (!this.parsingRps.isEmpty()) {
+                ParsingRp parsingRpInfo = this.parsingRps.get(0);
 
                 List<String> fileContent = ParsingFileUtil.getFileContent(file);
                 if (parsingRpInfo.getDataType().equals(ParsingFieldUtil.SINGLE)) {
@@ -114,11 +110,6 @@ public class ParsingRpServiceImpl extends ServiceImpl<ParsingRpMapper, ParsingRp
         return true;
     }
 
-    @Override
-    public List selectByStationCode(String stationCode) {
-        return this.parsingRps.stream().filter(p->p.getStationCode().equals(stationCode)).collect(Collectors.toList());
-    }
-
 
     protected Date parsingForecastTime(String sign, List<String> fileContent) {
         Date time = null;

+ 0 - 6
cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingStatusServiceImpl.java

@@ -78,12 +78,6 @@ public class ParsingStatusServiceImpl implements ParsingInterface {
         return true;
     }
 
-    @Override
-    public List selectByStationCode(String stationCode) {
-        return null;
-    }
-
-
     @Data
     class StationStatusDto {
         private List<ChannelError> channelErrors;

+ 18 - 0
cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingTypeServiceImpl.java

@@ -0,0 +1,18 @@
+package com.cpp.web.service.datafactory.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.cpp.web.domain.datafactory.ParsingType;
+import com.cpp.web.mapper.datafactory.ParsingTypeMapper;
+import com.cpp.web.service.datafactory.ParsingTypeService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 解析ftp路径业务层实现类
+ *
+ * @author tl
+ * @date 2022-05-11 18:07:03
+ */
+@Service
+public class ParsingTypeServiceImpl extends ServiceImpl<ParsingTypeMapper, ParsingType> implements ParsingTypeService {
+
+}

+ 218 - 0
cpp-ui/src/views/configManager/ftpChannel/index.vue

@@ -0,0 +1,218 @@
+<template>
+  <div class="execution">
+    <basic-container>
+      <div style="margin-bottom: .5%">
+        <el-button-group style="margin-left: 1%">
+          <el-button type="primary" icon="el-icon-search" :loading="tableLoading" @click="getList()">刷新</el-button>
+          <el-button type="primary" icon="el-icon-circle-plus-outline" @click="handleAdd()" :loading="tableLoading">添加</el-button>
+        </el-button-group>
+      </div>
+
+      <el-table
+        :data="tableData"
+        :header-cell-style="{background:'#ECF1FE'}"
+        border
+        style="width: 100%">
+        <el-table-column align="name" prop="url" label="通道名称"></el-table-column>
+        <el-table-column align="ip" prop="url" label="ip"></el-table-column>
+        <el-table-column align="port" prop="url" label="端口"></el-table-column>
+        <el-table-column align="username" prop="url" label="用户"></el-table-column>
+        <el-table-column align="password" prop="url" label="密码"></el-table-column>
+        <el-table-column align="center" label="操作" width="200">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="warning"
+              :loading="tableLoading"
+              @click="handleEdit(scope.$index, scope.row)">编辑
+            </el-button>
+            <el-button
+              size="mini"
+              type="danger"
+              :loading="tableLoading"
+              @click="handleDelete(scope.$index, scope.row)">删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="this.page.currentPage"
+        :page-sizes="[10, 20, 50, 100]"
+        :page-size="this.page.pageSize"
+        layout="->,total, sizes, prev, pager, next, jumper"
+        :total="this.page.total">
+      </el-pagination>
+
+      <el-dialog
+        :title="title"
+        :visible.sync="dialogVisible"
+        :append-to-body="true"
+        :close-on-click-modal="false"
+        width="30%"
+        :before-close="handleClose">
+        <el-form ref="elform" :model="form" :rules="rules" label-width="80px">
+          <el-form-item prop="name" label="通道名称">
+            <el-input v-model="form.name"></el-input>
+          </el-form-item>
+          <el-form-item prop="ip" label="ip">
+            <el-input v-model="form.ip"></el-input>
+          </el-form-item>
+          <el-form-item prop="port" label="端口">
+            <el-input v-model="form.port"></el-input>
+          </el-form-item>
+          <el-form-item prop="username" label="用户">
+            <el-input v-model="form.username"></el-input>
+          </el-form-item>
+          <el-form-item prop="password" label="密码">
+            <el-input v-model="form.password"></el-input>
+          </el-form-item>
+        </el-form>
+        <div style="text-align: center">
+          <el-button type="primary" @click="handleUpdate">保存</el-button>
+          <el-button @click="handleCancel">取消</el-button>
+        </div>
+      </el-dialog>
+    </basic-container>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'ftpChannel',
+  data() {
+    return {
+      form: {},
+      searchForm: {},
+      tableData: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 20 // 每页显示多少条
+      },
+      tableLoading: false,
+      stationCode:'',
+      dialogVisible: false,
+      dialogType: '',//新增还是编辑
+      title:'',//弹框的文本
+      rules: {
+        // stationCode: {required: true, message: '请选择场站', trigger: 'blur'},
+        // url: {required: true, message: '请输入路径', trigger: 'blur'},
+      }
+    }
+  },
+  computed: {
+
+  },
+  created() {
+    this.getList()
+  },
+  methods: {
+    getList() {
+      var page = this.page
+      // if (this.searchForm.stationCode != '') {
+      //   this.form.stationCode =  this.searchForm.stationCode
+      // }
+      // this.form.cId = this.channelId
+      // this.searchForm = this.form
+      // console.log(this.form)
+      if(this.stationCode !== null && this.stationCode !== undefined && this.stationCode !== ''){
+        this.searchForm ={stationCode:this.stationCode,delFlag:0}
+      }else {
+        this.searchForm = {delFlag:0}
+      }
+      this.tableLoading = true
+      this.$axios.get("/ftpChannel", Object.assign({
+        current: page.currentPage,
+        size: page.pageSize
+      }, this.searchForm)).then(response => {
+        this.tableData = response.data.data.records
+        this.page.total = response.data.data.total
+        this.tableLoading = false
+      }).catch(() => {
+        this.tableLoading = false
+      })
+    },
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.page.currentPage = 1
+      this.getList();
+    },
+    handleCurrentChange(val) {
+      this.page.currentPage = val
+      this.getList();
+    },
+    handleAdd() {
+      this.form = {}
+      this.dialogType = "add"
+      this.title = '新增&保存'
+      this.form.cid = this.channelId
+      this.dialogVisible = true
+    },
+    // 编辑按钮
+    handleEdit(index, row) {
+      this.form = row
+      this.dialogType = "edit"
+      this.title = '编辑&保存'
+      this.dialogVisible = true
+
+    },
+    // 删除按钮
+    handleDelete(index, row) {
+      this.rowDel(row)
+    },
+
+    rowDel: function (row, index) {
+      this.$confirm('是否确认删除ID为' + row.id, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function () {
+        return this.$axios.delete("/ftpChannel/"+row.id)
+      }).then(data => {
+        this.$message.success('删除成功')
+        this.getList(this.page)
+      })
+    },
+    handleUpdate: function () {
+      if (this.dialogType === 'add') {
+        // row.cid = this.channelId
+        // row.stationCode = this.stationCode
+        this.$axios.post("/ftpChannel",this.form).then(data => {
+          this.$message.success('添加成功')
+          this.getList()
+          this.dialogVisible = false
+        }).catch((e) => {
+          console.log('添加失败:' + e)
+        });
+      } else {
+        this.$axios.put("/ftpChannel", this.form).then(data => {
+          this.$message.success('修改成功')
+          this.getList()
+          this.dialogVisible = false
+        }).catch(() => {
+          console.log('修改失败:' + e)
+        });
+      }
+
+    },
+    // 弹框的关闭前的回调
+    handleClose(done) {
+      this.form = {}
+      this.$nextTick(() => {
+        this.$refs.elform.resetFields();
+      })
+      done()
+    },
+    handleCancel() {
+      this.$nextTick(() => {
+        this.$refs.elform.resetFields();
+      })
+      this.form = {}
+      this.dialogVisible = false
+    },
+
+  }
+}
+</script>

+ 457 - 0
cpp-ui/src/views/configManager/parsingConf/cdqparsing.vue

@@ -0,0 +1,457 @@
+<template>
+  <div>
+    <el-button type="primary" icon="el-icon-plus" plain @click="handleAdd" class="myButton">新增</el-button>
+    <!--上报对象表格-->
+    <el-table
+      :data="tableData"
+      :header-cell-style="{background:'#ECF1FE',}"
+      v-loading="tableLoading" border style="width: 100%">
+      <el-table-column prop="fileName" align="center" label="文件名关键字" width="200px"></el-table-column>
+      <el-table-column prop="forecastTime" align="center" label="预测时间公式"  width="300px"></el-table-column>
+      <el-table-column prop="fpValue" align="center" label="预测数据公式"  width="300px"></el-table-column>
+      <el-table-column prop="dataType" align="center" label="数据类型" width="100px" :formatter="formatDataType"></el-table-column>
+      <el-table-column prop="stationCode" align="center" label="场站编号"></el-table-column>
+      <el-table-column label="操作" align="center" width="150px">
+        <template slot-scope="scope">
+          <el-button type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-button>
+          <el-button type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="block">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page=this.page.currentPage
+        :page-sizes="[10, 15, 30, 50]"
+        :page-size=this.page.pageSize
+        layout="total, sizes, prev, pager, next, jumper"
+        :total=this.page.total>
+      </el-pagination>
+    </div>
+    <!--编辑框-->
+    <el-dialog :title="saveFlag==1?'新增':'编辑'" :visible.sync="visible" width="100%">
+
+      <el-row :gutter="20">
+        <el-col :span="16">
+          <div>
+                    <span style="color: red">
+            <font size="4px">灰色文本框需要点击后,在右侧进行编辑录入!</font>
+                    </span>
+          </div>
+          &nbsp;
+          <div class="grid-content bg-purple">
+            <el-form v-model="form" ref="form" :key="timer">
+              <el-row :gutter="16">
+                <el-col :span="12">
+                  <el-form-item prop="fileName" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>文件名关键字
+                    </span>
+                    <el-input v-model="form.fileName" @focus="clearformula"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item prop="dataType" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>数据类型
+                    </span>
+                    <el-select v-model="form.dataType" clearable @focus="clearformula">
+                      <el-option
+                        v-for="item in this.dataType"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"/>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="12">
+                  <el-form-item prop="fpValue" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>预测数据公式
+                    </span>
+                    <el-input v-model="form.fpValue" readonly
+                              @click.native="ftck(form.fpValue,'form.fpValue','(预测数据)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item prop="forecastTime" label-width="110px"
+                                class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>预测时间公式
+                    </span>
+                    <el-input v-model="form.forecastTime" readonly
+                              @click.native="ftck(form.forecastTime,'form.forecastTime','(预测时间)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col :span="24">
+                  <el-form-item prop="stationCode" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>场站编号
+                    </span>
+                    <el-select v-model="form.stationCode" multiple clearable @focus="clearformula" style="width: 100%">
+                      <el-option
+                        v-for="item in this.stationCodeList"
+                        :key="item.stationCode"
+                        :label="item.stationCode"
+                        :value="item.stationCode"/>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="handleSave('form')">
+                <span v-if="saveFlag == 1">保 存</span>
+                <span v-else>修 改</span>
+              </el-button>
+              <el-button @click="visible = false">取 消</el-button>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="1">
+          <el-divider direction="vertical"></el-divider>
+        </el-col>
+        <el-col :span="6">
+          <h2>公式编辑区{{ this.editinfo }}</h2>
+          <el-form>
+            <el-row>
+              <el-col>
+                <el-form-item prop="rownumber" label-width="110px">
+                  <span slot="label">
+                      <font color="red">*</font>解析行
+                  </span>
+                  <el-input v-model="pfform.rownumber"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item prop="columnumber" label-width="110px">
+                  <span slot="label">
+                      <font color="red">*</font>解析列
+                  </span>
+                  <el-input v-model="pfform.columnumber"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="标签名" prop="signname" label-width="110px">
+                  <el-input v-model="pfform.signname"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="时间格式" prop="timeformat" label-width="110px">
+                  <el-select v-model="pfform.timeformat" clearable>
+                    <el-option
+                      v-for="item in this.timeFormat"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"/>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-button type="primary" @click="genformula">
+                <span>生成公式</span>
+              </el-button>
+              <el-button type="primary" @click="destoryformula">
+                <span>清除录入</span>
+              </el-button>
+            </el-row>
+          </el-form>
+        </el-col>
+      </el-row>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+
+export default {
+  name: "index",
+  data() {
+    return {
+      stationCodeList: [],
+      dataType: [
+        {value: 's', label: '时间单行'},
+        {value: 'm', label: '时间多行'}
+      ],
+      timeFormat: [
+        {value: 'yyyy-MM-dd HH:mm:ss', label: 'yyyy-MM-dd HH:mm:ss'},
+        {value: 'yyyy-MM-dd', label: 'yyyy-MM-dd'},
+        {value: 'yyyy-MM-dd_HH:mm', label: 'yyyy-MM-dd_HH:mm'},
+        {value: 'yyyy-MM-dd_HH:mm:ss', label: 'yyyy-MM-dd_HH:mm:ss'}
+      ],
+      editinfo: '',
+      timer: new Date().getTime(),
+      props: {multiple: true},
+      staionList: [],//场站集合
+      tableLoading: false,
+      tableData: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      info: '',
+      visible: false,
+      form: {
+        fileName: '',
+        forecastTime: '',
+        fpValue: '',
+        dataType: '',
+        stationCode: ''
+      },
+      pfform: {
+        rownumber: '',
+        columnumber: '',
+        signname: '',
+        timeformat: ''
+      },
+      tempformulasign: '',
+      saveFlag: 1
+    };
+  },
+  mounted() {
+    this.getElectricFieldList()
+    this.getTableList()
+  },
+  methods: {
+    formatDataType(row, column) {
+      let belongTo = '未知类型'
+      for (let i = 0; i < this.dataType.length; i++) {
+        if (row.dataType === this.dataType[i].value) {
+          belongTo = this.dataType[i].label
+        }
+      }
+      return belongTo
+    },
+    getTableList() {
+      this.tableLoading = true
+      // 获取列表
+      this.$axios.get("/parsingCdq/page",Object.assign({
+        current: this.page.currentPage,
+        size: this.page.pageSize
+      })).then(response => {
+        this.tableData = response.data.data.records
+        this.page.total = response.data.data.total
+        this.tableLoading = false
+      }).catch((e) => {
+        this.tableLoading = false
+      })
+    },
+    getElectricFieldList() {
+      // 获取所有场站
+      this.$axios("/parsingInfo/getElectricField").then(response => {
+        this.stationCodeList = response.data.data
+        this.tableLoading = false
+      }).catch((e) => {
+        this.tableLoading = false
+      })
+    },
+    destoryformula() {
+      // 清空公式区字段
+      if (this.tempformulasign == 'form.forecastTime') {
+        this.form.forecastTime = ''
+      } else if (this.tempformulasign == 'form.fpValue') {
+        this.form.fpValue = ''
+      }
+      this.clearformula()
+    },
+    clearformula() {
+      // 清空公式区字段
+      this.pfform.rownumber = ''
+      this.pfform.columnumber = ''
+      this.pfform.signname = ''
+      this.pfform.timeformat = ''
+      this.editinfo = ''
+      this.tempformulasign = ''
+    },
+    ftck(obj, sign, editname) {
+      this.clearformula()
+      if (obj != undefined && obj != null) {
+        var objs = obj.split('<=>')
+        for (let i = 0; i < objs.length; i++) {
+          if (objs[i] != "") {
+            if (i == 0) {
+              this.pfform.rownumber = objs[i]
+            } else if (i == 1) {
+              this.pfform.columnumber = objs[i]
+            } else if (i == 2) {
+              this.pfform.signname = objs[i]
+            } else if (i == 3) {
+              this.pfform.timeformat = objs[i]
+            }
+          }
+        }
+      }
+      this.tempformulasign = sign;
+      this.editinfo = editname
+    },
+    genformula() {
+      if (this.tempformulasign==''){
+        this.$message.warning('请先选定左侧公式项')
+        return
+      }
+      if (!this.pfform.rownumber || !this.pfform.columnumber) {
+        this.$message.warning('填写必填项')
+        return
+      }
+      if ((this.pfform.signname && !this.pfform.timeformat) || (!this.pfform.signname && this.pfform.timeformat)) {
+        this.$message.warning('标签名称和时间格式要同时填写')
+        return
+      }
+      // 拼装公式
+      var resultStr = ''
+      if (this.pfform.rownumber) {
+        resultStr = this.pfform.rownumber
+      }
+      if (this.pfform.columnumber) {
+        resultStr = resultStr + '<=>' + this.pfform.columnumber
+      }
+      if (this.pfform.signname) {
+        resultStr = resultStr + '<=>' + this.pfform.signname
+      }
+      if (this.pfform.timeformat) {
+        resultStr = resultStr + '<=>' + this.pfform.timeformat
+      }
+      // 将生成的公式赋值到左侧表格中
+      if (this.tempformulasign == 'form.forecastTime') {
+        this.form.forecastTime = resultStr
+      } else if (this.tempformulasign == 'form.fpValue') {
+        this.form.fpValue = resultStr
+      }
+      this.timer = new Date().getTime()
+      this.clearformula()
+    },
+    /*保存*/
+    handleSave(formName) {
+      if (!this.form.fileName || !this.form.forecastTime || !this.form.fpValue || !this.form.dataType || this.form.stationCode=="") {
+        this.$message.warning('填写必填项');
+        return false;
+      } else {
+        const data = this.form.stationCode
+        let data1 = "";
+        for (let n = 0; n < data.length; n++) {
+          for (let j = 0; j < this.stationCodeList.length; j++) {
+            if (data[n] == this.stationCodeList[j]["stationCode"]) {
+              data1 = data1 + this.stationCodeList[j]["stationCode"] + ","
+            }
+          }
+        }
+        data1 = data1.substr(0, data1.length - 1)
+        this.form.stationCode = data1
+        if (this.saveFlag === 1) {
+          this.$axios.post("/parsingCdq",this.form).then(response => {
+            this.dialogVisible = false
+            this.getTableList()
+            this.tableLoading = false
+            this.$message.success(response.data.data)
+          }).catch(() => {
+            this.tableLoading = false
+          })
+        } else {
+          console.log(this.form)
+          this.$axios.put("/parsingCdq", this.form).then(response => {
+            this.dialogVisible = false
+            this.getTableList()
+            this.tableLoading = false
+            this.$message.success(response.data.data)
+          }).catch(() => {
+            this.tableLoading = false
+          })
+        }
+        this.visible = false
+      }
+    },
+    /*上报对象*/
+    handleAdd() {
+      this.saveFlag = 1
+      this.info = ''
+      this.form = {}
+      this.clearformula()
+      this.visible = true
+    },
+    /*上报对象编辑*/
+    handleEdit(row) {
+      this.saveFlag = 2
+      let newRow = Object.assign({},row)
+      let tempStationCode = newRow.stationCode.split(',')
+      this.form = newRow
+      this.form.stationCode = tempStationCode
+      this.clearformula()
+      this.visible = true
+    },
+    /*上报对象删除*/
+    handleDelete(row) {
+      this.$confirm('是否确认删除此条配置?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$axios.delete("/parsingCdq/"+row.id).then(response => {
+          this.getTableList()
+          this.$message.success(response.data.data)
+        })
+      })
+    },
+    /*上报对象pageSize改变*/
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.page.currentPage = 1
+      this.getTableList()
+
+    },
+    /*上报对象currentPage改变*/
+    handleCurrentChange(val) {
+      this.page.currentPage = val
+      this.getTableList()
+    }
+  }
+}
+</script>
+
+<style scoped>
+.block {
+  float: right;
+}
+
+.myButton {
+  margin-bottom: .5%;
+}
+
+.uploadno {
+  background: #2d8cf0;
+  width: 20px;
+  height: 20px;
+  border-radius: 50%;
+  text-align: center;
+  display: inline-block;
+  color: #fff;
+}
+
+.el-divider--vertical {
+  display: inline-block;
+  width: 1px;
+  height: 35em;
+  margin: 0 8px;
+  vertical-align: middle;
+  position: relative;
+}
+
+/deep/ .formulaColor .el-input--small .el-input__inner {
+  height: 32px;
+  line-height: 32px;
+  background-color: #cccccc;
+}
+
+</style>

+ 907 - 0
cpp-ui/src/views/configManager/parsingConf/cftparsing.vue

@@ -0,0 +1,907 @@
+<template>
+  <div>
+    <el-button type="primary" icon="el-icon-plus" plain @click="handleAdd" class="myButton">新增</el-button>
+    <!--上报对象表格-->
+    <el-table
+      :data="tableData"
+      :header-cell-style="{background:'#ECF1FE'}"
+      v-loading="tableLoading" border style="width: 100%">
+      <el-table-column type="expand">
+        <template slot-scope="props">
+          <table style="width: 100%;text-align: left">
+            <tr>
+              <td>温度瞬时公式:{{ props.row.tInst }}</td>
+              <td>湿度瞬时公式:{{ props.row.rhInst }}</td>
+              <td>气压瞬时公式:{{ props.row.paInst }}</td>
+            </tr>
+            <tr>
+            <tr>
+              <td>10米风速瞬时公式:{{ props.row.wsInst10 }}</td>
+              <td>10米风向瞬时公式:{{ props.row.wdInst10 }}</td>
+              <td>30米风速瞬时公式:{{ props.row.wsInst30 }}</td>
+            </tr>
+            <tr>
+              <td>30米风向瞬时公式:{{ props.row.wdInst30 }}</td>
+              <td>50米风速瞬时公式:{{ props.row.wsInst50 }}</td>
+              <td>50米风向瞬时公式:{{ props.row.wdInst50 }}</td>
+            </tr>
+            <tr>
+              <td>60米风速瞬时公式:{{ props.row.wsInst60 }}</td>
+              <td>60米风向瞬时公式:{{ props.row.wdInst60 }}</td>
+              <td>70米风速瞬时公式:{{ props.row.wsInst70 }}</td>
+            </tr>
+            <tr>
+              <td>70米风向瞬时公式:{{ props.row.wdInst70 }}</td>
+              <td>80米风速瞬时公式:{{ props.row.wsInst80 }}</td>
+              <td>80米风向瞬时公式:{{ props.row.wdInst80 }}</td>
+            </tr>
+            <tr>
+              <td>90米风速瞬时公式:{{ props.row.wsInst90 }}</td>
+              <td>90米风向瞬时公式:{{ props.row.wdInst90 }}</td>
+              <td>100米风速瞬时公式:{{ props.row.wsInst100 }}</td>
+            </tr>
+            <tr>
+              <td>100米风向瞬时公式:{{ props.row.wdInst100 }}</td>
+              <td>110米风速瞬时公式:{{ props.row.wsInst110 }}</td>
+              <td>110米风向瞬时公式:{{ props.row.wdInst110 }}</td>
+            </tr>
+            <tr>
+              <td>120米风速瞬时公式:{{ props.row.wsInst120 }}</td>
+              <td>120米风向瞬时公式:{{ props.row.wdInst120 }}</td>
+              <td>轮毂风速瞬时公式:{{ props.row.wsInstHubHeight }}</td>
+            </tr>
+            <tr>
+              <td>轮毂风向瞬时公式:{{ props.row.wdInstHubHeight }}</td>
+            </tr>
+          </table>
+        </template>
+      </el-table-column>
+      <el-table-column prop="fileName" align="center" label="文件名关键字" width="200px"></el-table-column>
+      <el-table-column prop="dataType" align="center" label="数据类型" width="100px" :formatter="formatDataType"></el-table-column>
+      <el-table-column prop="time" align="center" label="预测时间公式"  width="300px"></el-table-column>
+      <el-table-column prop="stationCode" align="center" label="场站编号"></el-table-column>
+      <el-table-column label="操作" align="center" width="150px">
+        <template slot-scope="scope">
+          <el-button type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-button>
+          <el-button type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="block">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page=this.page.currentPage
+        :page-sizes="[10, 15, 30, 50]"
+        :page-size=this.page.pageSize
+        layout="total, sizes, prev, pager, next, jumper"
+        :total=this.page.total>
+      </el-pagination>
+    </div>
+    <!--编辑框-->
+    <el-dialog :title="saveFlag==1?'新增':'编辑'" :visible.sync="visible" width="100%" :fullscreen="true">
+
+      <el-row :gutter="20">
+        <el-col :span="17">
+          <div>
+                    <span style="color: red">
+            <font size="4px">灰色文本框需要点击后,在右侧进行编辑录入!</font>
+                    </span>
+          </div>
+          &nbsp;
+          <div class="grid-content bg-purple">
+            <el-form v-model="form" ref="form" :key="timer">
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="fileName" label-width="150px">
+                    <span slot="label">
+                      <font color="red">*</font>文件名关键字
+                    </span>
+                    <el-input v-model="form.fileName" @focus="clearformula"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="dataType" label-width="150px">
+                    <span slot="label">
+                      <font color="red">*</font>数据类型
+                    </span>
+                    <el-select v-model="form.dataType" clearable @focus="clearformula">
+                      <el-option
+                        v-for="item in this.dataType"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"/>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col :span="24">
+                  <el-form-item prop="stationCode" label-width="150px">
+                    <span slot="label">
+                      <font color="red">*</font>场站编号
+                    </span>
+                    <el-select v-model="form.stationCode" multiple clearable @focus="clearformula" style="width: 100%">
+                      <el-option
+                        v-for="item in this.stationCodeList"
+                        :key="item.stationCode"
+                        :label="item.stationCode"
+                        :value="item.stationCode"/>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="time" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                     <font color="red">*</font>预测时间公式
+                    </span>
+                    <el-input v-model="form.time" readonly
+                              @click.native="ftck(form.time,'form.time','(预测时间)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="tInst" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      温度瞬时公式
+                    </span>
+                    <el-input v-model="form.tInst" readonly
+                              @click.native="ftck(form.tInst,'form.tInst','(温度瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="rhInst" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      湿度瞬时公式
+                    </span>
+                    <el-input v-model="form.rhInst" readonly
+                              @click.native="ftck(form.rhInst,'form.rhInst','(湿度瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="paInst" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                     气压瞬时公式
+                    </span>
+                    <el-input v-model="form.paInst" readonly
+                              @click.native="ftck(form.paInst,'form.paInst','(气压瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wsInst10" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      10米风速瞬时公式
+                    </span>
+                    <el-input v-model="form.wsInst10" readonly
+                              @click.native="ftck(form.wsInst10,'form.wsInst10','(10米风速瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wdInst10" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      10米风向瞬时公式
+                    </span>
+                    <el-input v-model="form.wdInst10" readonly
+                              @click.native="ftck(form.wdInst10,'form.wdInst10','(10米风向瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="wsInst30" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                     30米风速瞬时公式
+                    </span>
+                    <el-input v-model="form.wsInst30" readonly
+                              @click.native="ftck(form.wsInst30,'form.wsInst30','(30米风速瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wdInst30" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      30米风向瞬时公式
+                    </span>
+                    <el-input v-model="form.wdInst30" readonly
+                              @click.native="ftck(form.wdInst30,'form.wdInst30','(30米风向瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wsInst50" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      50米风速瞬时公式
+                    </span>
+                    <el-input v-model="form.wsInst50" readonly
+                              @click.native="ftck(form.wsInst50,'form.wsInst50','(50米风速瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="wdInst50" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      50米风向瞬时公式
+                    </span>
+                    <el-input v-model="form.wdInst50" readonly
+                              @click.native="ftck(form.wdInst50,'form.wdInst50','(50米风向瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wsInst60" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      60米风速瞬时公式
+                    </span>
+                    <el-input v-model="form.wsInst60" readonly
+                              @click.native="ftck(form.wsInst60,'form.wsInst60','(60米风速瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wdInst60" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      60米风向瞬时公式
+                    </span>
+                    <el-input v-model="form.wdInst60" readonly
+                              @click.native="ftck(form.wdInst60,'form.wdInst60','(60米风向瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="wsInst70" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      70米风速瞬时公式
+                    </span>
+                    <el-input v-model="form.wsInst70" readonly
+                              @click.native="ftck(form.wsInst70,'form.wsInst70','(70米风速瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wdInst70" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      70米风向瞬时公式
+                    </span>
+                    <el-input v-model="form.wdInst70" readonly
+                              @click.native="ftck(form.wdInst70,'form.wdInst70','(70米风向瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wsInst80" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      80米风速瞬时公式
+                    </span>
+                    <el-input v-model="form.wsInst80" readonly
+                              @click.native="ftck(form.wsInst80,'form.wsInst80','(80米风速瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="wdInst80" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      80米风向瞬时公式
+                    </span>
+                    <el-input v-model="form.wdInst80" readonly
+                              @click.native="ftck(form.wdInst80,'form.wdInst80','(80米风向瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wsInst90" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      90米风速瞬时公式
+                    </span>
+                    <el-input v-model="form.wsInst90" readonly
+                              @click.native="ftck(form.wsInst90,'form.wsInst90','(90米风速瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wdInst90" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      90米风向瞬时公式
+                    </span>
+                    <el-input v-model="form.wdInst90" readonly
+                              @click.native="ftck(form.wdInst90,'form.wdInst90','(90米风向瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="wsInst100" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      100米风速瞬时公式
+                    </span>
+                    <el-input v-model="form.wsInst100" readonly
+                              @click.native="ftck(form.wsInst100,'form.wsInst100','(100米风速瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wdInst100" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      100米风向瞬时公式
+                    </span>
+                    <el-input v-model="form.wdInst100" readonly
+                              @click.native="ftck(form.wdInst100,'form.wdInst100','(100米风向瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wsInst110" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      110米风速瞬时公式
+                    </span>
+                    <el-input v-model="form.wsInst110" readonly
+                              @click.native="ftck(form.wsInst110,'form.wsInst110','(110米风速瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="wdInst110" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      110米风向瞬时公式
+                    </span>
+                    <el-input v-model="form.wdInst110" readonly
+                              @click.native="ftck(form.wdInst110,'form.wdInst110','(110米风向瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wsInst120" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      120米风速瞬时公式
+                    </span>
+                    <el-input v-model="form.wsInst120" readonly
+                              @click.native="ftck(form.wsInst120,'form.wsInst120','(120米风速瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wdInst120" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      120米风向瞬时公式
+                    </span>
+                    <el-input v-model="form.wdInst120" readonly
+                              @click.native="ftck(form.wdInst120,'form.wdInst120','(120米风向瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="wsInstHubHeight" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      轮毂风速瞬时公式
+                    </span>
+                    <el-input v-model="form.wsInstHubHeight" readonly
+                              @click.native="ftck(form.wsInstHubHeight,'form.wsInstHubHeight','(轮毂风速瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wdInstHubHeight" label-width="150px" class="formulaColor">
+                    <span slot="label">
+                      轮毂风向瞬时公式
+                    </span>
+                    <el-input v-model="form.wdInstHubHeight" readonly
+                              @click.native="ftck(form.wdInstHubHeight,'form.wdInstHubHeight','(轮毂风向瞬时)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="handleSave('form')">
+                <span v-if="saveFlag == 1">保 存</span>
+                <span v-else>修 改</span>
+              </el-button>
+              <el-button @click="visible = false">取 消</el-button>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="1">
+          <el-divider direction="vertical" style="height: 200px"></el-divider>
+        </el-col>
+        <el-col :span="5">
+          <h2>公式编辑区{{ this.editinfo }}</h2>
+          <el-form>
+            <el-row>
+              <el-col>
+                <el-form-item prop="rownumber" label-width="150px">
+                  <span slot="label">
+                      <font color="red">*</font>解析行
+                  </span>
+                  <el-input v-model="pfform.rownumber"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item prop="columnumber" label-width="150px">
+                  <span slot="label">
+                      <font color="red">*</font>解析列
+                  </span>
+                  <el-input v-model="pfform.columnumber"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="标签名" prop="signname" label-width="150px">
+                  <el-input v-model="pfform.signname"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="时间格式" prop="timeformat" label-width="150px">
+                  <el-select v-model="pfform.timeformat" clearable>
+                    <el-option
+                      v-for="item in this.timeFormat"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"/>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-button type="primary" @click="genformula">
+                <span>生成公式</span>
+              </el-button>
+              <el-button type="primary" @click="destoryformula">
+                <span>清除录入</span>
+              </el-button>
+            </el-row>
+          </el-form>
+        </el-col>
+      </el-row>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+
+export default {
+  name: "index",
+  data() {
+    return {
+      stationCodeList: [],
+      dataType: [
+        {value: 's', label: '时间单行'},
+        {value: 'm', label: '时间多行'}
+      ],
+      timeFormat: [
+        {value: 'yyyy-MM-dd HH:mm:ss', label: 'yyyy-MM-dd HH:mm:ss'},
+        {value: 'yyyy-MM-dd', label: 'yyyy-MM-dd'},
+        {value: 'yyyy-MM-dd_HH:mm', label: 'yyyy-MM-dd_HH:mm'},
+        {value: 'yyyy-MM-dd_HH:mm:ss', label: 'yyyy-MM-dd_HH:mm:ss'}
+      ],
+      editinfo: '',
+      timer: new Date().getTime(),
+      props: {multiple: true},
+      staionList: [],//场站集合
+      tableLoading: false,
+      tableData: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      info: '',
+      visible: false,
+
+      form: {
+        fileName: '',
+        time: '',
+        dataType: '',
+        stationCode: '',
+        tInst: '',
+        rhInst: '',
+        paInst: '',
+        wsInst10: '',
+        wdInst10: '',
+        wsInst30: '',
+        wdInst30: '',
+        wsInst50: '',
+        wdInst50: '',
+        wsInst60: '',
+        wdInst60: '',
+        wsInst70: '',
+        wdInst70: '',
+        wsInst80: '',
+        wdInst80: '',
+        wsInst90: '',
+        wdInst90: '',
+        wsInst100: '',
+        wdInst100: '',
+        wsInst110: '',
+        wdInst110: '',
+        wsInst120: '',
+        wdInst120: '',
+        wsInstHubHeight: '',
+        wdInstHubHeight: ''
+      },
+      pfform: {
+        rownumber: '',
+        columnumber: '',
+        signname: '',
+        timeformat: ''
+      },
+      tempformulasign: '',
+      saveFlag: 1
+    };
+  },
+  mounted() {
+    this.getElectricFieldList()
+    this.getTableList()
+  },
+  methods: {
+    formatDataType(row, column) {
+      let belongTo = '未知类型'
+      for (let i = 0; i < this.dataType.length; i++) {
+        if (row.dataType === this.dataType[i].value) {
+          belongTo = this.dataType[i].label
+        }
+      }
+      return belongTo
+    },
+    getTableList() {
+      this.tableLoading = true
+      // 获取列表
+      this.$axios.get("/parsingCft/page",Object.assign({
+        current: this.page.currentPage,
+        size: this.page.pageSize
+      })).then(response => {
+        this.tableData = response.data.data.records
+        this.page.total = response.data.data.total
+        this.tableLoading = false
+      }).catch((e) => {
+        this.tableLoading = false
+      })
+    },
+    getElectricFieldList() {
+      // 获取所有场站
+      this.$axios("/parsingInfo/getElectricField").then(response => {
+        this.stationCodeList = response.data.data
+        this.tableLoading = false
+      }).catch((e) => {
+        this.tableLoading = false
+      })
+    },
+    destoryformula() {
+      // 清空公式区字段
+      if (this.tempformulasign == 'form.time') {
+        this.form.time = ''
+      }
+      else if (this.tempformulasign == 'form.tInst') {
+        this.form.tInst = ''
+      }
+      else if (this.tempformulasign == 'form.rhInst') {
+        this.form.rhInst = ''
+      }
+      else if (this.tempformulasign == 'form.paInst') {
+        this.form.paInst = ''
+      }
+      else if (this.tempformulasign == 'form.wsInst10') {
+        this.form.wsInst10 = ''
+      }
+      else if (this.tempformulasign == 'form.wdInst10') {
+        this.form.wdInst10 = ''
+      }
+      else if (this.tempformulasign == 'form.wsInst30') {
+        this.form.wsInst30 = ''
+      }
+      else if (this.tempformulasign == 'form.wdInst30') {
+        this.form.wdInst30 = ''
+      }
+      else if (this.tempformulasign == 'form.wsInst50') {
+        this.form.wsInst50 = ''
+      }
+      else if (this.tempformulasign == 'form.wdInst50') {
+        this.form.wdInst50 = ''
+      }
+      else if (this.tempformulasign == 'form.wsInst60') {
+        this.form.wsInst60 = ''
+      }
+      else if (this.tempformulasign == 'form.wdInst60') {
+        this.form.wdInst60 = ''
+      }
+      else if (this.tempformulasign == 'form.wsInst70') {
+        this.form.wsInst70 = ''
+      }
+      else if (this.tempformulasign == 'form.wdInst70') {
+        this.form.wdInst70 = ''
+      }
+      else if (this.tempformulasign == 'form.wsInst80') {
+        this.form.wsInst80 = ''
+      }
+      else if (this.tempformulasign == 'form.wdInst80') {
+        this.form.wdInst80 = ''
+      }
+      else if (this.tempformulasign == 'form.wsInst90') {
+        this.form.wsInst90 = ''
+      }
+      else if (this.tempformulasign == 'form.wdInst90') {
+        this.form.wdInst90 = ''
+      }
+      else if (this.tempformulasign == 'form.wsInst100') {
+        this.form.wsInst100 = ''
+      }
+      else if (this.tempformulasign == 'form.wdInst100') {
+        this.form.wdInst100 = ''
+      }
+      else if (this.tempformulasign == 'form.wsInst110') {
+        this.form.wsInst110 = ''
+      }
+      else if (this.tempformulasign == 'form.wdInst110') {
+        this.form.wdInst110 = ''
+      }
+      else if (this.tempformulasign == 'form.wsInst120') {
+        this.form.wsInst120 = ''
+      }
+      else if (this.tempformulasign == 'form.wdInst120') {
+        this.form.wdInst120 = ''
+      }
+      else if (this.tempformulasign == 'form.wsInstHubHeight') {
+        this.form.wsInstHubHeight = ''
+      }
+      else if (this.tempformulasign == 'form.wdInstHubHeight') {
+        this.form.wdInstHubHeight = ''
+      }
+      this.clearformula()
+    },
+    clearformula() {
+      // 清空公式区字段
+      this.pfform.rownumber = ''
+      this.pfform.columnumber = ''
+      this.pfform.signname = ''
+      this.pfform.timeformat = ''
+      this.editinfo = ''
+      this.tempformulasign = ''
+    },
+    ftck(obj, sign, editname) {
+      this.clearformula()
+      if (obj != undefined && obj != null) {
+        var objs = obj.split('<=>')
+        for (let i = 0; i < objs.length; i++) {
+          if (objs[i] != "") {
+            if (i == 0) {
+              this.pfform.rownumber = objs[i]
+            } else if (i == 1) {
+              this.pfform.columnumber = objs[i]
+            } else if (i == 2) {
+              this.pfform.signname = objs[i]
+            } else if (i == 3) {
+              this.pfform.timeformat = objs[i]
+            }
+          }
+        }
+      }
+      this.tempformulasign = sign;
+      this.editinfo = editname
+    },
+    genformula() {
+      if (this.tempformulasign==''){
+        this.$message.warning('请先选定左侧公式项')
+        return
+      }
+      if (!this.pfform.rownumber || !this.pfform.columnumber) {
+        this.$message.warning('填写必填项')
+        return
+      }
+      if ((this.pfform.signname && !this.pfform.timeformat) || (!this.pfform.signname && this.pfform.timeformat)) {
+        this.$message.warning('标签名称和时间格式要同时填写')
+        return
+      }
+      // 拼装公式
+      var resultStr = ''
+      if (this.pfform.rownumber) {
+        resultStr = this.pfform.rownumber
+      }
+      if (this.pfform.columnumber) {
+        resultStr = resultStr + '<=>' + this.pfform.columnumber
+      }
+      if (this.pfform.signname) {
+        resultStr = resultStr + '<=>' + this.pfform.signname
+      }
+      if (this.pfform.timeformat) {
+        resultStr = resultStr + '<=>' + this.pfform.timeformat
+      }
+      // 将生成的公式赋值到左侧表格中
+      if (this.tempformulasign == 'form.time') {
+        this.form.time = resultStr
+      }
+      else if (this.tempformulasign == 'form.tInst') {
+        this.form.tInst = resultStr
+      }
+      else if (this.tempformulasign == 'form.rhInst') {
+        this.form.rhInst = resultStr
+      }
+      else if (this.tempformulasign == 'form.paInst') {
+        this.form.paInst = resultStr
+      }
+      else if (this.tempformulasign == 'form.wsInst10') {
+        this.form.wsInst10 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wdInst10') {
+        this.form.wdInst10 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wsInst30') {
+        this.form.wsInst30 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wdInst30') {
+        this.form.wdInst30 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wsInst50') {
+        this.form.wsInst50 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wdInst50') {
+        this.form.wdInst50 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wsInst60') {
+        this.form.wsInst60 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wdInst60') {
+        this.form.wdInst60 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wsInst70') {
+        this.form.wsInst70 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wdInst70') {
+        this.form.wdInst70 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wsInst80') {
+        this.form.wsInst80 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wdInst80') {
+        this.form.wdInst80 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wsInst90') {
+        this.form.wsInst90 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wdInst90') {
+        this.form.wdInst90 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wsInst100') {
+        this.form.wsInst100 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wdInst100') {
+        this.form.wdInst100 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wsInst110') {
+        this.form.wsInst110 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wdInst110') {
+        this.form.wdInst110 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wsInst120') {
+        this.form.wsInst120 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wdInst120') {
+        this.form.wdInst120 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wsInstHubHeight') {
+        this.form.wsInstHubHeight = resultStr
+      }
+      else if (this.tempformulasign == 'form.wdInstHubHeight') {
+        this.form.wdInstHubHeight = resultStr
+      }
+      this.timer = new Date().getTime()
+      this.clearformula()
+    },
+    /*保存*/
+    handleSave(formName) {
+      if (!this.form.fileName || !this.form.time || !this.form.dataType || this.form.stationCode=="") {
+        this.$message.warning('填写必填项');
+        return false;
+      } else {
+        const data = this.form.stationCode
+        let data1 = "";
+        for (let n = 0; n < data.length; n++) {
+          for (let j = 0; j < this.stationCodeList.length; j++) {
+            if (data[n] == this.stationCodeList[j]["stationCode"]) {
+              data1 = data1 + this.stationCodeList[j]["stationCode"] + ","
+            }
+          }
+        }
+        data1 = data1.substr(0, data1.length - 1)
+        this.form.stationCode = data1
+        if (this.saveFlag === 1) {
+          this.$axios.post("/parsingCft",this.form).then(response => {
+            this.dialogVisible = false
+            this.getTableList()
+            this.tableLoading = false
+            this.$message.success(response.data.data)
+          }).catch(() => {
+            this.tableLoading = false
+          })
+        } else {
+          this.$axios.put("/parsingCft", this.form).then(response => {
+            this.dialogVisible = false
+            this.getTableList()
+            this.tableLoading = false
+            this.$message.success(response.data.data)
+          }).catch(() => {
+            this.tableLoading = false
+          })
+        }
+        this.visible = false
+      }
+    },
+    /*上报对象*/
+    handleAdd() {
+      this.saveFlag = 1
+      this.info = ''
+      this.form = {}
+      this.clearformula()
+      this.visible = true
+    },
+    /*上报对象编辑*/
+    handleEdit(row) {
+      this.saveFlag = 2
+      let newRow = Object.assign({},row)
+      let tempStationCode = newRow.stationCode.split(',')
+      this.form = newRow
+      this.form.stationCode = tempStationCode
+      this.clearformula()
+      this.visible = true
+    },
+    /*上报对象删除*/
+    handleDelete(row) {
+      this.$confirm('是否确认删除此条配置?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$axios.delete("/parsingCft/"+row.id).then(response => {
+          this.getTableList()
+          this.$message.success(response.data.data)
+        })
+      })
+    },
+    /*上报对象pageSize改变*/
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.page.currentPage = 1
+      this.getTableList()
+
+    },
+    /*上报对象currentPage改变*/
+    handleCurrentChange(val) {
+      this.page.currentPage = val
+      this.getTableList()
+    }
+  }
+}
+</script>
+
+<style scoped>
+.block {
+  float: right;
+}
+
+.myButton {
+  margin-bottom: .5%;
+}
+
+.uploadno {
+  background: #2d8cf0;
+  width: 20px;
+  height: 20px;
+  border-radius: 50%;
+  text-align: center;
+  display: inline-block;
+  color: #fff;
+}
+
+.el-divider--vertical {
+  display: inline-block;
+  width: 1px;
+  height: 35em;
+  margin: 0 8px;
+  vertical-align: middle;
+  position: relative;
+}
+
+/deep/ .formulaColor .el-input--small .el-input__inner {
+  height: 32px;
+  line-height: 32px;
+  background-color: #cccccc;
+}
+
+</style>

+ 457 - 0
cpp-ui/src/views/configManager/parsingConf/dqparsing.vue

@@ -0,0 +1,457 @@
+<template>
+  <div>
+    <el-button type="primary" icon="el-icon-plus" plain @click="handleAdd" class="myButton">新增</el-button>
+    <!--上报对象表格-->
+    <el-table
+      :data="tableData"
+      :header-cell-style="{background:'#ECF1FE',}"
+      v-loading="tableLoading" border style="width: 100%">
+      <el-table-column prop="fileName" align="center" label="文件名关键字" width="200px"></el-table-column>
+      <el-table-column prop="forecastTime" align="center" label="预测时间公式"  width="300px"></el-table-column>
+      <el-table-column prop="fpValue" align="center" label="预测数据公式"  width="300px"></el-table-column>
+      <el-table-column prop="dataType" align="center" label="数据类型" width="100px" :formatter="formatDataType"></el-table-column>
+      <el-table-column prop="stationCode" align="center" label="场站编号"></el-table-column>
+      <el-table-column label="操作" align="center" width="150px">
+        <template slot-scope="scope">
+          <el-button type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-button>
+          <el-button type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="block">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page=this.page.currentPage
+        :page-sizes="[10, 15, 30, 50]"
+        :page-size=this.page.pageSize
+        layout="total, sizes, prev, pager, next, jumper"
+        :total=this.page.total>
+      </el-pagination>
+    </div>
+    <!--编辑框-->
+    <el-dialog :title="saveFlag==1?'新增':'编辑'" :visible.sync="visible" width="100%">
+
+      <el-row :gutter="20">
+        <el-col :span="16">
+          <div>
+                    <span style="color: red">
+            <font size="4px">灰色文本框需要点击后,在右侧进行编辑录入!</font>
+                    </span>
+          </div>
+          &nbsp;
+          <div class="grid-content bg-purple">
+            <el-form v-model="form" ref="form" :key="timer">
+              <el-row :gutter="16">
+                <el-col :span="12">
+                  <el-form-item prop="fileName" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>文件名关键字
+                    </span>
+                    <el-input v-model="form.fileName" @focus="clearformula"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item prop="dataType" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>数据类型
+                    </span>
+                    <el-select v-model="form.dataType" clearable @focus="clearformula">
+                      <el-option
+                        v-for="item in this.dataType"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"/>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="12">
+                  <el-form-item prop="fpValue" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>预测数据公式
+                    </span>
+                    <el-input v-model="form.fpValue" readonly
+                              @click.native="ftck(form.fpValue,'form.fpValue','(预测数据)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item prop="forecastTime" label-width="110px"
+                                class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>预测时间公式
+                    </span>
+                    <el-input v-model="form.forecastTime" readonly
+                              @click.native="ftck(form.forecastTime,'form.forecastTime','(预测时间)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col :span="24">
+                  <el-form-item prop="stationCode" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>场站编号
+                    </span>
+                    <el-select v-model="form.stationCode" multiple clearable @focus="clearformula" style="width: 100%">
+                      <el-option
+                        v-for="item in this.stationCodeList"
+                        :key="item.stationCode"
+                        :label="item.stationCode"
+                        :value="item.stationCode"/>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="handleSave('form')">
+                <span v-if="saveFlag == 1">保 存</span>
+                <span v-else>修 改</span>
+              </el-button>
+              <el-button @click="visible = false">取 消</el-button>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="1">
+          <el-divider direction="vertical"></el-divider>
+        </el-col>
+        <el-col :span="6">
+          <h2>公式编辑区{{ this.editinfo }}</h2>
+          <el-form>
+            <el-row>
+              <el-col>
+                <el-form-item prop="rownumber" label-width="110px">
+                  <span slot="label">
+                      <font color="red">*</font>解析行
+                  </span>
+                  <el-input v-model="pfform.rownumber"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item prop="columnumber" label-width="110px">
+                  <span slot="label">
+                      <font color="red">*</font>解析列
+                  </span>
+                  <el-input v-model="pfform.columnumber"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="标签名" prop="signname" label-width="110px">
+                  <el-input v-model="pfform.signname"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="时间格式" prop="timeformat" label-width="110px">
+                  <el-select v-model="pfform.timeformat" clearable>
+                    <el-option
+                      v-for="item in this.timeFormat"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"/>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-button type="primary" @click="genformula">
+                <span>生成公式</span>
+              </el-button>
+              <el-button type="primary" @click="destoryformula">
+                <span>清除录入</span>
+              </el-button>
+            </el-row>
+          </el-form>
+        </el-col>
+      </el-row>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+
+export default {
+  name: "index",
+  data() {
+    return {
+      stationCodeList: [],
+      dataType: [
+        {value: 's', label: '时间单行'},
+        {value: 'm', label: '时间多行'}
+      ],
+      timeFormat: [
+        {value: 'yyyy-MM-dd HH:mm:ss', label: 'yyyy-MM-dd HH:mm:ss'},
+        {value: 'yyyy-MM-dd', label: 'yyyy-MM-dd'},
+        {value: 'yyyy-MM-dd_HH:mm', label: 'yyyy-MM-dd_HH:mm'},
+        {value: 'yyyy-MM-dd_HH:mm:ss', label: 'yyyy-MM-dd_HH:mm:ss'}
+      ],
+      editinfo: '',
+      timer: new Date().getTime(),
+      props: {multiple: true},
+      staionList: [],//场站集合
+      tableLoading: false,
+      tableData: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      info: '',
+      visible: false,
+      form: {
+        fileName: '',
+        forecastTime: '',
+        fpValue: '',
+        dataType: '',
+        stationCode: ''
+      },
+      pfform: {
+        rownumber: '',
+        columnumber: '',
+        signname: '',
+        timeformat: ''
+      },
+      tempformulasign: '',
+      saveFlag: 1
+    };
+  },
+  mounted() {
+    this.getElectricFieldList()
+    this.getTableList()
+  },
+  methods: {
+    formatDataType(row, column) {
+      let belongTo = '未知类型'
+      for (let i = 0; i < this.dataType.length; i++) {
+        if (row.dataType === this.dataType[i].value) {
+          belongTo = this.dataType[i].label
+        }
+      }
+      return belongTo
+    },
+    getTableList() {
+      this.tableLoading = true
+      // 获取列表
+      this.$axios.get("/parsingDq/page",Object.assign({
+        current: this.page.currentPage,
+        size: this.page.pageSize
+      })).then(response => {
+        this.tableData = response.data.data.records
+        this.page.total = response.data.data.total
+        this.tableLoading = false
+      }).catch((e) => {
+        this.tableLoading = false
+      })
+    },
+    getElectricFieldList() {
+      // 获取所有场站
+      this.$axios("/parsingInfo/getElectricField").then(response => {
+        this.stationCodeList = response.data.data
+        this.tableLoading = false
+      }).catch((e) => {
+        this.tableLoading = false
+      })
+    },
+    destoryformula() {
+      // 清空公式区字段
+      if (this.tempformulasign == 'form.forecastTime') {
+        this.form.forecastTime = ''
+      } else if (this.tempformulasign == 'form.fpValue') {
+        this.form.fpValue = ''
+      }
+      this.clearformula()
+    },
+    clearformula() {
+      // 清空公式区字段
+      this.pfform.rownumber = ''
+      this.pfform.columnumber = ''
+      this.pfform.signname = ''
+      this.pfform.timeformat = ''
+      this.editinfo = ''
+      this.tempformulasign = ''
+    },
+    ftck(obj, sign, editname) {
+      this.clearformula()
+      if (obj != undefined && obj != null) {
+        var objs = obj.split('<=>')
+        for (let i = 0; i < objs.length; i++) {
+          if (objs[i] != "") {
+            if (i == 0) {
+              this.pfform.rownumber = objs[i]
+            } else if (i == 1) {
+              this.pfform.columnumber = objs[i]
+            } else if (i == 2) {
+              this.pfform.signname = objs[i]
+            } else if (i == 3) {
+              this.pfform.timeformat = objs[i]
+            }
+          }
+        }
+      }
+      this.tempformulasign = sign;
+      this.editinfo = editname
+    },
+    genformula() {
+      if (this.tempformulasign==''){
+        this.$message.warning('请先选定左侧公式项')
+        return
+      }
+      if (!this.pfform.rownumber || !this.pfform.columnumber) {
+        this.$message.warning('填写必填项')
+        return
+      }
+      if ((this.pfform.signname && !this.pfform.timeformat) || (!this.pfform.signname && this.pfform.timeformat)) {
+        this.$message.warning('标签名称和时间格式要同时填写')
+        return
+      }
+      // 拼装公式
+      var resultStr = ''
+      if (this.pfform.rownumber) {
+        resultStr = this.pfform.rownumber
+      }
+      if (this.pfform.columnumber) {
+        resultStr = resultStr + '<=>' + this.pfform.columnumber
+      }
+      if (this.pfform.signname) {
+        resultStr = resultStr + '<=>' + this.pfform.signname
+      }
+      if (this.pfform.timeformat) {
+        resultStr = resultStr + '<=>' + this.pfform.timeformat
+      }
+      // 将生成的公式赋值到左侧表格中
+      if (this.tempformulasign == 'form.forecastTime') {
+        this.form.forecastTime = resultStr
+      } else if (this.tempformulasign == 'form.fpValue') {
+        this.form.fpValue = resultStr
+      }
+      this.timer = new Date().getTime()
+      this.clearformula()
+    },
+    /*保存*/
+    handleSave(formName) {
+      if (!this.form.fileName || !this.form.forecastTime || !this.form.fpValue || !this.form.dataType || this.form.stationCode=="") {
+        this.$message.warning('填写必填项');
+        return false;
+      } else {
+        const data = this.form.stationCode
+        let data1 = "";
+        for (let n = 0; n < data.length; n++) {
+          for (let j = 0; j < this.stationCodeList.length; j++) {
+            if (data[n] == this.stationCodeList[j]["stationCode"]) {
+              data1 = data1 + this.stationCodeList[j]["stationCode"] + ","
+            }
+          }
+        }
+        data1 = data1.substr(0, data1.length - 1)
+        this.form.stationCode = data1
+        if (this.saveFlag === 1) {
+          this.$axios.post("/parsingDq",this.form).then(response => {
+            this.dialogVisible = false
+            this.getTableList()
+            this.tableLoading = false
+            this.$message.success(response.data.data)
+          }).catch(() => {
+            this.tableLoading = false
+          })
+        } else {
+          console.log(this.form)
+          this.$axios.put("/parsingDq", this.form).then(response => {
+            this.dialogVisible = false
+            this.getTableList()
+            this.tableLoading = false
+            this.$message.success(response.data.data)
+          }).catch(() => {
+            this.tableLoading = false
+          })
+        }
+        this.visible = false
+      }
+    },
+    /*上报对象*/
+    handleAdd() {
+      this.saveFlag = 1
+      this.info = ''
+      this.form = {}
+      this.clearformula()
+      this.visible = true
+    },
+    /*上报对象编辑*/
+    handleEdit(row) {
+      this.saveFlag = 2
+      let newRow = Object.assign({},row)
+      let tempStationCode = newRow.stationCode.split(',')
+      this.form = newRow
+      this.form.stationCode = tempStationCode
+      this.clearformula()
+      this.visible = true
+    },
+    /*上报对象删除*/
+    handleDelete(row) {
+      this.$confirm('是否确认删除此条配置?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$axios.delete("/parsingDq/"+row.id).then(response => {
+          this.getTableList()
+          this.$message.success(response.data.data)
+        })
+      })
+    },
+    /*上报对象pageSize改变*/
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.page.currentPage = 1
+      this.getTableList()
+
+    },
+    /*上报对象currentPage改变*/
+    handleCurrentChange(val) {
+      this.page.currentPage = val
+      this.getTableList()
+    }
+  }
+}
+</script>
+
+<style scoped>
+.block {
+  float: right;
+}
+
+.myButton {
+  margin-bottom: .5%;
+}
+
+.uploadno {
+  background: #2d8cf0;
+  width: 20px;
+  height: 20px;
+  border-radius: 50%;
+  text-align: center;
+  display: inline-block;
+  color: #fff;
+}
+
+.el-divider--vertical {
+  display: inline-block;
+  width: 1px;
+  height: 35em;
+  margin: 0 8px;
+  vertical-align: middle;
+  position: relative;
+}
+
+/deep/ .formulaColor .el-input--small .el-input__inner {
+  height: 32px;
+  line-height: 32px;
+  background-color: #cccccc;
+}
+
+</style>

+ 723 - 0
cpp-ui/src/views/configManager/parsingConf/fjparsing.vue

@@ -0,0 +1,723 @@
+<template>
+  <div>
+    <el-button type="primary" icon="el-icon-plus" plain @click="handleAdd" class="myButton">新增</el-button>
+    <!--上报对象表格-->
+    <el-table
+      :data="tableData"
+      :header-cell-style="{background:'#ECF1FE'}"
+      v-loading="tableLoading" border style="width: 100%">
+      <el-table-column type="expand">
+        <template slot-scope="props">
+          <table style="width: 100%;text-align: left">
+            <tr>
+              <td>状态公式:{{ props.row.status }}</td>
+              <td>有功公式:{{ props.row.activePower }}</td>
+              <td>无功公式:{{ props.row.reactivePower }}</td>
+            </tr>
+            <tr>
+              <td>功率因数公式:{{ props.row.powerFactor }}</td>
+              <td>电压公式:{{ props.row.voltage }}</td>
+              <td>电流公式:{{ props.row.electricalCurrent }}</td>
+            </tr>
+            <tr>
+              <td>当日发电量公式:{{ props.row.dayElectricQuantity }}</td>
+              <td>累积发电量公式:{{ props.row.cumulativeGeneratedEnergy }}</td>
+              <td>并网小时数公式:{{ props.row.dayGridConnectedHours }}</td>
+            </tr>
+            <tr>
+              <td>转速公式:{{ props.row.windWheelRatedSpeed }}</td>
+              <td>风速公式:{{ props.row.ws }}</td>
+              <td>风向公式:{{ props.row.wd }}</td>
+            </tr>
+            <tr>
+              <td>温度公式:{{ props.row.t }}</td>
+              <td>桨距角公式:{{ props.row.pitchAngle }}</td>
+              <td></td>
+            </tr>
+          </table>
+        </template>
+      </el-table-column>
+      <el-table-column prop="fileName" align="center" label="文件名关键字" width="200px"></el-table-column>
+      <el-table-column prop="dataType" align="center" label="数据类型" width="100px" :formatter="formatDataType"></el-table-column>
+      <el-table-column prop="time" align="center" label="时间公式"  width="300px"></el-table-column>
+      <el-table-column prop="equipmentName" align="center" label="设备名称公式"  width="300px"></el-table-column>
+      <el-table-column prop="stationCode" align="center" label="场站编号"></el-table-column>
+      <el-table-column label="操作" align="center" width="150px">
+        <template slot-scope="scope">
+          <el-button type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-button>
+          <el-button type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="block">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page=this.page.currentPage
+        :page-sizes="[10, 15, 30, 50]"
+        :page-size=this.page.pageSize
+        layout="total, sizes, prev, pager, next, jumper"
+        :total=this.page.total>
+      </el-pagination>
+    </div>
+    <!--编辑框-->
+    <el-dialog :title="saveFlag==1?'新增':'编辑'" :visible.sync="visible" width="100%" :fullscreen="true">
+
+      <el-row :gutter="20">
+        <el-col :span="16">
+
+
+          <div>
+                    <span style="color: red">
+            <font size="4px">灰色文本框需要点击后,在右侧进行编辑录入!</font>
+                    </span>
+          </div>
+          &nbsp;
+          <div class="grid-content bg-purple">
+            <el-form v-model="form" ref="form" :key="timer">
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="fileName" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>文件名关键字
+                    </span>
+                    <el-input v-model="form.fileName" @focus="clearformula"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="dataType" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>数据类型
+                    </span>
+                    <el-select v-model="form.dataType" clearable @focus="clearformula">
+                      <el-option
+                        v-for="item in this.dataType"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"/>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="time" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>时间公式
+                    </span>
+                    <el-input v-model="form.time" readonly
+                              @click.native="ftck(form.time,'form.time','(时间)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="equipmentName" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>设备名称公式
+                    </span>
+                    <el-input v-model="form.equipmentName" readonly
+                              @click.native="ftck(form.equipmentName,'form.equipmentName','(设备名称)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col :span="24">
+                  <el-form-item prop="stationCode" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>场站编号
+                    </span>
+                    <el-select v-model="form.stationCode" multiple clearable @focus="clearformula" style="width: 100%">
+                      <el-option
+                        v-for="item in this.stationCodeList"
+                        :key="item.stationCode"
+                        :label="item.stationCode"
+                        :value="item.stationCode"/>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="status" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                     状态公式
+                    </span>
+                    <el-input v-model="form.status" readonly
+                              @click.native="ftck(form.status,'form.status','(状态)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="activePower" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      有功公式
+                    </span>
+                    <el-input v-model="form.activePower" readonly
+                              @click.native="ftck(form.activePower,'form.activePower','(有功)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="reactivePower" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      无功公式
+                    </span>
+                    <el-input v-model="form.reactivePower" readonly
+                              @click.native="ftck(form.reactivePower,'form.reactivePower','(无功)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="powerFactor" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                     功率因数公式
+                    </span>
+                    <el-input v-model="form.powerFactor" readonly
+                              @click.native="ftck(form.powerFactor,'form.powerFactor','(功率因数)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="voltage" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      电压公式
+                    </span>
+                    <el-input v-model="form.voltage" readonly
+                              @click.native="ftck(form.voltage,'form.voltage','(电压)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="electricalCurrent" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      电流公式
+                    </span>
+                    <el-input v-model="form.electricalCurrent" readonly
+                              @click.native="ftck(form.electricalCurrent,'form.electricalCurrent','(电流)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="dayElectricQuantity" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                     当日发电量公式
+                    </span>
+                    <el-input v-model="form.dayElectricQuantity" readonly
+                              @click.native="ftck(form.dayElectricQuantity,'form.dayElectricQuantity','(当日发电量)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="cumulativeGeneratedEnergy" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      累积发电量公式
+                    </span>
+                    <el-input v-model="form.cumulativeGeneratedEnergy" readonly
+                              @click.native="ftck(form.cumulativeGeneratedEnergy,'form.cumulativeGeneratedEnergy','(累积发电量)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="dayGridConnectedHours" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      并网小时数公式
+                    </span>
+                    <el-input v-model="form.dayGridConnectedHours" readonly
+                              @click.native="ftck(form.dayGridConnectedHours,'form.dayGridConnectedHours','(并网小时数)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="windWheelRatedSpeed" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                     转速公式
+                    </span>
+                    <el-input v-model="form.windWheelRatedSpeed" readonly
+                              @click.native="ftck(form.windWheelRatedSpeed,'form.windWheelRatedSpeed','(转速)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="ws" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      风速公式
+                    </span>
+                    <el-input v-model="form.ws" readonly
+                              @click.native="ftck(form.ws,'form.ws','(风速)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wd" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      风向公式
+                    </span>
+                    <el-input v-model="form.wd" readonly
+                              @click.native="ftck(form.wd,'form.wd','(风向)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="t" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                     温度公式
+                    </span>
+                    <el-input v-model="form.t" readonly
+                              @click.native="ftck(form.t,'form.t','(温度)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="pitchAngle" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      桨距角公式
+                    </span>
+                    <el-input v-model="form.pitchAngle" readonly
+                              @click.native="ftck(form.pitchAngle,'form.pitchAngle','(桨距角)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="handleSave('form')">
+                <span v-if="saveFlag == 1">保 存</span>
+                <span v-else>修 改</span>
+              </el-button>
+              <el-button @click="visible = false">取 消</el-button>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="1">
+          <el-divider direction="vertical" style="height: 200px"></el-divider>
+        </el-col>
+        <el-col :span="5">
+          <h2>公式编辑区{{ this.editinfo }}</h2>
+          <el-form>
+            <el-row>
+              <el-col>
+                <el-form-item prop="rownumber" label-width="110px">
+                  <span slot="label">
+                      <font color="red">*</font>解析行
+                  </span>
+                  <el-input v-model="pfform.rownumber"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item prop="columnumber" label-width="110px">
+                  <span slot="label">
+                      <font color="red">*</font>解析列
+                  </span>
+                  <el-input v-model="pfform.columnumber"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="标签名" prop="signname" label-width="110px">
+                  <el-input v-model="pfform.signname"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="时间格式" prop="timeformat" label-width="110px">
+                  <el-select v-model="pfform.timeformat" clearable>
+                    <el-option
+                      v-for="item in this.timeFormat"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"/>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-button type="primary" @click="genformula">
+                <span>生成公式</span>
+              </el-button>
+              <el-button type="primary" @click="destoryformula">
+                <span>清除录入</span>
+              </el-button>
+            </el-row>
+          </el-form>
+        </el-col>
+      </el-row>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+
+export default {
+  name: "index",
+  data() {
+    return {
+      stationCodeList: [],
+      dataType: [
+        {value: 's', label: '时间单行'},
+        {value: 'm', label: '时间多行'}
+      ],
+      timeFormat: [
+        {value: 'yyyy-MM-dd HH:mm:ss', label: 'yyyy-MM-dd HH:mm:ss'},
+        {value: 'yyyy-MM-dd', label: 'yyyy-MM-dd'},
+        {value: 'yyyy-MM-dd_HH:mm', label: 'yyyy-MM-dd_HH:mm'},
+        {value: 'yyyy-MM-dd_HH:mm:ss', label: 'yyyy-MM-dd_HH:mm:ss'}
+      ],
+      editinfo: '',
+      timer: new Date().getTime(),
+      props: {multiple: true},
+      staionList: [],//场站集合
+      tableLoading: false,
+      tableData: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      info: '',
+      visible: false,
+      form: {
+        fileName: '',
+        time: '',
+        dataType: '',
+        stationCode: '',
+        status: '',
+        activePower: '',
+        reactivePower: '',
+        powerFactor: '',
+        voltage: '',
+        electricalCurrent: '',
+        dayElectricQuantity: '',
+        cumulativeGeneratedEnergy: '',
+        dayGridConnectedHours: '',
+        equipmentName: '',
+        ws:'',
+        wd:'',
+        t:'',
+        pitchAngle:''
+      },
+      pfform: {
+        rownumber: '',
+        columnumber: '',
+        signname: '',
+        timeformat: ''
+      },
+      tempformulasign: '',
+      saveFlag: 1
+    };
+  },
+  mounted() {
+    this.getElectricFieldList()
+    this.getTableList()
+  },
+  methods: {
+    formatDataType(row, column) {
+      let belongTo = '未知类型'
+      for (let i = 0; i < this.dataType.length; i++) {
+        if (row.dataType === this.dataType[i].value) {
+          belongTo = this.dataType[i].label
+        }
+      }
+      return belongTo
+    },
+    getTableList() {
+      this.tableLoading = true
+      // 获取列表
+      this.$axios.get("/parsingFj/page",Object.assign({
+        current: this.page.currentPage,
+        size: this.page.pageSize
+      })).then(response => {
+        this.tableData = response.data.data.records
+        this.page.total = response.data.data.total
+        this.tableLoading = false
+      }).catch((e) => {
+        this.tableLoading = false
+      })
+    },
+    getElectricFieldList() {
+      // 获取所有场站
+      this.$axios("/parsingInfo/getElectricField").then(response => {
+        this.stationCodeList = response.data.data
+        this.tableLoading = false
+      }).catch((e) => {
+        this.tableLoading = false
+      })
+    },
+    destoryformula() {
+      // 清空公式区字段
+      if (this.tempformulasign == 'form.time') {
+        this.form.time = ''
+      }
+      else if (this.tempformulasign == 'form.equipmentName') {
+        this.form.equipmentName = ''
+      }
+      else if (this.tempformulasign == 'form.status') {
+        this.form.status = ''
+      }
+      else if (this.tempformulasign == 'form.activePower') {
+        this.form.activePower = ''
+      }
+      else if (this.tempformulasign == 'form.reactivePower') {
+        this.form.reactivePower = ''
+      }
+      else if (this.tempformulasign == 'form.powerFactor') {
+        this.form.powerFactor = ''
+      }
+      else if (this.tempformulasign == 'form.voltage') {
+        this.form.voltage = ''
+      }
+      else if (this.tempformulasign == 'form.electricalCurrent') {
+        this.form.electricalCurrent = ''
+      }
+      else if (this.tempformulasign == 'form.dayElectricQuantity') {
+        this.form.dayElectricQuantity = ''
+      }
+      else if (this.tempformulasign == 'form.cumulativeGeneratedEnergy') {
+        this.form.cumulativeGeneratedEnergy = ''
+      }
+      else if (this.tempformulasign == 'form.dayGridConnectedHours') {
+        this.form.dayGridConnectedHours = ''
+      }
+      else if (this.tempformulasign == 'form.windWheelRatedSpeed') {
+        this.form.windWheelRatedSpeed = ''
+      }
+      else if (this.tempformulasign == 'form.ws') {
+        this.form.ws = ''
+      }
+      else if (this.tempformulasign == 'form.wd') {
+        this.form.wd = ''
+      }
+      else if (this.tempformulasign == 'form.t') {
+        this.form.t = ''
+      }
+      else if (this.tempformulasign == 'form.pitchAngle') {
+        this.form.pitchAngle = ''
+      }
+      this.clearformula()
+    },
+    clearformula() {
+      // 清空公式区字段
+      this.pfform.rownumber = ''
+      this.pfform.columnumber = ''
+      this.pfform.signname = ''
+      this.pfform.timeformat = ''
+      this.editinfo = ''
+      this.tempformulasign = ''
+    },
+    ftck(obj, sign, editname) {
+      this.clearformula()
+      if (obj != undefined && obj != null) {
+        var objs = obj.split('<=>')
+        for (let i = 0; i < objs.length; i++) {
+          if (objs[i] != "") {
+            if (i == 0) {
+              this.pfform.rownumber = objs[i]
+            } else if (i == 1) {
+              this.pfform.columnumber = objs[i]
+            } else if (i == 2) {
+              this.pfform.signname = objs[i]
+            } else if (i == 3) {
+              this.pfform.timeformat = objs[i]
+            }
+          }
+        }
+      }
+      this.tempformulasign = sign;
+      this.editinfo = editname
+    },
+    genformula() {
+      if (this.tempformulasign==''){
+        this.$message.warning('请先选定左侧公式项')
+        return
+      }
+      if (!this.pfform.rownumber || !this.pfform.columnumber) {
+        this.$message.warning('填写必填项')
+        return
+      }
+      if ((this.pfform.signname && !this.pfform.timeformat) || (!this.pfform.signname && this.pfform.timeformat)) {
+        this.$message.warning('标签名称和时间格式要同时填写')
+        return
+      }
+      // 拼装公式
+      var resultStr = ''
+      if (this.pfform.rownumber) {
+        resultStr = this.pfform.rownumber
+      }
+      if (this.pfform.columnumber) {
+        resultStr = resultStr + '<=>' + this.pfform.columnumber
+      }
+      if (this.pfform.signname) {
+        resultStr = resultStr + '<=>' + this.pfform.signname
+      }
+      if (this.pfform.timeformat) {
+        resultStr = resultStr + '<=>' + this.pfform.timeformat
+      }
+      // 将生成的公式赋值到左侧表格中
+      if (this.tempformulasign == 'form.time') {
+        this.form.time = resultStr
+      }
+      else if (this.tempformulasign == 'form.equipmentName') {
+        this.form.equipmentName = resultStr
+      }
+      else if (this.tempformulasign == 'form.status') {
+        this.form.status = resultStr
+      }
+      else if (this.tempformulasign == 'form.activePower') {
+        this.form.activePower = resultStr
+      }
+      else if (this.tempformulasign == 'form.reactivePower') {
+        this.form.reactivePower = resultStr
+      }
+      else if (this.tempformulasign == 'form.powerFactor') {
+        this.form.powerFactor = resultStr
+      }
+      else if (this.tempformulasign == 'form.voltage') {
+        this.form.voltage = resultStr
+      }
+      else if (this.tempformulasign == 'form.electricalCurrent') {
+        this.form.electricalCurrent = resultStr
+      }
+      else if (this.tempformulasign == 'form.dayElectricQuantity') {
+        this.form.dayElectricQuantity = resultStr
+      }
+      else if (this.tempformulasign == 'form.cumulativeGeneratedEnergy') {
+        this.form.cumulativeGeneratedEnergy = resultStr
+      }
+      else if (this.tempformulasign == 'form.dayGridConnectedHours') {
+        this.form.dayGridConnectedHours = resultStr
+      }
+      else if (this.tempformulasign == 'form.windWheelRatedSpeed') {
+        this.form.windWheelRatedSpeed = resultStr
+      }
+      else if (this.tempformulasign == 'form.ws') {
+        this.form.ws = resultStr
+      }
+      else if (this.tempformulasign == 'form.wd') {
+        this.form.wd = resultStr
+      }
+      else if (this.tempformulasign == 'form.t') {
+        this.form.t = resultStr
+      }
+      else if (this.tempformulasign == 'form.pitchAngle') {
+        this.form.pitchAngle = resultStr
+      }
+      this.timer = new Date().getTime()
+      this.clearformula()
+    },
+    /*保存*/
+    handleSave(formName) {
+      if (!this.form.fileName || !this.form.time || !this.form.equipmentName || !this.form.dataType || this.form.stationCode=="") {
+        this.$message.warning('填写必填项');
+        return false;
+      } else {
+        const data = this.form.stationCode
+        let data1 = "";
+        for (let n = 0; n < data.length; n++) {
+          for (let j = 0; j < this.stationCodeList.length; j++) {
+            if (data[n] == this.stationCodeList[j]["stationCode"]) {
+              data1 = data1 + this.stationCodeList[j]["stationCode"] + ","
+            }
+          }
+        }
+        data1 = data1.substr(0, data1.length - 1)
+        this.form.stationCode = data1
+        if (this.saveFlag === 1) {
+          this.$axios.post("/parsingFj",this.form).then(response => {
+            this.dialogVisible = false
+            this.getTableList()
+            this.tableLoading = false
+            this.$message.success(response.data.data)
+          }).catch(() => {
+            this.tableLoading = false
+          })
+        } else {
+          this.$axios.put("/parsingFj", this.form).then(response => {
+            this.dialogVisible = false
+            this.getTableList()
+            this.tableLoading = false
+            this.$message.success(response.data.data)
+          }).catch(() => {
+            this.tableLoading = false
+          })
+        }
+        this.visible = false
+      }
+    },
+    /*上报对象*/
+    handleAdd() {
+      this.saveFlag = 1
+      this.info = ''
+      this.form = {}
+      this.clearformula()
+      this.visible = true
+    },
+    /*上报对象编辑*/
+    handleEdit(row) {
+      this.saveFlag = 2
+      let newRow = Object.assign({},row)
+      let tempStationCode = newRow.stationCode.split(',')
+      this.form = newRow
+      this.form.stationCode = tempStationCode
+      this.clearformula()
+      this.visible = true
+    },
+    /*上报对象删除*/
+    handleDelete(row) {
+      this.$confirm('是否确认删除此条配置?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$axios.delete("/parsingFj/"+row.id).then(response => {
+          this.getTableList()
+          this.$message.success(response.data.data)
+        })
+      })
+    },
+    /*上报对象pageSize改变*/
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.page.currentPage = 1
+      this.getTableList()
+
+    },
+    /*上报对象currentPage改变*/
+    handleCurrentChange(val) {
+      this.page.currentPage = val
+      this.getTableList()
+    }
+  }
+}
+</script>
+
+<style scoped>
+.block {
+  float: right;
+}
+
+.myButton {
+  margin-bottom: .5%;
+}
+
+.uploadno {
+  background: #2d8cf0;
+  width: 20px;
+  height: 20px;
+  border-radius: 50%;
+  text-align: center;
+  display: inline-block;
+  color: #fff;
+}
+
+.el-divider--vertical {
+  display: inline-block;
+  width: 1px;
+  height: 35em;
+  margin: 0 8px;
+  vertical-align: middle;
+  position: relative;
+}
+
+/deep/ .formulaColor .el-input--small .el-input__inner {
+  height: 32px;
+  line-height: 32px;
+  background-color: #cccccc;
+}
+
+</style>

+ 172 - 0
cpp-ui/src/views/configManager/parsingConf/index.vue

@@ -0,0 +1,172 @@
+<template>
+  <div>
+    <basic-container>
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <el-tab-pane label="短期" name="dq">
+          <dqparsing v-if="isDq"/>
+        </el-tab-pane>
+        <el-tab-pane label="超短期" name="cdq">
+          <cdqparsing v-if="isCdq"/>
+        </el-tab-pane>
+<!--        <el-tab-pane label="nwp" name="nwp">-->
+<!--          <nwpparsing v-if="isNwp"/>-->
+<!--        </el-tab-pane>-->
+        <el-tab-pane label="实际功率" name="rp">
+          <rpparsing v-if="isRp"/>
+        </el-tab-pane>
+        <el-tab-pane label="测风塔" name="cft">
+          <cftparsing v-if="isCft"/>
+        </el-tab-pane>
+        <el-tab-pane label="风机" name="fj">
+          <fjparsing v-if="isFj"/>
+        </el-tab-pane>
+        <el-tab-pane label="气象站" name="qxz">
+          <qxzparsing v-if="isQxz"/>
+        </el-tab-pane>
+        <el-tab-pane label="逆变器" name="nbq">
+          <nbqparsing v-if="isNbq"/>
+        </el-tab-pane>
+      </el-tabs>
+      <!--通道配置的编辑框-->
+      <!--文件类型配置的编辑框-->
+    </basic-container>
+  </div>
+</template>
+<script>
+import dqparsing from "./dqparsing";
+import cdqparsing from "./cdqparsing";
+import nwpparsing from "./nwpparsing";
+import qxzparsing from "./qxzparsing";
+import cftparsing from "./cftparsing";
+import nbqparsing from "./nbqparsing";
+import fjparsing from "./fjparsing";
+import rpparsing from "./rpparsing";
+
+export default {
+  data() {
+    return {
+      activeName: 'dq',
+      isDq:true,
+      isCdq:false,
+      isNwp:false,
+      isQxz:false,
+      isCft:false,
+      isNbq:false,
+      isFj:false,
+      isRp:false,
+      btnLonding: false
+    }
+  },
+  components: {
+    dqparsing,
+    cdqparsing,
+    nwpparsing,
+    qxzparsing,
+    cftparsing,
+    nbqparsing,
+    fjparsing,
+    rpparsing
+  },
+  methods:{
+    handleClick(tab){
+      if (tab.name==='dq'){
+        this.isDq = true
+        this.isCdq = false
+        this.isNwp = false
+        this.isQxz = false
+        this.isCft = false
+        this.isNbq = false
+        this.isFj = false
+        this.isRp = false
+      }
+      else if (tab.name==='cdq'){
+        this.isDq = false
+        this.isCdq = true
+        this.isNwp = false
+        this.isQxz = false
+        this.isCft = false
+        this.isNbq = false
+        this.isFj = false
+        this.isRp = false
+      }
+      else if (tab.name==='nwp'){
+        this.isDq = false
+        this.isCdq = false
+        this.isNwp = true
+        this.isQxz = false
+        this.isCft = false
+        this.isNbq = false
+        this.isFj = false
+        this.isRp = false
+      }
+      else if (tab.name==='qxz'){
+        this.isDq = false
+        this.isCdq = false
+        this.isNwp = false
+        this.isQxz = true
+        this.isCft = false
+        this.isNbq = false
+        this.isFj = false
+        this.isRp = false
+      }
+      else if (tab.name==='cft'){
+        this.isDq = false
+        this.isCdq = false
+        this.isNwp = false
+        this.isQxz = false
+        this.isCft = true
+        this.isNbq = false
+        this.isFj = false
+        this.isRp = false
+      }
+      else if (tab.name==='nbq'){
+        this.isDq = false
+        this.isCdq = false
+        this.isNwp = false
+        this.isQxz = false
+        this.isCft = false
+        this.isNbq = true
+        this.isFj = false
+        this.isRp = false
+      }
+      else if (tab.name==='fj'){
+        this.isDq = false
+        this.isCdq = false
+        this.isNwp = false
+        this.isQxz = false
+        this.isCft = false
+        this.isNbq = false
+        this.isFj = true
+        this.isRp = false
+      }
+      else if (tab.name==='rp'){
+        this.isDq = false
+        this.isCdq = false
+        this.isNwp = false
+        this.isQxz = false
+        this.isCft = false
+        this.isNbq = false
+        this.isFj = false
+        this.isRp = true
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.app-container {
+
+}
+
+.pagination {
+  margin: 20px 0;
+  text-align: right;
+}
+
+td {
+  width: 33%;
+  height: 30px;
+}
+
+</style>

+ 631 - 0
cpp-ui/src/views/configManager/parsingConf/nbqparsing.vue

@@ -0,0 +1,631 @@
+<template>
+  <div>
+    <el-button type="primary" icon="el-icon-plus" plain @click="handleAdd" class="myButton">新增</el-button>
+    <!--上报对象表格-->
+    <el-table
+      :data="tableData"
+      :header-cell-style="{background:'#ECF1FE'}"
+      v-loading="tableLoading" border style="width: 100%">
+      <el-table-column type="expand">
+        <template slot-scope="props">
+          <table style="width: 100%;text-align: left">
+            <tr>
+              <td>状态公式:{{ props.row.status }}</td>
+              <td>有功公式:{{ props.row.activePower }}</td>
+              <td>无功公式:{{ props.row.reactivePower }}</td>
+            </tr>
+            <tr>
+              <td>功率因数公式:{{ props.row.powerFactor }}</td>
+              <td>电压公式:{{ props.row.voltage }}</td>
+              <td>电流公式:{{ props.row.electricalCurrent }}</td>
+            </tr>
+            <tr>
+              <td>当日发电量公式:{{ props.row.dayElectricQuantity }}</td>
+              <td>累计发电量公式:{{ props.row.cumulativeGeneratedEnergy }}</td>
+              <td>并网小时数公式:{{ props.row.dayGridConnectedHours }}</td>
+            </tr>
+          </table>
+        </template>
+      </el-table-column>
+      <el-table-column prop="fileName" align="center" label="文件名关键字" width="200px"></el-table-column>
+      <el-table-column prop="dataType" align="center" label="数据类型" width="100px" :formatter="formatDataType"></el-table-column>
+      <el-table-column prop="time" align="center" label="时间公式"  width="300px"></el-table-column>
+      <el-table-column prop="equipmentName" align="center" label="设备名称公式"  width="300px"></el-table-column>
+      <el-table-column prop="stationCode" align="center" label="场站编号"></el-table-column>
+      <el-table-column label="操作" align="center" width="150px">
+        <template slot-scope="scope">
+          <el-button type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-button>
+          <el-button type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="block">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page=this.page.currentPage
+        :page-sizes="[10, 15, 30, 50]"
+        :page-size=this.page.pageSize
+        layout="total, sizes, prev, pager, next, jumper"
+        :total=this.page.total>
+      </el-pagination>
+    </div>
+    <!--编辑框-->
+    <el-dialog :title="saveFlag==1?'新增':'编辑'" :visible.sync="visible" width="100%" :fullscreen="true">
+
+      <el-row :gutter="20">
+        <el-col :span="16">
+
+
+          <div>
+                    <span style="color: red">
+            <font size="4px">灰色文本框需要点击后,在右侧进行编辑录入!</font>
+                    </span>
+          </div>
+          &nbsp;
+          <div class="grid-content bg-purple">
+            <el-form v-model="form" ref="form" :key="timer">
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="fileName" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>文件名关键字
+                    </span>
+                    <el-input v-model="form.fileName" @focus="clearformula"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="dataType" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>数据类型
+                    </span>
+                    <el-select v-model="form.dataType" clearable @focus="clearformula">
+                      <el-option
+                        v-for="item in this.dataType"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"/>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="time" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>时间公式
+                    </span>
+                    <el-input v-model="form.time" readonly
+                              @click.native="ftck(form.time,'form.time','(时间)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="equipmentName" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>设备名称公式
+                    </span>
+                    <el-input v-model="form.equipmentName" readonly
+                              @click.native="ftck(form.equipmentName,'form.equipmentName','(设备名称)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col :span="24">
+                  <el-form-item prop="stationCode" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>场站编号
+                    </span>
+                    <el-select v-model="form.stationCode" multiple clearable @focus="clearformula" style="width: 100%">
+                      <el-option
+                        v-for="item in this.stationCodeList"
+                        :key="item.stationCode"
+                        :label="item.stationCode"
+                        :value="item.stationCode"/>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="status" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                     状态公式
+                    </span>
+                    <el-input v-model="form.status" readonly
+                              @click.native="ftck(form.status,'form.status','(状态)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="activePower" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      有功公式
+                    </span>
+                    <el-input v-model="form.activePower" readonly
+                              @click.native="ftck(form.activePower,'form.activePower','(有功)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="reactivePower" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      无功公式
+                    </span>
+                    <el-input v-model="form.reactivePower" readonly
+                              @click.native="ftck(form.reactivePower,'form.reactivePower','(无功)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="powerFactor" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                     功率因数公式
+                    </span>
+                    <el-input v-model="form.powerFactor" readonly
+                              @click.native="ftck(form.powerFactor,'form.powerFactor','(功率因数)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="voltage" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      电压公式
+                    </span>
+                    <el-input v-model="form.voltage" readonly
+                              @click.native="ftck(form.voltage,'form.voltage','(电压)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="electricalCurrent" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      电流公式
+                    </span>
+                    <el-input v-model="form.electricalCurrent" readonly
+                              @click.native="ftck(form.electricalCurrent,'form.electricalCurrent','(电流)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="dayElectricQuantity" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                     当日发电量公式
+                    </span>
+                    <el-input v-model="form.dayElectricQuantity" readonly
+                              @click.native="ftck(form.dayElectricQuantity,'form.dayElectricQuantity','(当日发电量)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="cumulativeGeneratedEnergy" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      累计发电量公式
+                    </span>
+                    <el-input v-model="form.cumulativeGeneratedEnergy" readonly
+                              @click.native="ftck(form.cumulativeGeneratedEnergy,'form.cumulativeGeneratedEnergy','(累积发电量)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="dayGridConnectedHours" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      并网小时数公式
+                    </span>
+                    <el-input v-model="form.dayGridConnectedHours" readonly
+                              @click.native="ftck(form.dayGridConnectedHours,'form.dayGridConnectedHours','(并网小时数)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="handleSave('form')">
+                <span v-if="saveFlag == 1">保 存</span>
+                <span v-else>修 改</span>
+              </el-button>
+              <el-button @click="visible = false">取 消</el-button>
+            </div>
+          </div>
+
+        </el-col>
+        <el-col :span="1">
+          <el-divider direction="vertical" style="height: 200px"></el-divider>
+        </el-col>
+        <el-col :span="5">
+          <h2>公式编辑区{{ this.editinfo }}</h2>
+          <el-form>
+            <el-row>
+              <el-col>
+                <el-form-item prop="rownumber" label-width="110px">
+                  <span slot="label">
+                      <font color="red">*</font>解析行
+                  </span>
+                  <el-input v-model="pfform.rownumber"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item prop="columnumber" label-width="110px">
+                  <span slot="label">
+                      <font color="red">*</font>解析列
+                  </span>
+                  <el-input v-model="pfform.columnumber"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="标签名" prop="signname" label-width="110px">
+                  <el-input v-model="pfform.signname"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="时间格式" prop="timeformat" label-width="110px">
+                  <el-select v-model="pfform.timeformat" clearable>
+                    <el-option
+                      v-for="item in this.timeFormat"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"/>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-button type="primary" @click="genformula">
+                <span>生成公式</span>
+              </el-button>
+              <el-button type="primary" @click="destoryformula">
+                <span>清除录入</span>
+              </el-button>
+            </el-row>
+          </el-form>
+        </el-col>
+      </el-row>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+
+export default {
+  name: "index",
+  data() {
+    return {
+      stationCodeList: [],
+      dataType: [
+        {value: 's', label: '时间单行'},
+        {value: 'm', label: '时间多行'}
+      ],
+      timeFormat: [
+        {value: 'yyyy-MM-dd HH:mm:ss', label: 'yyyy-MM-dd HH:mm:ss'},
+        {value: 'yyyy-MM-dd', label: 'yyyy-MM-dd'},
+        {value: 'yyyy-MM-dd_HH:mm', label: 'yyyy-MM-dd_HH:mm'},
+        {value: 'yyyy-MM-dd_HH:mm:ss', label: 'yyyy-MM-dd_HH:mm:ss'}
+      ],
+      editinfo: '',
+      timer: new Date().getTime(),
+      props: {multiple: true},
+      staionList: [],//场站集合
+      tableLoading: false,
+      tableData: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      info: '',
+      visible: false,
+      form: {
+        fileName: '',
+        time: '',
+        dataType: '',
+        stationCode: '',
+        status: '',
+        activePower: '',
+        reactivePower: '',
+        powerFactor: '',
+        voltage: '',
+        electricalCurrent: '',
+        dayElectricQuantity: '',
+        cumulativeGeneratedEnergy: '',
+        dayGridConnectedHours: '',
+        equipmentName: ''
+      },
+      pfform: {
+        rownumber: '',
+        columnumber: '',
+        signname: '',
+        timeformat: ''
+      },
+      tempformulasign: '',
+      saveFlag: 1
+    };
+  },
+  mounted() {
+    this.getElectricFieldList()
+    this.getTableList()
+  },
+  methods: {
+    formatDataType(row, column) {
+      let belongTo = '未知类型'
+      for (let i = 0; i < this.dataType.length; i++) {
+        if (row.dataType === this.dataType[i].value) {
+          belongTo = this.dataType[i].label
+        }
+      }
+      return belongTo
+    },
+    getTableList() {
+      this.tableLoading = true
+      // 获取列表
+      this.$axios.get("/parsingNbq/page",Object.assign({
+        current: this.page.currentPage,
+        size: this.page.pageSize
+      })).then(response => {
+        this.tableData = response.data.data.records
+        this.page.total = response.data.data.total
+        this.tableLoading = false
+      }).catch((e) => {
+        this.tableLoading = false
+      })
+    },
+    getElectricFieldList() {
+      // 获取所有场站
+      this.$axios("/parsingInfo/getElectricField").then(response => {
+        this.stationCodeList = response.data.data
+        this.tableLoading = false
+      }).catch((e) => {
+        this.tableLoading = false
+      })
+    },
+    destoryformula() {
+      // 清空公式区字段
+      if (this.tempformulasign == 'form.time') {
+        this.form.time = ''
+      }
+      else if (this.tempformulasign == 'form.equipmentName') {
+        this.form.equipmentName = ''
+      }
+      else if (this.tempformulasign == 'form.status') {
+        this.form.status = ''
+      }
+      else if (this.tempformulasign == 'form.activePower') {
+        this.form.activePower = ''
+      }
+      else if (this.tempformulasign == 'form.reactivePower') {
+        this.form.reactivePower = ''
+      }
+      else if (this.tempformulasign == 'form.powerFactor') {
+        this.form.powerFactor = ''
+      }
+      else if (this.tempformulasign == 'form.voltage') {
+        this.form.voltage = ''
+      }
+      else if (this.tempformulasign == 'form.electricalCurrent') {
+        this.form.electricalCurrent = ''
+      }
+      else if (this.tempformulasign == 'form.dayElectricQuantity') {
+        this.form.dayElectricQuantity = ''
+      }
+      else if (this.tempformulasign == 'form.cumulativeGeneratedEnergy') {
+        this.form.cumulativeGeneratedEnergy = ''
+      }
+      else if (this.tempformulasign == 'form.dayGridConnectedHours') {
+        this.form.dayGridConnectedHours = ''
+      }
+      this.clearformula()
+    },
+    clearformula() {
+      // 清空公式区字段
+      this.pfform.rownumber = ''
+      this.pfform.columnumber = ''
+      this.pfform.signname = ''
+      this.pfform.timeformat = ''
+      this.editinfo = ''
+      this.tempformulasign = ''
+    },
+    ftck(obj, sign, editname) {
+      this.clearformula()
+      if (obj != undefined && obj != null) {
+        var objs = obj.split('<=>')
+        for (let i = 0; i < objs.length; i++) {
+          if (objs[i] != "") {
+            if (i == 0) {
+              this.pfform.rownumber = objs[i]
+            } else if (i == 1) {
+              this.pfform.columnumber = objs[i]
+            } else if (i == 2) {
+              this.pfform.signname = objs[i]
+            } else if (i == 3) {
+              this.pfform.timeformat = objs[i]
+            }
+          }
+        }
+      }
+      this.tempformulasign = sign;
+      this.editinfo = editname
+    },
+    genformula() {
+      if (this.tempformulasign==''){
+        this.$message.warning('请先选定左侧公式项')
+        return
+      }
+      if (!this.pfform.rownumber || !this.pfform.columnumber) {
+        this.$message.warning('填写必填项')
+        return
+      }
+      if ((this.pfform.signname && !this.pfform.timeformat) || (!this.pfform.signname && this.pfform.timeformat)) {
+        this.$message.warning('标签名称和时间格式要同时填写')
+        return
+      }
+      // 拼装公式
+      var resultStr = ''
+      if (this.pfform.rownumber) {
+        resultStr = this.pfform.rownumber
+      }
+      if (this.pfform.columnumber) {
+        resultStr = resultStr + '<=>' + this.pfform.columnumber
+      }
+      if (this.pfform.signname) {
+        resultStr = resultStr + '<=>' + this.pfform.signname
+      }
+      if (this.pfform.timeformat) {
+        resultStr = resultStr + '<=>' + this.pfform.timeformat
+      }
+      // 将生成的公式赋值到左侧表格中
+      if (this.tempformulasign == 'form.time') {
+        this.form.time = resultStr
+      }
+      else if (this.tempformulasign == 'form.equipmentName') {
+        this.form.equipmentName = resultStr
+      }
+      else if (this.tempformulasign == 'form.status') {
+        this.form.status = resultStr
+      }
+      else if (this.tempformulasign == 'form.activePower') {
+        this.form.activePower = resultStr
+      }
+      else if (this.tempformulasign == 'form.reactivePower') {
+        this.form.reactivePower = resultStr
+      }
+      else if (this.tempformulasign == 'form.powerFactor') {
+        this.form.powerFactor = resultStr
+      }
+      else if (this.tempformulasign == 'form.voltage') {
+        this.form.voltage = resultStr
+      }
+      else if (this.tempformulasign == 'form.electricalCurrent') {
+        this.form.electricalCurrent = resultStr
+      }
+      else if (this.tempformulasign == 'form.dayElectricQuantity') {
+        this.form.dayElectricQuantity = resultStr
+      }
+      else if (this.tempformulasign == 'form.cumulativeGeneratedEnergy') {
+        this.form.cumulativeGeneratedEnergy = resultStr
+      }
+      else if (this.tempformulasign == 'form.dayGridConnectedHours') {
+        this.form.dayGridConnectedHours = resultStr
+      }
+      this.timer = new Date().getTime()
+      this.clearformula()
+    },
+    /*保存*/
+    handleSave(formName) {
+      if (!this.form.fileName || !this.form.time || !this.form.equipmentName || !this.form.dataType || this.form.stationCode=="") {
+        this.$message.warning('填写必填项');
+        return false;
+      } else {
+        const data = this.form.stationCode
+        let data1 = "";
+        for (let n = 0; n < data.length; n++) {
+          for (let j = 0; j < this.stationCodeList.length; j++) {
+            if (data[n] == this.stationCodeList[j]["stationCode"]) {
+              data1 = data1 + this.stationCodeList[j]["stationCode"] + ","
+            }
+          }
+        }
+        data1 = data1.substr(0, data1.length - 1)
+        this.form.stationCode = data1
+        if (this.saveFlag === 1) {
+          this.$axios.post("/parsingNbq",this.form).then(response => {
+            this.dialogVisible = false
+            this.getTableList()
+            this.tableLoading = false
+            this.$message.success(response.data.data)
+          }).catch(() => {
+            this.tableLoading = false
+          })
+        } else {
+          this.$axios.put("/parsingNbq", this.form).then(response => {
+            this.dialogVisible = false
+            this.getTableList()
+            this.tableLoading = false
+            this.$message.success(response.data.data)
+          }).catch(() => {
+            this.tableLoading = false
+          })
+        }
+        this.visible = false
+      }
+    },
+    /*上报对象*/
+    handleAdd() {
+      this.saveFlag = 1
+      this.info = ''
+      this.form = {}
+      this.clearformula()
+      this.visible = true
+    },
+    /*上报对象编辑*/
+    handleEdit(row) {
+      this.saveFlag = 2
+      let newRow = Object.assign({},row)
+      let tempStationCode = newRow.stationCode.split(',')
+      this.form = newRow
+      this.form.stationCode = tempStationCode
+      this.clearformula()
+      this.visible = true
+    },
+    /*上报对象删除*/
+    handleDelete(row) {
+      this.$confirm('是否确认删除此条配置?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$axios.delete("/parsingNbq/"+row.id).then(response => {
+          this.getTableList()
+          this.$message.success(response.data.data)
+        })
+      })
+    },
+    /*上报对象pageSize改变*/
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.page.currentPage = 1
+      this.getTableList()
+
+    },
+    /*上报对象currentPage改变*/
+    handleCurrentChange(val) {
+      this.page.currentPage = val
+      this.getTableList()
+    }
+  }
+}
+</script>
+
+<style scoped>
+.block {
+  float: right;
+}
+
+.myButton {
+  margin-bottom: .5%;
+}
+
+.uploadno {
+  background: #2d8cf0;
+  width: 20px;
+  height: 20px;
+  border-radius: 50%;
+  text-align: center;
+  display: inline-block;
+  color: #fff;
+}
+
+.el-divider--vertical {
+  display: inline-block;
+  width: 1px;
+  height: 35em;
+  margin: 0 8px;
+  vertical-align: middle;
+  position: relative;
+}
+
+/deep/ .formulaColor .el-input--small .el-input__inner {
+  height: 32px;
+  line-height: 32px;
+  background-color: #cccccc;
+}
+
+</style>

+ 866 - 0
cpp-ui/src/views/configManager/parsingConf/nwpparsing.vue

@@ -0,0 +1,866 @@
+<template>
+  <div>
+    <el-button type="primary" icon="el-icon-plus" plain @click="handleAdd" class="myButton">新增</el-button>
+    <!--上报对象表格-->
+    <el-table
+      :data="tableData"
+      :header-cell-style="{background:'#ECF1FE'}"
+      v-loading="tableLoading" border style="width: 100%">
+      <el-table-column type="expand">
+        <template slot-scope="props">
+          <table style="width: 100%;text-align: left">
+            <tr>
+              <td>温度公式:{{ props.row.t }}</td>
+              <td>湿度公式:{{ props.row.rh }}</td>
+              <td>气压公式:{{ props.row.pressure }}</td>
+            </tr>
+            <tr>
+              <td>全波总辐射公式:{{ props.row.lwr }}</td>
+              <td>总辐射公式:{{ props.row.swr }}</td>
+              <td>直辐射公式:{{ props.row.directRadiation }}</td>
+              <td>散辐射公式:{{ props.row.diffuseRadiation }}</td>
+            </tr>
+            <tr>
+              <td>10米风速公式:{{ props.row.ws10 }}</td>
+              <td>10米风向公式:{{ props.row.wd10 }}</td>
+              <td>30米风速公式:{{ props.row.ws30 }}</td>
+              <td>30米风向公式:{{ props.row.wd30 }}</td>
+            </tr>
+            <tr>
+              <td>50米风速公式:{{ props.row.ws50 }}</td>
+              <td>50米风向公式:{{ props.row.wd50 }}</td>
+              <td>70米风速公式:{{ props.row.ws70 }}</td>
+              <td>70米风向公式:{{ props.row.wd70 }}</td>
+            </tr>
+            <tr>
+              <td>80米风速公式:{{ props.row.ws80 }}</td>
+              <td>80米风向公式:{{ props.row.wd80 }}</td>
+              <td>90米风速公式:{{ props.row.ws90 }}</td>
+              <td>90米风向公式:{{ props.row.wd90 }}</td>
+            </tr>
+            <tr>
+              <td>100米风速公式:{{ props.row.ws100 }}</td>
+              <td>100米风向公式:{{ props.row.wd100 }}</td>
+              <td>170米风速公式:{{ props.row.ws170 }}</td>
+              <td>170米风向公式:{{ props.row.wd170 }}</td>
+            </tr>
+          </table>
+        </template>
+      </el-table-column>
+      <el-table-column prop="fileName" align="center" label="文件名关键字" width="200px"></el-table-column>
+      <el-table-column prop="dataType" align="center" label="数据类型" width="100px" :formatter="formatDataType"></el-table-column>
+      <el-table-column prop="preTime" align="center" label="预测时间公式"  width="300px"></el-table-column>
+      <el-table-column prop="stationCode" align="center" label="场站编号"></el-table-column>
+      <el-table-column label="操作" align="center" width="150px">
+        <template slot-scope="scope">
+          <el-button type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-button>
+          <el-button type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="block">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page=this.page.currentPage
+        :page-sizes="[10, 15, 30, 50]"
+        :page-size=this.page.pageSize
+        layout="total, sizes, prev, pager, next, jumper"
+        :total=this.page.total>
+      </el-pagination>
+    </div>
+    <!--编辑框-->
+    <el-dialog :title="saveFlag==1?'新增':'编辑'" :visible.sync="visible" width="100%" :fullscreen="true">
+
+      <el-row :gutter="20">
+        <el-col :span="16">
+
+
+          <div>
+                    <span style="color: red">
+            <font size="4px">灰色文本框需要点击后,在右侧进行编辑录入!</font>
+                    </span>
+          </div>
+          &nbsp;
+          <div class="grid-content bg-purple">
+            <el-form v-model="form" ref="form" :key="timer">
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="fileName" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>文件名关键字
+                    </span>
+                    <el-input v-model="form.fileName" @focus="clearformula"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="dataType" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>数据类型
+                    </span>
+                    <el-select v-model="form.dataType" clearable @focus="clearformula">
+                      <el-option
+                        v-for="item in this.dataType"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"/>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="preTime" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>预测时间公式
+                    </span>
+                    <el-input v-model="form.preTime" readonly
+                              @click.native="ftck(form.preTime,'form.preTime','(预测时间)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col :span="24">
+                  <el-form-item prop="stationCode" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>场站编号
+                    </span>
+                    <el-select v-model="form.stationCode" multiple clearable @focus="clearformula" style="width: 100%">
+                      <el-option
+                        v-for="item in this.stationCodeList"
+                        :key="item.stationCode"
+                        :label="item.stationCode"
+                        :value="item.stationCode"/>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="t" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                     温度公式
+                    </span>
+                    <el-input v-model="form.t" readonly
+                              @click.native="ftck(form.t,'form.t','(温度)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="rh" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      湿度公式
+                    </span>
+                    <el-input v-model="form.rh" readonly
+                              @click.native="ftck(form.rh,'form.rh','(湿度)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="pressure" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      气压公式
+                    </span>
+                    <el-input v-model="form.pressure" readonly
+                              @click.native="ftck(form.pressure,'form.pressure','(气压)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="lwr" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                     全波总辐射公式
+                    </span>
+                    <el-input v-model="form.lwr" readonly
+                              @click.native="ftck(form.lwr,'form.lwr','(全波总辐射)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="swr" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      总辐射公式
+                    </span>
+                    <el-input v-model="form.swr" readonly
+                              @click.native="ftck(form.swr,'form.swr','(总辐射)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="directRadiation" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      直辐射公式
+                    </span>
+                    <el-input v-model="form.directRadiation" readonly
+                              @click.native="ftck(form.directRadiation,'form.directRadiation','(直辐射)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="diffuseRadiation" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                     散辐射公式
+                    </span>
+                    <el-input v-model="form.diffuseRadiation" readonly
+                              @click.native="ftck(form.diffuseRadiation,'form.diffuseRadiation','(散辐射)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="ws10" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      10米风速
+                    </span>
+                    <el-input v-model="form.ws10" readonly
+                              @click.native="ftck(form.ws10,'form.ws10','(10米风速)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wd10" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      10米风向
+                    </span>
+                    <el-input v-model="form.wd10" readonly
+                              @click.native="ftck(form.wd10,'form.wd10','(10米风向)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="ws30" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                     30米风速
+                    </span>
+                    <el-input v-model="form.ws30" readonly
+                              @click.native="ftck(form.ws30,'form.ws30','(30米风速)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wd30" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      30米风向
+                    </span>
+                    <el-input v-model="form.wd30" readonly
+                              @click.native="ftck(form.wd30,'form.wd30','(30米风向)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="ws50" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      50米风速
+                    </span>
+                    <el-input v-model="form.ws50" readonly
+                              @click.native="ftck(form.ws50,'form.ws50','(50米风速)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="wd50" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                     50米风向
+                    </span>
+                    <el-input v-model="form.wd50" readonly
+                              @click.native="ftck(form.wd50,'form.wd50','(50米风向)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="ws70" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      70米风速
+                    </span>
+                    <el-input v-model="form.ws70" readonly
+                              @click.native="ftck(form.ws70,'form.ws70','(70米风速)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wd70" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      70米风向
+                    </span>
+                    <el-input v-model="form.wd70" readonly
+                              @click.native="ftck(form.wd70,'form.wd70','(70米风向)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="ws80" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                     80米风速
+                    </span>
+                    <el-input v-model="form.ws80" readonly
+                              @click.native="ftck(form.ws80,'form.ws80','(80米风速)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wd80" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      80米风向
+                    </span>
+                    <el-input v-model="form.wd80" readonly
+                              @click.native="ftck(form.wd80,'form.wd80','(80米风向)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="ws90" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      90米风速
+                    </span>
+                    <el-input v-model="form.ws90" readonly
+                              @click.native="ftck(form.ws90,'form.ws90','(90米风速)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="wd90" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                     90米风向
+                    </span>
+                    <el-input v-model="form.wd90" readonly
+                              @click.native="ftck(form.wd90,'form.wd90','(90米风向)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="ws100" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      100米风速
+                    </span>
+                    <el-input v-model="form.ws100" readonly
+                              @click.native="ftck(form.ws100,'form.ws100','(100米风速)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wd100" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      100米风向
+                    </span>
+                    <el-input v-model="form.wd100" readonly
+                              @click.native="ftck(form.wd100,'form.wd100','(100米风向)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="ws170" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      170米风速
+                    </span>
+                    <el-input v-model="form.ws170" readonly
+                              @click.native="ftck(form.ws170,'form.ws170','(170米风速)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wd170" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      170米风向
+                    </span>
+                    <el-input v-model="form.wd170" readonly
+                              @click.native="ftck(form.wd170,'form.wd170','(170米风向)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="handleSave('form')">
+                <span v-if="saveFlag == 1">保 存</span>
+                <span v-else>修 改</span>
+              </el-button>
+              <el-button @click="visible = false">取 消</el-button>
+            </div>
+          </div>
+
+        </el-col>
+        <el-col :span="1">
+          <el-divider direction="vertical" style="height: 200px"></el-divider>
+        </el-col>
+        <el-col :span="5">
+          <h2>公式编辑区{{ this.editinfo }}</h2>
+          <el-form>
+            <el-row>
+              <el-col>
+                <el-form-item prop="rownumber" label-width="110px">
+                  <span slot="label">
+                      <font color="red">*</font>解析行
+                  </span>
+                  <el-input v-model="pfform.rownumber"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item prop="columnumber" label-width="110px">
+                  <span slot="label">
+                      <font color="red">*</font>解析列
+                  </span>
+                  <el-input v-model="pfform.columnumber"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="标签名" prop="signname" label-width="110px">
+                  <el-input v-model="pfform.signname"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="时间格式" prop="timeformat" label-width="110px">
+                  <el-select v-model="pfform.timeformat" clearable>
+                    <el-option
+                      v-for="item in this.timeFormat"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"/>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-button type="primary" @click="genformula">
+                <span>生成公式</span>
+              </el-button>
+              <el-button type="primary" @click="destoryformula">
+                <span>清除录入</span>
+              </el-button>
+            </el-row>
+          </el-form>
+        </el-col>
+      </el-row>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+
+export default {
+  name: "index",
+  data() {
+    return {
+      stationCodeList: [],
+      dataType: [
+        {value: 's', label: '时间单行'},
+        {value: 'm', label: '时间多行'}
+      ],
+      timeFormat: [
+        {value: 'yyyy-MM-dd HH:mm:ss', label: 'yyyy-MM-dd HH:mm:ss'},
+        {value: 'yyyy-MM-dd', label: 'yyyy-MM-dd'},
+        {value: 'yyyy-MM-dd_HH:mm', label: 'yyyy-MM-dd_HH:mm'},
+        {value: 'yyyy-MM-dd HH:mm', label: 'yyyy-MM-dd HH:mm'}
+      ],
+      editinfo: '',
+      timer: new Date().getTime(),
+      props: {multiple: true},
+      staionList: [],//场站集合
+      tableLoading: false,
+      tableData: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      info: '',
+      visible: false,
+      form: {
+        fileName: '',
+        preTime: '',
+        dataType: '',
+        stationCode: '',
+        t: '',
+        rh: '',
+        pressure: '',
+        lwr: '',
+        swr: '',
+        directRadiation: '',
+        diffuseRadiation: '',
+        ws10: '',
+        wd10: '',
+        ws30: '',
+        wd30: '',
+        ws50: '',
+        wd50: '',
+        ws70: '',
+        wd70: '',
+        ws80: '',
+        wd80: '',
+        ws90: '',
+        wd90: '',
+        ws100: '',
+        wd100: '',
+        ws170: '',
+        wd170: ''
+      },
+      pfform: {
+        rownumber: '',
+        columnumber: '',
+        signname: '',
+        timeformat: ''
+      },
+      tempformulasign: '',
+      saveFlag: 1
+    };
+  },
+  mounted() {
+    this.getElectricFieldList()
+    this.getTableList()
+  },
+  methods: {
+    formatDataType(row, column) {
+      let belongTo = '未知类型'
+      for (let i = 0; i < this.dataType.length; i++) {
+        if (row.dataType === this.dataType[i].value) {
+          belongTo = this.dataType[i].label
+        }
+      }
+      return belongTo
+    },
+    getTableList() {
+      this.tableLoading = true
+      // 获取列表
+      this.$axios.get("/parsingNwp/page",Object.assign({
+        current: this.page.currentPage,
+        size: this.page.pageSize
+      })).then(response => {
+        this.tableData = response.data.data.records
+        this.page.total = response.data.data.total
+        this.tableLoading = false
+      }).catch((e) => {
+        this.tableLoading = false
+      })
+    },
+    getElectricFieldList() {
+      // 获取所有场站
+      this.$axios("/parsingInfo/getElectricField").then(response => {
+        this.stationCodeList = response.data.data
+        this.tableLoading = false
+      }).catch((e) => {
+        this.tableLoading = false
+      })
+    },
+    destoryformula() {
+      // 清空公式区字段
+      if (this.tempformulasign == 'form.preTime') {
+        this.form.preTime = ''
+      }
+      else if (this.tempformulasign == 'form.t') {
+        this.form.t = ''
+      }
+      else if (this.tempformulasign == 'form.rh') {
+        this.form.rh = ''
+      }
+      else if (this.tempformulasign == 'form.pressure') {
+        this.form.pressure = ''
+      }
+      else if (this.tempformulasign == 'form.lwr') {
+        this.form.lwr = ''
+      }
+      else if (this.tempformulasign == 'form.swr') {
+        this.form.swr = ''
+      }
+      else if (this.tempformulasign == 'form.directRadiation') {
+        this.form.directRadiation = ''
+      }
+      else if (this.tempformulasign == 'form.diffuseRadiation') {
+        this.form.diffuseRadiation = ''
+      }
+      else if (this.tempformulasign == 'form.ws10') {
+        this.form.ws10 = ''
+      }
+      else if (this.tempformulasign == 'form.wd10') {
+        this.form.wd10 = ''
+      }
+      else if (this.tempformulasign == 'form.ws30') {
+        this.form.ws30 = ''
+      }
+      else if (this.tempformulasign == 'form.wd30') {
+        this.form.wd30 = ''
+      }
+      else if (this.tempformulasign == 'form.ws50') {
+        this.form.ws50 = ''
+      }
+      else if (this.tempformulasign == 'form.wd50') {
+        this.form.wd50 = ''
+      }
+      else if (this.tempformulasign == 'form.ws70') {
+        this.form.ws70 = ''
+      }
+      else if (this.tempformulasign == 'form.wd70') {
+        this.form.wd70 = ''
+      }
+      else if (this.tempformulasign == 'form.ws80') {
+        this.form.ws80 = ''
+      }
+      else if (this.tempformulasign == 'form.wd80') {
+        this.form.wd80 = ''
+      }
+      else if (this.tempformulasign == 'form.ws90') {
+        this.form.ws90 = ''
+      }
+      else if (this.tempformulasign == 'form.wd90') {
+        this.form.wd90 = ''
+      }
+      else if (this.tempformulasign == 'form.ws100') {
+        this.form.ws100 = ''
+      }
+      else if (this.tempformulasign == 'form.wd100') {
+        this.form.wd100 = ''
+      }
+      else if (this.tempformulasign == 'form.ws170') {
+        this.form.ws170 = ''
+      }
+      else if (this.tempformulasign == 'form.wd170') {
+        this.form.wd170 = ''
+      }
+      this.clearformula()
+    },
+    clearformula() {
+      // 清空公式区字段
+      this.pfform.rownumber = ''
+      this.pfform.columnumber = ''
+      this.pfform.signname = ''
+      this.pfform.timeformat = ''
+      this.editinfo = ''
+      this.tempformulasign = ''
+    },
+    ftck(obj, sign, editname) {
+      this.clearformula()
+      if (obj != undefined && obj != null) {
+        var objs = obj.split('<=>')
+        for (let i = 0; i < objs.length; i++) {
+          if (objs[i] != "") {
+            if (i == 0) {
+              this.pfform.rownumber = objs[i]
+            } else if (i == 1) {
+              this.pfform.columnumber = objs[i]
+            } else if (i == 2) {
+              this.pfform.signname = objs[i]
+            } else if (i == 3) {
+              this.pfform.timeformat = objs[i]
+            }
+          }
+        }
+      }
+      this.tempformulasign = sign;
+      this.editinfo = editname
+    },
+    genformula() {
+      if (this.tempformulasign==''){
+        this.$message.warning('请先选定左侧公式项')
+        return
+      }
+      if (!this.pfform.rownumber || !this.pfform.columnumber) {
+        this.$message.warning('填写必填项')
+        return
+      }
+      if ((this.pfform.signname && !this.pfform.timeformat) || (!this.pfform.signname && this.pfform.timeformat)) {
+        this.$message.warning('标签名称和时间格式要同时填写')
+        return
+      }
+      // 拼装公式
+      var resultStr = ''
+      if (this.pfform.rownumber) {
+        resultStr = this.pfform.rownumber
+      }
+      if (this.pfform.columnumber) {
+        resultStr = resultStr + '<=>' + this.pfform.columnumber
+      }
+      if (this.pfform.signname) {
+        resultStr = resultStr + '<=>' + this.pfform.signname
+      }
+      if (this.pfform.timeformat) {
+        resultStr = resultStr + '<=>' + this.pfform.timeformat
+      }
+      // 将生成的公式赋值到左侧表格中
+      if (this.tempformulasign == 'form.preTime') {
+        this.form.preTime = resultStr
+      }
+      else if (this.tempformulasign == 'form.t') {
+        this.form.t = resultStr
+      }
+      else if (this.tempformulasign == 'form.rh') {
+        this.form.rh = resultStr
+      }
+      else if (this.tempformulasign == 'form.pressure') {
+        this.form.pressure = resultStr
+      }
+      else if (this.tempformulasign == 'form.lwr') {
+        this.form.lwr = resultStr
+      }
+      else if (this.tempformulasign == 'form.swr') {
+        this.form.swr = resultStr
+      }
+      else if (this.tempformulasign == 'form.directRadiation') {
+        this.form.directRadiation = resultStr
+      }
+      else if (this.tempformulasign == 'form.diffuseRadiation') {
+        this.form.diffuseRadiation = resultStr
+      }
+      else if (this.tempformulasign == 'form.ws10') {
+        this.form.ws10 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wd10') {
+        this.form.wd10 = resultStr
+      }
+      else if (this.tempformulasign == 'form.ws30') {
+        this.form.ws30 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wd30') {
+        this.form.wd30 = resultStr
+      }
+      else if (this.tempformulasign == 'form.ws50') {
+        this.form.ws50 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wd50') {
+        this.form.wd50 = resultStr
+      }
+      else if (this.tempformulasign == 'form.ws70') {
+        this.form.ws70 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wd70') {
+        this.form.wd70 = resultStr
+      }
+      else if (this.tempformulasign == 'form.ws80') {
+        this.form.ws80 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wd80') {
+        this.form.wd80 = resultStr
+      }
+      else if (this.tempformulasign == 'form.ws90') {
+        this.form.ws90 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wd90') {
+        this.form.wd90 = resultStr
+      }
+      else if (this.tempformulasign == 'form.ws100') {
+        this.form.ws100 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wd100') {
+        this.form.wd100 = resultStr
+      }
+      else if (this.tempformulasign == 'form.ws170') {
+        this.form.ws170 = resultStr
+      }
+      else if (this.tempformulasign == 'form.wd170') {
+        this.form.wd170 = resultStr
+      }
+      this.timer = new Date().getTime()
+      this.clearformula()
+    },
+    /*保存*/
+    handleSave(formName) {
+      if (!this.form.fileName || !this.form.preTime || !this.form.dataType || this.form.stationCode=="") {
+        this.$message.warning('填写必填项');
+        return false;
+      } else {
+        const data = this.form.stationCode
+        let data1 = "";
+        for (let n = 0; n < data.length; n++) {
+          for (let j = 0; j < this.stationCodeList.length; j++) {
+            if (data[n] == this.stationCodeList[j]["stationCode"]) {
+              data1 = data1 + this.stationCodeList[j]["stationCode"] + ","
+            }
+          }
+        }
+        data1 = data1.substr(0, data1.length - 1)
+        this.form.stationCode = data1
+        if (this.saveFlag === 1) {
+          this.$axios.post("/parsingNwp",this.form).then(response => {
+            this.dialogVisible = false
+            this.getTableList()
+            this.tableLoading = false
+            this.$message.success(response.data.data)
+          }).catch(() => {
+            this.tableLoading = false
+          })
+        } else {
+          this.$axios.put("/parsingNwp", this.form).then(response => {
+            this.dialogVisible = false
+            this.getTableList()
+            this.tableLoading = false
+            this.$message.success(response.data.data)
+          }).catch(() => {
+            this.tableLoading = false
+          })
+        }
+        this.visible = false
+      }
+    },
+    /*上报对象*/
+    handleAdd() {
+      this.saveFlag = 1
+      this.info = ''
+      this.form = {}
+      this.clearformula()
+      this.visible = true
+    },
+    /*上报对象编辑*/
+    handleEdit(row) {
+      this.saveFlag = 2
+      let newRow = Object.assign({},row)
+      let tempStationCode = newRow.stationCode.split(',')
+      this.form = newRow
+      this.form.stationCode = tempStationCode
+      this.clearformula()
+      this.visible = true
+    },
+    /*上报对象删除*/
+    handleDelete(row) {
+      this.$confirm('是否确认删除此条配置?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$axios.delete("/parsingNwp/"+row.id).then(response => {
+          this.getTableList()
+          this.$message.success(response.data.data)
+        })
+      })
+    },
+    /*上报对象pageSize改变*/
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.page.currentPage = 1
+      this.getTableList()
+
+    },
+    /*上报对象currentPage改变*/
+    handleCurrentChange(val) {
+      this.page.currentPage = val
+      this.getTableList()
+    }
+  }
+}
+</script>
+
+<style scoped>
+.block {
+  float: right;
+}
+
+.myButton {
+  margin-bottom: .5%;
+}
+
+.uploadno {
+  background: #2d8cf0;
+  width: 20px;
+  height: 20px;
+  border-radius: 50%;
+  text-align: center;
+  display: inline-block;
+  color: #fff;
+}
+
+.el-divider--vertical {
+  display: inline-block;
+  width: 1px;
+  height: 35em;
+  margin: 0 8px;
+  vertical-align: middle;
+  position: relative;
+}
+
+/deep/ .formulaColor .el-input--small .el-input__inner {
+  height: 32px;
+  line-height: 32px;
+  background-color: #cccccc;
+}
+
+</style>

+ 612 - 0
cpp-ui/src/views/configManager/parsingConf/qxzparsing.vue

@@ -0,0 +1,612 @@
+<template>
+  <div>
+    <el-button type="primary" icon="el-icon-plus" plain @click="handleAdd" class="myButton">新增</el-button>
+    <!--上报对象表格-->
+    <el-table
+      :data="tableData"
+      :header-cell-style="{background:'#ECF1FE'}"
+      v-loading="tableLoading" border style="width: 100%">
+      <el-table-column type="expand">
+        <template slot-scope="props">
+          <table style="width: 100%;text-align: left">
+            <tr>
+              <td>总辐射公式:{{ props.row.globalR }}</td>
+              <td>直辐射公式:{{ props.row.directR }}</td>
+              <td>散辐射公式:{{ props.row.diffuseR }}</td>
+            </tr>
+            <tr>
+            <tr>
+              <td>环境温度公式:{{ props.row.airT }}</td>
+              <td>电池板温度公式:{{ props.row.cellT }}</td>
+              <td>风速公式:{{ props.row.ws }}</td>
+            </tr>
+            <tr>
+              <td>风向公式:{{ props.row.wd }}</td>
+              <td>气压公式:{{ props.row.p }}</td>
+              <td>湿度公式:{{ props.row.rh }}</td>
+            </tr>
+          </table>
+        </template>
+      </el-table-column>
+      <el-table-column prop="fileName" align="center" label="文件名关键字" width="200px"></el-table-column>
+      <el-table-column prop="dataType" align="center" label="数据类型" width="100px" :formatter="formatDataType"></el-table-column>
+      <el-table-column prop="time" align="center" label="预测时间公式"  width="300px"></el-table-column>
+      <el-table-column prop="stationCode" align="center" label="场站编号"></el-table-column>
+      <el-table-column label="操作" align="center" width="150px">
+        <template slot-scope="scope">
+          <el-button type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-button>
+          <el-button type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="block">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page=this.page.currentPage
+        :page-sizes="[10, 15, 30, 50]"
+        :page-size=this.page.pageSize
+        layout="total, sizes, prev, pager, next, jumper"
+        :total=this.page.total>
+      </el-pagination>
+    </div>
+    <!--编辑框-->
+    <el-dialog :title="saveFlag==1?'新增':'编辑'" :visible.sync="visible" width="100%">
+
+      <el-row :gutter="20">
+        <el-col :span="17">
+          <div>
+                    <span style="color: red">
+            <font size="4px">灰色文本框需要点击后,在右侧进行编辑录入!</font>
+                    </span>
+          </div>
+          &nbsp;
+          <div class="grid-content bg-purple">
+            <el-form v-model="form" ref="form" :key="timer">
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="fileName" label-width="115px">
+                    <span slot="label">
+                      <font color="red">*</font>文件名关键字
+                    </span>
+                    <el-input v-model="form.fileName" @focus="clearformula"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="dataType" label-width="115px">
+                    <span slot="label">
+                      <font color="red">*</font>数据类型
+                    </span>
+                    <el-select v-model="form.dataType" clearable @focus="clearformula">
+                      <el-option
+                        v-for="item in this.dataType"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"/>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col :span="24">
+                  <el-form-item prop="stationCode" label-width="115px">
+                    <span slot="label">
+                      <font color="red">*</font>场站编号
+                    </span>
+                    <el-select v-model="form.stationCode" multiple clearable @focus="clearformula" style="width: 100%">
+                      <el-option
+                        v-for="item in this.stationCodeList"
+                        :key="item.stationCode"
+                        :label="item.stationCode"
+                        :value="item.stationCode"/>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="time" label-width="115px" class="formulaColor">
+                    <span slot="label">
+                     <font color="red">*</font>预测时间公式
+                    </span>
+                    <el-input v-model="form.time" readonly
+                              @click.native="ftck(form.time,'form.time','(预测时间)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="globalR" label-width="115px" class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>总辐射公式
+                    </span>
+                    <el-input v-model="form.globalR" readonly
+                              @click.native="ftck(form.globalR,'form.globalR','(总辐射)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="directR" label-width="115px" class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>直辐射公式
+                    </span>
+                    <el-input v-model="form.directR" readonly
+                              @click.native="ftck(form.directR,'form.directR','(直辐射)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="diffuseR" label-width="115px" class="formulaColor">
+                    <span slot="label">
+                     <font color="red">*</font>散辐射公式
+                    </span>
+                    <el-input v-model="form.diffuseR" readonly
+                              @click.native="ftck(form.diffuseR,'form.diffuseR','(散辐射)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="airT" label-width="115px" class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>环境温度公式
+                    </span>
+                    <el-input v-model="form.airT" readonly
+                              @click.native="ftck(form.airT,'form.airT','(环境温度)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="cellT" label-width="115px" class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>电池板温度公式
+                    </span>
+                    <el-input v-model="form.cellT" readonly
+                              @click.native="ftck(form.cellT,'form.cellT','(电池板温度)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="ws" label-width="115px" class="formulaColor">
+                    <span slot="label">
+                     <font color="red">*</font>风速公式
+                    </span>
+                    <el-input v-model="form.ws" readonly
+                              @click.native="ftck(form.ws,'form.ws','(风速)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="wd" label-width="115px" class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>风向公式
+                    </span>
+                    <el-input v-model="form.wd" readonly
+                              @click.native="ftck(form.wd,'form.wd','(风向)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="p" label-width="115px" class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>气压公式
+                    </span>
+                    <el-input v-model="form.p" readonly
+                              @click.native="ftck(form.p,'form.p','(气压)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="8">
+                  <el-form-item prop="rh" label-width="115px" class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>湿度公式
+                    </span>
+                    <el-input v-model="form.rh" readonly
+                              @click.native="ftck(form.rh,'form.rh','(湿度)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="handleSave('form')">
+                <span v-if="saveFlag == 1">保 存</span>
+                <span v-else>修 改</span>
+              </el-button>
+              <el-button @click="visible = false">取 消</el-button>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="1">
+          <el-divider direction="vertical" style="height: 200px"></el-divider>
+        </el-col>
+        <el-col :span="5">
+          <h2>公式编辑区{{ this.editinfo }}</h2>
+          <el-form>
+            <el-row>
+              <el-col>
+                <el-form-item prop="rownumber" label-width="115px">
+                  <span slot="label">
+                      <font color="red">*</font>解析行
+                  </span>
+                  <el-input v-model="pfform.rownumber"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item prop="columnumber" label-width="115px">
+                  <span slot="label">
+                      <font color="red">*</font>解析列
+                  </span>
+                  <el-input v-model="pfform.columnumber"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="标签名" prop="signname" label-width="115px">
+                  <el-input v-model="pfform.signname"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="时间格式" prop="timeformat" label-width="115px">
+                  <el-select v-model="pfform.timeformat" clearable>
+                    <el-option
+                      v-for="item in this.timeFormat"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"/>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-button type="primary" @click="genformula">
+                <span>生成公式</span>
+              </el-button>
+              <el-button type="primary" @click="destoryformula">
+                <span>清除录入</span>
+              </el-button>
+            </el-row>
+          </el-form>
+        </el-col>
+      </el-row>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+
+export default {
+  name: "index",
+  data() {
+    return {
+      stationCodeList: [],
+      dataType: [
+        {value: 's', label: '时间单行'},
+        {value: 'm', label: '时间多行'}
+      ],
+      timeFormat: [
+        {value: 'yyyy-MM-dd HH:mm:ss', label: 'yyyy-MM-dd HH:mm:ss'},
+        {value: 'yyyy-MM-dd', label: 'yyyy-MM-dd'},
+        {value: 'yyyy-MM-dd_HH:mm', label: 'yyyy-MM-dd_HH:mm'},
+        {value: 'yyyy-MM-dd_HH:mm:ss', label: 'yyyy-MM-dd_HH:mm:ss'}
+      ],
+      editinfo: '',
+      timer: new Date().getTime(),
+      props: {multiple: true},
+      staionList: [],//场站集合
+      tableLoading: false,
+      tableData: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      info: '',
+      visible: false,
+      form: {
+        fileName: '',
+        time: '',
+        dataType: '',
+        stationCode: '',
+        globalR: '',
+        directR: '',
+        diffuseR: '',
+        airT: '',
+        cellT: '',
+        ws: '',
+        wd: '',
+        p: '',
+        rh: ''
+      },
+      pfform: {
+        rownumber: '',
+        columnumber: '',
+        signname: '',
+        timeformat: ''
+      },
+      tempformulasign: '',
+      saveFlag: 1
+    };
+  },
+  mounted() {
+    this.getElectricFieldList()
+    this.getTableList()
+  },
+  methods: {
+    formatDataType(row, column) {
+      let belongTo = '未知类型'
+      for (let i = 0; i < this.dataType.length; i++) {
+        if (row.dataType === this.dataType[i].value) {
+          belongTo = this.dataType[i].label
+        }
+      }
+      return belongTo
+    },
+    getTableList() {
+      this.tableLoading = true
+      // 获取列表
+      this.$axios.get("/parsingQxz/page",Object.assign({
+        current: this.page.currentPage,
+        size: this.page.pageSize
+      })).then(response => {
+        this.tableData = response.data.data.records
+        this.page.total = response.data.data.total
+        this.tableLoading = false
+      }).catch((e) => {
+        this.tableLoading = false
+      })
+    },
+    getElectricFieldList() {
+      // 获取所有场站
+      this.$axios("/parsingInfo/getElectricField").then(response => {
+        this.stationCodeList = response.data.data
+        this.tableLoading = false
+      }).catch((e) => {
+        this.tableLoading = false
+      })
+    },
+    destoryformula() {
+      // 清空公式区字段
+      if (this.tempformulasign == 'form.time') {
+        this.form.time = ''
+      }
+      else if (this.tempformulasign == 'form.globalR') {
+        this.form.globalR = ''
+      }
+      else if (this.tempformulasign == 'form.directR') {
+        this.form.directR = ''
+      }
+      else if (this.tempformulasign == 'form.diffuseR') {
+        this.form.diffuseR = ''
+      }
+      else if (this.tempformulasign == 'form.airT') {
+        this.form.airT = ''
+      }
+      else if (this.tempformulasign == 'form.cellT') {
+        this.form.cellT = ''
+      }
+      else if (this.tempformulasign == 'form.ws') {
+        this.form.ws = ''
+      }
+      else if (this.tempformulasign == 'form.wd') {
+        this.form.wd = ''
+      }
+      else if (this.tempformulasign == 'form.p') {
+        this.form.p = ''
+      }
+      else if (this.tempformulasign == 'form.rh') {
+        this.form.rh = ''
+      }
+      this.clearformula()
+    },
+    clearformula() {
+      // 清空公式区字段
+      this.pfform.rownumber = ''
+      this.pfform.columnumber = ''
+      this.pfform.signname = ''
+      this.pfform.timeformat = ''
+      this.editinfo = ''
+      this.tempformulasign = ''
+    },
+    ftck(obj, sign, editname) {
+      this.clearformula()
+      if (obj != undefined && obj != null) {
+        var objs = obj.split('<=>')
+        for (let i = 0; i < objs.length; i++) {
+          if (objs[i] != "") {
+            if (i == 0) {
+              this.pfform.rownumber = objs[i]
+            } else if (i == 1) {
+              this.pfform.columnumber = objs[i]
+            } else if (i == 2) {
+              this.pfform.signname = objs[i]
+            } else if (i == 3) {
+              this.pfform.timeformat = objs[i]
+            }
+          }
+        }
+      }
+      this.tempformulasign = sign;
+      this.editinfo = editname
+    },
+    genformula() {
+      if (this.tempformulasign==''){
+        this.$message.warning('请先选定左侧公式项')
+        return
+      }
+      if (!this.pfform.rownumber || !this.pfform.columnumber) {
+        this.$message.warning('填写必填项')
+        return
+      }
+      if ((this.pfform.signname && !this.pfform.timeformat) || (!this.pfform.signname && this.pfform.timeformat)) {
+        this.$message.warning('标签名称和时间格式要同时填写')
+        return
+      }
+      // 拼装公式
+      var resultStr = ''
+      if (this.pfform.rownumber) {
+        resultStr = this.pfform.rownumber
+      }
+      if (this.pfform.columnumber) {
+        resultStr = resultStr + '<=>' + this.pfform.columnumber
+      }
+      if (this.pfform.signname) {
+        resultStr = resultStr + '<=>' + this.pfform.signname
+      }
+      if (this.pfform.timeformat) {
+        resultStr = resultStr + '<=>' + this.pfform.timeformat
+      }
+      // 将生成的公式赋值到左侧表格中
+      if (this.tempformulasign == 'form.time') {
+        this.form.time = resultStr
+      }
+      else if (this.tempformulasign == 'form.globalR') {
+        this.form.globalR = resultStr
+      }
+      else if (this.tempformulasign == 'form.directR') {
+        this.form.directR = resultStr
+      }
+      else if (this.tempformulasign == 'form.diffuseR') {
+        this.form.diffuseR = resultStr
+      }
+      else if (this.tempformulasign == 'form.airT') {
+        this.form.airT = resultStr
+      }
+      else if (this.tempformulasign == 'form.cellT') {
+        this.form.cellT = resultStr
+      }
+      else if (this.tempformulasign == 'form.ws') {
+        this.form.ws = resultStr
+      }
+      else if (this.tempformulasign == 'form.wd') {
+        this.form.wd = resultStr
+      }
+      else if (this.tempformulasign == 'form.p') {
+        this.form.p = resultStr
+      }
+      else if (this.tempformulasign == 'form.rh') {
+        this.form.rh = resultStr
+      }
+      this.timer = new Date().getTime()
+      this.clearformula()
+    },
+    /*保存*/
+    handleSave(formName) {
+      if (!this.form.fileName || !this.form.time || !this.form.dataType || !this.form.globalR ||!this.form.directR ||!this.form.diffuseR ||!this.form.airT ||!this.form.cellT ||!this.form.ws ||!this.form.wd ||!this.form.p||!this.form.rh||this.form.stationCode=="") {
+        this.$message.warning('填写必填项');
+        return false;
+      } else {
+        const data = this.form.stationCode
+        let data1 = "";
+        for (let n = 0; n < data.length; n++) {
+          for (let j = 0; j < this.stationCodeList.length; j++) {
+            if (data[n] == this.stationCodeList[j]["stationCode"]) {
+              data1 = data1 + this.stationCodeList[j]["stationCode"] + ","
+            }
+          }
+        }
+        data1 = data1.substr(0, data1.length - 1)
+        this.form.stationCode = data1
+        if (this.saveFlag === 1) {
+          this.$axios.post("/parsingQxz",this.form).then(response => {
+            this.dialogVisible = false
+            this.getTableList()
+            this.tableLoading = false
+            this.$message.success(response.data.data)
+          }).catch(() => {
+            this.tableLoading = false
+          })
+        } else {
+          this.$axios.put("/parsingQxz", this.form).then(response => {
+            this.dialogVisible = false
+            this.getTableList()
+            this.tableLoading = false
+            this.$message.success(response.data.data)
+          }).catch(() => {
+            this.tableLoading = false
+          })
+        }
+        this.visible = false
+      }
+    },
+    /*上报对象*/
+    handleAdd() {
+      this.saveFlag = 1
+      this.info = ''
+      this.form = {}
+      this.clearformula()
+      this.visible = true
+    },
+    /*上报对象编辑*/
+    handleEdit(row) {
+      this.saveFlag = 2
+      let newRow = Object.assign({},row)
+      let tempStationCode = newRow.stationCode.split(',')
+      this.form = newRow
+      this.form.stationCode = tempStationCode
+      this.clearformula()
+      this.visible = true
+    },
+    /*上报对象删除*/
+    handleDelete(row) {
+      this.$confirm('是否确认删除此条配置?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$axios.delete("/parsingQxz/"+row.id).then(response => {
+          this.getTableList()
+          this.$message.success(response.data.data)
+        })
+      })
+    },
+    /*上报对象pageSize改变*/
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.page.currentPage = 1
+      this.getTableList()
+
+    },
+    /*上报对象currentPage改变*/
+    handleCurrentChange(val) {
+      this.page.currentPage = val
+      this.getTableList()
+    }
+  }
+}
+</script>
+
+<style scoped>
+.block {
+  float: right;
+}
+
+.myButton {
+  margin-bottom: .5%;
+}
+
+.uploadno {
+  background: #2d8cf0;
+  width: 20px;
+  height: 20px;
+  border-radius: 50%;
+  text-align: center;
+  display: inline-block;
+  color: #fff;
+}
+
+.el-divider--vertical {
+  display: inline-block;
+  width: 1px;
+  height: 35em;
+  margin: 0 8px;
+  vertical-align: middle;
+  position: relative;
+}
+
+/deep/ .formulaColor .el-input--small .el-input__inner {
+  height: 32px;
+  line-height: 32px;
+  background-color: #cccccc;
+}
+
+</style>

+ 457 - 0
cpp-ui/src/views/configManager/parsingConf/rpparsing.vue

@@ -0,0 +1,457 @@
+<template>
+  <div>
+    <el-button type="primary" icon="el-icon-plus" plain @click="handleAdd" class="myButton">新增</el-button>
+    <!--上报对象表格-->
+    <el-table
+      :data="tableData"
+      :header-cell-style="{background:'#ECF1FE',}"
+      v-loading="tableLoading" border style="width: 100%">
+      <el-table-column prop="fileName" align="center" label="文件名关键字" width="200px"></el-table-column>
+      <el-table-column prop="time" align="center" label="时间公式"  width="300px"></el-table-column>
+      <el-table-column prop="realValue" align="center" label="实际功率公式"  width="300px"></el-table-column>
+      <el-table-column prop="dataType" align="center" label="数据类型" width="100px" :formatter="formatDataType"></el-table-column>
+      <el-table-column prop="stationCode" align="center" label="场站编号"></el-table-column>
+      <el-table-column label="操作" align="center" width="150px">
+        <template slot-scope="scope">
+          <el-button type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-button>
+          <el-button type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="block">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page=this.page.currentPage
+        :page-sizes="[10, 15, 30, 50]"
+        :page-size=this.page.pageSize
+        layout="total, sizes, prev, pager, next, jumper"
+        :total=this.page.total>
+      </el-pagination>
+    </div>
+    <!--编辑框-->
+    <el-dialog :title="saveFlag==1?'新增':'编辑'" :visible.sync="visible" width="100%">
+
+      <el-row :gutter="20">
+        <el-col :span="16">
+          <div>
+                    <span style="color: red">
+            <font size="4px">灰色文本框需要点击后,在右侧进行编辑录入!</font>
+                    </span>
+          </div>
+          &nbsp;
+          <div class="grid-content bg-purple">
+            <el-form v-model="form" ref="form" :key="timer">
+              <el-row :gutter="16">
+                <el-col :span="12">
+                  <el-form-item prop="fileName" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>文件名关键字
+                    </span>
+                    <el-input v-model="form.fileName" @focus="clearformula"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item prop="dataType" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>数据类型
+                    </span>
+                    <el-select v-model="form.dataType" clearable @focus="clearformula">
+                      <el-option
+                        v-for="item in this.dataType"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"/>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="16">
+                <el-col :span="12">
+                  <el-form-item prop="realValue" label-width="110px" class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>实际功率公式
+                    </span>
+                    <el-input v-model="form.realValue" readonly
+                              @click.native="ftck(form.realValue,'form.realValue','(实际功率数据)')"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item prop="time" label-width="110px"
+                                class="formulaColor">
+                    <span slot="label">
+                      <font color="red">*</font>时间公式
+                    </span>
+                    <el-input v-model="form.time" readonly
+                              @click.native="ftck(form.time,'form.time','(时间)')"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col :span="24">
+                  <el-form-item prop="stationCode" label-width="110px">
+                    <span slot="label">
+                      <font color="red">*</font>场站编号
+                    </span>
+                    <el-select v-model="form.stationCode" multiple clearable @focus="clearformula" style="width: 100%">
+                      <el-option
+                        v-for="item in this.stationCodeList"
+                        :key="item.stationCode"
+                        :label="item.stationCode"
+                        :value="item.stationCode"/>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="handleSave('form')">
+                <span v-if="saveFlag == 1">保 存</span>
+                <span v-else>修 改</span>
+              </el-button>
+              <el-button @click="visible = false">取 消</el-button>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="1">
+          <el-divider direction="vertical"></el-divider>
+        </el-col>
+        <el-col :span="6">
+          <h2>公式编辑区{{ this.editinfo }}</h2>
+          <el-form>
+            <el-row>
+              <el-col>
+                <el-form-item prop="rownumber" label-width="110px">
+                  <span slot="label">
+                      <font color="red">*</font>解析行
+                  </span>
+                  <el-input v-model="pfform.rownumber"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item prop="columnumber" label-width="110px">
+                  <span slot="label">
+                      <font color="red">*</font>解析列
+                  </span>
+                  <el-input v-model="pfform.columnumber"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="标签名" prop="signname" label-width="110px">
+                  <el-input v-model="pfform.signname"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="时间格式" prop="timeformat" label-width="110px">
+                  <el-select v-model="pfform.timeformat" clearable>
+                    <el-option
+                      v-for="item in this.timeFormat"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"/>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-button type="primary" @click="genformula">
+                <span>生成公式</span>
+              </el-button>
+              <el-button type="primary" @click="destoryformula">
+                <span>清除录入</span>
+              </el-button>
+            </el-row>
+          </el-form>
+        </el-col>
+      </el-row>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+
+export default {
+  name: "index",
+  data() {
+    return {
+      stationCodeList: [],
+      dataType: [
+        {value: 's', label: '时间单行'},
+        {value: 'm', label: '时间多行'}
+      ],
+      timeFormat: [
+        {value: 'yyyy-MM-dd HH:mm:ss', label: 'yyyy-MM-dd HH:mm:ss'},
+        {value: 'yyyy-MM-dd', label: 'yyyy-MM-dd'},
+        {value: 'yyyy-MM-dd_HH:mm', label: 'yyyy-MM-dd_HH:mm'},
+        {value: 'yyyy-MM-dd_HH:mm:ss', label: 'yyyy-MM-dd_HH:mm:ss'}
+      ],
+      editinfo: '',
+      timer: new Date().getTime(),
+      props: {multiple: true},
+      staionList: [],//场站集合
+      tableLoading: false,
+      tableData: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      info: '',
+      visible: false,
+      form: {
+        fileName: '',
+        time: '',
+        realValue: '',
+        dataType: '',
+        stationCode: ''
+      },
+      pfform: {
+        rownumber: '',
+        columnumber: '',
+        signname: '',
+        timeformat: ''
+      },
+      tempformulasign: '',
+      saveFlag: 1
+    };
+  },
+  mounted() {
+    this.getElectricFieldList()
+    this.getTableList()
+  },
+  methods: {
+    formatDataType(row, column) {
+      let belongTo = '未知类型'
+      for (let i = 0; i < this.dataType.length; i++) {
+        if (row.dataType === this.dataType[i].value) {
+          belongTo = this.dataType[i].label
+        }
+      }
+      return belongTo
+    },
+    getTableList() {
+      this.tableLoading = true
+      // 获取列表
+      this.$axios.get("/parsingRp/page",Object.assign({
+        current: this.page.currentPage,
+        size: this.page.pageSize
+      })).then(response => {
+        this.tableData = response.data.data.records
+        this.page.total = response.data.data.total
+        this.tableLoading = false
+      }).catch((e) => {
+        this.tableLoading = false
+      })
+    },
+    getElectricFieldList() {
+      // 获取所有场站
+      this.$axios("/parsingInfo/getElectricField").then(response => {
+        this.stationCodeList = response.data.data
+        this.tableLoading = false
+      }).catch((e) => {
+        this.tableLoading = false
+      })
+    },
+    destoryformula() {
+      // 清空公式区字段
+      if (this.tempformulasign == 'form.time') {
+        this.form.time = ''
+      } else if (this.tempformulasign == 'form.realValue') {
+        this.form.realValue = ''
+      }
+      this.clearformula()
+    },
+    clearformula() {
+      // 清空公式区字段
+      this.pfform.rownumber = ''
+      this.pfform.columnumber = ''
+      this.pfform.signname = ''
+      this.pfform.timeformat = ''
+      this.editinfo = ''
+      this.tempformulasign = ''
+    },
+    ftck(obj, sign, editname) {
+      this.clearformula()
+      if (obj != undefined && obj != null) {
+        var objs = obj.split('<=>')
+        for (let i = 0; i < objs.length; i++) {
+          if (objs[i] != "") {
+            if (i == 0) {
+              this.pfform.rownumber = objs[i]
+            } else if (i == 1) {
+              this.pfform.columnumber = objs[i]
+            } else if (i == 2) {
+              this.pfform.signname = objs[i]
+            } else if (i == 3) {
+              this.pfform.timeformat = objs[i]
+            }
+          }
+        }
+      }
+      this.tempformulasign = sign;
+      this.editinfo = editname
+    },
+    genformula() {
+      if (this.tempformulasign==''){
+        this.$message.warning('请先选定左侧公式项')
+        return
+      }
+      if (!this.pfform.rownumber || !this.pfform.columnumber) {
+        this.$message.warning('填写必填项')
+        return
+      }
+      if ((this.pfform.signname && !this.pfform.timeformat) || (!this.pfform.signname && this.pfform.timeformat)) {
+        this.$message.warning('标签名称和时间格式要同时填写')
+        return
+      }
+      // 拼装公式
+      var resultStr = ''
+      if (this.pfform.rownumber) {
+        resultStr = this.pfform.rownumber
+      }
+      if (this.pfform.columnumber) {
+        resultStr = resultStr + '<=>' + this.pfform.columnumber
+      }
+      if (this.pfform.signname) {
+        resultStr = resultStr + '<=>' + this.pfform.signname
+      }
+      if (this.pfform.timeformat) {
+        resultStr = resultStr + '<=>' + this.pfform.timeformat
+      }
+      // 将生成的公式赋值到左侧表格中
+      if (this.tempformulasign == 'form.time') {
+        this.form.time = resultStr
+      } else if (this.tempformulasign == 'form.realValue') {
+        this.form.realValue = resultStr
+      }
+      this.timer = new Date().getTime()
+      this.clearformula()
+    },
+    /*保存*/
+    handleSave(formName) {
+      if (!this.form.fileName || !this.form.time || !this.form.realValue || !this.form.dataType || this.form.stationCode=="") {
+        this.$message.warning('填写必填项');
+        return false;
+      } else {
+        const data = this.form.stationCode
+        let data1 = "";
+        for (let n = 0; n < data.length; n++) {
+          for (let j = 0; j < this.stationCodeList.length; j++) {
+            if (data[n] == this.stationCodeList[j]["stationCode"]) {
+              data1 = data1 + this.stationCodeList[j]["stationCode"] + ","
+            }
+          }
+        }
+        data1 = data1.substr(0, data1.length - 1)
+        this.form.stationCode = data1
+        if (this.saveFlag === 1) {
+          this.$axios.post("/parsingRp",this.form).then(response => {
+            this.dialogVisible = false
+            this.getTableList()
+            this.tableLoading = false
+            this.$message.success(response.data.data)
+          }).catch(() => {
+            this.tableLoading = false
+          })
+        } else {
+          console.log(this.form)
+          this.$axios.put("/parsingRp", this.form).then(response => {
+            this.dialogVisible = false
+            this.getTableList()
+            this.tableLoading = false
+            this.$message.success(response.data.data)
+          }).catch(() => {
+            this.tableLoading = false
+          })
+        }
+        this.visible = false
+      }
+    },
+    /*上报对象*/
+    handleAdd() {
+      this.saveFlag = 1
+      this.info = ''
+      this.form = {}
+      this.clearformula()
+      this.visible = true
+    },
+    /*上报对象编辑*/
+    handleEdit(row) {
+      this.saveFlag = 2
+      let newRow = Object.assign({},row)
+      let tempStationCode = newRow.stationCode.split(',')
+      this.form = newRow
+      this.form.stationCode = tempStationCode
+      this.clearformula()
+      this.visible = true
+    },
+    /*上报对象删除*/
+    handleDelete(row) {
+      this.$confirm('是否确认删除此条配置?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$axios.delete("/parsingRp/"+row.id).then(response => {
+          this.getTableList()
+          this.$message.success(response.data.data)
+        })
+      })
+    },
+    /*上报对象pageSize改变*/
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.page.currentPage = 1
+      this.getTableList()
+
+    },
+    /*上报对象currentPage改变*/
+    handleCurrentChange(val) {
+      this.page.currentPage = val
+      this.getTableList()
+    }
+  }
+}
+</script>
+
+<style scoped>
+.block {
+  float: right;
+}
+
+.myButton {
+  margin-bottom: .5%;
+}
+
+.uploadno {
+  background: #2d8cf0;
+  width: 20px;
+  height: 20px;
+  border-radius: 50%;
+  text-align: center;
+  display: inline-block;
+  color: #fff;
+}
+
+.el-divider--vertical {
+  display: inline-block;
+  width: 1px;
+  height: 35em;
+  margin: 0 8px;
+  vertical-align: middle;
+  position: relative;
+}
+
+/deep/ .formulaColor .el-input--small .el-input__inner {
+  height: 32px;
+  line-height: 32px;
+  background-color: #cccccc;
+}
+
+</style>