修改bug
Some checks failed
aagro-ui-admin CI / build (14.x) (push) Has been cancelled
aagro-ui-admin CI / build (16.x) (push) Has been cancelled
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled

This commit is contained in:
ylweng
2025-10-06 15:21:03 +08:00
parent f8f3cc8277
commit faad389e82
1682 changed files with 8962 additions and 48880 deletions

View File

@@ -3,8 +3,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>cn.aagro.gg</groupId>
<artifactId>aiot</artifactId>
<groupId>cn.aagro.aa</groupId>
<artifactId>aiotagro</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -20,55 +20,55 @@
<dependencies>
<dependency>
<groupId>cn.aagro.gg</groupId>
<groupId>cn.aagro.aa</groupId>
<artifactId>aagro-module-system</artifactId>
<version>${revision}</version>
</dependency>
<!-- 业务组件 -->
<dependency>
<groupId>cn.aagro.gg</groupId>
<groupId>cn.aagro.aa</groupId>
<artifactId>aagro-spring-boot-starter-biz-tenant</artifactId>
</dependency>
<!-- Web 相关 -->
<dependency>
<groupId>cn.aagro.gg</groupId>
<groupId>cn.aagro.aa</groupId>
<artifactId>aagro-spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>cn.aagro.gg</groupId>
<groupId>cn.aagro.aa</groupId>
<artifactId>aagro-spring-boot-starter-security</artifactId>
</dependency>
<!-- DB 相关 -->
<dependency>
<groupId>cn.aagro.gg</groupId>
<groupId>cn.aagro.aa</groupId>
<artifactId>aagro-spring-boot-starter-mybatis</artifactId>
</dependency>
<!-- Test 测试相关 -->
<dependency>
<groupId>cn.aagro.gg</groupId>
<artifactId>aagro-spring-boot-starter-test</artifactId>
<version>${revision}</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- 积木报表-->
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-spring-boot-starter</artifactId>
<artifactId>jimureport-spring-boot3-starter-fastjson2</artifactId>
</dependency>
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimubi-spring-boot-starter</artifactId>
<artifactId>jimubi-spring-boot3-starter</artifactId>
</dependency>
<dependency>
<groupId>cn.aagro.gg</groupId>
<groupId>cn.aagro.aa</groupId>
<artifactId>aagro-spring-boot-starter-excel</artifactId>
</dependency>
</dependencies>
</project>
</project>

View File

@@ -0,0 +1 @@
package cn.aagro.ag.module.report.controller.admin.ajreport;

View File

@@ -1,11 +1,11 @@
package cn.aagro.pp.module.report.controller.admin.goview;
package cn.aagro.ag.module.report.controller.admin.goview;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.RandomUtil;
import cn.aagro.pp.framework.common.pojo.CommonResult;
import cn.aagro.pp.module.report.controller.admin.goview.vo.data.GoViewDataGetBySqlReqVO;
import cn.aagro.pp.module.report.controller.admin.goview.vo.data.GoViewDataRespVO;
import cn.aagro.pp.module.report.service.goview.GoViewDataService;
import cn.aagro.ag.framework.common.pojo.CommonResult;
import cn.aagro.ag.module.report.controller.admin.goview.vo.data.GoViewDataGetBySqlReqVO;
import cn.aagro.ag.module.report.controller.admin.goview.vo.data.GoViewDataRespVO;
import cn.aagro.ag.module.report.service.goview.GoViewDataService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -15,12 +15,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.validation.Valid;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import java.util.*;
import static cn.aagro.pp.framework.common.pojo.CommonResult.success;
import static cn.aagro.ag.framework.common.pojo.CommonResult.success;
@Tag(name = "管理后台 - GoView 数据", description = "提供 SQL、HTTP 等数据查询的能力")
@RestController

View File

