From 6c44fdd0a13bb9ae71b4b6b8fa424c4edc8f360c Mon Sep 17 00:00:00 2001 From: "1378012178@qq.com" <1378012178@qq.com> Date: Thu, 28 Aug 2025 19:20:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/jeecgboot-mysql-5.7.sql | 4 +- jeecg-module-system/jeecg-system-biz/pom.xml | 17 +- .../controller/AnalysisRuleController.java | 173 ++++++ .../analysisrule/entity/AnalysisRule.java | 89 +++ .../mapper/AnalysisRuleMapper.java | 15 + .../mapper/xml/AnalysisRuleMapper.xml | 5 + .../service/IAnalysisRuleService.java | 14 + .../service/impl/AnalysisRuleServiceImpl.java | 18 + .../DataExtractConfigController.java | 147 +++++ .../controller/HeatanalysisController.java | 194 +++++++ .../HeatanalysisHistoryController.java | 92 ++++ .../controller/HeatsourceController.java | 171 ++++++ .../HeatsourcestationController.java | 203 +++++++ .../controller/MarkinfoController.java | 100 ++++ .../controller/SimconfigController.java | 250 +++++++++ .../controller/SubstationController.java | 36 ++ .../controller/ThermalcompanyController.java | 173 ++++++ .../heating/entity/DataExtractConfig.java | 68 +++ .../modules/heating/entity/Heatanalysis.java | 139 +++++ .../heating/entity/HeatanalysisHistory.java | 116 ++++ .../modules/heating/entity/Heatsource.java | 151 ++++++ .../heating/entity/Heatsourcestation.java | 108 ++++ .../modules/heating/entity/Markinfo.java | 71 +++ .../modules/heating/entity/Simconfig.java | 94 ++++ .../modules/heating/entity/Substation.java | 58 ++ .../heating/entity/Thermalcompany.java | 123 +++++ .../modules/heating/job/FlowanalysisJob.java | 192 +++++++ .../modules/heating/job/HeatingReportJob.java | 194 +++++++ .../heating/job/HeatingSimulateJob.java | 36 ++ .../modules/heating/job/PsdsjApiTask.java | 58 ++ .../mapper/DataExtractConfigMapper.java | 17 + .../mapper/HeatanalysisHistoryMapper.java | 14 + .../heating/mapper/HeatanalysisMapper.java | 26 + .../heating/mapper/HeatsourceMapper.java | 9 + .../mapper/HeatsourcestationMapper.java | 11 + .../heating/mapper/MarkinfoMapper.java | 13 + .../heating/mapper/SimconfigMapper.java | 18 + .../heating/mapper/SubstationMapper.java | 9 + .../heating/mapper/ThermalcompanyMapper.java | 9 + .../mapper/xml/DataExtractConfigMapper.xml | 97 ++++ .../mapper/xml/HeatanalysisHistoryMapper.xml | 256 +++++++++ .../heating/mapper/xml/HeatanalysisMapper.xml | 507 ++++++++++++++++++ .../heating/mapper/xml/HeatsourceMapper.xml | 80 +++ .../mapper/xml/HeatsourcestationMapper.xml | 120 +++++ .../heating/mapper/xml/MarkinfoMapper.xml | 101 ++++ .../heating/mapper/xml/SimconfigMapper.xml | 64 +++ .../heating/mapper/xml/SubstationMapper.xml | 60 +++ .../mapper/xml/ThermalcompanyMapper.xml | 57 ++ .../service/DataExtractConfigService.java | 16 + .../service/HeatanalysisHistoryService.java | 14 + .../heating/service/HeatanalysisService.java | 27 + .../heating/service/HeatsourceService.java | 9 + .../service/HeatsourcestationService.java | 11 + .../heating/service/MarkinfoService.java | 18 + .../heating/service/SimconfigService.java | 19 + .../heating/service/SubstationService.java | 9 + .../service/ThermalcompanyService.java | 10 + .../impl/DataExtractConfigServiceImpl.java | 24 + .../impl/HeatanalysisHistoryServiceImpl.java | 118 ++++ .../service/impl/HeatanalysisServiceImpl.java | 90 ++++ .../service/impl/HeatsourceServiceImpl.java | 21 + .../impl/HeatsourcestationServiceImpl.java | 28 + .../service/impl/MarkinfoServiceImpl.java | 137 +++++ .../service/impl/SimconfigServiceImpl.java | 31 ++ .../service/impl/SubstationServiceImpl.java | 20 + .../impl/ThermalcompanyServiceImpl.java | 20 + .../modules/message/util/HttpPostTest.java | 157 ++++++ .../controller/TemperatureController.java | 50 ++ .../temperature/entity/Temperature.java | 46 ++ .../temperature/mapper/TemperatureMapper.java | 10 + .../mapper/xml/TemperatureMapper.xml | 62 +++ .../service/TemperatureService.java | 10 + .../service/impl/TemperatureServiceImpl.java | 73 +++ .../BlWaterFlowConfigController.java | 180 +++++++ .../entity/BlWaterFlowConfig.java | 85 +++ .../mapper/BlWaterFlowConfigMapper.java | 17 + .../mapper/xml/BlWaterFlowConfigMapper.xml | 5 + .../service/IBlWaterFlowConfigService.java | 14 + .../impl/BlWaterFlowConfigServiceImpl.java | 19 + .../src/main/resources/application-dev.yml | 8 +- pom.xml | 10 +- 81 files changed, 5933 insertions(+), 12 deletions(-) create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/controller/AnalysisRuleController.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/entity/AnalysisRule.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/mapper/AnalysisRuleMapper.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/mapper/xml/AnalysisRuleMapper.xml create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/service/IAnalysisRuleService.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/service/impl/AnalysisRuleServiceImpl.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/DataExtractConfigController.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatanalysisController.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatanalysisHistoryController.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatsourceController.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatsourcestationController.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/MarkinfoController.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/SimconfigController.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/SubstationController.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/ThermalcompanyController.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/DataExtractConfig.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatanalysis.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/HeatanalysisHistory.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatsource.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatsourcestation.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Markinfo.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Simconfig.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Substation.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Thermalcompany.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/job/FlowanalysisJob.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/job/HeatingReportJob.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/job/HeatingSimulateJob.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/job/PsdsjApiTask.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/DataExtractConfigMapper.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatanalysisHistoryMapper.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatanalysisMapper.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatsourceMapper.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatsourcestationMapper.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/MarkinfoMapper.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/SimconfigMapper.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/SubstationMapper.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/ThermalcompanyMapper.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/DataExtractConfigMapper.xml create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatanalysisHistoryMapper.xml create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatanalysisMapper.xml create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatsourceMapper.xml create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatsourcestationMapper.xml create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/MarkinfoMapper.xml create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/SimconfigMapper.xml create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/SubstationMapper.xml create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/ThermalcompanyMapper.xml create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/DataExtractConfigService.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatanalysisHistoryService.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatanalysisService.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatsourceService.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatsourcestationService.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/MarkinfoService.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/SimconfigService.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/SubstationService.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/ThermalcompanyService.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/DataExtractConfigServiceImpl.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatanalysisHistoryServiceImpl.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatanalysisServiceImpl.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatsourceServiceImpl.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatsourcestationServiceImpl.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/MarkinfoServiceImpl.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/SimconfigServiceImpl.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/SubstationServiceImpl.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/ThermalcompanyServiceImpl.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/message/util/HttpPostTest.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/controller/TemperatureController.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/entity/Temperature.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/mapper/TemperatureMapper.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/mapper/xml/TemperatureMapper.xml create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/service/TemperatureService.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/service/impl/TemperatureServiceImpl.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/controller/BlWaterFlowConfigController.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/entity/BlWaterFlowConfig.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/mapper/BlWaterFlowConfigMapper.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/mapper/xml/BlWaterFlowConfigMapper.xml create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/service/IBlWaterFlowConfigService.java create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/service/impl/BlWaterFlowConfigServiceImpl.java diff --git a/db/jeecgboot-mysql-5.7.sql b/db/jeecgboot-mysql-5.7.sql index 2218cb6..3204342 100644 --- a/db/jeecgboot-mysql-5.7.sql +++ b/db/jeecgboot-mysql-5.7.sql @@ -1,5 +1,5 @@ -CREATE database if NOT EXISTS `jeecg-boot` default character set utf8mb4 collate utf8mb4_unicode_ci; -USE `jeecg-boot`; +CREATE database if NOT EXISTS `heating` default character set utf8mb4 collate utf8mb4_unicode_ci; +USE `heating`; /* Navicat Premium Data Transfer diff --git a/jeecg-module-system/jeecg-system-biz/pom.xml b/jeecg-module-system/jeecg-system-biz/pom.xml index 1e0ae5a..bc3b171 100644 --- a/jeecg-module-system/jeecg-system-biz/pom.xml +++ b/jeecg-module-system/jeecg-system-biz/pom.xml @@ -55,6 +55,21 @@ org.jeecgframework.jimureport jimubi-spring-boot-starter + + + cn.hutool + hutool-core + + + cn.hutool + hutool-crypto + + + cn.hutool + hutool-json + 5.8.26 + + - + diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/controller/AnalysisRuleController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/controller/AnalysisRuleController.java new file mode 100644 index 0000000..5f429de --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/controller/AnalysisRuleController.java @@ -0,0 +1,173 @@ +package org.jeecg.modules.analysisrule.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.query.QueryRuleEnum; +import org.jeecg.modules.analysisrule.entity.AnalysisRule; +import org.jeecg.modules.analysisrule.service.IAnalysisRuleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * @Description: bl_analysis_rule + * @Author: jeecg-boot + * @Date: 2025-08-25 + * @Version: V1.0 + */ +@Tag(name = "bl_analysis_rule") +@RestController +@RequestMapping("/analysisrule/analysisRule") +@Slf4j +public class AnalysisRuleController extends JeecgController { + @Autowired + private IAnalysisRuleService analysisRuleService; + + /** + * 分页列表查询 + * + * @param analysisRule + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "bl_analysis_rule-分页列表查询") + @Operation(summary = "bl_analysis_rule-分页列表查询", description = "bl_analysis_rule-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(AnalysisRule analysisRule, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + // 自定义查询规则 + Map customeRuleMap = new HashMap<>(); + // 自定义多选的查询规则为:LIKE_WITH_OR + customeRuleMap.put("companyId", QueryRuleEnum.LIKE_WITH_OR); + customeRuleMap.put("sourceId", QueryRuleEnum.LIKE_WITH_OR); + customeRuleMap.put("stationId", QueryRuleEnum.LIKE_WITH_OR); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(analysisRule, req.getParameterMap(), customeRuleMap); + queryWrapper.eq("region_type", analysisRule.getRegionType()); + Page page = new Page(pageNo, pageSize); + IPage pageList = analysisRuleService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param analysisRule + * @return + */ + @AutoLog(value = "bl_analysis_rule-添加") + @Operation(summary = "bl_analysis_rule-添加", description = "bl_analysis_rule-添加") + @RequiresPermissions("analysisrule:bl_analysis_rule:add") + @PostMapping(value = "/add") + public Result add(@RequestBody AnalysisRule analysisRule) { + analysisRuleService.save(analysisRule); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param analysisRule + * @return + */ + @AutoLog(value = "bl_analysis_rule-编辑") + @RequiresPermissions("analysisrule:bl_analysis_rule:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) + public Result edit(@RequestBody AnalysisRule analysisRule) { + analysisRuleService.updateById(analysisRule); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "bl_analysis_rule-通过id删除") + @Operation(summary = "bl_analysis_rule-通过id删除", description = "bl_analysis_rule-通过id删除") + @RequiresPermissions("analysisrule:bl_analysis_rule:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name = "id", required = true) String id) { + analysisRuleService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "bl_analysis_rule-批量删除") + @Operation(summary = "bl_analysis_rule-批量删除", description = "bl_analysis_rule-批量删除") + @RequiresPermissions("analysisrule:bl_analysis_rule:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name = "ids", required = true) String ids) { + this.analysisRuleService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "bl_analysis_rule-通过id查询") + @Operation(summary = "bl_analysis_rule-通过id查询", description = "bl_analysis_rule-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name = "id", required = true) String id) { + AnalysisRule analysisRule = analysisRuleService.getById(id); + if (analysisRule == null) { + return Result.error("未找到对应数据"); + } + return Result.OK(analysisRule); + } + + /** + * 导出excel + * + * @param request + * @param analysisRule + */ + @RequiresPermissions("analysisrule:bl_analysis_rule:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, AnalysisRule analysisRule) { + return super.exportXls(request, analysisRule, AnalysisRule.class, "bl_analysis_rule"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("analysisrule:bl_analysis_rule:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, AnalysisRule.class); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/entity/AnalysisRule.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/entity/AnalysisRule.java new file mode 100644 index 0000000..029c2e7 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/entity/AnalysisRule.java @@ -0,0 +1,89 @@ +package org.jeecg.modules.analysisrule.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.TableLogic; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.jeecg.common.constant.ProvinceCityArea; +import org.jeecg.common.util.SpringContextUtils; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; + + +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: bl_analysis_rule + * @Author: jeecg-boot + * @Date: 2025-08-25 + * @Version: V1.0 + */ +@Data +@TableName("bl_analysis_rule") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@Tag(name ="bl_analysis_rule对象", description="bl_analysis_rule") +public class AnalysisRule implements Serializable { + private static final long serialVersionUID = 1L; + + /**ID*/ + @TableId(type = IdType.ASSIGN_ID) + private java.lang.Integer id; + /**卡号*/ + @Excel(name = "卡号", width = 15) + private java.lang.String sim; + /**规则代码 1 2 3 4 5 */ + @Excel(name = "规则代码 1 2 3 4 5 ", width = 15) + private java.lang.String code; + /**规则描述 1:0141规则码 2:31字节长度 3:73字节长度 4:26字节长度 5:不解析*/ + @Excel(name = "规则描述 1:0141规则码 2:31字节长度 3:73字节长度 4:26字节长度 5:不解析", width = 15) + private java.lang.String remarks; + /**热力公司ID*/ + @Excel(name = "热力公司ID", width = 15, dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id") + @Dict(dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id") + private java.lang.String companyId; + /**热力公司*/ + @Excel(name = "热力公司", width = 15) + private java.lang.String conpanyName; + /**锅炉房ID*/ + @Excel(name = "锅炉房ID", width = 15, dictTable = "bl_heatsource", dicText = "source_name", dicCode = "id") + @Dict(dictTable = "bl_heatsource", dicText = "source_name", dicCode = "id") + private java.lang.String sourceId; + /**锅炉房*/ + @Excel(name = "锅炉房", width = 15) + private java.lang.String sourceName; + /**换热站ID*/ + @Excel(name = "换热站ID", width = 15, dictTable = "bl_heatsourcestation", dicText = "station_name", dicCode = "id") + @Dict(dictTable = "bl_heatsourcestation", dicText = "station_name", dicCode = "id") + private java.lang.String stationId; + /**换热站*/ + @Excel(name = "换热站", width = 15) + private java.lang.String stationName; + /**删除标识*/ + @Excel(name = "删除标识", width = 15) + @TableLogic + private java.lang.String delFlag; + /**创建时间*/ + @Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date createDate; + /**更改时间*/ + @Excel(name = "更改时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date updateDate; + /**地区类型*/ + @Excel(name = "地区类型", width = 15) + private java.lang.String regionType; +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/mapper/AnalysisRuleMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/mapper/AnalysisRuleMapper.java new file mode 100644 index 0000000..2a4ffa1 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/mapper/AnalysisRuleMapper.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.analysisrule.mapper; + + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.analysisrule.entity.AnalysisRule; + +/** + * @Description: bl_analysis_rule + * @Author: jeecg-boot + * @Date: 2025-08-25 + * @Version: V1.0 + */ +public interface AnalysisRuleMapper extends BaseMapper { + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/mapper/xml/AnalysisRuleMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/mapper/xml/AnalysisRuleMapper.xml new file mode 100644 index 0000000..6146cf3 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/mapper/xml/AnalysisRuleMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/service/IAnalysisRuleService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/service/IAnalysisRuleService.java new file mode 100644 index 0000000..fbf5eb1 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/service/IAnalysisRuleService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.analysisrule.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.analysisrule.entity.AnalysisRule; + +/** + * @Description: bl_analysis_rule + * @Author: jeecg-boot + * @Date: 2025-08-25 + * @Version: V1.0 + */ +public interface IAnalysisRuleService extends IService { + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/service/impl/AnalysisRuleServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/service/impl/AnalysisRuleServiceImpl.java new file mode 100644 index 0000000..ed7b535 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/analysisrule/service/impl/AnalysisRuleServiceImpl.java @@ -0,0 +1,18 @@ +package org.jeecg.modules.analysisrule.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.modules.analysisrule.entity.AnalysisRule; +import org.jeecg.modules.analysisrule.mapper.AnalysisRuleMapper; +import org.jeecg.modules.analysisrule.service.IAnalysisRuleService; +import org.springframework.stereotype.Service; + +/** + * @Description: bl_analysis_rule + * @Author: jeecg-boot + * @Date: 2025-08-25 + * @Version: V1.0 + */ +@Service +public class AnalysisRuleServiceImpl extends ServiceImpl implements IAnalysisRuleService { + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/DataExtractConfigController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/DataExtractConfigController.java new file mode 100644 index 0000000..7277ff4 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/DataExtractConfigController.java @@ -0,0 +1,147 @@ +package org.jeecg.modules.heating.controller; + +import java.util.Arrays; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecg.modules.heating.entity.DataExtractConfig; +import org.jeecg.modules.heating.service.DataExtractConfigService; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; +import org.jeecg.common.aspect.annotation.AutoLog; + +/** + * @Description: 数据抽取配置 + * @Author: jeecg-boot + * @Date: 2024-12-06 + * @Version: V1.0 + */ +@Tag(name="数据抽取配置") +@RestController +@RequestMapping("/heating/dataExtractConfig") +@Slf4j +public class DataExtractConfigController extends JeecgController { + @Autowired + private DataExtractConfigService dataExtractConfigService; + + /** + * 分页列表查询 + * + * @param dataExtractConfig + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "数据抽取配置-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(DataExtractConfig dataExtractConfig, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + Page page = new Page(pageNo, pageSize); + IPage pageList = dataExtractConfigService.findPage(page, dataExtractConfig); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param dataExtractConfig + * @return + */ + @AutoLog(value = "数据抽取配置-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody DataExtractConfig dataExtractConfig) { + dataExtractConfigService.save(dataExtractConfig); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param dataExtractConfig + * @return + */ + @AutoLog(value = "数据抽取配置-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody DataExtractConfig dataExtractConfig) { + dataExtractConfigService.updateById(dataExtractConfig); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "数据抽取配置-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + dataExtractConfigService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "数据抽取配置-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.dataExtractConfigService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "数据抽取配置-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + DataExtractConfig dataExtractConfig = dataExtractConfigService.getById(id); + if(dataExtractConfig==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(dataExtractConfig); + } + + /** + * 导出excel + * + * @param request + * @param dataExtractConfig + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, DataExtractConfig dataExtractConfig) { + return super.exportXls(request, dataExtractConfig, DataExtractConfig.class, "数据抽取配置"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, DataExtractConfig.class); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatanalysisController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatanalysisController.java new file mode 100644 index 0000000..93c2a9b --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatanalysisController.java @@ -0,0 +1,194 @@ +package org.jeecg.modules.heating.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.SecurityUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.vo.LoginUser; +import org.jeecg.config.JeecgBaseConfig; +import org.jeecg.modules.heating.entity.*; +import org.jeecg.modules.heating.service.*; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.util.List; + + +@Slf4j +@RestController +@RequestMapping("/heating/heatanalysis") +public class HeatanalysisController extends JeecgController { + @Autowired + private HeatanalysisService heatanalysisService; + @Resource + private JeecgBaseConfig jeecgBaseConfig; + + /** + * 分页列表查询 + * + * @param heatanalysis + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @GetMapping(value = "/page") + public Result queryPageList(Heatanalysis heatanalysis, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { + Page page = new Page(pageNo, pageSize); + IPage pageList = heatanalysisService.findPage(page, heatanalysis); + return Result.ok(pageList); + } + + /** + * 编辑 + * + * @param heatanalysis + * @return + */ + @RequestMapping(value = "/updateType", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result updateType(@RequestBody Heatanalysis heatanalysis){ + heatanalysisService.updateType(heatanalysis); + return Result.OK("修改状态成功!"); + } + + /** + * 列表查询 + * + * @param heatanalysis + * @param req + * @return + */ + @GetMapping(value = "/findSourceList") + public Result findSourceList(Heatanalysis heatanalysis, HttpServletRequest req) { + List list = heatanalysisService.findSourceList(heatanalysis); + return Result.ok(list); + } + + /** + * 列表查询 + * + * @param heatanalysis + * @param req + * @return + */ + @GetMapping(value = "/list") + public Result queryList(Heatanalysis heatanalysis, HttpServletRequest req) { + List list = heatanalysisService.findList(heatanalysis); + return Result.ok(list); + } + + /** + * 列表查询 + * + * @param heatanalysis + * @param req + * @return + */ + @GetMapping(value = "/staticList") + public Result staticList(Heatanalysis heatanalysis, HttpServletRequest req) { + List list = heatanalysisService.findStaticList(heatanalysis); + return Result.ok(list); + } + + /** + * 列表查询 + * + * @param heatanalysis + * @param req + * @return + */ + @GetMapping(value = "/lowest") + public Result lowest(Heatanalysis heatanalysis, HttpServletRequest req) { + List list = heatanalysisService.lowest(heatanalysis); + return Result.ok(list); + } + + /** + * 导出excel + * + * @param request + * @param heatanalysis + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Heatanalysis heatanalysis) { + return exportXls(request, heatanalysis, Heatanalysis.class, "网关温压监测"); + } + + protected ModelAndView exportXls(HttpServletRequest request, Heatanalysis object, Class clazz, String title) { + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + List exportList = heatanalysisService.findList(object); + //AutoPoi 导出Excel + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); + //此处设置的filename无效 ,前端会重更新设置一下 + mv.addObject(NormalExcelConstants.FILE_NAME, title); + mv.addObject(NormalExcelConstants.CLASS, clazz); + //update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置-------------------- + ExportParams exportParams=new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title); + exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload()); + //update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置---------------------- + mv.addObject(NormalExcelConstants.PARAMS,exportParams); + mv.addObject(NormalExcelConstants.DATA_LIST, exportList); + return mv; + } + + /** + * 分页列表查询抽取一次网 + */ + @GetMapping(value = "/onePage") + public Result> onePage(Heatanalysis object, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + Page page = new Page(pageNo, pageSize); + IPage pageList = heatanalysisService.findOnePage(page, object); + return Result.OK(pageList); + } + + /** + * 分页列表查询抽取二次网 + */ + @GetMapping(value = "/twoPage") + public Result> twoPage(Heatanalysis object, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + Page page = new Page(pageNo, pageSize); + IPage pageList = heatanalysisService.findTwoPage(page, object); + return Result.OK(pageList); + } + + /** + * 分页列表查询抽取一次网 + */ + @GetMapping(value = "/extractedOnePage") + public Result> extractedOnePage(Heatanalysis object, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + Page page = new Page(pageNo, pageSize); + IPage pageList = heatanalysisService.findExtractedOnePage(page, object); + return Result.OK(pageList); + } + + /** + * 分页列表查询抽取一次网 + */ + @GetMapping(value = "/extractedTwoPage") + public Result> extractedTwoPage(Heatanalysis object, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + Page page = new Page(pageNo, pageSize); + IPage pageList = heatanalysisService.findExtractedTwoPage(page, object); + return Result.OK(pageList); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatanalysisHistoryController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatanalysisHistoryController.java new file mode 100644 index 0000000..6dac103 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatanalysisHistoryController.java @@ -0,0 +1,92 @@ +package org.jeecg.modules.heating.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang.StringUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.modules.heating.entity.HeatanalysisHistory; +import org.jeecg.modules.heating.service.HeatanalysisHistoryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.List; + + +@Slf4j +@RestController +@RequestMapping("/heating/heatanalysishistory") +public class HeatanalysisHistoryController extends JeecgController { + @Autowired + private HeatanalysisHistoryService service; + + /** + * 分页列表查询 + * + * @param heatanalysisHistory + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @GetMapping(value = "/page") + public Result queryPageList(HeatanalysisHistory heatanalysisHistory, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + @RequestParam(name = "SDateStr", required = false) String SDateStr, + @RequestParam(name = "EDateStr", required = false) String EDateStr, HttpServletRequest req) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + try { + if(StringUtils.isNotBlank(SDateStr)){ + heatanalysisHistory.setSDate(sdf.parse(SDateStr)); + } + if(StringUtils.isNotBlank(EDateStr)){ + heatanalysisHistory.setEDate(sdf.parse(EDateStr)); + } + } catch (ParseException e) { + e.printStackTrace(); + } + Page page = new Page(pageNo, pageSize); + IPage pageList = service.findPage(page, heatanalysisHistory); + return Result.ok(pageList); + } + + /** + * 分页列表查询 + * + * @param heatanalysisHistory + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @GetMapping(value = "/jxpage") + public Result queryJxPageList(HeatanalysisHistory heatanalysisHistory, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + @RequestParam(name = "SDateStr", required = false) String SDateStr, + @RequestParam(name = "EDateStr", required = false) String EDateStr, HttpServletRequest req) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + try { + if(StringUtils.isNotBlank(SDateStr)){ + heatanalysisHistory.setSDate(sdf.parse(SDateStr)); + } + if(StringUtils.isNotBlank(EDateStr)){ + heatanalysisHistory.setEDate(sdf.parse(EDateStr)); + } + } catch (ParseException e) { + e.printStackTrace(); + } + Page page = new Page(pageNo, pageSize); + IPage pageList = service.findJxPage(page, heatanalysisHistory); + return Result.ok(pageList); + } + + @GetMapping(value = "/queryHistoryList") + public Result queryHistoryList(HeatanalysisHistory heatanalysisHistory, HttpServletRequest req) { + return service.findHistoryList(heatanalysisHistory); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatsourceController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatsourceController.java new file mode 100644 index 0000000..88ba9ef --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatsourceController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.heating.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.v3.oas.annotations.Operation; +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.query.QueryRuleEnum; +import org.jeecg.modules.heating.entity.Heatsource; +import org.jeecg.modules.heating.service.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Slf4j +@RestController +@RequestMapping("/heating/heatsource") +public class HeatsourceController extends JeecgController { + + @Autowired + private HeatsourceService heatsourceService; + + /** + * 列表查询 + * + * @param heatsource + * @param req + * @return + */ + @GetMapping(value = "/list") + public Result queryList(Heatsource heatsource, HttpServletRequest req) { + //所有热源 + List list = heatsourceService.findList(heatsource); + return Result.ok(list); + } + + /** + * 分页列表查询 + * + * @param heatsource + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "热力源-分页列表查询") + @GetMapping(value = "/page") + public Result> queryPageList(Heatsource heatsource, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + // 自定义查询规则 + Map customeRuleMap = new HashMap<>(); + // 自定义多选的查询规则为:LIKE_WITH_OR + customeRuleMap.put("companyId", QueryRuleEnum.LIKE_WITH_OR); + customeRuleMap.put("sourceName", QueryRuleEnum.LIKE_WITH_OR); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(heatsource, req.getParameterMap(),customeRuleMap); + Page page = new Page(pageNo, pageSize); + IPage pageList = heatsourceService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param heatsource + * @return + */ + @AutoLog(value = "热力源-添加") + @RequiresPermissions("heating:bl_heatsource:add") + @PostMapping(value = "/add") + public Result add(@RequestBody Heatsource heatsource) { + heatsourceService.save(heatsource); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param heatsource + * @return + */ + @AutoLog(value = "热力源-编辑") + @RequiresPermissions("heating:bl_heatsource:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody Heatsource heatsource) { + heatsourceService.updateById(heatsource); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "热力源-通过id删除") + @RequiresPermissions("heating:bl_heatsource:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + heatsourceService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "热力源-批量删除") + @RequiresPermissions("heating:bl_heatsource:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.heatsourceService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "热力源-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + Heatsource heatsource = heatsourceService.getById(id); + if(heatsource==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(heatsource); + } + + /** + * 导出excel + * + * @param request + * @param heatsource + */ + @RequiresPermissions("heating:bl_heatsource:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Heatsource heatsource) { + return super.exportXls(request, heatsource, Heatsource.class, "热力源"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("heating:bl_heatsource:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, Heatsource.class); + } +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatsourcestationController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatsourcestationController.java new file mode 100644 index 0000000..266e82d --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatsourcestationController.java @@ -0,0 +1,203 @@ +package org.jeecg.modules.heating.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.v3.oas.annotations.Operation; +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.query.QueryRuleEnum; +import org.jeecg.modules.heating.entity.Heatsourcestation; +import org.jeecg.modules.heating.service.*; +import org.jeecg.modules.system.entity.SysDepart; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Slf4j +@RestController +@RequestMapping("/heating/heatsourcestation") +public class HeatsourcestationController extends JeecgController { + + @Autowired + private HeatsourcestationService heatsourcestationService; + + /** + * 列表查询 + * + * @param heatsourcestation + * @param req + * @return + */ + @GetMapping(value = "/list") + public Result queryList(Heatsourcestation heatsourcestation, HttpServletRequest req) { + //所有站点 + List list = heatsourcestationService.findList(heatsourcestation); + return Result.ok(list); + } + + /** + * 列表查询 + * + * @param heatsourcestation + * @param req + * @return + */ + @GetMapping(value = "/companyList") + public Result companyList(Heatsourcestation heatsourcestation, HttpServletRequest req) { + //所有站点 + List list = heatsourcestationService.findCompanyList(heatsourcestation); + return Result.ok(list); + } + + /** + * 列表查询 + * + * @param heatsourcestation + * @param req + * @return + */ + @GetMapping(value = "/sourceList") + public Result sourceList(Heatsourcestation heatsourcestation, HttpServletRequest req) { + //所有站点 + List list = heatsourcestationService.findSourceList(heatsourcestation); + return Result.ok(list); + } + + /** + * 分页列表查询 + * + * @param heatsourcestation + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "热力站-分页列表查询") + @GetMapping(value = "/page") + public Result> queryPageList(Heatsourcestation heatsourcestation, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + // 自定义查询规则 + Map customeRuleMap = new HashMap<>(); + // 自定义多选的查询规则为:LIKE_WITH_OR + customeRuleMap.put("companyId", QueryRuleEnum.EQ); + customeRuleMap.put("sourceId", QueryRuleEnum.EQ); + customeRuleMap.put("stationName", QueryRuleEnum.LIKE_WITH_OR); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(heatsourcestation, req.getParameterMap(),customeRuleMap); + queryWrapper.orderByAsc("company_id"); + queryWrapper.orderByAsc("source_id"); + Page page = new Page(pageNo, pageSize); + IPage pageList = heatsourcestationService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param heatsourcestation + * @return + */ + @AutoLog(value = "热力站-添加") + @RequiresPermissions("heating:bl_heatsourcestation:add") + @PostMapping(value = "/add") + public Result add(@RequestBody Heatsourcestation heatsourcestation) { + heatsourcestationService.save(heatsourcestation); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param heatsourcestation + * @return + */ + @AutoLog(value = "热力站-编辑") + @RequiresPermissions("heating:bl_heatsourcestation:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody Heatsourcestation heatsourcestation) { + heatsourcestationService.updateById(heatsourcestation); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "热力站-通过id删除") + @RequiresPermissions("heating:bl_heatsourcestation:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + heatsourcestationService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "热力站-批量删除") + @RequiresPermissions("heating:bl_heatsourcestation:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.heatsourcestationService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "热力站-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + Heatsourcestation heatsourcestation = heatsourcestationService.getById(id); + if(heatsourcestation==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(heatsourcestation); + } + + /** + * 导出excel + * + * @param request + * @param heatsourcestation + */ + @RequiresPermissions("heating:bl_heatsourcestation:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Heatsourcestation heatsourcestation) { + return super.exportXls(request, heatsourcestation, Heatsourcestation.class, "热力站"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("heating:bl_heatsourcestation:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, Heatsourcestation.class); + } +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/MarkinfoController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/MarkinfoController.java new file mode 100644 index 0000000..10ec8f8 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/MarkinfoController.java @@ -0,0 +1,100 @@ +package org.jeecg.modules.heating.controller; + +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.modules.heating.entity.Markinfo; +import org.jeecg.modules.heating.service.MarkinfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletRequest; +import java.util.List; +import java.util.Map; + +@Slf4j +@RestController +@RequestMapping("/heating/markinfo") +public class MarkinfoController extends JeecgController { + + @Autowired + private MarkinfoService markinfoService; + + @GetMapping(value = "/queryTree") + public Result queryTree() { + List> list = markinfoService.queryTree(); + return Result.ok(list); + } + + /** + * 列表查询 + * + * @param markinfo + * @param req + * @return + */ + @GetMapping(value = "/list") + public Result queryList(Markinfo markinfo, HttpServletRequest req) { + List list = markinfoService.findList(markinfo); + return Result.ok(list); + } + + @GetMapping(value = "/getMarkinfo") + public Result getMarkinfo(Markinfo markinfo, HttpServletRequest req) { + Markinfo entity = markinfoService.getMarkinfo(markinfo); + return Result.ok(entity); + } + + @GetMapping(value = "/getPointInfo") + public Result getPointInfo(Markinfo markinfo, HttpServletRequest req) { + return markinfoService.getPointInfo(markinfo); + } + + /** + * 添加 + * + * @param markinfo + * @return + */ + @PostMapping(value = "/add") +// @RequiresPermissions("heating:bl_markinfo:add") + public Result add(@RequestBody Markinfo markinfo) { + markinfoService.save(markinfo); + return Result.OK("添加成功!"); + } + + /** + * 通过经纬度删除 + * + * @param markinfo + * @return + */ + @DeleteMapping(value = "/delete") +// @RequiresPermissions("heating:bl_markinfo:delete") + public Result delete(@RequestBody Markinfo markinfo) { + markinfoService.delete(markinfo); + return Result.OK("删除成功!"); + } + + @DeleteMapping(value = "/deleteAll") +// @RequiresPermissions("heating:bl_markinfo:delete") + public Result deleteAll() { + markinfoService.deleteAll(); + return Result.OK("删除成功!"); + } + + @GetMapping(value = "/sourceList") + public Result sourceList(Markinfo markinfo, HttpServletRequest req) { + //所有热源 + List list = markinfoService.sourceList(markinfo); + return Result.ok(list); + } + + @GetMapping(value = "/stationList") + public Result stationList(Markinfo markinfo, HttpServletRequest req) { + //所有站点 + List list = markinfoService.stationList(markinfo); + return Result.ok(list); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/SimconfigController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/SimconfigController.java new file mode 100644 index 0000000..addf418 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/SimconfigController.java @@ -0,0 +1,250 @@ +package org.jeecg.modules.heating.controller; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.query.QueryRuleEnum; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import org.jeecg.modules.heating.entity.Simconfig; +import org.jeecg.modules.heating.service.SimconfigService; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.apache.shiro.authz.annotation.RequiresPermissions; + + /** + * @Description: 设备信息管理 + * @Author: jeecg-boot + * @Date: 2025-04-09 + * @Version: V1.0 + */ +@Tag(name="设备信息管理") +@RestController +@RequestMapping("/heating/simconfig") +@Slf4j +public class SimconfigController extends JeecgController { + @Autowired + private SimconfigService simconfigService; + + /** + * 列表查询 + * + * @param simconfig + * @param req + * @return + */ + @GetMapping(value = "/companyList") + public Result companyList(Simconfig simconfig, HttpServletRequest req) { + //所有站点 + List list = simconfigService.findCompanyList(simconfig); + return Result.ok(list); + } + + /** + * 列表查询 + * + * @param simconfig + * @param req + * @return + */ + @GetMapping(value = "/sourceList") + public Result sourceList(Simconfig simconfig, HttpServletRequest req) { + //所有站点 + List list = simconfigService.findSourceList(simconfig); + return Result.ok(list); + } + + /** + * 列表查询 + * + * @param simconfig + * @param req + * @return + */ + @GetMapping(value = "/stationList") + public Result stationList(Simconfig simconfig, HttpServletRequest req) { + //所有站点 + List list = simconfigService.findStationList(simconfig); + return Result.ok(list); + } + + /** + * 分页列表查询 + * + * @param simconfig + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "设备信息管理-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(Simconfig simconfig, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + + // 自定义查询规则 + Map customeRuleMap = new HashMap<>(); + // 自定义多选的查询规则为:LIKE_WITH_OR + customeRuleMap.put("companyCompanyId", QueryRuleEnum.EQ); + customeRuleMap.put("sourceSourceId", QueryRuleEnum.EQ); + customeRuleMap.put("stationStationId", QueryRuleEnum.EQ); + customeRuleMap.put("code", QueryRuleEnum.LIKE_WITH_OR); + customeRuleMap.put("sim", QueryRuleEnum.LIKE_WITH_OR); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(simconfig, req.getParameterMap(),customeRuleMap); + queryWrapper.eq("region_type",simconfig.getRegionType()); + queryWrapper.orderByAsc("company_company_id,source_source_id,station_station_id"); + Page page = new Page(pageNo, pageSize); + IPage pageList = simconfigService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param simconfig + * @return + */ + @AutoLog(value = "设备信息管理-添加") + @RequiresPermissions("heating:bl_simconfig:add") + @PostMapping(value = "/add") + public Result add(@RequestBody Simconfig simconfig) { + String sim = simconfig.getSim(); + if(sim!=null&&!sim.equals("")){ + Simconfig entity = new Simconfig(); + entity.setSim(sim); + List list = simconfigService.findSimconfig(entity); + if(list.size()>0){ + return Result.error("添加失败,电话号已存在!"); + } + } + String code = simconfig.getCode(); + if(code!=null&&!code.equals("")){ + Simconfig entity = new Simconfig(); + entity.setCode(code); + List list = simconfigService.findSimconfig(entity); + if(list.size()>0){ + return Result.error("添加失败,设备号已存在!"); + } + } + simconfigService.save(simconfig); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param simconfig + * @return + */ + @AutoLog(value = "设备信息管理-编辑") + @RequiresPermissions("heating:bl_simconfig:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody Simconfig simconfig) { + String sim = simconfig.getSim(); + if(sim!=null&&!sim.equals("")){ + Simconfig entity = new Simconfig(); + entity.setSim(sim); + entity.setId(simconfig.getId()); + List list = simconfigService.findSimconfig(entity); + if(list.size()>0){ + return Result.error("添加失败,电话号已存在!"); + } + } + String code = simconfig.getCode(); + if(code!=null&&!code.equals("")){ + Simconfig entity = new Simconfig(); + entity.setCode(code); + entity.setId(simconfig.getId()); + List list = simconfigService.findSimconfig(entity); + if(list.size()>0){ + return Result.error("添加失败,设备号已存在!"); + } + } + simconfigService.updateById(simconfig); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "设备信息管理-通过id删除") + @RequiresPermissions("heating:bl_simconfig:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + simconfigService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "设备信息管理-批量删除") + @RequiresPermissions("heating:bl_simconfig:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.simconfigService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "设备信息管理-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + Simconfig simconfig = simconfigService.getById(id); + if(simconfig==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(simconfig); + } + + /** + * 导出excel + * + * @param request + * @param simconfig + */ + @RequiresPermissions("heating:bl_simconfig:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Simconfig simconfig) { + return super.exportXls(request, simconfig, Simconfig.class, "设备信息管理"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("heating:bl_simconfig:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, Simconfig.class); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/SubstationController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/SubstationController.java new file mode 100644 index 0000000..6fc70c4 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/SubstationController.java @@ -0,0 +1,36 @@ +package org.jeecg.modules.heating.controller; + +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.modules.heating.entity.Substation; +import org.jeecg.modules.heating.service.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +@Slf4j +@RestController +@RequestMapping("/heating/substation") +public class SubstationController extends JeecgController { + + @Autowired + private SubstationService substationService; + + /** + * 列表查询 + * + * @param substation + * @param req + * @return + */ + @GetMapping(value = "/list") + public Result queryList(Substation substation, HttpServletRequest req) { + //所有热力分所 + List list = substationService.findList(substation); + return Result.ok(list); + } +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/ThermalcompanyController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/ThermalcompanyController.java new file mode 100644 index 0000000..88d9b83 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/ThermalcompanyController.java @@ -0,0 +1,173 @@ +package org.jeecg.modules.heating.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.v3.oas.annotations.Operation; +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.query.QueryRuleEnum; +import org.jeecg.modules.heating.entity.Heatanalysis; +import org.jeecg.modules.heating.entity.Thermalcompany; +import org.jeecg.modules.heating.service.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Slf4j +@RestController +@RequestMapping("/heating/thermalcompany") +public class ThermalcompanyController extends JeecgController { + + @Autowired + private ThermalcompanyService thermalcompanyService; + + /** + * 列表查询 + * + * @param thermalcompany + * @param req + * @return + */ + @GetMapping(value = "/list") + public Result queryList(Thermalcompany thermalcompany, HttpServletRequest req) { + //获取所有公司 + List list = thermalcompanyService.findList(thermalcompany); + return Result.ok(list); + } + + /** + * 分页列表查询 + * + * @param thermalcompany + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "热力公司-分页列表查询") + @GetMapping(value = "/page") + public Result> queryPageList(Thermalcompany thermalcompany, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + // 自定义查询规则 + Map customeRuleMap = new HashMap<>(); + // 自定义多选的查询规则为:LIKE_WITH_OR + customeRuleMap.put("companyType", QueryRuleEnum.LIKE_WITH_OR); + customeRuleMap.put("companyName", QueryRuleEnum.LIKE_WITH_OR); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(thermalcompany, req.getParameterMap(),customeRuleMap); + queryWrapper.eq("region_type",thermalcompany.getRegionType()); + Page page = new Page(pageNo, pageSize); + IPage pageList = thermalcompanyService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param thermalcompany + * @return + */ + @AutoLog(value = "热力公司-添加") + @RequiresPermissions("heating:bl_thermalcompany:add") + @PostMapping(value = "/add") + public Result add(@RequestBody Thermalcompany thermalcompany) { + thermalcompanyService.save(thermalcompany); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param thermalcompany + * @return + */ + @AutoLog(value = "热力公司-编辑") + @RequiresPermissions("heating:bl_thermalcompany:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody Thermalcompany thermalcompany) { + thermalcompanyService.updateById(thermalcompany); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "热力公司-通过id删除") + @RequiresPermissions("heating:bl_thermalcompany:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + thermalcompanyService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "热力公司-批量删除") + @RequiresPermissions("heating:bl_thermalcompany:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.thermalcompanyService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "热力公司-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + Thermalcompany thermalcompany = thermalcompanyService.getById(id); + if(thermalcompany==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(thermalcompany); + } + + /** + * 导出excel + * + * @param request + * @param thermalcompany + */ + @RequiresPermissions("heating:bl_thermalcompany:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Thermalcompany thermalcompany) { + return super.exportXls(request, thermalcompany, Thermalcompany.class, "热力公司"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("heating:bl_thermalcompany:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, Thermalcompany.class); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/DataExtractConfig.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/DataExtractConfig.java new file mode 100644 index 0000000..f0c563c --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/DataExtractConfig.java @@ -0,0 +1,68 @@ +package org.jeecg.modules.heating.entity; + +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import org.jeecg.common.system.base.entity.JeecgEntity; + +import java.io.Serializable; + +/** + *

Class :数据抽取配置Entity + *

功能描述:功能描述 + */ +@Data +@TableName("bl_data_extract_config") +public class DataExtractConfig implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * id + */ + @TableId(type = IdType.AUTO) + private Long id; + private String sim; //手机号 + private String onePipeSim; //一次网抽取sim卡号 + private String onePipeType; //一次网抽取类型 0无 1一次网 2二次网 + private String twoPipeSim; //二次网抽取sim卡号 + private String twoPipeType; //二次网抽取类型 0无 1一次网 2二次网 + private String flag; //是否生效 0失效 1生效 + + @TableField(exist = false) + private Integer companyId;//热力公司 + @TableField(exist = false) + private String company; + @TableField(exist = false) + private Integer sourceId;//热源站 + @TableField(exist = false) + private String source; + @TableField(exist = false) + private Integer stationId;//换热站 + @TableField(exist = false) + private String station; + + @TableField(exist = false) + private Integer oneCompanyId;//一次网热力公司 + @TableField(exist = false) + private String oneCompany; + @TableField(exist = false) + private Integer oneSourceId;//一次网热源站 + @TableField(exist = false) + private String oneSource; + @TableField(exist = false) + private Integer oneStationId;//一次网换热站 + @TableField(exist = false) + private String oneStation; + @TableField(exist = false) + private Integer twoCompanyId;//二次网热力公司 + @TableField(exist = false) + private String twoCompany; + @TableField(exist = false) + private Integer twoSourceId;//二次网热源站 + @TableField(exist = false) + private String twoSource; + @TableField(exist = false) + private Integer twoStationId;//二次网换热站 + @TableField(exist = false) + private String twoStation; + +} \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatanalysis.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatanalysis.java new file mode 100644 index 0000000..ceab39c --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatanalysis.java @@ -0,0 +1,139 @@ +package org.jeecg.modules.heating.entity; + +import java.io.Serializable; +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.system.base.entity.JeecgEntity; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +/** + *

Class :管网温压检测Entity + *

功能描述:功能描述 + */ +@Data +@TableName("bl_heatanalysis") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +public class Heatanalysis extends JeecgEntity { + + private static final long serialVersionUID = 1L; + + @TableField(exist = false) + private java.lang.String createBy; + @TableField(exist = false) + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private java.util.Date createTime; + @TableField(exist = false) + private java.lang.String updateBy; + @TableField(exist = false) + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private java.util.Date updateTime; + + @TableField(exist = false) + @Excel(name="热力公司", width = 15) + private String view001Name;//公司名称 + @TableField(exist = false) + @Excel(name="热源名称", width = 15) + private String view002Name;//热源名称 + @TableField(exist = false) + private String view003Name;//热源所名称 + @TableField(exist = false) + @Excel(name="换热站名称", width = 15) + private String view004Name;//热力站名称 + + private Integer view001; // 热力公司 + private Integer view002; // 热源站 + private String view003; // 热源所 + private String view004; // 换热站 + @Excel(name = "数据时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @TableField(updateStrategy = FieldStrategy.NEVER) + private Date datatime; // 数据时间 + private Integer caveat; // caveat + @Excel(name="一次供水温度", width = 15) + private String view005; // 一次供水温度 + @Excel(name="一次回水温度", width = 15) + private String view006; // 一次回水温度 + @Excel(name="一次供水压力", width = 15) + private String view007; // 一次供水压力 + @Excel(name="一次回水压力", width = 15) + private String view008; // 一次回水压力 + @Excel(name="二次供水温度", width = 15) + private String view009; // 二次供水温度 + @Excel(name="二次回水温度", width = 15) + private String view010; // 二次回水温度 + @Excel(name="二次供水压力", width = 15) + private String view011; // 二次供水压力 + @Excel(name="二次回水压力", width = 15) + private String view012; // 二次回水压力 + private String view013; // view013 + private String view014; // view014 + private String view015; // view015 + private String view016; // view016 + private String view017; // view017 + private String view018; // view018 + private String view019; // view019 + private String view020; // view020 + private String view021; // view021 + private String view022; // view022 + private String view023; // view023 + private String view024; // view024 + private String view025; // view025 + private String view026; // view026 + private String view027; // view027 + private String view028; // view028 + private String view029; // view029 + private String view030; // view030 + private String sim; // sim + private String code; // code + private Integer reportType;//数据采集类型 1设备自动上报 2定时模拟 + private String fromFlow; // 温度是否从流量取 0否 1是 + private String view031; // 流量设备SN,view031到view047全是从流量表上获取的数据 + private String view032; // 流量数据上报时间 + private String view033; // 仪表ID + private String view034; // 数据有效标识 0无效 1有效 + private String view035; // 供水温度 + private String view036; // 回水温度 + private String view037; // 瞬时流量 + private String view038; // 正累积流量 + private String view039; // 负累积流量 + private String view040; // 净累积流量 + private String view041; // 瞬时热量 + private String view042; // 正累积热量 + private String view043; // 负累积热量 + private String view044; // 净累积热量 + private String view045; // 流体速度 + private String view046; // 流量因子 + private String view047; // 热量因子 + private Integer isExtract;//是否抽取 0否 1是 + /**地区类型*/ + @Excel(name = "地区类型", width = 15) + private java.lang.String regionType; + + @TableField(exist = false) + private Integer isExtracted;//是否被抽取 0否 1是 + @TableField(exist = false) + private Integer isTimeout;//是否超时 0否 1是 + + @TableField(exist = false) + private String SDate;//开始时间 + @TableField(exist = false) + private String EDate;//结束时间 + @TableField(exist = false) + private String tableName;//表名字 + private String delFlag; // 删除标识 + + + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/HeatanalysisHistory.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/HeatanalysisHistory.java new file mode 100644 index 0000000..f19627f --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/HeatanalysisHistory.java @@ -0,0 +1,116 @@ +package org.jeecg.modules.heating.entity; + +import com.baomidou.mybatisplus.annotation.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; + +import lombok.Data; +import org.jeecg.common.system.base.entity.JeecgEntity; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + *

Class :管网温压检测Entity + *

功能描述:功能描述 + */ +@Data +@TableName("bl_heatanalysis_YYMM") +public class HeatanalysisHistory extends JeecgEntity { + + private static final long serialVersionUID = 1L; + + @TableField(exist = false) + @Excel(name="热力公司", width = 15) + private String view001Name;//公司名称 + @TableField(exist = false) + @Excel(name="热源名称", width = 15) + private String view002Name;//热源名称 + @TableField(exist = false) + private String view003Name;//热源所名称 + @TableField(exist = false) + @Excel(name="换热站名称", width = 15) + private String view004Name;//热力站名称 + + private Integer view001; // 热力公司 + private Integer view002; // 热源站 + private String view003; // 热源所 + private String view004; // 换热站 + @Excel(name = "数据时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @TableField(updateStrategy = FieldStrategy.NEVER) + private Date datatime; // 数据时间 + private Integer caveat; // caveat + @Excel(name="一次供水温度", width = 15) + private String view005; // 一次供水温度 + @Excel(name="一次回水温度", width = 15) + private String view006; // 一次回水温度 + @Excel(name="一次供水压力", width = 15) + private String view007; // 一次供水压力 + @Excel(name="一次回水压力", width = 15) + private String view008; // 一次回水压力 + @Excel(name="二次供水温度", width = 15) + private String view009; // 二次供水温度 + @Excel(name="二次回水温度", width = 15) + private String view010; // 二次回水温度 + @Excel(name="二次供水压力", width = 15) + private String view011; // 二次供水压力 + @Excel(name="二次回水压力", width = 15) + private String view012; // 二次回水压力 + private String view013; // view013 + private String view014; // view014 + private String view015; // view015 + private String view016; // view016 + private String view017; // view017 + private String view018; // view018 + private String view019; // view019 + private String view020; // view020 + private String view021; // view021 + private String view022; // view022 + private String view023; // view023 + private String view024; // view024 + private String view025; // view025 + private String view026; // view026 + private String view027; // view027 + private String view028; // view028 + private String view029; // view029 + private String view030; // view030 + private String sim; // sim + private String code; // code + private Integer reportType;//数据采集类型 1设备自动上报 2定时模拟 + private String fromFlow; // 温度是否从流量取 0否 1是 + private String view031; // 流量设备SN,view031到view047全是从流量表上获取的数据 + private Date view032; // 流量数据上报时间 + private String view033; // 仪表ID + private int view034; // 数据有效标识 0无效 1有效 + private Double view035; // 供水温度 + private Double view036; // 回水温度 + private Double view037; // 瞬时流量 + private Double view038; // 正累积流量 + private Double view039; // 负累积流量 + private Double view040; // 净累积流量 + private Double view041; // 瞬时热量 + private Double view042; // 正累积热量 + private Double view043; // 负累积热量 + private Double view044; // 净累积热量 + private Double view045; // 流体速度 + private Double view046; // 流量因子 + private Double view047; // 热量因子 + private Integer isExtract;//是否抽取 0否 1是 + /**地区类型*/ + @Excel(name = "地区类型", width = 15) + private java.lang.String regionType; + @TableField(exist = false) + private Date SDate;//开始时间 + @TableField(exist = false) + private Date EDate;//结束时间 + @TableField(exist = false) + private String tableName;//表名字 + private String delFlag; // 删除标识 + @TableField(exist = false) + private String startDate;//开始时间 + @TableField(exist = false) + private String endDate;//结束时间 +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatsource.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatsource.java new file mode 100644 index 0000000..af3ad42 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatsource.java @@ -0,0 +1,151 @@ +package org.jeecg.modules.heating.entity; + +import java.io.Serializable; +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.*; +import com.fasterxml.jackson.annotation.JsonFormat; + + +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +/** + *

Class :热源信息管理Entity + *

功能描述:功能描述 + */ +@Data +@TableName("bl_heatsource") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@Tag(name ="bl_heatsource对象", description="热力源") +public class Heatsource implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.AUTO) + private Integer id; + /**锅炉规格*/ + @Excel(name = "锅炉规格", width = 15) + private Double boilerCapacity; + /**锅炉类型*/ + @Excel(name = "锅炉类型", width = 15) + @Dict(dicCode = "h_boiler_type") + private String boilerType; + /**联系人*/ + @Excel(name = "联系人", width = 15) + private String dutyPeople; + /**流量回下限*/ + @Excel(name = "流量回下限", width = 15) + private String llcomeDown; + /**流量回上限*/ + @Excel(name = "流量回上限", width = 15) + private String llcomeUp; + /**流量入下限*/ + @Excel(name = "流量入下限", width = 15) + private String llgoDown; + /**流量入上限*/ + @Excel(name = "流量入上限", width = 15) + private String llgoUp; + /**建设时间*/ + @Excel(name = "建设时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private Date setupTime; + /**热源名称*/ + @Excel(name = "热源名称", width = 15) + private String sourceName; + /**联系电话*/ + @Excel(name = "联系电话", width = 15) + private String sourcePhone; + /**热源类型*/ + @Excel(name = "热源类型", width = 15) + @Dict(dicCode = "h_source_type") + private String sourceType; + /**热力回下限*/ + @Excel(name = "热力回下限", width = 15) + private String wdcomeDown; + /**热力回上限*/ + @Excel(name = "热力回上限", width = 15) + private String wdcomeUp; + /**热力入下限*/ + @Excel(name = "热力入下限", width = 15) + private String wdgoDown; + /**热力入上限*/ + @Excel(name = "热力入上限", width = 15) + private String wdgoUp; + /**压力回下限*/ + @Excel(name = "压力回下限", width = 15) + private String ylcomeDown; + /**压力回上限*/ + @Excel(name = "压力回上限", width = 15) + private String ylcomeUp; + /**压力入下限*/ + @Excel(name = "压力入下限", width = 15) + private String ylgoDown; + /**压力入上限*/ + @Excel(name = "压力入上限", width = 15) + private String ylgoUp; + /**所属公司*/ + @Excel(name = "所属公司", width = 15) + private Integer company; + /**公司名称*/ + @Excel(name = "公司名称", width = 15) + private String companyName; + /**公司ID*/ + @Excel(name = "公司ID", width = 15, dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id") + @Dict(dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id") + private String companyId; + @TableField(exist = false) + private String companyNameView;//公司名称 + private String sourceImage;//热源图片 + private String treeId; //树形ID + private String heatingArea; //供热面积 + private String residentialArea; //住宅面积 + private String noresidentialArea; //非住宅面积 + private String yearcoal; //年用煤量 + private String nowcoal; //现储煤量 + private String yearwater; //年用水量 + private String yearelectricity; //年用电量 + private String onenet; //一次网 + private String secondarynet; //二次网 + private String boilernum; //锅炉数量 + private String tonnage; //吨位 + private String tonnageTwo; //锅炉吨位2 + @TableField(exist = false) + private String stationName; + @TableField(exist = false) + private String stationAddress; + @TableField(exist = false) + private String datatime; + @TableField(exist = false) + private String supplyBuild; + @Excel(name = "删除标识", width = 15) + @TableLogic + private String delFlag; // 删除标识 + /**创建人*/ + private String createBy; + /**创建时间*/ + @Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private Date createDate; + /**更改人*/ + private String updateBy; + /**更改时间*/ + @Excel(name = "更改时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private Date updateDate; + @TableField(exist = false) + private String typeFlag; // 类型标识 1热源 2换热站 + /**地区类型*/ + @Excel(name = "地区类型", width = 15) + private java.lang.String regionType; + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatsourcestation.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatsourcestation.java new file mode 100644 index 0000000..60b1983 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatsourcestation.java @@ -0,0 +1,108 @@ +package org.jeecg.modules.heating.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; + + +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecg.common.system.base.entity.JeecgEntity; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +/** + *

Class :热力站点管理Entity + *

功能描述:功能描述 + */ +@Data +@TableName("bl_heatsourcestation") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@Tag(name ="bl_heatsourcestation对象", description="热力站") +public class Heatsourcestation implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.AUTO) + private java.lang.Integer id; + @Excel(name="流量回下线", width = 15) + private Double llcomeDown; // 流量回下线 + @Excel(name="流量回上线", width = 15) + private Double llcomeUp; // 流量回上线 + @Excel(name="流量入下线", width = 15) + private Double llgoDown; // 流量入下线 + @Excel(name="流量入上线", width = 15) + private Double llgoUp; // 流量入上线 + @Excel(name="热力回下线", width = 15) + private Double wdcomeDown; // 热力回下线 + @Excel(name="热力回上线", width = 15) + private Double wdcomeUp; // 热力回上线 + @Excel(name="热力入下线", width = 15) + private Double wdgoDown; // 热力入下线 + @Excel(name="热力入上线", width = 15) + private Double wdgoUp; // 热力入上线 + @Excel(name="压力回下线", width = 15) + private Double ylcomeDown; // 压力回下线 + @Excel(name="压力回上线", width = 15) + private Double ylcomeUp; // 压力回上线 + @Excel(name="压力入下线", width = 15) + private Double ylgoDown; // 压力入下线 + @Excel(name="压力入上线", width = 15) + private Double ylgoUp; // 压力入上线 + @Excel(name="联系人", width = 15) + private String dutyPeople; // 联系人 + @Excel(name = "建设时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date setupTime; + @Excel(name="换热站地址", width = 15) + private String stationAddress; // 换热站地址 + @Excel(name="换热站名称", width = 15) + private String stationName; // 换热站名称 + @Excel(name="换热站电话", width = 15) + private String stationPhone; // 换热站电话 + @Excel(name="公司", width = 15) + private String company; // 公司 + @Excel(name="热源", width = 15) + private String source; // 热源 + @Excel(name="热力", width = 15) + private String substation; // 热力 + @Excel(name="公司ID", width = 15) + @Dict(dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id") + private String companyId; // 公司ID + @Excel(name="公司名称", width = 15) + private String companyName; // 公司名称 + @Excel(name="热源ID", width = 15) + @Dict(dictTable = "bl_heatsource", dicText = "source_name", dicCode = "id") + private String sourceId; // 热源ID + @Excel(name="热源名称", width = 15) + private String sourceName; // 热源名称 + @Excel(name="热力ID", width = 15) + private Integer substationId; // 热力ID + @Excel(name="热力名称", width = 15) + private String substationName; // 热力名称 + @TableField(exist = false) + private String sourceNameView; //热源名称 + @TableField(exist = false) + private String companyNameView;//公司名称 + @TableField(exist = false) + private String substationNameView;//热力分所名称 + private String sourcestationImage;//热力站图片 + private String treeId; //树形ID + private String supplyBuild; //所供楼宇 + private String delFlag; // 删除标识 + @TableField(exist = false) + private String typeFlag; // 类型标识 1热源 2换热站 + @TableField(exist = false) + private String regionType; // 地区类型 城区 郊县 +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Markinfo.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Markinfo.java new file mode 100644 index 0000000..c5c033e --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Markinfo.java @@ -0,0 +1,71 @@ +package org.jeecg.modules.heating.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; + + +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.system.base.entity.JeecgEntity; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + *

Class:地图标注信息Entity + *

功能描述:功能描述 + */ +@Data +@TableName("bl_markinfo") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@Tag(name ="bl_markinfo对象", description="地图标注信息") +public class Markinfo implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private java.lang.String id; + private String description; // 描述 + private String latitude; // 纬度 + private String longitude; // 经度 + private String name; // 热源的名称 + @TableField(exist = false) + private String stationId; // 热源的id + private String delFlag; // 删除标识 + private String typeFlag; // 类型标识 1热源 2换热站 + /**创建人*/ + private String createBy; + /**创建时间*/ + @Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private Date createDate; + /**更改人*/ + private String updateBy; + /**更改时间*/ + @Excel(name = "更改时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private Date updateDate; + + @TableField(exist = false) + private String heatSourceId; // 热源的id + @TableField(exist = false) + private String heatSourceName; // 热源的名称 + + @TableField(exist = false) + private String heatStationId; // 热站的id + @TableField(exist = false) + private String heatStationName; // 热站的名称 + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Simconfig.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Simconfig.java new file mode 100644 index 0000000..78840d7 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Simconfig.java @@ -0,0 +1,94 @@ +package org.jeecg.modules.heating.entity; + +import java.io.Serializable; +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.jeecg.common.aspect.annotation.Dict; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; + + +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 设备信息管理 + * @Author: jeecg-boot + * @Date: 2025-04-09 + * @Version: V1.0 + */ +@Data +@TableName("bl_simconfig") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@Tag(name ="bl_simconfig对象", description="设备信息管理") +public class Simconfig implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.AUTO) + private Integer id; + /**手机号*/ + @Excel(name = "手机号", width = 15) + private String sim; + /**注册设备时间*/ + @Excel(name = "注册设备时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private Date occurtime; + /**公司名称*/ + @Excel(name = "公司名称", width = 15) + @Dict(dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id") + private Integer companyCompanyId; + @TableField(exist = false) + private String companyId; + @TableField(exist = false) + private String companyName; + /**热源名称*/ + @Excel(name = "热源名称", width = 15) + @Dict(dictTable = "bl_heatsource", dicText = "source_name", dicCode = "id") + private Integer sourceSourceId; + @TableField(exist = false) + private String sourceId; + @TableField(exist = false) + private String sourceName; + /**换热站名称*/ + @Excel(name = "换热站名称", width = 15) + @Dict(dictTable = "bl_heatsourcestation", dicText = "station_name", dicCode = "id") + private Integer stationStationId; + @TableField(exist = false) + private String stationId; + @TableField(exist = false) + private String stationName; + /**热力分所名称*/ + @Excel(name = "热力分所名称", width = 15) + private Integer substationId; + /**创建者*/ + private String createBy; + /**创建时间*/ + @Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private Date createDate; + /**更改者*/ + private String updateBy; + /**更改时间*/ + @Excel(name = "更改时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private Date updateDate; + /**删除标识*/ + @Excel(name = "删除标识", width = 15) + @TableLogic + private String delFlag; + /**设备代码*/ + @Excel(name = "设备代码", width = 15) + private String code;/**地区类型*/ + @Excel(name = "地区类型", width = 15) + private java.lang.String regionType; + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Substation.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Substation.java new file mode 100644 index 0000000..1371f78 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Substation.java @@ -0,0 +1,58 @@ +package org.jeecg.modules.heating.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import java.util.Date; +import org.jeecg.common.system.base.entity.JeecgEntity; +import org.jeecgframework.poi.excel.annotation.Excel; + +/** + *

Class :热力分所管理Entity + *

功能描述:功能描述 + */ +@Data +@TableName("bl_substation") +public class Substation extends JeecgEntity { + + private static final long serialVersionUID = 1L; + @Excel(name="供热所地址", width = 15) + private String addres; // 供热所地址 + @Excel(name="供热面积", width = 15) + private String area; // 供热面积 + @Excel(name="管线长度", width = 15) + private String conduits; // 管线长度 + @Excel(name="供热总户数", width = 15) + private Integer doorsum; // 供热总户数 + @Excel(name="成立时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") + private Date establishedtime; // 成立时间 + @Excel(name="供热区域", width = 15) + private String heatarea; // 供热区域 + @Excel(name="负责人", width = 15) + private String inperson; // 负责人 + @Excel(name="供热所名称", width = 15) + private String name; // 供热所名称 + @Excel(name="十五年以上管网", width = 15) + private Double old15conduits; // 十五年以上管网 + @Excel(name="换热站数量", width = 15) + private Integer stacount; // 换热站数量 + @Excel(name="供热所电话", width = 15) + private String tel; // 供热所电话 + @Excel(name="热力公司", width = 15) + private String company; // 热力公司 + @Excel(name="热源", width = 15) + private Integer source; // 热源 + @Excel(name="热力公司ID", width = 15) + private Integer companyId; // 热力公司ID + @Excel(name="热力公司名称", width = 15) + private String companyName; // 热力公司名称 + @Excel(name="热源ID", width = 15) + private Integer sourceId; // 热源ID + @Excel(name="热源名称", width = 15) + private String sourceName; // 热源名称 + @TableField(exist = false) + private String companyNameView; // 热力公司名称 + @TableField(exist = false) + private String sourceNameView; // 热源名称 + private String delFlag; // 删除标识 +} \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Thermalcompany.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Thermalcompany.java new file mode 100644 index 0000000..c9b41ce --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Thermalcompany.java @@ -0,0 +1,123 @@ +package org.jeecg.modules.heating.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; + + +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecg.common.system.base.entity.JeecgEntity; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +/** + *

Class :热力公司配置Entity + *

功能描述:功能描述 + */ +@Data +@TableName("bl_thermalcompany") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@Tag(name ="bl_thermalcompany对象", description="热力公司") +public class Thermalcompany implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.AUTO) + private java.lang.Integer id; + /**换热站个数*/ + @Excel(name = "换热站个数", width = 15) + private java.lang.Integer barterHeat; + /**锅炉房个数*/ + @Excel(name = "锅炉房个数", width = 15) + private java.lang.Integer boilerHouse; + /**公司地址*/ + @Excel(name = "公司地址", width = 15) + private java.lang.String companyAddress; + /**公司名称*/ + @Excel(name = "公司名称", width = 15) + private java.lang.String companyName; + /**电话*/ + @Excel(name = "电话", width = 15) + private java.lang.String companyPhone; + /**公司类型*/ + @Excel(name = "公司类型", width = 15, dicCode = "h_company_type") + @Dict(dicCode = "h_company_type") + private java.lang.String companyType; + /**其中直供个数*/ + @Excel(name = "其中直供个数", width = 15) + private java.lang.Integer direct; + /**供热总户数*/ + @Excel(name = "供热总户数", width = 15) + private java.lang.Integer doorsum; + /**管线长度*/ + @Excel(name = "管线长度", width = 15) + private java.lang.Double ductLength; + /**负责人*/ + @Excel(name = "负责人", width = 15) + private java.lang.String dutyPeople; + /**供热区域*/ + @Excel(name = "供热区域", width = 15) + private java.lang.String heatArea; + /**拥有热源*/ + @Excel(name = "拥有热源", width = 15) + private java.lang.Integer heatSource; + /**供热面积*/ + @Excel(name = "供热面积", width = 15) + private java.lang.Double heatingArea; + /**其中间供个数*/ + @Excel(name = "其中间供个数", width = 15) + private java.lang.Integer indirect; + /**非居民热费价格*/ + @Excel(name = "非居民热费价格", width = 15) + private java.lang.Double nonresidentPrice; + /**十五年以上管网*/ + @Excel(name = "十五年以上管网", width = 15) + private java.lang.Double old15Length; + /**居民热费价格*/ + @Excel(name = "居民热费价格", width = 15) + private java.lang.Double residentPrice; + /**成立时间*/ + @Excel(name = "成立时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date setupTime; + /**创建人*/ + private java.lang.String createBy; + /**创建时间*/ + @Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date createDate; + /**更改人*/ + private java.lang.String updateBy; + /**更改时间*/ + @Excel(name = "更改时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date updateDate; + /**删除标识*/ + @Excel(name = "删除标识", width = 15) + @TableLogic + private java.lang.String delFlag; + /**树形ID*/ + @Excel(name = "树形ID", width = 15) + private java.lang.String treeId; + /**排序ID*/ + @Excel(name = "排序ID", width = 15) + private java.lang.Integer orderId; + /**地区类型*/ + @Excel(name = "地区类型", width = 15) + private java.lang.String regionType; + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/job/FlowanalysisJob.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/job/FlowanalysisJob.java new file mode 100644 index 0000000..17d9be4 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/job/FlowanalysisJob.java @@ -0,0 +1,192 @@ +package org.jeecg.modules.heating.job; + +import cn.hutool.json.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang.StringUtils; +import org.apache.http.HttpEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.util.EntityUtils; +import org.jeecg.common.util.DateUtils; +import org.jeecg.modules.heating.entity.Heatanalysis; +import org.jeecg.modules.heating.service.HeatanalysisService; +import org.jeecg.modules.waterFlowConfig.entity.BlWaterFlowConfig; +import org.jeecg.modules.waterFlowConfig.service.IBlWaterFlowConfigService; +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; +import org.springframework.beans.factory.annotation.Autowired; + +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; +/** + * 发送消息任务 + * @author: jeecg-boot + */ + +@Slf4j +public class FlowanalysisJob implements Job { + + @Autowired + private HeatanalysisService heatanalysisService; + + @Autowired + private IBlWaterFlowConfigService WaterFlowConfigService; + + @Override + public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { + + log.info(String.format("获取热量水流量数据 ! 时间:" + DateUtils.getTimestamp())); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("del_flag","0"); + List list = WaterFlowConfigService.list(queryWrapper); + for(BlWaterFlowConfig config : list){ + try{ + String sn = config.getSn(); + String json = getWebInfo(sn); + if(StringUtils.equals(json,"false")) continue; + JSONObject jsonObject = new JSONObject(json); + log.info("jsonObject:"+jsonObject); + String success = jsonObject.getStr("success"); + if(StringUtils.equals(success,"true")){ + QueryWrapper heatanalysisQueryWrapper = new QueryWrapper<>(); + heatanalysisQueryWrapper.eq("view031",sn); + heatanalysisQueryWrapper.last("limit 1"); + Heatanalysis heatanalysis = heatanalysisService.getOne(heatanalysisQueryWrapper); + if(heatanalysis != null){ + String view032_old = heatanalysis.getView032(); + String data = jsonObject.getStr("data"); + JSONObject dataObject = new JSONObject(data); + String view032 = dataObject.getStr("logat"); + if(StringUtils.equals(view032,view032_old)){ + log.info("--------数据重复---------"); + continue; + } + String view033 = dataObject.getStr("ID"); + String view034 = dataObject.getStr("valid"); + String view035 = dataObject.getStr("gswd"); + String view036 = dataObject.getStr("hswd"); + String view037 = dataObject.getStr("flowRate"); + String view037_2 = dataObject.getStr("ssll"); + String view038 = dataObject.getStr("pflowAccumulator"); + String view038_2 = dataObject.getStr("zljll"); + String view039 = dataObject.getStr("nflowAccumulator"); + String view039_2 = dataObject.getStr("fljll"); + String view040 = dataObject.getStr("netflowAccumulator"); + String view040_2 = dataObject.getStr("jljll"); + String view041 = dataObject.getStr("ssrl"); + String view042 = dataObject.getStr("zljrl"); + String view043 = dataObject.getStr("fljrl"); + String view044 = dataObject.getStr("jljrl"); + String view045 = dataObject.getStr("ltsd"); + String view046 = dataObject.getStr("n"); + String view047 = dataObject.getStr("m"); + heatanalysis.setView031(sn); + heatanalysis.setView032(view032); + heatanalysis.setView033(view033); + heatanalysis.setView034(view034); + heatanalysis.setView035(view035); + heatanalysis.setView036(view036); + if (StringUtils.isEmpty(view037)){ + heatanalysis.setView037(view037_2); + }else{ + heatanalysis.setView037(view037); + } + if (StringUtils.isEmpty(view038)){ + heatanalysis.setView038(view038_2); + }else{ + heatanalysis.setView038(view038); + } + if (StringUtils.isEmpty(view039)){ + heatanalysis.setView039(view039_2); + }else{ + heatanalysis.setView039(view039); + } + if (StringUtils.isEmpty(view040)){ + heatanalysis.setView040(view040_2); + }else{ + heatanalysis.setView040(view040); + } + heatanalysis.setView041(view041); + heatanalysis.setView042(view042); + heatanalysis.setView043(view043); + heatanalysis.setView044(view044); + heatanalysis.setView045(view045); + heatanalysis.setView046(view046); + heatanalysis.setView047(view047); + heatanalysisService.exeWater(heatanalysis); + + } + } + + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + + + public static String getWebInfo(String sn) { + String result = "false"; + try { + // 1. 创建URL对象 + URL url = new URL("http://49.235.190.102:8068/api/v1/feeding/snap/b501a6e0-d23f-4282-8fab-78661bf999e7/"+sn); + + // 2. 打开连接,转换为HttpURLConnection + HttpURLConnection connection = (HttpURLConnection) url.openConnection(); + + // 3. 设置请求方法为GET + connection.setRequestMethod("GET"); + + // 4. 可选:设置请求头(例如,指定期望的响应内容类型) + connection.setRequestProperty("Accept", "application/json"); + + // 5. 获取响应代码 + int responseCode = connection.getResponseCode(); + System.out.println("Response Code: " + responseCode); + + // 6. 如果响应成功(200 OK),读取响应体 + if (responseCode == HttpURLConnection.HTTP_OK) { + // 使用BufferedReader读取输入流 + BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); + String inputLine; + StringBuilder response = new StringBuilder(); + + while ((inputLine = in.readLine()) != null) { + response.append(inputLine); + } + in.close(); // 关闭流 + + // 打印响应结果 + log.info(String.format("获取热量水流量数据 - Response Body:" + response.toString())); + result = response.toString(); + } else { + log.error(String.format("获取热量水流量数据 - GET request failed.")); + result = "false"; + } + + // 7. 断开连接 + connection.disconnect(); + + } catch (IOException e) { + e.printStackTrace(); + result = "false"; + } + return result; + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/job/HeatingReportJob.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/job/HeatingReportJob.java new file mode 100644 index 0000000..963062c --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/job/HeatingReportJob.java @@ -0,0 +1,194 @@ +package org.jeecg.modules.heating.job; + +import cn.hutool.json.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import lombok.extern.slf4j.Slf4j; +import org.apache.http.HttpEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.util.EntityUtils; +import org.jeecg.common.api.dto.message.MessageDTO; +import org.jeecg.common.system.api.ISysBaseAPI; +import org.jeecg.common.util.DateUtils; +import org.jeecg.modules.heating.entity.Heatanalysis; +import org.jeecg.modules.heating.service.HeatanalysisService; +import org.jeecg.modules.message.entity.SysMessage; +import org.jeecg.modules.message.handle.enums.SendMsgStatusEnum; +import org.jeecg.modules.message.service.ISysMessageService; +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; +import org.springframework.beans.factory.annotation.Autowired; + +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * 发送消息任务 + * @author: jeecg-boot + */ + +@Slf4j +public class HeatingReportJob implements Job { + + @Autowired + private HeatanalysisService heatanalysisService; + + @Override + public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { + + log.info(String.format("热量上报 HeatingReportJob ! 时间:" + DateUtils.getTimestamp())); + + String body = PsdsjApiTask.getToken(); + JSONObject jsonObjectTok = new JSONObject(body); + if(jsonObjectTok!=null && jsonObjectTok.get("access_token")!=null && !"".equals(jsonObjectTok.get("access_token"))){ + String token = jsonObjectTok.get("access_token").toString(); + log.info("token:"+token); + String url = "http://36.135.12.177:12101/uploadsHeatData"; + SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String SDate = sdf.format(new Date()); + String tableName = "heatanalysis_"+SDate.substring(2, 4)+SDate.substring(5, 7); + List list = new ArrayList<>(); + list.add("22423010001");//磐石市白云物业管理有限责任公司 磐石白云物业供热站 白云锅炉房 + list.add("12423011000");//磐石市北亚供热有限公司 磐石北亚供热站 北亚锅炉房 +// list.add("");//磐石市颐和供热有限责任公司 磐石颐和供热站 三兴嘉园锅炉房 + list.add("22423030004");//磐石市鼎丰供热有限责任公司 磐石鼎丰供热站 汇城国樾府小区(香格里拉 + list.add("22423013000");//磐石市冬晨供热有限公司 磐石冬晨供热站 冬晨锅炉房 + list.add("22423014000");//磐石市海达供热有限公司 磐石海达供热站 海达锅炉房 + list.add("22423001001");//磐石市红大供热有限公司 磐石红大供热站 红大锅炉房 + list.add("22423002001");//磐石市宏城供热有限公司 磐石宏城供热站 宏城锅炉房 + list.add("22423003002");//磐石市隆昌物业管理有限公司 磐石隆昌物业供热站 隆昌1处锅炉房 + list.add("22423003005");//磐石市琉森供热管理有限公司 磐石琉森供热站 隆昌二处锅炉房 + list.add("32423012001");//磐石市牟力供热有限公司 磐石牟力供热站 牟力锅炉房 + list.add("22423004000");//磐石市三兴供热有限公司 磐石三兴供热站 三兴锅炉房 + list.add("12423005000");//磐石市升旺供热有限公司 磐石升旺供热站 升旺锅炉房 + list.add("22423008001");//磐石市万达物业管理有限公司 磐石万达供热站 万达锅炉房 + list.add("22423006000");//磐石市馨达供热有限公司 磐石馨达供热站 馨达锅炉房 + list.add("22423009000");//磐石市忠信供热有限公司 磐石忠信供热站 忠信锅炉房 + list.add("22423020000");//磐石市恒升供热有限公司 磐石恒升供热站 恒升锅炉房 +// list.add("");//磐石市柏悦供热有限公司 磐石柏悦供热站 + for(String sim:list){ + Heatanalysis heatanalysis = new Heatanalysis(); + heatanalysis.setSim(sim); + heatanalysis.setTableName(tableName); + Heatanalysis heatanalysis2 = heatanalysisService.getHeatOne(heatanalysis); + String CompanyName = ""; + String HeatName = ""; +// if("1111111111".equals(sim)){ + if("22423010001".equals(sim)){ + CompanyName = "磐石市白云物业管理有限责任公司"; + HeatName = "磐石白云物业供热站"; + }else if("12423011000".equals(sim)){ + CompanyName = "磐石市北亚供热有限公司"; + HeatName = "磐石北亚供热站"; + }else if("12423007000".equals(sim)){ + CompanyName = "磐石市颐和供热有限责任公司"; + HeatName = "磐石颐和供热站"; + }else if("22423030004".equals(sim)){ + CompanyName = "磐石市鼎丰供热有限责任公司"; + HeatName = "磐石鼎丰供热站"; + }else if("22423013000".equals(sim)){ + CompanyName = "磐石市冬晨供热有限公司"; + HeatName = "磐石冬晨供热站"; + }else if("22423014000".equals(sim)){ + CompanyName = "磐石市海达供热有限公司"; + HeatName = "磐石海达供热站"; + }else if("22423001001".equals(sim)){ + CompanyName = "磐石市红大供热有限公司"; + HeatName = "磐石红大供热站"; + }else if("22423002001".equals(sim)){ + CompanyName = "磐石市宏城供热有限公司"; + HeatName = "磐石宏城供热站"; + }else if("22423003002".equals(sim)){ + CompanyName = "磐石市隆昌物业管理有限公司"; + HeatName = "磐石隆昌物业供热站"; + }else if("22423003005".equals(sim)){ + CompanyName = "磐石市琉森供热管理有限公司"; + HeatName = "磐石琉森供热站"; + }else if("32423012001".equals(sim)){ + CompanyName = "磐石市牟力供热有限公司"; + HeatName = "磐石牟力供热站"; + }else if("22423004000".equals(sim)){ + CompanyName = "磐石市三兴供热有限公司"; + HeatName = "磐石三兴供热站"; + }else if("12423005000".equals(sim)){ + CompanyName = "磐石市升旺供热有限公司"; + HeatName = "磐石升旺供热站"; + }else if("22423008001".equals(sim)){ + CompanyName = "磐石市万达物业管理有限公司"; + HeatName = "磐石万达供热站"; + }else if("22423006000".equals(sim)){ + CompanyName = "磐石市馨达供热有限公司"; + HeatName = "磐石馨达供热站"; + }else if("22423009000".equals(sim)){ + CompanyName = "磐石市忠信供热有限公司"; + HeatName = "磐石忠信供热站"; + }else if("22423020000".equals(sim)){ + CompanyName = "磐石市恒升供热有限公司"; + HeatName = "磐石恒升供热站"; + } +// else if("".equals(sim)){ +// CompanyName = "磐石市柏悦供热有限公司"; +// HeatName = "磐石柏悦供热站"; +// } + try{ + if(CompanyName!=null&&!"".equals(CompanyName)&&heatanalysis2!=null&&!"".equals(heatanalysis2.getId())){ + log.info("sim:"+sim); + JSONObject jsonObject = new JSONObject(); + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("CompanyName", CompanyName);//供热公司名称 + jsonObject2.put("HeatName", HeatName);//热源名称 + jsonObject2.put("DateTime", sdf.format(new Date()));//数据上传时间 + jsonObject2.put("PrimaryFeedTem", heatanalysis2.getView005());//供水温度 + jsonObject2.put("PrimaryFeedPressure", heatanalysis2.getView007());//供水压力 + jsonObject2.put("PrimaryReturnTem", heatanalysis2.getView006());//回水温度 + jsonObject2.put("PrimaryReturnPressure", heatanalysis2.getView008());//回水压力 + jsonObject2.put("FeedFlow","0");//供水瞬时流量 + jsonObject2.put("ReturnFlow", "0");//供水累计流量 + jsonObject.put("InParam", jsonObject2); + jsonObject.put("RequestType", "normal");//默认填写 + jsonObject.put("RequestID","121");//默认填写 + log.info("jsonObject:"+jsonObject); + uploadData5(url,jsonObject.toString(),token); + } + }catch(Exception e){ + e.printStackTrace(); + } + } + } + + } + + public static void uploadData5(String url,String params,String token) throws IOException { + // 创建HttpClient对象 + CloseableHttpClient httpClient = HttpClientBuilder.create().build(); + // 创建HttpPost对象 + HttpPost httpPost = new HttpPost(url); + // 设置Content-Type为application/json + httpPost.setHeader("Content-Type", "application/json"); + httpPost.setHeader("Authorization", "Bearer "+token); + // 设置请求体参数 + String requestBody = params; + // 设置请求体 + StringEntity entity = new StringEntity(requestBody, ContentType.APPLICATION_JSON); + httpPost.setEntity(entity); + // 发送请求并获取响应 + CloseableHttpResponse response = httpClient.execute(httpPost); + // 解析响应 + HttpEntity responseEntity = response.getEntity(); + String responseBody = EntityUtils.toString(responseEntity); + // 关闭响应和HttpClient + response.close(); + httpClient.close(); + // 输出响应结果 + log.info(responseBody); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/job/HeatingSimulateJob.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/job/HeatingSimulateJob.java new file mode 100644 index 0000000..b04e678 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/job/HeatingSimulateJob.java @@ -0,0 +1,36 @@ +package org.jeecg.modules.heating.job; + +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.util.DateUtils; +import org.jeecg.modules.heating.entity.Heatanalysis; +import org.jeecg.modules.heating.service.HeatanalysisService; +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.List; + +/** + * 模拟数据 + * @author: jeecg-boot + */ + +@Slf4j +public class HeatingSimulateJob implements Job { + + @Autowired + private HeatanalysisService heatanalysisService; + + @Override + public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { + log.info(String.format("模拟生成数据 HeatingSimulateJob ! 时间:" + DateUtils.getTimestamp())); + List list = heatanalysisService.findSimulateList(new Heatanalysis()); + for (Heatanalysis heat : list) + { + log.info(String.format("code:"+heat.getCode()+" sim:" + heat.getSim())); + heatanalysisService.exeProc(heat); + } + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/job/PsdsjApiTask.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/job/PsdsjApiTask.java new file mode 100644 index 0000000..a795449 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/job/PsdsjApiTask.java @@ -0,0 +1,58 @@ +package org.jeecg.modules.heating.job; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import org.jeecg.modules.message.util.HttpPostTest; +import org.apache.http.HttpEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.util.EntityUtils; + +public class PsdsjApiTask { + + //获取token + public static String getToken() { + String url = "http://36.135.12.74:11006/oauth/token"; + Map params = new HashMap<>(); + params.put("grant_type", "password"); + params.put("client_id", "B81F19E0CE92A349"); + params.put("client_secret", "76061F7F697F1DBFCB3E7C3EA641985C"); + params.put("username", "postUsers"); + params.put("password", "jilinHeat@gg1.25"); + params.put("redirect_uri", "https://36.135.12.177:12103"); + String body = HttpPostTest.post(url, params); + System.out.println(body); + return body; + } + + public static void uploadData5(String url,String params,String token) throws IOException { + // 创建HttpClient对象 + CloseableHttpClient httpClient = HttpClientBuilder.create().build(); + // 创建HttpPost对象 + HttpPost httpPost = new HttpPost(url); + // 设置Content-Type为application/json + httpPost.setHeader("Content-Type", "application/json"); + httpPost.setHeader("Authorization", "Bearer "+token); + // 设置请求体参数 + String requestBody = params; + // 设置请求体 + StringEntity entity = new StringEntity(requestBody, ContentType.APPLICATION_JSON); + httpPost.setEntity(entity); + // 发送请求并获取响应 + CloseableHttpResponse response = httpClient.execute(httpPost); + // 解析响应 + HttpEntity responseEntity = response.getEntity(); + String responseBody = EntityUtils.toString(responseEntity); + // 关闭响应和HttpClient + response.close(); + httpClient.close(); + // 输出响应结果 + System.out.println(responseBody); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/DataExtractConfigMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/DataExtractConfigMapper.java new file mode 100644 index 0000000..f23725d --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/DataExtractConfigMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.heating.mapper; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.heating.entity.DataExtractConfig; + +/** + * @Description: 数据抽取配置 + * @Author: jeecg-boot + * @Date: 2024-12-06 + * @Version: V1.0 + */ +public interface DataExtractConfigMapper extends BaseMapper { + Page findPage(Page page, @Param("params") DataExtractConfig dataExtractConfig); + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatanalysisHistoryMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatanalysisHistoryMapper.java new file mode 100644 index 0000000..00cd908 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatanalysisHistoryMapper.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.heating.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.heating.entity.HeatanalysisHistory; + +import java.util.List; + +public interface HeatanalysisHistoryMapper extends BaseMapper { + Page findPage(Page page, @Param("params") HeatanalysisHistory heatanalysisHistory); + Page findJxPage(Page page, @Param("params") HeatanalysisHistory heatanalysisHistory); + List findHistoryList(HeatanalysisHistory heatanalysisHistory); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatanalysisMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatanalysisMapper.java new file mode 100644 index 0000000..4395524 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatanalysisMapper.java @@ -0,0 +1,26 @@ +package org.jeecg.modules.heating.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.heating.entity.Heatanalysis; + +import java.util.List; + +public interface HeatanalysisMapper extends BaseMapper { + Heatanalysis getHeatOne(Heatanalysis heatanalysis); + Page findPage(Page page, @Param("params") Heatanalysis heatanalysis); + void updateType(Heatanalysis heatanalysis); + List findSourceList(Heatanalysis heatanalysis); + List findList(Heatanalysis heatanalysis); + List findStaticList(Heatanalysis heatanalysis); + List findSimulateList(Heatanalysis heatanalysis); + void exeProc(Heatanalysis heatanalysis); + List lowest(Heatanalysis heatanalysis); + Page findOnePage(Page page, @Param("params") Heatanalysis heatanalysis); + Page findTwoPage(Page page, @Param("params") Heatanalysis heatanalysis); + Page findExtractedOnePage(Page page, @Param("params") Heatanalysis heatanalysis); + Page findExtractedTwoPage(Page page, @Param("params") Heatanalysis heatanalysis); + + void exeWater(Heatanalysis heatanalysis); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatsourceMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatsourceMapper.java new file mode 100644 index 0000000..d6a0689 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatsourceMapper.java @@ -0,0 +1,9 @@ +package org.jeecg.modules.heating.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.heating.entity.Heatsource; +import java.util.List; + +public interface HeatsourceMapper extends BaseMapper { + List findList(Heatsource heatsource); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatsourcestationMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatsourcestationMapper.java new file mode 100644 index 0000000..8c5a221 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatsourcestationMapper.java @@ -0,0 +1,11 @@ +package org.jeecg.modules.heating.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.heating.entity.Heatsourcestation; +import java.util.List; + +public interface HeatsourcestationMapper extends BaseMapper { + List findList(Heatsourcestation heatsourcestation); + List findCompanyList(Heatsourcestation heatsourcestation); + List findSourceList(Heatsourcestation heatsourcestation); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/MarkinfoMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/MarkinfoMapper.java new file mode 100644 index 0000000..bb98d2a --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/MarkinfoMapper.java @@ -0,0 +1,13 @@ +package org.jeecg.modules.heating.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.heating.entity.Markinfo; +import java.util.List; + +public interface MarkinfoMapper extends BaseMapper { + List findList(Markinfo markinfo); + Markinfo getMarkinfo(Markinfo markinfo); + void deleteAll(); + List sourceList(Markinfo markinfo); + List stationList(Markinfo markinfo); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/SimconfigMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/SimconfigMapper.java new file mode 100644 index 0000000..0451433 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/SimconfigMapper.java @@ -0,0 +1,18 @@ +package org.jeecg.modules.heating.mapper; + +import java.util.List; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.heating.entity.Simconfig; + +/** + * @Description: 设备信息管理 + * @Author: jeecg-boot + * @Date: 2025-04-09 + * @Version: V1.0 + */ +public interface SimconfigMapper extends BaseMapper { + List findCompanyList(Simconfig simconfig); + List findSourceList(Simconfig simconfig); + List findStationList(Simconfig simconfig); + List findSimconfig(Simconfig simconfig); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/SubstationMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/SubstationMapper.java new file mode 100644 index 0000000..e42ee2b --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/SubstationMapper.java @@ -0,0 +1,9 @@ +package org.jeecg.modules.heating.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.heating.entity.Substation; +import java.util.List; + +public interface SubstationMapper extends BaseMapper { + List findList(Substation substation); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/ThermalcompanyMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/ThermalcompanyMapper.java new file mode 100644 index 0000000..6bc833f --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/ThermalcompanyMapper.java @@ -0,0 +1,9 @@ +package org.jeecg.modules.heating.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.heating.entity.Thermalcompany; +import java.util.List; + +public interface ThermalcompanyMapper extends BaseMapper { + List findList(Thermalcompany thermalcompany); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/DataExtractConfigMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/DataExtractConfigMapper.xml new file mode 100644 index 0000000..a088898 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/DataExtractConfigMapper.xml @@ -0,0 +1,97 @@ + + + + + + + \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatanalysisHistoryMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatanalysisHistoryMapper.xml new file mode 100644 index 0000000..ab0e98a --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatanalysisHistoryMapper.xml @@ -0,0 +1,256 @@ + + + + + + + + + + + diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatanalysisMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatanalysisMapper.xml new file mode 100644 index 0000000..ff119d1 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatanalysisMapper.xml @@ -0,0 +1,507 @@ + + + + + + + + + + UPDATE BL_HEATANALYSIS + SET report_type = #{reportType} + where id = #{id} + + + + + + + + + + + + CALL P_Q_D_HEATANALYSIS_SIMULATE_NEW(#{code}, #{sim}, #{datatime}, #{view005}, #{view006}, #{view007}, #{view008}, #{view009}, #{view010}, #{view011}, #{view012}) + + + + CALL P_Q_D_HEATFLOWANALYSIS(#{view031}, #{view032}, #{view033}, #{view034}, #{view035}, #{view036}, #{view037}, #{view038}, #{view039}, #{view040}, #{view041}, #{view042}, #{view043}, #{view044}, #{view045}, #{view046}, #{view047}) + + + + + + + + + + + + + diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatsourceMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatsourceMapper.xml new file mode 100644 index 0000000..b683aa1 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatsourceMapper.xml @@ -0,0 +1,80 @@ + + + + + + a.id AS "id", + a.boiler_capacity AS "boilerCapacity", + a.boiler_type AS "boilerType", + a.duty_people AS "dutyPeople", + a.llcome_down AS "llcomeDown", + a.llcome_up AS "llcomeUp", + a.llgo_down AS "llgoDown", + a.llgo_up AS "llgoUp", + a.setup_time AS "setupTime", + a.source_name AS "sourceName", + a.source_phone AS "sourcePhone", + a.source_type AS "sourceType", + a.wdcome_down AS "wdcomeDown", + a.wdcome_up AS "wdcomeUp", + a.wdgo_down AS "wdgoDown", + a.wdgo_up AS "wdgoUp", + a.ylcome_down AS "ylcomeDown", + a.ylcome_up AS "ylcomeUp", + a.ylgo_down AS "ylgoDown", + a.ylgo_up AS "ylgoUp", + a.company AS "company", + a.company_name AS "companyName", + a.company_id AS "companyId", + a.create_by AS "createBy.id", + a.create_date AS "createDate", + a.update_by AS "updateBy.id", + a.update_date AS "updateDate", + a.del_flag AS "delFlag", + a.source_image AS "sourceImage", + b.company_name AS "companyNameView", + a.tree_id AS "treeID", + + a.heating_area AS "heatingArea", + a.residential_area AS "residentialArea", + a.noresidential_area AS "noresidentialArea", + a.yearcoal AS "yearcoal", + a.nowcoal AS "nowcoal", + a.yearwater AS "yearwater", + a.yearelectricity AS "yearelectricity", + a.onenet AS "onenet", + a.secondarynet AS "secondarynet", + a.boilernum AS "boilernum", + a.tonnage AS "tonnage", + a.tonnage_two AS "tonnageTwo" + + + + + LEFT JOIN BL_thermalcompany b ON b.id=a.company_id + + + + diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatsourcestationMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatsourcestationMapper.xml new file mode 100644 index 0000000..80781b7 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatsourcestationMapper.xml @@ -0,0 +1,120 @@ + + + + + + a.id AS "id", + a.llcome_down AS "llcomeDown", + a.llcome_up AS "llcomeUp", + a.llgo_down AS "llgoDown", + a.llgo_up AS "llgoUp", + a.wdcome_down AS "wdcomeDown", + a.wdcome_up AS "wdcomeUp", + a.wdgo_down AS "wdgoDown", + a.wdgo_up AS "wdgoUp", + a.ylcome_down AS "ylcomeDown", + a.ylcome_up AS "ylcomeUp", + a.ylgo_down AS "ylgoDown", + a.ylgo_up AS "ylgoUp", + a.duty_people AS "dutyPeople", + a.setup_time AS "setupTime", + a.station_address AS "stationAddress", + a.station_name AS "stationName", + a.station_phone AS "stationPhone", + a.company AS "company", + a.source AS "source", + a.substation AS "substation", + a.company_id AS "companyId", + a.company_name AS "companyName", + a.source_id AS "sourceId", + a.source_name AS "sourceName", + a.substation_id AS "substationId", + a.substation_name AS "substationName", + a.create_by AS "createBy.id", + a.create_date AS "createDate", + a.update_by AS "updateBy.id", + a.update_date AS "updateDate", + a.del_flag AS "delFlag", + b.source_name AS "sourceNameView", + c.company_name AS "companyNameView", + d.name AS "substationNameView", + a.sourcestation_image AS "sourcestationImage", + a.tree_id AS "treeID", + a.supply_build AS "supplybuild" + + + + LEFT JOIN BL_substation d ON d.id=a.substation_id + LEFT JOIN BL_heatsource b ON b.id=a.source_id + LEFT JOIN BL_thermalcompany c ON c.id=a.company_id + + + + + + + + + \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/MarkinfoMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/MarkinfoMapper.xml new file mode 100644 index 0000000..31f7aac --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/MarkinfoMapper.xml @@ -0,0 +1,101 @@ + + + + + + + + + + DELETE FROM bl_markinfo + + + + + + + \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/SimconfigMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/SimconfigMapper.xml new file mode 100644 index 0000000..b8628c4 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/SimconfigMapper.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/SubstationMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/SubstationMapper.xml new file mode 100644 index 0000000..56c0644 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/SubstationMapper.xml @@ -0,0 +1,60 @@ + + + + + + a.id AS "id", + a.addres AS "addres", + a.area AS "area", + a.conduits AS "conduits", + a.doorsum AS "doorsum", + a.establishedtime AS "establishedtime", + a.heatarea AS "heatarea", + a.inperson AS "inperson", + a.name AS "name", + a.old15conduits AS "old15conduits", + a.stacount AS "stacount", + a.tel AS "tel", + a.company AS "company", + a.source AS "source", + a.company_id AS "companyId", + a.company_name AS "companyName", + a.source_id AS "sourceId", + a.source_name AS "sourceName", + a.create_by AS "createBy.id", + a.create_date AS "createDate", + a.update_by AS "updateBy.id", + a.update_date AS "updateDate", + a.del_flag AS "delFlag", + b.source_name AS "sourceNameView", + c.company_name AS "companyNameView" + + + + LEFT JOIN BL_heatsource b ON b.id=a.source_id + LEFT JOIN BL_thermalcompany c ON c.id=b.company_id + + + + \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/ThermalcompanyMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/ThermalcompanyMapper.xml new file mode 100644 index 0000000..71c11a6 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/ThermalcompanyMapper.xml @@ -0,0 +1,57 @@ + + + + + + a.id AS "id", + a.barter_heat AS "barterHeat", + a.boiler_house AS "boilerHouse", + a.company_address AS "companyAddress", + a.company_name AS "companyName", + a.company_phone AS "companyPhone", + a.company_type AS "companyType", + a.direct AS "direct", + a.doorsum AS "doorsum", + a.duct_length AS "ductLength", + a.duty_people AS "dutyPeople", + a.heat_area AS "heatArea", + a.heat_source AS "heatSource", + a.heating_area AS "heatingArea", + a.indirect AS "indirect", + a.nonresident_price AS "nonresidentPrice", + a.old15_length AS "old15Length", + a.resident_price AS "residentPrice", + a.setup_time AS "setupTime", + a.create_by AS "createBy.id", + a.create_date AS "createDate", + a.update_by AS "updateBy.id", + a.update_date AS "updateDate", + a.del_flag AS "delFlag", + a.tree_id AS "treeId", + a.order_id AS "orderId" + + + + + + + diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/DataExtractConfigService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/DataExtractConfigService.java new file mode 100644 index 0000000..bf332f3 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/DataExtractConfigService.java @@ -0,0 +1,16 @@ +package org.jeecg.modules.heating.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.heating.entity.DataExtractConfig; + +/** + * @Description: 数据抽取配置 + * @Author: jeecg-boot + * @Date: 2024-12-06 + * @Version: V1.0 + */ +public interface DataExtractConfigService extends IService { + IPage findPage(Page page, DataExtractConfig dataExtractConfig); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatanalysisHistoryService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatanalysisHistoryService.java new file mode 100644 index 0000000..550d8bf --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatanalysisHistoryService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.heating.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.base.service.JeecgService; +import org.jeecg.modules.heating.entity.HeatanalysisHistory; +import java.util.List; + +public interface HeatanalysisHistoryService extends JeecgService { + IPage findPage(Page page,HeatanalysisHistory heatanalysisHistory); + IPage findJxPage(Page page,HeatanalysisHistory heatanalysisHistory); + Result findHistoryList(HeatanalysisHistory heatanalysisHistory); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatanalysisService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatanalysisService.java new file mode 100644 index 0000000..62a2445 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatanalysisService.java @@ -0,0 +1,27 @@ +package org.jeecg.modules.heating.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.jeecg.common.system.base.service.JeecgService; +import org.jeecg.modules.heating.entity.Heatanalysis; + +import java.util.List; + +public interface HeatanalysisService extends JeecgService { + Heatanalysis getHeatOne(Heatanalysis heatanalysis); + IPage findPage(Page page,Heatanalysis heatanalysis); + void updateType(Heatanalysis heatanalysis); + List findSourceList(Heatanalysis heatanalysis); + List findList(Heatanalysis heatanalysis); + List findStaticList(Heatanalysis heatanalysis); + List findSimulateList(Heatanalysis heatanalysis); + void exeProc(Heatanalysis heatanalysis); + List lowest(Heatanalysis heatanalysis); + + IPage findOnePage(Page page, Heatanalysis heatanalysis); + IPage findTwoPage(Page page, Heatanalysis heatanalysis); + IPage findExtractedOnePage(Page page, Heatanalysis heatanalysis); + IPage findExtractedTwoPage(Page page, Heatanalysis heatanalysis); + + void exeWater(Heatanalysis heatanalysis); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatsourceService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatsourceService.java new file mode 100644 index 0000000..005408a --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatsourceService.java @@ -0,0 +1,9 @@ +package org.jeecg.modules.heating.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.heating.entity.Heatsource; +import java.util.List; + +public interface HeatsourceService extends IService { + List findList(Heatsource heatsource); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatsourcestationService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatsourcestationService.java new file mode 100644 index 0000000..b0a8168 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatsourcestationService.java @@ -0,0 +1,11 @@ +package org.jeecg.modules.heating.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.heating.entity.Heatsourcestation; +import java.util.List; + +public interface HeatsourcestationService extends IService { + List findList(Heatsourcestation heatsourcestation); + List findCompanyList(Heatsourcestation heatsourcestation); + List findSourceList(Heatsourcestation heatsourcestation); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/MarkinfoService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/MarkinfoService.java new file mode 100644 index 0000000..fb94f1d --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/MarkinfoService.java @@ -0,0 +1,18 @@ +package org.jeecg.modules.heating.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.common.api.vo.Result; +import org.jeecg.modules.heating.entity.Markinfo; +import java.util.List; +import java.util.Map; + +public interface MarkinfoService extends IService { + List> queryTree(); + List findList(Markinfo markinfo); + Markinfo getMarkinfo(Markinfo markinfo); + Result getPointInfo(Markinfo markinfo); + void delete(Markinfo markinfo); + void deleteAll(); + List sourceList(Markinfo markinfo); + List stationList(Markinfo markinfo); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/SimconfigService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/SimconfigService.java new file mode 100644 index 0000000..ca1876c --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/SimconfigService.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.heating.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.heating.entity.Simconfig; + +import java.util.List; + +/** + * @Description: 设备信息管理 + * @Author: jeecg-boot + * @Date: 2025-04-09 + * @Version: V1.0 + */ +public interface SimconfigService extends IService { + List findCompanyList(Simconfig simconfig); + List findSourceList(Simconfig simconfig); + List findStationList(Simconfig simconfig); + List findSimconfig(Simconfig simconfig); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/SubstationService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/SubstationService.java new file mode 100644 index 0000000..7b8775b --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/SubstationService.java @@ -0,0 +1,9 @@ +package org.jeecg.modules.heating.service; + +import org.jeecg.common.system.base.service.JeecgService; +import org.jeecg.modules.heating.entity.Substation; +import java.util.List; + +public interface SubstationService extends JeecgService { + List findList(Substation substation); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/ThermalcompanyService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/ThermalcompanyService.java new file mode 100644 index 0000000..7eb968a --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/ThermalcompanyService.java @@ -0,0 +1,10 @@ +package org.jeecg.modules.heating.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.heating.entity.Thermalcompany; + +import java.util.List; + +public interface ThermalcompanyService extends IService { + List findList(Thermalcompany thermalcompany); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/DataExtractConfigServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/DataExtractConfigServiceImpl.java new file mode 100644 index 0000000..7946e1d --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/DataExtractConfigServiceImpl.java @@ -0,0 +1,24 @@ +package org.jeecg.modules.heating.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.jeecg.modules.heating.entity.DataExtractConfig; +import org.jeecg.modules.heating.mapper.DataExtractConfigMapper; +import org.jeecg.modules.heating.service.DataExtractConfigService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 数据抽取配置 + * @Author: jeecg-boot + * @Date: 2024-12-06 + * @Version: V1.0 + */ +@Service +public class DataExtractConfigServiceImpl extends ServiceImpl implements DataExtractConfigService { + + public IPage findPage(Page page, DataExtractConfig dataExtractConfig){ + return baseMapper.findPage(page,dataExtractConfig); + } +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatanalysisHistoryServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatanalysisHistoryServiceImpl.java new file mode 100644 index 0000000..409f1f0 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatanalysisHistoryServiceImpl.java @@ -0,0 +1,118 @@ +package org.jeecg.modules.heating.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.base.service.impl.JeecgServiceImpl; +import org.jeecg.modules.heating.entity.HeatanalysisHistory; +import org.jeecg.modules.heating.entity.Heatsource; +import org.jeecg.modules.heating.mapper.HeatanalysisHistoryMapper; +import org.jeecg.modules.heating.mapper.HeatsourceMapper; +import org.jeecg.modules.heating.service.HeatanalysisHistoryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Service +public class HeatanalysisHistoryServiceImpl extends JeecgServiceImpl implements HeatanalysisHistoryService { + + @Autowired + HeatsourceMapper heatsourceMapper; + + public IPage findPage(Page page,HeatanalysisHistory heatanalysisHistory){ + Date sDate = heatanalysisHistory.getSDate(); + String sDateStr = ""; + SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + if(sDate!=null){ + sDateStr = sdf.format(sDate); + }else{ + sDateStr = sdf.format(new Date()); + heatanalysisHistory.setSDate(sDate); + } + String tableName = "bl_heatanalysis_"+sDateStr.substring(2, 4)+sDateStr.substring(5, 7); + heatanalysisHistory.setTableName(tableName); + Date eDate = heatanalysisHistory.getEDate(); + if(eDate==null){ + eDate = new Date(); + heatanalysisHistory.setEDate(eDate); + } + return baseMapper.findPage(page,heatanalysisHistory); + } + + public IPage findJxPage(Page page,HeatanalysisHistory heatanalysisHistory){ + Date sDate = heatanalysisHistory.getSDate(); + String sDateStr = ""; + SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + if(sDate!=null){ + sDateStr = sdf.format(sDate); + }else{ + sDateStr = sdf.format(new Date()); + heatanalysisHistory.setSDate(sDate); + } + String tableName = "bl_heatanalysis_"+sDateStr.substring(2, 4)+sDateStr.substring(5, 7); + heatanalysisHistory.setTableName(tableName); + Date eDate = heatanalysisHistory.getEDate(); + if(eDate==null){ + eDate = new Date(); + heatanalysisHistory.setEDate(eDate); + } + return baseMapper.findJxPage(page,heatanalysisHistory); + } + + public Result findHistoryList(HeatanalysisHistory heatanalysisHistory){ + Map map = new HashMap<>(); + SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat timeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String startDate = heatanalysisHistory.getStartDate(); + if(startDate==null||startDate.equals("")) { + startDate = dayFormat.format(new Date()); + heatanalysisHistory.setStartDate(startDate); + } + if(startDate!=null&&!startDate.equals("")){ + String sDateStr = startDate+" 00:00:00"; + Date sDate = null; + try { + sDate = timeFormat.parse(sDateStr); + } catch (ParseException e) { + e.printStackTrace(); + } + heatanalysisHistory.setSDate(sDate); + } + String tableName = "bl_heatanalysis_"+startDate.substring(2, 4)+startDate.substring(5, 7); + heatanalysisHistory.setTableName(tableName); + String endDate = heatanalysisHistory.getEndDate(); + if(endDate==null||endDate.equals("")) { + endDate = dayFormat.format(new Date()); + heatanalysisHistory.setEndDate(endDate); + } + if(endDate!=null&&!endDate.equals("")){ + String eDateStr = endDate+" 23:59:59"; + Date eDate = null; + try { + eDate = timeFormat.parse(eDateStr); + } catch (ParseException e) { + e.printStackTrace(); + } + heatanalysisHistory.setEDate(eDate); + } + Integer sourceId = heatanalysisHistory.getView002(); + if(sourceId == null){ + List sourceList = heatsourceMapper.findList(null); + if(sourceList.size()>0){ + Heatsource heatsource = sourceList.get(0); + heatanalysisHistory.setView002(heatsource.getId()); + } + } + List list = baseMapper.findHistoryList(heatanalysisHistory); + map.put("data",heatanalysisHistory); + map.put("list",list); + return Result.ok(map); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatanalysisServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatanalysisServiceImpl.java new file mode 100644 index 0000000..6f79e42 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatanalysisServiceImpl.java @@ -0,0 +1,90 @@ +package org.jeecg.modules.heating.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.jeecg.common.system.base.service.impl.JeecgServiceImpl; +import org.jeecg.common.util.DateUtils; +import org.jeecg.modules.heating.entity.Heatanalysis; +import org.jeecg.modules.heating.mapper.HeatanalysisMapper; +import org.jeecg.modules.heating.service.HeatanalysisService; +import org.springframework.stereotype.Service; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +@Service +public class HeatanalysisServiceImpl extends JeecgServiceImpl implements HeatanalysisService { + + public Heatanalysis getHeatOne(Heatanalysis heatanalysis) { + return baseMapper.getHeatOne(heatanalysis); + } + + public IPage findPage(Page page,Heatanalysis heatanalysis){ + return baseMapper.findPage(page,heatanalysis); + } + + public void updateType(Heatanalysis heatanalysis){ + baseMapper.updateType(heatanalysis); + } + + public List findList(Heatanalysis heatanalysis){ + return baseMapper.findList(heatanalysis); + } + + public List findSourceList(Heatanalysis heatanalysis){ + return baseMapper.findSourceList(heatanalysis); + } + + public List findStaticList(Heatanalysis heatanalysis){ + return baseMapper.findStaticList(heatanalysis); + } + + public List findSimulateList(Heatanalysis heatanalysis){ + return baseMapper.findSimulateList(heatanalysis); + } + + public void exeProc(Heatanalysis heatanalysis){ + baseMapper.exeProc(heatanalysis); + } + + public List lowest(Heatanalysis heatanalysis){ + heatanalysis.setTableName(getTableName()); + try { + String s = DateUtils.formatDate(new Date(), "yyyy-MM-dd 00:00:00"); + heatanalysis.setDatatime(DateUtils.parseDate(s, "yyyy-MM-dd HH:mm:ss")); + }catch (Exception e){ + e.printStackTrace(); + } + return baseMapper.lowest(heatanalysis); + } + + private String getTableName(){ + SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String SDate = sdf.format(new Date()); + String tableName = "heatanalysis_"+SDate.substring(2, 4)+SDate.substring(5, 7); + return tableName; + } + + public IPage findOnePage(Page page, Heatanalysis heatanalysis){ + return baseMapper.findOnePage(page,heatanalysis); + } + + public IPage findTwoPage(Page page, Heatanalysis heatanalysis){ + return baseMapper.findTwoPage(page,heatanalysis); + } + + public IPage findExtractedOnePage(Page page, Heatanalysis heatanalysis){ + return baseMapper.findExtractedOnePage(page,heatanalysis); + } + + public IPage findExtractedTwoPage(Page page, Heatanalysis heatanalysis){ + return baseMapper.findExtractedTwoPage(page,heatanalysis); + } + + @Override + public void exeWater(Heatanalysis heatanalysis) { + baseMapper.exeWater(heatanalysis); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatsourceServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatsourceServiceImpl.java new file mode 100644 index 0000000..d3dabf7 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatsourceServiceImpl.java @@ -0,0 +1,21 @@ +package org.jeecg.modules.heating.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.modules.heating.entity.Heatsource; +import org.jeecg.modules.heating.mapper.HeatsourceMapper; +import org.jeecg.modules.heating.service.HeatsourceService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class HeatsourceServiceImpl extends ServiceImpl implements HeatsourceService { + + @Autowired + HeatsourceMapper mapper; + + public List findList(Heatsource heatsource) { + return mapper.findList(heatsource); + } +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatsourcestationServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatsourcestationServiceImpl.java new file mode 100644 index 0000000..1f26c5d --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatsourcestationServiceImpl.java @@ -0,0 +1,28 @@ +package org.jeecg.modules.heating.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.modules.heating.entity.Heatsourcestation; +import org.jeecg.modules.heating.mapper.HeatsourcestationMapper; +import org.jeecg.modules.heating.service.HeatsourcestationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import java.util.List; + +@Service +public class HeatsourcestationServiceImpl extends ServiceImpl implements HeatsourcestationService { + + @Autowired + HeatsourcestationMapper mapper; + + public List findList(Heatsourcestation heatsourcestation) { + return mapper.findList(heatsourcestation); + } + + public List findCompanyList(Heatsourcestation heatsourcestation) { + return mapper.findCompanyList(heatsourcestation); + } + + public List findSourceList(Heatsourcestation heatsourcestation) { + return mapper.findSourceList(heatsourcestation); + } +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/MarkinfoServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/MarkinfoServiceImpl.java new file mode 100644 index 0000000..a7c6bb0 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/MarkinfoServiceImpl.java @@ -0,0 +1,137 @@ +package org.jeecg.modules.heating.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.apache.commons.lang3.StringUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.modules.heating.entity.Heatsource; +import org.jeecg.modules.heating.entity.Heatsourcestation; +import org.jeecg.modules.heating.entity.Markinfo; +import org.jeecg.modules.heating.entity.Thermalcompany; +import org.jeecg.modules.heating.mapper.HeatsourceMapper; +import org.jeecg.modules.heating.mapper.HeatsourcestationMapper; +import org.jeecg.modules.heating.mapper.MarkinfoMapper; +import org.jeecg.modules.heating.mapper.ThermalcompanyMapper; +import org.jeecg.modules.heating.service.MarkinfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Service +public class MarkinfoServiceImpl extends ServiceImpl implements MarkinfoService { + + @Autowired + private ThermalcompanyMapper thermalcompanyMapper; + @Autowired + private HeatsourceMapper heatsourceMapper; + @Autowired + private HeatsourcestationMapper heatsourcestationMapper; + + @Override + public List> queryTree() { + List> mapList = new ArrayList>(); + + QueryWrapper companyWrapper = new QueryWrapper<>(); + companyWrapper.eq("del_flag","0"); + companyWrapper.orderByAsc("id"); + List companyList = thermalcompanyMapper.selectList(companyWrapper); + + QueryWrapper heatsourceWrapper = new QueryWrapper<>(); + heatsourceWrapper.eq("del_flag","0"); + heatsourceWrapper.orderByAsc("id"); + List heatsourceList = heatsourceMapper.selectList(heatsourceWrapper); + + QueryWrapper stationWrapper = new QueryWrapper<>(); + stationWrapper.eq("del_flag","0"); + stationWrapper.orderByAsc("id"); + List stationList = heatsourcestationMapper.selectList(stationWrapper); + + List> heatsourceMapList = new ArrayList>(); + for(Heatsource par : heatsourceList){ + Map heatsourceMap = new HashMap(); + List> stationMapList = new ArrayList>(); + for(Heatsourcestation heatsourcestation:stationList){ + if(StringUtils.equals(heatsourcestation.getSourceId(),par.getId().toString())){ + Map stationMap = new HashMap(); + stationMap.put("key","c_"+heatsourcestation.getId()); + stationMap.put("title",heatsourcestation.getStationName()); + stationMapList.add(stationMap); + } + } + heatsourceMap.put("key","b_"+par.getId()); + heatsourceMap.put("parentId","a_"+par.getCompanyId()); + heatsourceMap.put("title",par.getSourceName()); + heatsourceMap.put("children",stationMapList); + heatsourceMapList.add(heatsourceMap); + } + + List> infoMapList = new ArrayList>(); + for(Thermalcompany par : companyList){ + Map infoMap = new HashMap(); + List> heatsourceMap2List = new ArrayList>(); + for(Map heatsourcePar : heatsourceMapList){ + if(StringUtils.equals("a_"+par.getId(),heatsourcePar.get("parentId").toString())){ + heatsourceMap2List.add(heatsourcePar); + } + } + infoMap.put("key","a_"+par.getId()); + infoMap.put("title",par.getCompanyName()); + infoMap.put("children",heatsourceMap2List); + infoMapList.add(infoMap); + } + return infoMapList; + } + + @Override + public List findList(Markinfo markinfo) { + return baseMapper.findList(markinfo); + } + @Override + public Markinfo getMarkinfo(Markinfo markinfo) { + return baseMapper.getMarkinfo(markinfo); + } + + @Override + public Result getPointInfo(Markinfo markinfo) { + List infoList= baseMapper.findList(markinfo); + if(infoList!=null&&infoList.size()>0){ + String typeFlag = infoList.get(0).getTypeFlag(); + String id = infoList.get(0).getStationId(); + id = id.replaceAll("b_","").replaceAll("c_",""); + if(typeFlag.equals("1")){ + Heatsource heatsource = heatsourceMapper.selectById(id); + heatsource.setTypeFlag(typeFlag); + return Result.ok(heatsource); + }else{ + Heatsourcestation heatsourcestation = heatsourcestationMapper.selectById(id); + heatsourcestation.setTypeFlag(typeFlag); + return Result.ok(heatsourcestation); + } + } + return Result.error("暂无该热源信息"); + } + + @Override + public void delete(Markinfo markinfo){ + List infoList= baseMapper.findList(markinfo); + for(Markinfo info :infoList){ + baseMapper.deleteById(info.getId()); + } + } + @Override + public void deleteAll() { + baseMapper.deleteAll(); + } + + public List sourceList(Markinfo markinfo) { + return baseMapper.sourceList(markinfo); + } + + public List stationList(Markinfo markinfo) { + return baseMapper.stationList(markinfo); + } +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/SimconfigServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/SimconfigServiceImpl.java new file mode 100644 index 0000000..b0cece4 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/SimconfigServiceImpl.java @@ -0,0 +1,31 @@ +package org.jeecg.modules.heating.service.impl; + +import org.jeecg.modules.heating.entity.Simconfig; +import org.jeecg.modules.heating.mapper.SimconfigMapper; +import org.jeecg.modules.heating.service.SimconfigService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import java.util.List; + +/** + * @Description: 设备信息管理 + * @Author: jeecg-boot + * @Date: 2025-04-09 + * @Version: V1.0 + */ +@Service +public class SimconfigServiceImpl extends ServiceImpl implements SimconfigService { + public List findCompanyList(Simconfig simconfig) { + return baseMapper.findCompanyList(simconfig); + } + public List findSourceList(Simconfig simconfig) { + return baseMapper.findSourceList(simconfig); + } + public List findStationList(Simconfig simconfig) { + return baseMapper.findStationList(simconfig); + } + public List findSimconfig(Simconfig simconfig) { + return baseMapper.findSimconfig(simconfig); + } +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/SubstationServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/SubstationServiceImpl.java new file mode 100644 index 0000000..58a6a0a --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/SubstationServiceImpl.java @@ -0,0 +1,20 @@ +package org.jeecg.modules.heating.service.impl; + +import org.jeecg.common.system.base.service.impl.JeecgServiceImpl; +import org.jeecg.modules.heating.entity.Substation; +import org.jeecg.modules.heating.mapper.SubstationMapper; +import org.jeecg.modules.heating.service.SubstationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import java.util.List; + +@Service +public class SubstationServiceImpl extends JeecgServiceImpl implements SubstationService { + + @Autowired + SubstationMapper mapper; + + public List findList(Substation substation) { + return mapper.findList(substation); + } +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/ThermalcompanyServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/ThermalcompanyServiceImpl.java new file mode 100644 index 0000000..140a2f9 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/ThermalcompanyServiceImpl.java @@ -0,0 +1,20 @@ +package org.jeecg.modules.heating.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.modules.heating.entity.Thermalcompany; +import org.jeecg.modules.heating.mapper.ThermalcompanyMapper; +import org.jeecg.modules.heating.service.ThermalcompanyService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import java.util.List; + +@Service +public class ThermalcompanyServiceImpl extends ServiceImpl implements ThermalcompanyService { + + @Autowired + ThermalcompanyMapper mapper; + + public List findList(Thermalcompany thermalcompany) { + return mapper.findList(thermalcompany); + } +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/message/util/HttpPostTest.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/message/util/HttpPostTest.java new file mode 100644 index 0000000..dcd3ff2 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/message/util/HttpPostTest.java @@ -0,0 +1,157 @@ +package org.jeecg.modules.message.util; + +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.NameValuePair; +import org.apache.http.ParseException; +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpUriRequest; +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.protocol.HTTP; +import org.apache.http.util.EntityUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.util.*; + + +public class HttpPostTest { + private static Logger log = LoggerFactory.getLogger(HttpPostTest.class); + Map params; + String url; + public static String post(String url, Map params) { + DefaultHttpClient httpclient = new DefaultHttpClient(); + String body = null; + + log.info("create httppost:" + url); + HttpPost post = postForm(url, params); + + body = invoke(httpclient, post); + + httpclient.getConnectionManager().shutdown(); + + return body; + } + + + public static String uploadData(String url, Map params,String token) { + DefaultHttpClient httpclient = new DefaultHttpClient(); + String body = null; + + log.info("create httppost:" + url); + HttpPost post = postForm(url, params); + post.setHeader("Authorization","Bearer "+token); +// post.setHeader("Content-Type","application/json"); + body = invoke(httpclient, post); + httpclient.getConnectionManager().shutdown(); + + return body; + } + + public HttpPostTest(String url, Map params){ + this.url = url; + this.params = params; + } + public static String get(String url) { + DefaultHttpClient httpclient = new DefaultHttpClient(); + String body = null; + + log.info("create httppost:" + url); + HttpGet get = new HttpGet(url); + body = invoke(httpclient, get); + + httpclient.getConnectionManager().shutdown(); + + return body; + } + + + private static String invoke(DefaultHttpClient httpclient, + HttpUriRequest httpost) { + + HttpResponse response = sendRequest(httpclient, httpost); + String body = paseResponse(response); + + return body; + } + + private static String paseResponse(HttpResponse response) { + log.info("get response from http server.."); + HttpEntity entity = response.getEntity(); + + log.info("response status: " + response.getStatusLine()); + String charset = EntityUtils.getContentCharSet(entity); + log.info(charset); + + String body = null; + try { + body = EntityUtils.toString(entity); + log.info(body); + } catch (ParseException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + + return body; + } + + private static HttpResponse sendRequest(DefaultHttpClient httpclient, + HttpUriRequest httpost) { + log.info("execute post..."); + HttpResponse response = null; + + try { + response = httpclient.execute(httpost); + } catch (ClientProtocolException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + return response; + } + + private static HttpPost postForm(String url, Map params){ + + HttpPost httpost = new HttpPost(url); + List nvps = new ArrayList (); + + Set keySet = params.keySet(); + for(String key : keySet) { + nvps.add(new BasicNameValuePair(key, params.get(key))); + } + + try { + log.info("set utf-8 form entity to httppost"); + httpost.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8)); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + + return httpost; + } + + public static void main(String []agrs){ + Map params = new HashMap(); + params.put("name", "jeeplus"); + params.put("password", "admin"); + + String xml = HttpPostTest.post("http://localhost:8080/HeartCare/a/login", params); + } + + public String post(){ + +// Map params = new HashMap(); +// params.put("name", "admin"); +// params.put("password", "admin"); + + String xml = HttpPostTest.post(url, params); + return xml; + } +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/controller/TemperatureController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/controller/TemperatureController.java new file mode 100644 index 0000000..d8cb589 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/controller/TemperatureController.java @@ -0,0 +1,50 @@ +package org.jeecg.modules.temperature.controller; + +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.modules.temperature.entity.Temperature; +import org.jeecg.modules.temperature.service.TemperatureService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import javax.servlet.http.HttpServletRequest; +import java.util.List; + + +@Slf4j +@RestController +@RequestMapping("/temp/temperature") +public class TemperatureController extends JeecgController { + @Autowired + private TemperatureService service; + + /** + * 查询1条 + * + * @param Temperature + * @param req + * @return + */ + @GetMapping(value = "/findOne") + public Result findOne(Temperature Temperature, HttpServletRequest req) { + Temperature temp = service.findOne(Temperature); + return Result.ok(temp); + } + + /** + * 列表查询 + * + * @param Temperature + * @param req + * @return + */ + @GetMapping(value = "/list") + public Result queryList(Temperature Temperature, HttpServletRequest req) { + List list = service.findList(Temperature); + return Result.ok(list); + } + + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/entity/Temperature.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/entity/Temperature.java new file mode 100644 index 0000000..42548b8 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/entity/Temperature.java @@ -0,0 +1,46 @@ +package org.jeecg.modules.temperature.entity; + +import com.baomidou.mybatisplus.annotation.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import org.jeecg.common.system.base.entity.JeecgEntity; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + *

Class:室内温度 + *

功能描述:功能描述 + */ +@Data +@TableName("bl_temperature") +public class Temperature extends JeecgEntity { + private static final long serialVersionUID = 1L; + private String code; + private String upPeri; + private String csq; + private String bat; + private String errNet; + private String errTemp; + private String offLine; + private String errMove; + private String reserved; + private String roomTemp; + private String humidity; + private String reportTime; +// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") +// private Date createTime; + @TableField(exist = false) + private String reportHour; + @TableField(exist = false) + private String SDate;//开始时间 + @TableField(exist = false) + private String EDate;//结束时间 + @TableField(exist = false) + private String tableName;//表名字 + + @TableField(exist = false) + private String houseName;//房屋名字 +} \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/mapper/TemperatureMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/mapper/TemperatureMapper.java new file mode 100644 index 0000000..1f12f1e --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/mapper/TemperatureMapper.java @@ -0,0 +1,10 @@ +package org.jeecg.modules.temperature.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.temperature.entity.Temperature; +import java.util.List; + +public interface TemperatureMapper extends BaseMapper { + Temperature findOne(Temperature temperature); + List findList(Temperature temperature); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/mapper/xml/TemperatureMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/mapper/xml/TemperatureMapper.xml new file mode 100644 index 0000000..86c6763 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/mapper/xml/TemperatureMapper.xml @@ -0,0 +1,62 @@ + + + + + + + + + \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/service/TemperatureService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/service/TemperatureService.java new file mode 100644 index 0000000..e82897b --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/service/TemperatureService.java @@ -0,0 +1,10 @@ +package org.jeecg.modules.temperature.service; + +import org.jeecg.common.system.base.service.JeecgService; +import org.jeecg.modules.temperature.entity.Temperature; +import java.util.List; + +public interface TemperatureService extends JeecgService { + Temperature findOne(Temperature temperature); + List findList(Temperature temperature); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/service/impl/TemperatureServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/service/impl/TemperatureServiceImpl.java new file mode 100644 index 0000000..471ebbe --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/service/impl/TemperatureServiceImpl.java @@ -0,0 +1,73 @@ +package org.jeecg.modules.temperature.service.impl; + +import org.jeecg.common.system.base.service.impl.JeecgServiceImpl; +import org.jeecg.common.util.DateUtils; +import org.jeecg.modules.temperature.entity.Temperature; +import org.jeecg.modules.temperature.mapper.TemperatureMapper; +import org.jeecg.modules.temperature.service.TemperatureService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +@Service +public class TemperatureServiceImpl extends JeecgServiceImpl implements TemperatureService { + + @Override + public Temperature findOne(Temperature temperature){ + String suffix = ""; + String SDate = temperature.getSDate(); + if(SDate==null||SDate.equals("")){ + SDate = new SimpleDateFormat("YYYY-MM-dd").format(new Date())+" 00:00:00"; + suffix = new SimpleDateFormat("YYMM").format(new Date()); + }else{ + suffix = SDate.substring(2, 4)+SDate.substring(5, 7); + } + temperature.setTableName("bl_temperature_"+suffix); + if(SDate.length()<=10){ + SDate = SDate +" 00:00:00"; + } + temperature.setSDate(SDate); + + String EDate = temperature.getEDate(); + if(EDate==null||EDate.equals("")) { +// EDate = new SimpleDateFormat("YYYY-MM-dd").format(new Date()) + " 23:59:59"; + EDate = SDate.substring(0,10)+ " 23:59:59"; + } + if(EDate.length()<=10){ + EDate = EDate +" 23:59:59"; + } + temperature.setEDate(EDate); + return baseMapper.findOne(temperature); + } + + @Override + public List findList(Temperature temperature){ + String suffix = ""; + String SDate = temperature.getSDate(); + if(SDate==null||SDate.equals("")){ + SDate = new SimpleDateFormat("YYYY-MM-dd").format(new Date())+" 00:00:00"; + suffix = new SimpleDateFormat("YYMM").format(new Date()); + }else{ + suffix = SDate.substring(2, 4)+SDate.substring(5, 7); + } + temperature.setTableName("bl_temperature_"+suffix); + if(SDate.length()<=10){ + SDate = SDate +" 00:00:00"; + } + temperature.setSDate(SDate); + + String EDate = temperature.getEDate(); + if(EDate==null||EDate.equals("")) { +// EDate = new SimpleDateFormat("YYYY-MM-dd").format(new Date()) + " 23:59:59"; + EDate = SDate.substring(0,10)+ " 23:59:59"; + } + if(EDate.length()<=10){ + EDate = EDate +" 23:59:59"; + } + temperature.setEDate(EDate); + return baseMapper.findList(temperature); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/controller/BlWaterFlowConfigController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/controller/BlWaterFlowConfigController.java new file mode 100644 index 0000000..8f74f34 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/controller/BlWaterFlowConfigController.java @@ -0,0 +1,180 @@ +package org.jeecg.modules.waterFlowConfig.controller; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.query.QueryRuleEnum; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.waterFlowConfig.entity.BlWaterFlowConfig; +import org.jeecg.modules.waterFlowConfig.service.IBlWaterFlowConfigService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.apache.shiro.authz.annotation.RequiresPermissions; + + /** + * @Description: 热量水流量配置 + * @Author: jeecg-boot + * @Date: 2025-08-25 + * @Version: V1.0 + */ +@Tag(name="热量水流量配置") +@RestController +@RequestMapping("/waterFlowConfig/blWaterFlowConfig") +@Slf4j +public class BlWaterFlowConfigController extends JeecgController { + @Autowired + private IBlWaterFlowConfigService blWaterFlowConfigService; + + /** + * 分页列表查询 + * + * @param blWaterFlowConfig + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "热量水流量配置-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(BlWaterFlowConfig blWaterFlowConfig, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + // 自定义查询规则 + Map customeRuleMap = new HashMap<>(); + // 自定义多选的查询规则为:LIKE_WITH_OR + customeRuleMap.put("companyCompanyId", QueryRuleEnum.LIKE_WITH_OR); + customeRuleMap.put("sourceSourceId", QueryRuleEnum.LIKE_WITH_OR); + customeRuleMap.put("stationStationId", QueryRuleEnum.LIKE_WITH_OR); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(blWaterFlowConfig, req.getParameterMap(),customeRuleMap); + Page page = new Page(pageNo, pageSize); + IPage pageList = blWaterFlowConfigService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param blWaterFlowConfig + * @return + */ + @AutoLog(value = "热量水流量配置-添加") + @RequiresPermissions("waterFlowConfig:bl_water_flow_config:add") + @PostMapping(value = "/add") + public Result add(@RequestBody BlWaterFlowConfig blWaterFlowConfig) { + blWaterFlowConfigService.save(blWaterFlowConfig); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param blWaterFlowConfig + * @return + */ + @AutoLog(value = "热量水流量配置-编辑") + @RequiresPermissions("waterFlowConfig:bl_water_flow_config:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody BlWaterFlowConfig blWaterFlowConfig) { + blWaterFlowConfigService.updateById(blWaterFlowConfig); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "热量水流量配置-通过id删除") + @RequiresPermissions("waterFlowConfig:bl_water_flow_config:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + blWaterFlowConfigService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "热量水流量配置-批量删除") + @RequiresPermissions("waterFlowConfig:bl_water_flow_config:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.blWaterFlowConfigService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "热量水流量配置-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + BlWaterFlowConfig blWaterFlowConfig = blWaterFlowConfigService.getById(id); + if(blWaterFlowConfig==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(blWaterFlowConfig); + } + + /** + * 导出excel + * + * @param request + * @param blWaterFlowConfig + */ + @RequiresPermissions("waterFlowConfig:bl_water_flow_config:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, BlWaterFlowConfig blWaterFlowConfig) { + return super.exportXls(request, blWaterFlowConfig, BlWaterFlowConfig.class, "热量水流量配置"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("waterFlowConfig:bl_water_flow_config:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, BlWaterFlowConfig.class); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/entity/BlWaterFlowConfig.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/entity/BlWaterFlowConfig.java new file mode 100644 index 0000000..3c27370 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/entity/BlWaterFlowConfig.java @@ -0,0 +1,85 @@ +package org.jeecg.modules.waterFlowConfig.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.TableLogic; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.jeecg.common.constant.ProvinceCityArea; +import org.jeecg.common.util.SpringContextUtils; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; + + +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 热量水流量配置 + * @Author: jeecg-boot + * @Date: 2025-08-25 + * @Version: V1.0 + */ +@Data +@TableName("bl_water_flow_config") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@Tag(name ="bl_water_flow_config对象", description="热量水流量配置") +public class BlWaterFlowConfig implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + private java.lang.Integer id; + /**sn*/ + @Excel(name = "sn", width = 15) + private java.lang.String sn; + /**注册设备时间*/ + @Excel(name = "注册设备时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date occurtime; + /**公司名称*/ + @Excel(name = "公司名称", width = 15, dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id") + @Dict(dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id") + private java.lang.String companyCompanyId; + /**热源名称*/ + @Excel(name = "热源名称", width = 15, dictTable = "bl_heatsource", dicText = "source_name", dicCode = "id") + @Dict(dictTable = "bl_heatsource", dicText = "source_name", dicCode = "id") + private java.lang.String sourceSourceId; + /**换热站名称*/ + @Excel(name = "换热站名称", width = 15, dictTable = "bl_heatsourcestation", dicText = "station_name", dicCode = "id") + @Dict(dictTable = "bl_heatsourcestation", dicText = "station_name", dicCode = "id") + private java.lang.String stationStationId; + /**热力分所名称*/ + @Excel(name = "热力分所名称", width = 15) + private java.lang.String substationId; + /**创建者*/ + private java.lang.String createBy; + /**创建时间*/ + @Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date createDate; + /**更改者*/ + private java.lang.String updateBy; + /**更改时间*/ + @Excel(name = "更改时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date updateDate; + /**删除标识*/ + @Excel(name = "删除标识", width = 15) + @TableLogic + private java.lang.String delFlag; + /**地区类型*/ + @Excel(name = "地区类型", width = 15) + private java.lang.String regionType; +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/mapper/BlWaterFlowConfigMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/mapper/BlWaterFlowConfigMapper.java new file mode 100644 index 0000000..97979e9 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/mapper/BlWaterFlowConfigMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.waterFlowConfig.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.waterFlowConfig.entity.BlWaterFlowConfig; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 热量水流量配置 + * @Author: jeecg-boot + * @Date: 2025-08-25 + * @Version: V1.0 + */ +public interface BlWaterFlowConfigMapper extends BaseMapper { + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/mapper/xml/BlWaterFlowConfigMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/mapper/xml/BlWaterFlowConfigMapper.xml new file mode 100644 index 0000000..ffe2d74 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/mapper/xml/BlWaterFlowConfigMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/service/IBlWaterFlowConfigService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/service/IBlWaterFlowConfigService.java new file mode 100644 index 0000000..f879490 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/service/IBlWaterFlowConfigService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.waterFlowConfig.service; + +import org.jeecg.modules.waterFlowConfig.entity.BlWaterFlowConfig; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 热量水流量配置 + * @Author: jeecg-boot + * @Date: 2025-08-25 + * @Version: V1.0 + */ +public interface IBlWaterFlowConfigService extends IService { + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/service/impl/BlWaterFlowConfigServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/service/impl/BlWaterFlowConfigServiceImpl.java new file mode 100644 index 0000000..cfd6146 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/waterFlowConfig/service/impl/BlWaterFlowConfigServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.waterFlowConfig.service.impl; + +import org.jeecg.modules.waterFlowConfig.entity.BlWaterFlowConfig; +import org.jeecg.modules.waterFlowConfig.mapper.BlWaterFlowConfigMapper; +import org.jeecg.modules.waterFlowConfig.service.IBlWaterFlowConfigService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 热量水流量配置 + * @Author: jeecg-boot + * @Date: 2025-08-25 + * @Version: V1.0 + */ +@Service +public class BlWaterFlowConfigServiceImpl extends ServiceImpl implements IBlWaterFlowConfigService { + +} diff --git a/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml b/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml index 63695e1..10163aa 100644 --- a/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml +++ b/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml @@ -154,9 +154,9 @@ spring: slow-sql-millis: 5000 datasource: master: - url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai - username: root - password: root + url: jdbc:mysql://192.168.2.199:3306/heating?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai + username: nu_sys + password: nu_sys driver-class-name: com.mysql.cj.jdbc.Driver # 多数据源配置 #multi-datasource1: @@ -258,7 +258,7 @@ jeecg: #大屏报表参数设置 jmreport: #多租户模式,默认值为空(created:按照创建人隔离、tenant:按照租户隔离) (v1.6.2+ 新增) - saasMode: + saasMode: # 平台上线安全配置(v1.6.2+ 新增) firewall: # 数据源安全 (开启后,不允许使用平台数据源、SQL解析加签并且不允许查询数据库) diff --git a/pom.xml b/pom.xml index cd528fd..bc5a6bb 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ http://guojusoft.com http://www.jeecg.com/vip - + org.springframework.boot spring-boot-starter-parent @@ -39,7 +39,7 @@ 2.0.4 1.7.0 2.4.1 - + 2.0.57 5.2.6 1.6.0 @@ -54,7 +54,7 @@ 9.0.0 8.1.1.49 - + 2.1.2 2.1.2 @@ -540,7 +540,7 @@ http://maven.jeecg.com:8090/nexus/content/repositories/snapshots/ - + @@ -640,4 +640,4 @@ - \ No newline at end of file +