From 2185035076aa14d98225b009c2035778c34e7ce7 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期四, 26 九月 2024 18:51:55 +0800 Subject: [PATCH] 指标管理 --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/item/service/impl/IndItemServiceImpl.java | 1 iailab-module-data/iailab-module-data-biz/src/main/resources/application.yml | 2 + iailab-module-data/iailab-module-data-biz/db/mysql/tenant.sql | 2 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/ItemTypeEnum.java | 2 + iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java | 2 - iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/IndTimeRangeEnum.java | 42 +++++++++++++++++++++ iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/IndTimeRangeConst.java | 60 ++++++++++++++++++++++++++++++ 7 files changed, 107 insertions(+), 4 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/db/mysql/tenant.sql b/iailab-module-data/iailab-module-data-biz/db/mysql/tenant.sql index 660929d..9a3d454 100644 --- a/iailab-module-data/iailab-module-data-biz/db/mysql/tenant.sql +++ b/iailab-module-data/iailab-module-data-biz/db/mysql/tenant.sql @@ -283,7 +283,7 @@ `item_no` VARCHAR(36) COMMENT '指标编码' , `item_name` VARCHAR(36) COMMENT '指标名称' , `item_type` VARCHAR(20) COMMENT '指标类型' , - `item_category` VARCHAR(20) COMMENT '指标分类' , + `item_category` VARCHAR(36) COMMENT '指标分类' , `coefficient` decimal(10, 4) COMMENT '转换系数', `precision` int COMMENT '指标精度', `time_granularity` VARCHAR(10) COMMENT '时间粒度' , diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/IndTimeRangeConst.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/IndTimeRangeConst.java new file mode 100644 index 0000000..77929c7 --- /dev/null +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/IndTimeRangeConst.java @@ -0,0 +1,60 @@ +package com.iailab.module.data.common.enums; + +/** + * @author PanZhibao + * @Description + * @createTime 2024年05月27日 + */ +public interface IndTimeRangeConst { + + /** + * 自定义 + */ + String CUSTOM = "CUSTOM"; + + /** + * 今天 + */ + String TODAY = "TODAY"; + + /** + * 昨天 + */ + String YESTERDAY = "YESTERDAY"; + + /** + * 最近7天 + */ + String LAST_DAY_7 = "LAST_DAY_7"; + + /** + * 最近30天 + */ + String LAST_DAY_30 = "LAST_DAY_30"; + + /** + * 当前月 + */ + String THIS_MONTH = "THIS_MONTH"; + + /** + * 最近12个月 + */ + String LAST_MONTH_12 = "LAST_MONTH_12"; + + /** + * 当年月份 + */ + String THIS_YEAR_MONTH = "THIS_YEAR_MONTH"; + + /** + * 去年 + */ + String LAST_YEAR = "LAST_YEAR"; + + /** + * 今年 + */ + String THIS_YEAR = "THIS_YEAR"; + +} \ No newline at end of file diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/IndTimeRangeEnum.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/IndTimeRangeEnum.java new file mode 100644 index 0000000..004bb39 --- /dev/null +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/IndTimeRangeEnum.java @@ -0,0 +1,42 @@ +package com.iailab.module.data.common.enums; + +/** + * @author PanZhibao + * @Description + * @createTime 2024年05月25日 + */ +public enum IndTimeRangeEnum { + + LAST_YEAR("LAST_YEAR", "LAST_YEAR"), + THIS_YEAR("THIS_YEAR", "THIS_YEAR"), + LAST_MONTH_12("LAST_MONTH_12", "LAST_MONTH_12"), + YESTERDAY("YESTERDAY", "YESTERDAY"), + TODAY("TODAY", "TODAY"), + LAST_DAY_7("LAST_DAY_7", "LAST_DAY_7"), + LAST_DAY_30("LAST_DAY_30", "LAST_DAY_30"); + + private String code; + + private String name; + + IndTimeRangeEnum(String code, String name) { + this.code = code; + this.name = name; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} \ No newline at end of file diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/ItemTypeEnum.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/ItemTypeEnum.java index 5622549..e90d204 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/ItemTypeEnum.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/ItemTypeEnum.java @@ -4,6 +4,8 @@ import lombok.Getter; /** + * 指标类型 + * * @author PanZhibao * @Description * @createTime 2023年05月03日 19:10:00 diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/item/service/impl/IndItemServiceImpl.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/item/service/impl/IndItemServiceImpl.java index 241c47c..e0c6981 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/item/service/impl/IndItemServiceImpl.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/item/service/impl/IndItemServiceImpl.java @@ -50,7 +50,6 @@ } @Override - @Transactional(rollbackFor = Exception.class) @DSTransactional(rollbackFor= Exception.class) public void create(IndItemSaveReqVO createReqVO) { IndItemEntity entity = BeanUtils.toBean(createReqVO, IndItemEntity.class); diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java index 83af85f..4f74aa8 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java @@ -74,8 +74,6 @@ @Override public List<DaPointDTO> list(Map<String, Object> params) { - Object page = params.get("page"); - Object limit = params.get("limit"); Object pointType = params.get("pointType"); List<String> pointNos = new ArrayList<>(); if (params.get("pointNos") != null) { diff --git a/iailab-module-data/iailab-module-data-biz/src/main/resources/application.yml b/iailab-module-data/iailab-module-data-biz/src/main/resources/application.yml index 5cc98b8..44bf6e2 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/resources/application.yml +++ b/iailab-module-data/iailab-module-data-biz/src/main/resources/application.yml @@ -198,6 +198,8 @@ - t_ind_item_category - t_ind_item - t_ind_item_atom + - t_ind_item_der + - t_ind_item_cal app: app-key: data app-secret: 85b0df7edc3df3611913df34ed695011 -- Gitblit v1.9.3