@@ -1,14 +1,14 @@
package cn.aagro.pp.module.report.controller.admin.goview;
package cn.aagro.ag.module.report.controller.admin.goview;
import cn.aagro.pp.framework.common.pojo.CommonResult;
import cn.aagro.pp.framework.common.pojo.PageParam;
import cn.aagro.pp.framework.common.pojo.PageResult;
import cn.aagro.pp.module.report.controller.admin.goview.vo.project.GoViewProjectCreateReqVO;
import cn.aagro.pp.module.report.controller.admin.goview.vo.project.GoViewProjectRespVO;
import cn.aagro.pp.module.report.controller.admin.goview.vo.project.GoViewProjectUpdateReqVO;
import cn.aagro.pp.module.report.convert.goview.GoViewProjectConvert;
import cn.aagro.pp.module.report.dal.dataobject.goview.GoViewProjectDO;
import cn.aagro.pp.module.report.service.goview.GoViewProjectService;
import cn.aagro.ag.framework.common.pojo.CommonResult;
import cn.aagro.ag.framework.common.pojo.PageParam;
import cn.aagro.ag.framework.common.pojo.PageResult;
import cn.aagro.ag.module.report.controller.admin.goview.vo.project.GoViewProjectCreateReqVO;
import cn.aagro.ag.module.report.controller.admin.goview.vo.project.GoViewProjectRespVO;
import cn.aagro.ag.module.report.controller.admin.goview.vo.project.GoViewProjectUpdateReqVO;
import cn.aagro.ag.module.report.convert.goview.GoViewProjectConvert;
import cn.aagro.ag.module.report.dal.dataobject.goview.GoViewProjectDO;
import cn.aagro.ag.module.report.service.goview.GoViewProjectService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
@@ -17,11 +17,11 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import static cn.aagro.pp.framework.common.pojo.CommonResult.success;
import static cn.aagro.pp.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
import static cn.aagro.ag.framework.common.pojo.CommonResult.success;
import static cn.aagro.ag.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
@Tag(name = "管理后台 - GoView 项目")
@RestController

View File

@@ -1,9 +1,9 @@
package cn.aagro.pp.module.report.controller.admin.goview.vo.data;
package cn.aagro.ag.module.report.controller.admin.goview.vo.data;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotEmpty;
@Schema(description = "管理后台 - GoView 使用 SQL 查询数据 Request VO")
@Data

View File

@@ -1,4 +1,4 @@
package cn.aagro.pp.module.report.controller.admin.goview.vo.data;
package cn.aagro.ag.module.report.controller.admin.goview.vo.data;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

View File

@@ -1,8 +1,8 @@
package cn.aagro.pp.module.report.controller.admin.goview.vo.project;
package cn.aagro.ag.module.report.controller.admin.goview.vo.project;
import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.*;
import jakarta.validation.constraints.*;
@Schema(description = "管理后台 - GoView 项目创建 Request VO")
@Data

View File

@@ -1,4 +1,4 @@
package cn.aagro.pp.module.report.controller.admin.goview.vo.project;
package cn.aagro.ag.module.report.controller.admin.goview.vo.project;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

View File

@@ -1,11 +1,11 @@
package cn.aagro.pp.module.report.controller.admin.goview.vo.project;
package cn.aagro.ag.module.report.controller.admin.goview.vo.project;
import cn.aagro.pp.framework.common.enums.CommonStatusEnum;
import cn.aagro.pp.framework.common.validation.InEnum;
import cn.aagro.ag.framework.common.enums.CommonStatusEnum;
import cn.aagro.ag.framework.common.validation.InEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import javax.validation.constraints.*;
import jakarta.validation.constraints.*;
@Schema(description = "管理后台 - GoView 项目更新 Request VO")
@Data

View File

@@ -3,4 +3,4 @@
* 1. admin 提供给管理后台 aagro-ui-admin 前端项目
* 2. app 提供给用户 APP aagro-ui-app 前端项目它的 Controller VO 都要添加 App 前缀用于和管理后台进行区分
*/
package cn.aagro.pp.module.report.controller;
package cn.aagro.ag.module.report.controller;

View File

@@ -0,0 +1,4 @@
/**
* TODO 占位,后续删除
*/
package cn.aagro.ag.module.report.convert.ajreport;

View File

