| | |
| | | `item_name` VARCHAR(36) COMMENT '指标名称' , |
| | | `item_type` VARCHAR(20) COMMENT '指标类型' , |
| | | `item_category` VARCHAR(20) COMMENT '指标分类' , |
| | | `coefficient` decimal(10, 4) COMMENT '系数', |
| | | `coefficient` decimal(10, 4) COMMENT '转换系数', |
| | | `precision` int COMMENT '指标精度', |
| | | `time_granularity` VARCHAR(10) COMMENT '时间粒度' , |
| | | `unit` VARCHAR(10) COMMENT '数量单位' , |
| | | `remark` VARCHAR(255) COMMENT '备注' , |
| | | `status` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0正常 1停用)', |
| | | `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建者', |
| | |
| | | `expression` varchar(100) DEFAULT NULL COMMENT '计算表达式', |
| | | PRIMARY KEY (id) USING BTREE, |
| | | UNIQUE KEY `uk_item_id` (`item_id`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '计算指标'; |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '复合指标'; |
| | | |
| | | |
| | | CREATE TABLE `t_ind_item_value` ( |
| | | `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'id', |
| | | `item_no` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '指标编码', |
| | | `data_time` varchar(36) DEFAULT NULL COMMENT '数据时间', |
| | | `data_time` varchar(20) DEFAULT NULL COMMENT '数据时间', |
| | | `data_value` decimal(24,6) DEFAULT NULL COMMENT '数据值', |
| | | PRIMARY KEY (`id`) USING BTREE, |
| | | KEY `idx_item_no` (`item_no`) USING BTREE, |
| | |
| | | package com.iailab.module.data.ind.category.vo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月10日 |
| | | */ |
| | | @Schema(description = "数据平台 - 指标分类 Response VO") |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class IndItemCategoryRespVO { |
| | | |
| | | @Schema(description = "指标分类ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("指标分类ID") |
| | | private String id; |
| | | |
| | | @Schema(description = "标签", example = "") |
| | | private String label; |
| | | |
| | | @Schema(description = "父ID", example = "") |
| | | private String pid; |
| | | |
| | | @Schema(description = "排序", example = "") |
| | | private Integer sort; |
| | | |
| | | @Schema(description = "创建者", example = "") |
| | | private String creator; |
| | | |
| | | @Schema(description = "创建时间", example = "") |
| | | private Date createTime; |
| | | |
| | | @Schema(description = "更新者", example = "") |
| | | private String updater; |
| | | |
| | | @Schema(description = "更新时间", example = "") |
| | | private Date updateTime; |
| | | } |
| | |
| | | private IndDataSetService indDataSetService; |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获取指标分类列表", description = "用于【指标分类】界面") |
| | | @Operation(summary = "获取指标数据集列表", description = "用于【指标数据集】界面") |
| | | @PreAuthorize("@ss.hasPermission('data:ind-data-set:query')") |
| | | public CommonResult<PageResult<IndDataSetRespVO>> page(IndDataSetPageReqVO reqVO) { |
| | | PageResult<IndDataSetEntity> page = indDataSetService.page(reqVO); |
| | |
| | | } |
| | | |
| | | @PostMapping("/create") |
| | | @Operation(summary = "创建指标分类") |
| | | @Operation(summary = "创建指标数据集") |
| | | @PreAuthorize("@ss.hasPermission('data:ind-data-set:create')") |
| | | public CommonResult<Boolean> create(@Valid @RequestBody IndDataSetSaveReqVO createReqVO) { |
| | | indDataSetService.create(createReqVO); |
| | |
| | | } |
| | | |
| | | @PutMapping("/update") |
| | | @Operation(summary = "修改指标分类") |
| | | @Operation(summary = "修改指标数据集") |
| | | @PreAuthorize("@ss.hasPermission('data:ind-data-set:update')") |
| | | public CommonResult<Boolean> update(@Valid @RequestBody IndDataSetSaveReqVO updateReqVO) { |
| | | indDataSetService.update(updateReqVO); |
| | |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "删除指标分类") |
| | | @Parameter(name = "id", description = "指标分类编号", required= true, example = "1024") |
| | | @Operation(summary = "删除指标数据集") |
| | | @Parameter(name = "id", description = "指标数据集编号", required= true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('data:ind-data-set:delete')") |
| | | public CommonResult<Boolean> delete(@RequestParam("id") String id) { |
| | | indDataSetService.delete(id); |
| | |
| | | } |
| | | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获取指标分类信息") |
| | | @Operation(summary = "获取指标数据集信息") |
| | | @PreAuthorize("@ss.hasPermission('system:ind-data-set:query')") |
| | | public CommonResult<IndDataSetRespVO> get(String id) { |
| | | IndDataSetEntity entity = indDataSetService.get(id); |
| | |
| | | private IndDataSetFieldService indDataSetFieldService; |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获取指标分类列表", description = "用于【指标分类】界面") |
| | | @Operation(summary = "获取指标数据集字段列表", description = "用于【指标数据集字段】界面") |
| | | @PreAuthorize("@ss.hasPermission('data:ind-data-set:query')") |
| | | public CommonResult<PageResult<IndDataSetRespVO>> page(IndDataSetFieldPageReqVO reqVO) { |
| | | PageResult<IndDataSetFieldEntity> page = indDataSetFieldService.page(reqVO); |
| | |
| | | } |
| | | |
| | | @PostMapping("/create") |
| | | @Operation(summary = "创建指标分类") |
| | | @Operation(summary = "创建指标数据集字段") |
| | | @PreAuthorize("@ss.hasPermission('data:ind-data-set:create')") |
| | | public CommonResult<Boolean> create(@Valid @RequestBody IndDataSetFieldSaveReqVO createReqVO) { |
| | | indDataSetFieldService.create(createReqVO); |
| | |
| | | } |
| | | |
| | | @PutMapping("/update") |
| | | @Operation(summary = "修改指标分类") |
| | | @Operation(summary = "修改指标数据集字段") |
| | | @PreAuthorize("@ss.hasPermission('data:ind-data-set:update')") |
| | | public CommonResult<Boolean> update(@Valid @RequestBody IndDataSetFieldSaveReqVO updateReqVO) { |
| | | indDataSetFieldService.update(updateReqVO); |
| | |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "删除指标分类") |
| | | @Parameter(name = "id", description = "指标分类编号", required= true, example = "1024") |
| | | @Operation(summary = "删除指标数据集字段") |
| | | @Parameter(name = "id", description = "指标数据集字段编号", required= true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('data:ind-data-set:delete')") |
| | | public CommonResult<Boolean> delete(@RequestParam("id") String id) { |
| | | indDataSetFieldService.delete(id); |
| | |
| | | } |
| | | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获取指标分类信息") |
| | | @Operation(summary = "获取指标数据集字段信息") |
| | | @PreAuthorize("@ss.hasPermission('system:ind-data-set:query')") |
| | | public CommonResult<IndDataSetRespVO> get(String id) { |
| | | IndDataSetFieldEntity entity = indDataSetFieldService.get(id); |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @Schema(description = "主键") |
| | | @TableId(value = "id",type = IdType.INPUT) |
| | | private String id; |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @Schema(description = "主键") |
| | | @TableId(value = "id",type = IdType.INPUT) |
| | | private String id; |
| | | |
| | |
| | | import com.iailab.framework.common.util.object.BeanUtils; |
| | | import com.iailab.module.data.ind.data.dao.IndDataSetFieldDao; |
| | | import com.iailab.module.data.ind.data.entity.IndDataSetFieldEntity; |
| | | import com.iailab.module.data.ind.data.entity.IndDataSetFieldEntity; |
| | | import com.iailab.module.data.ind.data.service.IndDataSetFieldService; |
| | | import com.iailab.module.data.ind.data.vo.IndDataSetFieldPageReqVO; |
| | | import com.iailab.module.data.ind.data.vo.IndDataSetFieldSaveReqVO; |
| | | import com.iailab.module.data.ind.data.vo.IndDataSetPageReqVO; |
| | | import com.iailab.module.data.ind.data.vo.IndDataSetSaveReqVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | |
| | | package com.iailab.module.data.ind.data.vo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月10日 |
| | | */ |
| | | @Schema(description = "数据平台 - 指标数据集字段 Response VO") |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class IndDataSetFieldRespVO { |
| | | |
| | | @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("ID") |
| | | private String id; |
| | | |
| | | @Schema(description = "数据集ID", example = "") |
| | | private String dataSetId; |
| | | |
| | | @Schema(description = "英文名", example = "") |
| | | private String fieldCode; |
| | | |
| | | @Schema(description = "中文名", example = "") |
| | | private String fieldName; |
| | | |
| | | @Schema(description = "数据类型", example = "") |
| | | private String fieldType; |
| | | |
| | | @Schema(description = "排序", example = "") |
| | | private Integer sort; |
| | | } |
| | |
| | | package com.iailab.module.data.ind.data.vo; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月10日 |
| | | */ |
| | | @Schema(description = "数据平台 - 数据集字段创建/修改 Request VO") |
| | | @Data |
| | | public class IndDataSetFieldSaveReqVO { |
| | | |
| | | @Schema(description = "ID") |
| | | private String id; |
| | | |
| | | @Schema(description = "数据集ID", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "数据集ID不能为空") |
| | | private String dataSetId; |
| | | |
| | | @Schema(description = "英文名ID", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "英文名不能为空") |
| | | private String fieldCode; |
| | | |
| | | @Schema(description = "中文名", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "中文名不能为空") |
| | | private String fieldName; |
| | | |
| | | @Schema(description = "数据类型", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "数据类型不能为空") |
| | | private String fieldType; |
| | | |
| | | @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "排序不能为空") |
| | | private Integer sort; |
| | | |
| | | } |
| | |
| | | package com.iailab.module.data.ind.data.vo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月10日 |
| | | */ |
| | | @Schema(description = "数据平台 - 指标数据集 Response VO") |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class IndDataSetRespVO { |
| | | |
| | | @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("ID") |
| | | private String id; |
| | | |
| | | @Schema(description = "名称", example = "") |
| | | private String name; |
| | | |
| | | @Schema(description = "数据源", example = "") |
| | | private String dataSource; |
| | | |
| | | @Schema(description = "查询语句", example = "") |
| | | private String querySql; |
| | | |
| | | @Schema(description = "备注", example = "") |
| | | private String remark; |
| | | |
| | | @Schema(description = "排序", example = "") |
| | | private Integer sort; |
| | | |
| | | @Schema(description = "创建者", example = "") |
| | | private String creator; |
| | | |
| | | @Schema(description = "创建时间", example = "") |
| | | private Date createTime; |
| | | |
| | | @Schema(description = "更新者", example = "") |
| | | private String updater; |
| | | |
| | | @Schema(description = "更新时间", example = "") |
| | | private Date updateTime; |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.controller; |
| | | |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | @Tag(name = "数据平台 - 指标定义") |
| | | @RestController |
| | | @RequestMapping("/data/ind-item") |
| | | @Validated |
| | | public class IndItemController { |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.dao; |
| | | |
| | | import com.iailab.framework.mybatis.core.mapper.BaseMapperX; |
| | | import com.iailab.framework.tenant.core.db.dynamic.TenantDS; |
| | | import com.iailab.module.data.ind.item.entity.IndItemAtomEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | @TenantDS |
| | | @Mapper |
| | | public interface IndItemAtomDao extends BaseMapperX<IndItemAtomEntity> { |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.dao; |
| | | |
| | | import com.iailab.framework.mybatis.core.mapper.BaseMapperX; |
| | | import com.iailab.framework.tenant.core.db.dynamic.TenantDS; |
| | | import com.iailab.module.data.ind.item.entity.IndItemCalEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | @TenantDS |
| | | @Mapper |
| | | public interface IndItemCalDao extends BaseMapperX<IndItemCalEntity> { |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.dao; |
| | | |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.framework.mybatis.core.mapper.BaseMapperX; |
| | | import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX; |
| | | import com.iailab.framework.tenant.core.db.dynamic.TenantDS; |
| | | import com.iailab.module.data.ind.item.entity.IndItemEntity; |
| | | import com.iailab.module.data.ind.item.vo.IndItemPageReqVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | @TenantDS |
| | | @Mapper |
| | | public interface IndItemDao extends BaseMapperX<IndItemEntity> { |
| | | |
| | | default PageResult<IndItemEntity> selectPage(IndItemPageReqVO reqVO) { |
| | | return selectPage(reqVO, new LambdaQueryWrapperX<IndItemEntity>() |
| | | .likeIfPresent(IndItemEntity::getItemNo, reqVO.getItemNo()) |
| | | .likeIfPresent(IndItemEntity::getItemName, reqVO.getItemName()) |
| | | .eq(IndItemEntity::getItemType, reqVO.getItemType()) |
| | | .eq(IndItemEntity::getItemCategory, reqVO.getItemCategory()) |
| | | .orderByDesc(IndItemEntity::getCreateTime)); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.dao; |
| | | |
| | | import com.iailab.framework.mybatis.core.mapper.BaseMapperX; |
| | | import com.iailab.framework.tenant.core.db.dynamic.TenantDS; |
| | | import com.iailab.module.data.ind.item.entity.IndItemDerEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | @TenantDS |
| | | @Mapper |
| | | public interface IndItemDerDao extends BaseMapperX<IndItemDerEntity> { |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 原子指标 |
| | | * |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | @Data |
| | | @TableName("t_ind_item_atom") |
| | | public class IndItemAtomEntity implements Serializable { |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id",type = IdType.INPUT) |
| | | private String id; |
| | | |
| | | /** |
| | | * 指标ID |
| | | */ |
| | | private String itemId; |
| | | |
| | | /** |
| | | * 数据源 |
| | | */ |
| | | private String dataSource; |
| | | |
| | | /** |
| | | * 数据集 |
| | | */ |
| | | private String dataSet; |
| | | |
| | | /** |
| | | * 使用字段 |
| | | */ |
| | | private String usingField; |
| | | |
| | | /** |
| | | * 统计方式 |
| | | */ |
| | | private String statFunc; |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 复合指标 |
| | | * |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | @Data |
| | | @TableName("t_ind_item_cal") |
| | | public class IndItemCalEntity implements Serializable { |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id",type = IdType.INPUT) |
| | | private String id; |
| | | |
| | | /** |
| | | * 指标ID |
| | | */ |
| | | private String itemId; |
| | | |
| | | /** |
| | | * 计算表达式 |
| | | */ |
| | | private String expression; |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 派生指标 |
| | | * |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | @Data |
| | | @TableName("t_ind_item_der") |
| | | public class IndItemDerEntity implements Serializable { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id",type = IdType.INPUT) |
| | | private String id; |
| | | |
| | | /** |
| | | * 指标ID |
| | | */ |
| | | private String itemId; |
| | | |
| | | /** |
| | | * 原子指标ID |
| | | */ |
| | | private String atomItemId; |
| | | |
| | | /** |
| | | * 时间标识 |
| | | */ |
| | | private String timeLabel; |
| | | |
| | | /** |
| | | * 时间限定 |
| | | */ |
| | | private String timeLimit; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | private String timeStart; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | private String timeEnd; |
| | | |
| | | /** |
| | | * 分析维度 |
| | | */ |
| | | private String dimension; |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 指标项表 |
| | | * |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | @Data |
| | | @TableName("t_ind_item") |
| | | public class IndItemEntity implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id",type = IdType.INPUT) |
| | | private String id; |
| | | |
| | | /** |
| | | * 指标编码 |
| | | */ |
| | | private String itemNo; |
| | | |
| | | /** |
| | | * 指标名称 |
| | | */ |
| | | private String itemName; |
| | | |
| | | /** |
| | | * 指标类型 |
| | | */ |
| | | private String itemType; |
| | | |
| | | /** |
| | | * 指标分类 |
| | | */ |
| | | private String itemCategory; |
| | | |
| | | /** |
| | | * 转换系数 |
| | | */ |
| | | private Boolean coefficient; |
| | | |
| | | /** |
| | | * 指标精度 |
| | | */ |
| | | private Integer precision; |
| | | |
| | | /** |
| | | * 时间粒度 |
| | | */ |
| | | private String timeGranularity; |
| | | |
| | | /** |
| | | * 数量单位 |
| | | */ |
| | | private String unit; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | private String creator; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 更新者 |
| | | */ |
| | | private String updater; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updateTime; |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.service; |
| | | |
| | | import com.iailab.framework.common.service.BaseService; |
| | | import com.iailab.module.data.ind.item.entity.IndItemAtomEntity; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | public interface IndItemAtomService extends BaseService<IndItemAtomEntity> { |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.service; |
| | | |
| | | import com.iailab.framework.common.service.BaseService; |
| | | import com.iailab.module.data.ind.item.entity.IndItemCalEntity; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | public interface IndItemCalService extends BaseService<IndItemCalEntity> { |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.service; |
| | | |
| | | import com.iailab.framework.common.service.BaseService; |
| | | import com.iailab.module.data.ind.item.entity.IndItemDerEntity; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | public interface IndItemDerService extends BaseService<IndItemDerEntity> { |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.service; |
| | | |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.framework.common.service.BaseService; |
| | | import com.iailab.module.data.ind.item.entity.IndItemEntity; |
| | | import com.iailab.module.data.ind.item.vo.IndItemPageReqVO; |
| | | import com.iailab.module.data.ind.item.vo.IndItemSaveReqVO; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | public interface IndItemService extends BaseService<IndItemEntity> { |
| | | |
| | | PageResult<IndItemEntity> page(IndItemPageReqVO reqVO); |
| | | |
| | | void create(IndItemSaveReqVO reqVO); |
| | | |
| | | void update(IndItemSaveReqVO reqVO); |
| | | |
| | | IndItemEntity get(String id); |
| | | |
| | | void delete(String id); |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.service.impl; |
| | | |
| | | import com.iailab.framework.common.service.impl.BaseServiceImpl; |
| | | import com.iailab.module.data.ind.item.dao.IndItemAtomDao; |
| | | import com.iailab.module.data.ind.item.entity.IndItemAtomEntity; |
| | | import com.iailab.module.data.ind.item.service.IndItemAtomService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | @Service |
| | | public class IndItemAtomServiceImpl extends BaseServiceImpl<IndItemAtomDao, IndItemAtomEntity> implements IndItemAtomService { |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.service.impl; |
| | | |
| | | import com.iailab.framework.common.service.impl.BaseServiceImpl; |
| | | import com.iailab.module.data.ind.item.dao.IndItemCalDao; |
| | | import com.iailab.module.data.ind.item.entity.IndItemCalEntity; |
| | | import com.iailab.module.data.ind.item.service.IndItemCalService; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | public class IndItemCalServiceImpl extends BaseServiceImpl<IndItemCalDao, IndItemCalEntity> implements IndItemCalService { |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.service.impl; |
| | | |
| | | import com.iailab.framework.common.service.impl.BaseServiceImpl; |
| | | import com.iailab.module.data.ind.item.dao.IndItemDerDao; |
| | | import com.iailab.module.data.ind.item.entity.IndItemDerEntity; |
| | | import com.iailab.module.data.ind.item.service.IndItemDerService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | @Service |
| | | public class IndItemDerServiceImpl extends BaseServiceImpl<IndItemDerDao, IndItemDerEntity> implements IndItemDerService { |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.service.impl; |
| | | |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.framework.common.service.impl.BaseServiceImpl; |
| | | import com.iailab.framework.common.util.object.BeanUtils; |
| | | import com.iailab.module.data.ind.item.dao.IndItemDao; |
| | | import com.iailab.module.data.ind.item.entity.IndItemEntity; |
| | | import com.iailab.module.data.ind.item.service.IndItemService; |
| | | import com.iailab.module.data.ind.item.vo.IndItemPageReqVO; |
| | | import com.iailab.module.data.ind.item.vo.IndItemSaveReqVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | @Service |
| | | public class IndItemServiceImpl extends BaseServiceImpl<IndItemDao, IndItemEntity> implements IndItemService { |
| | | |
| | | @Override |
| | | public PageResult<IndItemEntity> page(IndItemPageReqVO reqVO) { |
| | | return baseDao.selectPage(reqVO); |
| | | } |
| | | |
| | | @Override |
| | | public void create(IndItemSaveReqVO createReqVO) { |
| | | IndItemEntity entity = BeanUtils.toBean(createReqVO, IndItemEntity.class); |
| | | entity.setId(UUID.randomUUID().toString()); |
| | | entity.setCreateTime(new Date()); |
| | | baseDao.insert(entity); |
| | | } |
| | | |
| | | @Override |
| | | public void update(IndItemSaveReqVO updateReqVO) { |
| | | IndItemEntity entity = BeanUtils.toBean(updateReqVO, IndItemEntity.class); |
| | | entity.setUpdateTime(new Date()); |
| | | baseDao.updateById(entity); |
| | | } |
| | | |
| | | @Override |
| | | public IndItemEntity get(String id) { |
| | | return baseDao.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(String id) { |
| | | baseDao.deleteById(id); |
| | | } |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.vo; |
| | | |
| | | import com.iailab.framework.common.pojo.PageParam; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.ToString; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | @Schema(description = "数据平台 - 指标项分页 Request VO") |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ToString(callSuper = true) |
| | | public class IndItemPageReqVO extends PageParam { |
| | | |
| | | @Schema(description = "指标编码", example = "") |
| | | private String itemNo; |
| | | |
| | | @Schema(description = "指标名称", example = "") |
| | | private String itemName; |
| | | |
| | | @Schema(description = "指标类型", example = "") |
| | | private String itemType; |
| | | |
| | | @Schema(description = "指标分类", example = "") |
| | | private String itemCategory; |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.vo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | @Schema(description = "数据平台 - 指标项 Response VO") |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class IndItemRespVO { |
| | | |
| | | @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("ID") |
| | | private String id; |
| | | |
| | | @Schema(description = "指标编码", example = "") |
| | | private String itemNo; |
| | | |
| | | @Schema(description = "指标名称", example = "") |
| | | private String itemName; |
| | | |
| | | @Schema(description = "指标类型", example = "") |
| | | private String itemType; |
| | | |
| | | @Schema(description = "指标分类", example = "") |
| | | private String itemCategory; |
| | | |
| | | @Schema(description = "转换系数", example = "") |
| | | private Boolean coefficient; |
| | | |
| | | @Schema(description = "指标精度", example = "") |
| | | private Integer precision; |
| | | |
| | | @Schema(description = "时间粒度", example = "") |
| | | private String timeGranularity; |
| | | |
| | | @Schema(description = "数量单位", example = "") |
| | | private String unit; |
| | | |
| | | @Schema(description = "备注", example = "") |
| | | private String remark; |
| | | |
| | | @Schema(description = "状态", example = "") |
| | | private Integer status; |
| | | |
| | | @Schema(description = "创建者", example = "") |
| | | private String creator; |
| | | |
| | | @Schema(description = "创建时间", example = "") |
| | | private Date createTime; |
| | | |
| | | @Schema(description = "更新者", example = "") |
| | | private String updater; |
| | | |
| | | @Schema(description = "更新时间", example = "") |
| | | private Date updateTime; |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.ind.item.vo; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年09月11日 |
| | | */ |
| | | @Schema(description = "数据平台 - 指标项创建/修改 Request VO") |
| | | @Data |
| | | public class IndItemSaveReqVO { |
| | | |
| | | @Schema(description = "ID") |
| | | private String id; |
| | | |
| | | /** |
| | | * 指标编码 |
| | | */ |
| | | @Schema(description = "名称") |
| | | private String itemNo; |
| | | |
| | | /** |
| | | * 指标名称 |
| | | */ |
| | | @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "名称不能为空") |
| | | private String itemName; |
| | | |
| | | /** |
| | | * 指标类型 |
| | | */ |
| | | @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "名称不能为空") |
| | | private String itemType; |
| | | |
| | | /** |
| | | * 指标分类 |
| | | */ |
| | | @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "名称不能为空") |
| | | private String itemCategory; |
| | | |
| | | /** |
| | | * 转换系数 |
| | | */ |
| | | @Schema(description = "名称") |
| | | private Boolean coefficient; |
| | | |
| | | /** |
| | | * 指标精度 |
| | | */ |
| | | @Schema(description = "名称") |
| | | private Integer precision; |
| | | |
| | | /** |
| | | * 时间粒度 |
| | | */ |
| | | @Schema(description = "名称") |
| | | private String timeGranularity; |
| | | |
| | | /** |
| | | * 数量单位 |
| | | */ |
| | | @Schema(description = "名称") |
| | | private String unit; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @Schema(description = "名称") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | @Schema(description = "名称") |
| | | private Integer status; |
| | | } |