diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java b/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java index d9929e2..f59b98c 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java @@ -56,7 +56,7 @@ public class ShiroConfig { private JeecgBaseConfig jeecgBaseConfig; @Autowired(required = false) private RedisProperties redisProperties; - + /** * Filter Chain定义说明 * @@ -110,6 +110,8 @@ public class ShiroConfig { filterChainDefinitionMap.put("/sys/getQrcodeToken/**", "anon"); //监听扫码 filterChainDefinitionMap.put("/sys/checkAuth", "anon"); //授权接口排除 filterChainDefinitionMap.put("/openapi/call/**", "anon"); // 开放平台接口排除 +// filterChainDefinitionMap.put("/exportapi/homeApi/**", "anon"); // 首页、大屏暴露接口 + //update-begin--Author:scott Date:20221116 for:排除静态资源后缀 filterChainDefinitionMap.put("/", "anon"); @@ -144,7 +146,7 @@ public class ShiroConfig { filterChainDefinitionMap.put("/jmreport/**", "anon"); filterChainDefinitionMap.put("/**/*.js.map", "anon"); filterChainDefinitionMap.put("/**/*.css.map", "anon"); - + //积木BI大屏和仪表盘排除 filterChainDefinitionMap.put("/drag/view", "anon"); filterChainDefinitionMap.put("/drag/page/queryById", "anon"); @@ -177,7 +179,7 @@ public class ShiroConfig { filterChainDefinitionMap.put("/sys/version/app3version", "anon"); //仪表盘(按钮通信) filterChainDefinitionMap.put("/dragChannelSocket/**","anon"); - + //性能监控——安全隐患泄露TOEKN(durid连接池也有) //filterChainDefinitionMap.put("/actuator/**", "anon"); //测试模块排除 @@ -187,7 +189,7 @@ public class ShiroConfig { filterChainDefinitionMap.put("/error", "anon"); // 企业微信证书排除 filterChainDefinitionMap.put("/WW_verify*", "anon"); - + // 添加自己的过滤器并且取名为jwt Map filterMap = new HashMap(1); //如果cloudServer为空 则说明是单体 需要加载跨域配置【微服务跨域切换】 @@ -305,7 +307,7 @@ public class ShiroConfig { /** * RedisConfig在项目starter项目中 * jeecg-boot-starter-github\jeecg-boot-common\src\main\java\org\jeecg\common\modules\redis\config\RedisConfig.java - * + * * 配置shiro redisManager * 使用的是shiro-redis开源插件 * @@ -327,7 +329,7 @@ public class ShiroConfig { return sentinelManager; } - + // redis 单机支持,在集群为空,或者集群无机器时候使用 add by jzyadmin@163.com if (lettuceConnectionFactory.getClusterConfiguration() == null || lettuceConnectionFactory.getClusterConfiguration().getClusterNodes().isEmpty()) { RedisManager redisManager = new RedisManager(); diff --git a/jeecg-module-system/jeecg-system-api/jeecg-system-local-api/pom.xml b/jeecg-module-system/jeecg-system-api/jeecg-system-local-api/pom.xml index 1caa081..94e60be 100644 --- a/jeecg-module-system/jeecg-system-api/jeecg-system-local-api/pom.xml +++ b/jeecg-module-system/jeecg-system-api/jeecg-system-local-api/pom.xml @@ -10,5 +10,7 @@ 4.0.0 jeecg-system-local-api + + - \ No newline at end of file + diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/exportapi/api/HomeApi.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/exportapi/api/HomeApi.java new file mode 100644 index 0000000..aadfa59 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/exportapi/api/HomeApi.java @@ -0,0 +1,112 @@ +package org.jeecg.exportapi.api; + +import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.api.vo.Result; +import org.jeecg.exportapi.entity.HomeApiEntity; +import org.jeecg.modules.heating.entity.Heatanalysis; +import org.jeecg.modules.heating.entity.Heatsource; +import org.jeecg.modules.heating.entity.Heatsourcestation; +import org.jeecg.modules.heating.entity.Thermalcompany; +import org.jeecg.modules.heating.service.HeatanalysisService; +import org.jeecg.modules.heating.service.HeatsourceService; +import org.jeecg.modules.heating.service.HeatsourcestationService; +import org.jeecg.modules.heating.service.ThermalcompanyService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Slf4j +@RestController +@RequestMapping("/exportapi/homeApi") +public class HomeApi { + + //公司 + @Autowired + private ThermalcompanyService thermalcompanyService; + //锅炉房 + @Autowired + private HeatsourceService heatsourceService; + //换热站 + private HeatsourcestationService heatsourcestationService; + //各信息(温度、压力、热量、流量等) + @Autowired + private HeatanalysisService heatanalysisService; + + /** + * 城区锅炉房数量 + * 城区换热站数量 + * 郊县数量(郊县公司数量) + * 郊县锅炉房数量 + * + * @param dto + * @return + */ + @RequestMapping(value = "/slcx", method = RequestMethod.POST) + public Result slcx(HomeApiEntity dto) { + Map result = new HashMap<>(); + + //城区锅炉房数量 + LambdaQueryChainWrapper qw1 = heatsourceService.lambdaQuery(); + qw1.eq(Heatsource::getRegionType,"城区"); + qw1.eq(Heatsource::getDelFlag,"0"); + qw1.orderByAsc(Heatsource::getId); + List heatsourceCQList = qw1.list(); + result.put("cqglfsl",heatsourceCQList.size()); + + //城区换热站数量 + LambdaQueryChainWrapper qw2 = heatsourcestationService.lambdaQuery(); + qw2.eq(Heatsourcestation::getDelFlag,"0"); + qw2.orderByAsc(Heatsourcestation::getId); + List heatsourcestationList = qw2.list(); + result.put("cqhrzsl",heatsourcestationList.size()); + + //郊县数量(郊县公司数量) + LambdaQueryChainWrapper qw3 = thermalcompanyService.lambdaQuery(); + qw3.eq(Thermalcompany::getRegionType,"城区"); + qw3.eq(Thermalcompany::getDelFlag,"0"); + qw3.orderByAsc(Thermalcompany::getId); + List thermalcompanyList = qw3.list(); + result.put("jxsl",thermalcompanyList.size()); + + //郊县锅炉房数量 + LambdaQueryChainWrapper qw4 = heatsourceService.lambdaQuery(); + qw4.eq(Heatsource::getRegionType,"郊县"); + qw4.eq(Heatsource::getDelFlag,"0"); + qw4.orderByAsc(Heatsource::getId); + List heatsourceJXList = qw4.list(); + result.put("jxglfsl",heatsourceJXList.size()); + + return Result.ok(result); + } + + /** + * 数据查询 一次网 + * 城区锅炉房供回水温度 + * 郊县供回水温度 + * 郊县锅炉房瞬时热量 + * 郊县锅炉房瞬时流量 + * + * @param dto + * @return + */ + @RequestMapping(value = "/cqglfgswd", method = RequestMethod.POST) + public Result cqglfgswd(HomeApiEntity dto) { + Map result = new HashMap<>(); + + //城区锅炉房供回水温度 + LambdaQueryChainWrapper qw = heatanalysisService.lambdaQuery(); + qw.eq(Heatanalysis::getDelFlag,"0"); +// qw.eq(Heatanalysis::getRegionType,"城区"); + qw.orderByAsc(Heatanalysis::getId); + List list = qw.list(); + result.put("data",list); + return Result.ok(result); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/exportapi/entity/HomeApiEntity.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/exportapi/entity/HomeApiEntity.java new file mode 100644 index 0000000..ed8f962 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/exportapi/entity/HomeApiEntity.java @@ -0,0 +1,7 @@ +package org.jeecg.exportapi.entity; + +import lombok.Data; + +@Data +public class HomeApiEntity { +}