@@ -1,10 +1,10 @@
package cn.aagro.pp.module.report.convert.goview;
package cn.aagro.ag.module.report.convert.goview;
import cn.aagro.pp.framework.common.pojo.PageResult;
import cn.aagro.pp.module.report.controller.admin.goview.vo.project.GoViewProjectCreateReqVO;
import cn.aagro.pp.module.report.controller.admin.goview.vo.project.GoViewProjectRespVO;
import cn.aagro.pp.module.report.controller.admin.goview.vo.project.GoViewProjectUpdateReqVO;
import cn.aagro.pp.module.report.dal.dataobject.goview.GoViewProjectDO;
import cn.aagro.ag.framework.common.pojo.PageResult;
import cn.aagro.ag.module.report.controller.admin.goview.vo.project.GoViewProjectCreateReqVO;
import cn.aagro.ag.module.report.controller.admin.goview.vo.project.GoViewProjectRespVO;
import cn.aagro.ag.module.report.controller.admin.goview.vo.project.GoViewProjectUpdateReqVO;
import cn.aagro.ag.module.report.dal.dataobject.goview.GoViewProjectDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

View File

@@ -0,0 +1,4 @@
/**
* TODO 芋艿:占位,待删除
*/
package cn.aagro.ag.module.report.dal.dataobject.ajreport;

View File

