Commit 4fb4af2c5c9854db57d9244a941671308f695bb9
1 parent
0b98ef4e
feat:集成积木仪表盘
Showing
5 changed files
with
93 additions
and
5 deletions
yudao-dependencies/pom.xml
| ... | ... | @@ -585,10 +585,15 @@ |
| 585 | 585 | <groupId>org.jeecgframework.jimureport</groupId> |
| 586 | 586 | <artifactId>jimureport-spring-boot3-starter-fastjson2</artifactId> |
| 587 | 587 | <version>${jimureport.version}</version> |
| 588 | + </dependency> | |
| 589 | + <dependency> | |
| 590 | + <groupId>org.jeecgframework.jimureport</groupId> | |
| 591 | + <artifactId>jimubi-spring-boot3-starter</artifactId> | |
| 592 | + <version>${jimureport.version}</version> | |
| 588 | 593 | <exclusions> |
| 589 | 594 | <exclusion> |
| 590 | - <groupId>com.alibaba</groupId> | |
| 591 | - <artifactId>druid</artifactId> | |
| 595 | + <groupId>com.github.jsqlparser</groupId> | |
| 596 | + <artifactId>jsqlparser</artifactId> | |
| 592 | 597 | </exclusion> |
| 593 | 598 | </exclusions> |
| 594 | 599 | </dependency> | ... | ... |
yudao-module-report/yudao-module-report-biz/pom.xml
| ... | ... | @@ -64,6 +64,10 @@ |
| 64 | 64 | <groupId>org.jeecgframework.jimureport</groupId> |
| 65 | 65 | <artifactId>jimureport-spring-boot3-starter-fastjson2</artifactId> |
| 66 | 66 | </dependency> |
| 67 | + <dependency> | |
| 68 | + <groupId>org.jeecgframework.jimureport</groupId> | |
| 69 | + <artifactId>jimubi-spring-boot3-starter</artifactId> | |
| 70 | + </dependency> | |
| 67 | 71 | |
| 68 | 72 | <dependency> |
| 69 | 73 | <groupId>cn.iocoder.boot</groupId> | ... | ... |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/config/JmReportConfiguration.java
| 1 | 1 | package cn.iocoder.yudao.module.report.framework.jmreport.config; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.security.config.SecurityProperties; |
| 4 | -import cn.iocoder.yudao.module.system.api.oauth2.OAuth2TokenApi; | |
| 4 | +import cn.iocoder.yudao.module.report.framework.jmreport.core.service.JmOnlDragExternalServiceImpl; | |
| 5 | 5 | import cn.iocoder.yudao.module.report.framework.jmreport.core.service.JmReportTokenServiceImpl; |
| 6 | +import cn.iocoder.yudao.module.system.api.oauth2.OAuth2TokenApi; | |
| 6 | 7 | import cn.iocoder.yudao.module.system.api.permission.PermissionApi; |
| 7 | 8 | import org.jeecg.modules.jmreport.api.JmReportTokenServiceI; |
| 8 | 9 | import org.springframework.context.annotation.Bean; |
| 9 | 10 | import org.springframework.context.annotation.ComponentScan; |
| 10 | 11 | import org.springframework.context.annotation.Configuration; |
| 12 | +import org.springframework.context.annotation.Primary; | |
| 11 | 13 | |
| 12 | 14 | /** |
| 13 | 15 | * 积木报表的配置类 |
| ... | ... | @@ -19,11 +21,16 @@ import org.springframework.context.annotation.Configuration; |
| 19 | 21 | public class JmReportConfiguration { |
| 20 | 22 | |
| 21 | 23 | @Bean |
| 22 | - @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") | |
| 23 | 24 | public JmReportTokenServiceI jmReportTokenService(OAuth2TokenApi oAuth2TokenApi, |
| 24 | 25 | PermissionApi permissionApi, |
| 25 | 26 | SecurityProperties securityProperties) { |
| 26 | 27 | return new JmReportTokenServiceImpl(oAuth2TokenApi, permissionApi, securityProperties); |
| 27 | 28 | } |
| 28 | 29 | |
| 30 | + @Bean // 暂时注释:可以按需实现后打开 | |
| 31 | + @Primary | |
| 32 | + public JmOnlDragExternalServiceImpl jmOnlDragExternalService2() { | |
| 33 | + return new JmOnlDragExternalServiceImpl(); | |
| 34 | + } | |
| 35 | + | |
| 29 | 36 | } | ... | ... |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/core/service/JmOnlDragExternalServiceImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.report.framework.jmreport.core.service; | |
| 2 | + | |
| 3 | +import com.alibaba.fastjson.JSONObject; | |
| 4 | +import lombok.RequiredArgsConstructor; | |
| 5 | +import org.jeecg.modules.drag.service.IOnlDragExternalService; | |
| 6 | +import org.jeecg.modules.drag.vo.DragDictModel; | |
| 7 | +import org.jeecg.modules.drag.vo.DragLogDTO; | |
| 8 | + | |
| 9 | +import java.util.List; | |
| 10 | +import java.util.Map; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * {@link IOnlDragExternalService} 实现类,提供积木仪表盘的查询等功能 | |
| 14 | + * | |
| 15 | + * 实现可参考: | |
| 16 | + * 1. <a href="https://github.com/jeecgboot/jimureport/blob/master/jimureport-example/src/main/java/com/jeecg/modules/jmreport/extend/JimuDragExternalServiceImpl.java">jimureport-example</a> | |
| 17 | + * 2. <a href="https://gitee.com/jeecg/JeecgBoot/blob/master/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/config/jimureport/JimuDragExternalServiceImpl.java">JeecgBoot 集成</a> | |
| 18 | + * | |
| 19 | + * @author 芋道源码 | |
| 20 | + */ | |
| 21 | +@RequiredArgsConstructor | |
| 22 | +public class JmOnlDragExternalServiceImpl implements IOnlDragExternalService { | |
| 23 | + | |
| 24 | + // ========== DictItem 相关 ========== | |
| 25 | + | |
| 26 | + @Override | |
| 27 | + public Map<String, List<DragDictModel>> getManyDictItems(List<String> codeList, List<JSONObject> tableDictList) { | |
| 28 | + return IOnlDragExternalService.super.getManyDictItems(codeList, tableDictList); | |
| 29 | + } | |
| 30 | + | |
| 31 | + @Override | |
| 32 | + public List<DragDictModel> getDictItems(String dictCode) { | |
| 33 | + return IOnlDragExternalService.super.getDictItems(dictCode); | |
| 34 | + } | |
| 35 | + | |
| 36 | + @Override | |
| 37 | + public List<DragDictModel> getTableDictItems(String dictTable, String dictText, String dictCode) { | |
| 38 | + return IOnlDragExternalService.super.getTableDictItems(dictTable, dictText, dictCode); | |
| 39 | + } | |
| 40 | + | |
| 41 | + @Override | |
| 42 | + public List<DragDictModel> getCategoryTreeDictItems(List<String> ids) { | |
| 43 | + return IOnlDragExternalService.super.getCategoryTreeDictItems(ids); | |
| 44 | + } | |
| 45 | + | |
| 46 | + @Override | |
| 47 | + public List<DragDictModel> getUserDictItems(List<String> ids) { | |
| 48 | + return IOnlDragExternalService.super.getUserDictItems(ids); | |
| 49 | + } | |
| 50 | + | |
| 51 | + @Override | |
| 52 | + public List<DragDictModel> getDeptsDictItems(List<String> ids) { | |
| 53 | + return IOnlDragExternalService.super.getDeptsDictItems(ids); | |
| 54 | + } | |
| 55 | + | |
| 56 | + // ========== Log 相关 ========== | |
| 57 | + | |
| 58 | + @Override | |
| 59 | + public void addLog(DragLogDTO dto) { | |
| 60 | + IOnlDragExternalService.super.addLog(dto); | |
| 61 | + } | |
| 62 | + | |
| 63 | + @Override | |
| 64 | + public void addLog(String logMsg, int logType, int operateType) { | |
| 65 | + IOnlDragExternalService.super.addLog(logMsg, logType, operateType); | |
| 66 | + } | |
| 67 | + | |
| 68 | +} | ... | ... |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/security/config/SecurityConfiguration.java
| ... | ... | @@ -18,7 +18,11 @@ public class SecurityConfiguration { |
| 18 | 18 | |
| 19 | 19 | @Override |
| 20 | 20 | public void customize(AuthorizeHttpRequestsConfigurer<HttpSecurity>.AuthorizationManagerRequestMatcherRegistry registry) { |
| 21 | - registry.requestMatchers("/jmreport/**").permitAll(); // 积木报表 | |
| 21 | + // 积木报表 | |
| 22 | + registry.requestMatchers("/jmreport/**").permitAll(); | |
| 23 | + // 积木仪表盘 | |
| 24 | + registry.requestMatchers("/drag/**").permitAll(); | |
| 25 | + registry.requestMatchers("/jimubi/**").permitAll(); | |
| 22 | 26 | } |
| 23 | 27 | |
| 24 | 28 | }; | ... | ... |