@@ -1,6 +1,6 @@
package cn.aagro.pp.module.report.dal.dataobject.goview;
package cn.aagro.ag.module.report.dal.dataobject.goview;
import cn.aagro.pp.framework.mybatis.core.dataobject.BaseDO;
import cn.aagro.ag.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
@@ -11,7 +11,7 @@ import lombok.*;
*
* 每个大屏图标对应一个项目
*
* @author 芋道源码
* @author AIOTAGRO
*/
@TableName(value = "report_go_view_project", autoResultMap = true) // 由于 SQL Server system_user 是关键字所以使用 system_users
@KeySequence("report_go_view_project_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@@ -47,7 +47,7 @@ public class GoViewProjectDO extends BaseDO {
* 0 - 已发布
* 1 - 未发布
*
* 枚举 {@link cn.aagro.pp.framework.common.enums.CommonStatusEnum}
* 枚举 {@link cn.aagro.ag.framework.common.enums.CommonStatusEnum}
*/
private Integer status;
/**

View File

@@ -0,0 +1,4 @@
/**
* TODO 芋艿:占位,待删除
*/
package cn.aagro.ag.module.report.dal.mysql.ajreport;

View File

@@ -1,10 +1,10 @@
package cn.aagro.pp.module.report.dal.mysql.goview;
package cn.aagro.ag.module.report.dal.mysql.goview;
import cn.aagro.pp.framework.common.pojo.PageParam;
import cn.aagro.pp.framework.common.pojo.PageResult;
import cn.aagro.pp.framework.mybatis.core.mapper.BaseMapperX;
import cn.aagro.pp.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.aagro.pp.module.report.dal.dataobject.goview.GoViewProjectDO;
import cn.aagro.ag.framework.common.pojo.PageParam;
import cn.aagro.ag.framework.common.pojo.PageResult;
import cn.aagro.ag.framework.mybatis.core.mapper.BaseMapperX;
import cn.aagro.ag.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.aagro.ag.module.report.dal.dataobject.goview.GoViewProjectDO;
import org.apache.ibatis.annotations.Mapper;
@Mapper

View File

@@ -1,6 +1,6 @@
package cn.aagro.pp.module.report.enums;
package cn.aagro.ag.module.report.enums;
import cn.aagro.pp.framework.common.exception.ErrorCode;
import cn.aagro.ag.framework.common.exception.ErrorCode;
/**
* Report 错误码枚举类

View File

@@ -1,11 +1,11 @@
package cn.aagro.pp.module.report.framework.jmreport.config;
package cn.aagro.ag.module.report.framework.jmreport.config;
import cn.aagro.pp.framework.common.biz.system.oauth2.OAuth2TokenCommonApi;
import cn.aagro.pp.framework.common.biz.system.permission.PermissionCommonApi;
import cn.aagro.pp.framework.security.config.SecurityProperties;
import cn.aagro.pp.module.report.framework.jmreport.core.service.JmOnlDragExternalServiceImpl;
import cn.aagro.pp.module.report.framework.jmreport.core.service.JmReportTokenServiceImpl;
import cn.aagro.pp.module.system.api.permission.PermissionApi;
import cn.aagro.ag.framework.common.biz.system.oauth2.OAuth2TokenCommonApi;
import cn.aagro.ag.framework.common.biz.system.permission.PermissionCommonApi;
import cn.aagro.ag.framework.security.config.SecurityProperties;
import cn.aagro.ag.module.report.framework.jmreport.core.service.JmOnlDragExternalServiceImpl;
import cn.aagro.ag.module.report.framework.jmreport.core.service.JmReportTokenServiceImpl;
import cn.aagro.ag.module.system.api.permission.PermissionApi;
import org.jeecg.modules.jmreport.api.JmReportTokenServiceI;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
@@ -15,7 +15,7 @@ import org.springframework.context.annotation.Primary;
/**
* 积木报表的配置类
*
* @author 芋道源码
* @author AIOTAGRO
*/
@Configuration(proxyBeanMethods = false)
@ComponentScan(basePackages = "org.jeecg.modules.jmreport") // 扫描积木报表的包

View File

@@ -1,4 +1,4 @@
package cn.aagro.pp.module.report.framework.jmreport.core.service;
package cn.aagro.ag.module.report.framework.jmreport.core.service;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
@@ -16,7 +16,7 @@ import java.util.Map;
* 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>
* 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>
*
* @author 芋道源码
* @author AIOTAGRO
*/
@RequiredArgsConstructor
public class JmOnlDragExternalServiceImpl implements IOnlDragExternalService {

View File

@@ -1,24 +1,24 @@
package cn.aagro.pp.module.report.framework.jmreport.core.service;
package cn.aagro.ag.module.report.framework.jmreport.core.service;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.aagro.pp.framework.common.biz.system.permission.PermissionCommonApi;
import cn.aagro.pp.framework.common.exception.ServiceException;
import cn.aagro.pp.framework.common.util.servlet.ServletUtils;
import cn.aagro.pp.framework.security.config.SecurityProperties;
import cn.aagro.pp.framework.security.core.LoginUser;
import cn.aagro.pp.framework.security.core.util.SecurityFrameworkUtils;
import cn.aagro.pp.framework.tenant.core.context.TenantContextHolder;
import cn.aagro.pp.framework.web.core.util.WebFrameworkUtils;
import cn.aagro.pp.framework.common.biz.system.oauth2.OAuth2TokenCommonApi;
import cn.aagro.pp.framework.common.biz.system.oauth2.dto.OAuth2AccessTokenCheckRespDTO;
import cn.aagro.pp.module.system.api.permission.PermissionApi;
import cn.aagro.pp.module.system.enums.permission.RoleCodeEnum;
import cn.aagro.ag.framework.common.biz.system.permission.PermissionCommonApi;
import cn.aagro.ag.framework.common.exception.ServiceException;
import cn.aagro.ag.framework.common.util.servlet.ServletUtils;
import cn.aagro.ag.framework.security.config.SecurityProperties;
import cn.aagro.ag.framework.security.core.LoginUser;
import cn.aagro.ag.framework.security.core.util.SecurityFrameworkUtils;
import cn.aagro.ag.framework.tenant.core.context.TenantContextHolder;
import cn.aagro.ag.framework.web.core.util.WebFrameworkUtils;
import cn.aagro.ag.framework.common.biz.system.oauth2.OAuth2TokenCommonApi;
import cn.aagro.ag.framework.common.biz.system.oauth2.dto.OAuth2AccessTokenCheckRespDTO;
import cn.aagro.ag.module.system.api.permission.PermissionApi;
import cn.aagro.ag.module.system.enums.permission.RoleCodeEnum;
import lombok.RequiredArgsConstructor;
import org.jeecg.modules.jmreport.api.JmReportTokenServiceI;
import org.springframework.http.HttpHeaders;
import javax.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequest;
import java.util.Objects;
/**

View File

@@ -0,0 +1,4 @@
/**
* 占位,后续会基于 Filter 实现积木报表的认证等功能,替代 {@link cn.aagro.ag.module.report.framework.jmreport.core.service.JmReportTokenServiceImpl}
*/
package cn.aagro.ag.module.report.framework.jmreport.core.web;

View File

@@ -0,0 +1,6 @@
/**
* 属于 report 模块的 framework 封装
*
* @author AIOTAGRO
*/
package cn.aagro.ag.module.report.framework;

View File

@@ -1,6 +1,6 @@
package cn.aagro.pp.module.report.framework.security.config;
package cn.aagro.ag.module.report.framework.security.config;
import cn.aagro.pp.framework.security.config.AuthorizeRequestsCustomizer;
import cn.aagro.ag.framework.security.config.AuthorizeRequestsCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;

View File

@@ -0,0 +1,4 @@
/**
* 占位
*/
package cn.aagro.ag.module.report.framework.security.core;

View File

@@ -6,4 +6,4 @@
* 1. Controller URL /report/ 开头避免和其它 Module 冲突
* 2. DataObject 表名 report_ 开头方便在数据库中区分
*/
package cn.aagro.pp.module.report;
package cn.aagro.ag.module.report;

View File

@@ -0,0 +1,4 @@
/**
* TODO 芋艿:占位,待删除
*/
package cn.aagro.ag.module.report.service.ajreport;

View File

@@ -1,11 +1,11 @@
package cn.aagro.pp.module.report.service.goview;
package cn.aagro.ag.module.report.service.goview;
import cn.aagro.pp.module.report.controller.admin.goview.vo.data.GoViewDataRespVO;
import cn.aagro.ag.module.report.controller.admin.goview.vo.data.GoViewDataRespVO;
/**
* GoView 数据 Service 接口
*
* @author 芋道源码
* @author AIOTAGRO
*/
public interface GoViewDataService {

View File

@@ -1,6 +1,6 @@
package cn.aagro.pp.module.report.service.goview;
package cn.aagro.ag.module.report.service.goview;
import cn.aagro.pp.module.report.controller.admin.goview.vo.data.GoViewDataRespVO;
import cn.aagro.ag.module.report.controller.admin.goview.vo.data.GoViewDataRespVO;
import com.google.common.collect.Maps;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.support.rowset.SqlRowSet;
@@ -8,7 +8,7 @@ import org.springframework.jdbc.support.rowset.SqlRowSetMetaData;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
import jakarta.annotation.Resource;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Map;
@@ -20,7 +20,7 @@ import java.util.Map;
* 1. 目前默认使用 jdbcTemplate 查询项目配置的数据源如果你想查询其它数据源可以新建对应数据源的 jdbcTemplate 来实现
* 2. 默认数据源是 MySQL 关系数据源可能数据量比较大的情况下会比较慢可以考虑后续使用 Click House 等等
*
* @author 芋道源码
* @author AIOTAGRO
*/
@Service
@Validated

View File

@@ -1,17 +1,17 @@
package cn.aagro.pp.module.report.service.goview;
package cn.aagro.ag.module.report.service.goview;
import cn.aagro.pp.framework.common.pojo.PageParam;
import cn.aagro.pp.framework.common.pojo.PageResult;
import cn.aagro.pp.module.report.controller.admin.goview.vo.project.GoViewProjectCreateReqVO;
import cn.aagro.pp.module.report.controller.admin.goview.vo.project.GoViewProjectUpdateReqVO;
import cn.aagro.pp.module.report.dal.dataobject.goview.GoViewProjectDO;
import cn.aagro.ag.framework.common.pojo.PageParam;
import cn.aagro.ag.framework.common.pojo.PageResult;
import cn.aagro.ag.module.report.controller.admin.goview.vo.project.GoViewProjectCreateReqVO;
import cn.aagro.ag.module.report.controller.admin.goview.vo.project.GoViewProjectUpdateReqVO;
import cn.aagro.ag.module.report.dal.dataobject.goview.GoViewProjectDO;
import javax.validation.Valid;
import jakarta.validation.Valid;
/**
* GoView 项目 Service 接口
*
* @author 芋道源码
* @author AIOTAGRO
*/
public interface GoViewProjectService {

View File

@@ -1,25 +1,25 @@
package cn.aagro.pp.module.report.service.goview;
package cn.aagro.ag.module.report.service.goview;
import cn.aagro.pp.framework.common.enums.CommonStatusEnum;
import cn.aagro.pp.framework.common.pojo.PageParam;
import cn.aagro.pp.framework.common.pojo.PageResult;
import cn.aagro.pp.module.report.controller.admin.goview.vo.project.GoViewProjectCreateReqVO;
import cn.aagro.pp.module.report.controller.admin.goview.vo.project.GoViewProjectUpdateReqVO;
import cn.aagro.pp.module.report.convert.goview.GoViewProjectConvert;
import cn.aagro.pp.module.report.dal.dataobject.goview.GoViewProjectDO;
import cn.aagro.pp.module.report.dal.mysql.goview.GoViewProjectMapper;
import cn.aagro.ag.framework.common.enums.CommonStatusEnum;
import cn.aagro.ag.framework.common.pojo.PageParam;
import cn.aagro.ag.framework.common.pojo.PageResult;
import cn.aagro.ag.module.report.controller.admin.goview.vo.project.GoViewProjectCreateReqVO;
import cn.aagro.ag.module.report.controller.admin.goview.vo.project.GoViewProjectUpdateReqVO;
import cn.aagro.ag.module.report.convert.goview.GoViewProjectConvert;
import cn.aagro.ag.module.report.dal.dataobject.goview.GoViewProjectDO;
import cn.aagro.ag.module.report.dal.mysql.goview.GoViewProjectMapper;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
import jakarta.annotation.Resource;
import static cn.aagro.pp.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.aagro.pp.module.report.enums.ErrorCodeConstants.GO_VIEW_PROJECT_NOT_EXISTS;
import static cn.aagro.ag.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.aagro.ag.module.report.enums.ErrorCodeConstants.GO_VIEW_PROJECT_NOT_EXISTS;
/**
* GoView 项目 Service 实现类
*
* @author 芋道源码
* @author AIOTAGRO
*/
@Service
@Validated

View File

@@ -1 +0,0 @@
package cn.aagro.pp.module.report.controller.admin.ajreport;

View File

@@ -1,4 +0,0 @@
/**
* TODO 占位,后续删除
*/
package cn.aagro.pp.module.report.convert.ajreport;

View File

@@ -1,4 +0,0 @@
/**
* TODO 芋艿:占位,待删除
*/
package cn.aagro.pp.module.report.dal.dataobject.ajreport;

View File

@@ -1,4 +0,0 @@
/**
* TODO 芋艿:占位,待删除
*/
package cn.aagro.pp.module.report.dal.mysql.ajreport;

View File

@@ -1,4 +0,0 @@
/**
* 占位,后续会基于 Filter 实现积木报表的认证等功能,替代 {@link cn.aagro.pp.module.report.framework.jmreport.core.service.JmReportTokenServiceImpl}
*/
package cn.aagro.pp.module.report.framework.jmreport.core.web;

View File

@@ -1,6 +0,0 @@
/**
* 属于 report 模块的 framework 封装
*
* @author 芋道源码
*/
package cn.aagro.pp.module.report.framework;

View File

@@ -1,4 +0,0 @@
/**
* 占位
*/
package cn.aagro.pp.module.report.framework.security.core;

View File

@@ -1,4 +0,0 @@
/**
* TODO 芋艿:占位,待删除
*/
package cn.aagro.pp.module.report.service.ajreport;

View File

@@ -1,7 +1,7 @@
package cn.aagro.pp.module.report.service.goview;
package cn.aagro.ag.module.report.service.goview;
import cn.aagro.pp.framework.test.core.ut.BaseDbUnitTest;
import cn.aagro.pp.module.report.controller.admin.goview.vo.data.GoViewDataRespVO;
import cn.aagro.ag.framework.test.core.ut.BaseDbUnitTest;
import cn.aagro.ag.module.report.controller.admin.goview.vo.data.GoViewDataRespVO;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.context.annotation.Import;
@@ -9,7 +9,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.support.rowset.SqlRowSet;
import org.springframework.jdbc.support.rowset.SqlRowSetMetaData;
import javax.annotation.Resource;
import jakarta.annotation.Resource;
import java.util.Arrays;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -40,7 +40,7 @@ public class GoViewDataServiceImplTest extends BaseDbUnitTest {
// mock 数据明细
when(sqlRowSet.next()).thenReturn(true).thenReturn(true).thenReturn(false);
when(sqlRowSet.getObject("id")).thenReturn(1L).thenReturn(2L);
when(sqlRowSet.getObject("name")).thenReturn("芋道源码").thenReturn("芋道");
when(sqlRowSet.getObject("name")).thenReturn("AIOTAGRO").thenReturn("AIOTAGRO");
// 调用
GoViewDataRespVO dataBySQL = goViewDataService.getDataBySQL(sql);
@@ -49,10 +49,10 @@ public class GoViewDataServiceImplTest extends BaseDbUnitTest {
assertEquals(2, dataBySQL.getDimensions().size());
assertEquals(2, dataBySQL.getSource().get(0).size());
assertEquals(1L, dataBySQL.getSource().get(0).get("id"));
assertEquals("芋道源码", dataBySQL.getSource().get(0).get("name"));
assertEquals("AIOTAGRO", dataBySQL.getSource().get(0).get("name"));
assertEquals(2, dataBySQL.getSource().get(1).size());
assertEquals(2L, dataBySQL.getSource().get(1).get("id"));
assertEquals("芋道", dataBySQL.getSource().get(1).get("name"));
assertEquals("AIOTAGRO", dataBySQL.getSource().get(1).get("name"));
}
}

View File

@@ -1,28 +1,28 @@
package cn.aagro.pp.module.report.service.goview;
package cn.aagro.ag.module.report.service.goview;
import cn.aagro.pp.framework.common.pojo.PageParam;
import cn.aagro.pp.framework.common.pojo.PageResult;
import cn.aagro.pp.framework.test.core.ut.BaseDbUnitTest;
import cn.aagro.pp.module.report.controller.admin.goview.vo.project.GoViewProjectCreateReqVO;
import cn.aagro.pp.module.report.controller.admin.goview.vo.project.GoViewProjectUpdateReqVO;
import cn.aagro.pp.module.report.dal.dataobject.goview.GoViewProjectDO;
import cn.aagro.pp.module.report.dal.mysql.goview.GoViewProjectMapper;
import cn.aagro.ag.framework.common.pojo.PageParam;
import cn.aagro.ag.framework.common.pojo.PageResult;
import cn.aagro.ag.framework.test.core.ut.BaseDbUnitTest;
import cn.aagro.ag.module.report.controller.admin.goview.vo.project.GoViewProjectCreateReqVO;
import cn.aagro.ag.module.report.controller.admin.goview.vo.project.GoViewProjectUpdateReqVO;
import cn.aagro.ag.module.report.dal.dataobject.goview.GoViewProjectDO;
import cn.aagro.ag.module.report.dal.mysql.goview.GoViewProjectMapper;
import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.Import;
import javax.annotation.Resource;
import jakarta.annotation.Resource;
import static cn.aagro.pp.framework.common.util.object.ObjectUtils.cloneIgnoreId;
import static cn.aagro.pp.framework.test.core.util.AssertUtils.assertPojoEquals;
import static cn.aagro.pp.framework.test.core.util.AssertUtils.assertServiceException;
import static cn.aagro.pp.framework.test.core.util.RandomUtils.*;
import static cn.aagro.pp.module.report.enums.ErrorCodeConstants.GO_VIEW_PROJECT_NOT_EXISTS;
import static cn.aagro.ag.framework.common.util.object.ObjectUtils.cloneIgnoreId;
import static cn.aagro.ag.framework.test.core.util.AssertUtils.assertPojoEquals;
import static cn.aagro.ag.framework.test.core.util.AssertUtils.assertServiceException;
import static cn.aagro.ag.framework.test.core.util.RandomUtils.*;
import static cn.aagro.ag.module.report.enums.ErrorCodeConstants.GO_VIEW_PROJECT_NOT_EXISTS;
import static org.junit.jupiter.api.Assertions.*;
/**
* {@link GoViewProjectServiceImpl} 的单元测试类
*
* @author 芋道源码
* @author AIOTAGRO
*/
@Import(GoViewProjectServiceImpl.class)
public class GoViewProjectServiceImplTest extends BaseDbUnitTest {

View File

@@ -39,9 +39,9 @@ mybatis:
--- #################### 监控相关配置 ####################
--- #################### 芋道相关配置 ####################
--- #################### AIOTAGRO相关配置 ####################
# 芋道配置项,设置当前项目所有自定义的配置
# AIOTAGRO配置项,设置当前项目所有自定义的配置
aagro:
info:
base-package: cn.aagro.pp.module
base-package: cn.aagro.ag.module