鞍钢鲅鱼圈能源管控系统后端代码
潘志宝
4 天以前 3997480e0195d39fef4abd0b4bb2a6bd1d80772a
t_power_maxdemand
已修改3个文件
17 ■■■■ 文件已修改
ansteel-biz/db/mysql.sql 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ansteel-biz/src/main/java/com/iailab/module/ansteel/job/task/RunPowerMaxdemandTask.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
doc/鞍钢数据接口文档_master.doc 补丁 | 查看 | 原始文档 | blame | 历史
ansteel-biz/db/mysql.sql
@@ -808,7 +808,7 @@
CREATE TABLE `t_power_maxdemand_main`
(
    `id`         varchar(36) NOT NULL COMMENT 'id',
    `occur_time` datetimeL COMMENT '发生时间',
    `occur_time` datetime COMMENT '发生时间',
    `code`       varchar(50) NULL DEFAULT NULL COMMENT '编号',
    `name`       varchar(50) NULL DEFAULT NULL COMMENT '名称',
    `max_demand` decimal(10, 2) NULL DEFAULT NULL COMMENT '最大需量',
ansteel-biz/src/main/java/com/iailab/module/ansteel/job/task/RunPowerMaxdemandTask.java
@@ -71,17 +71,18 @@
                return;
            }
            for (PowerDemandEntity demand : demandList) {
                // 查询今天的最大需量
                logger.info("查询今天的最大需量");
                ApiPointValueQueryDTO pointValueQuery0 = new ApiPointValueQueryDTO();
                pointValueQuery0.setStart(dayStart);
                pointValueQuery0.setEnd(nowTime);
                pointValueQuery0.setPointNo(demand.getCurDemand());
                Map<String, Object> maxValue = dataPointApi.queryPointMaxValue(pointValueQuery0);
                BigDecimal todayMax = BigDecimal.ZERO;
                if (CollectionUtils.isEmpty(maxValue) && maxValue.containsKey(demand.getCurDemand())) {
                    todayMax = new BigDecimal(maxValue.get(demand.getCurDemand()).toString());
                if (CollectionUtils.isEmpty(maxValue)) {
                    logger.info("maxValue is empty");
                    continue;
                }
                BigDecimal todayMax = new BigDecimal(maxValue.get(demand.getCurDemand()).toString());
                logger.info("todayMax=" + todayMax);
                List<ApiPointValueDTO> valueList = dataPointApi.queryPointHistoryValue(pointValueQuery0);
                if (CollectionUtils.isEmpty(valueList)) {
                    logger.info("valueList is empty");
@@ -95,7 +96,7 @@
                    }
                }
                // 查询本月需量发生记录
                logger.info("查询本月需量发生记录");
                BigDecimal monthMax = powerMaxdemandMainService.getMax(demand.getCode(), monStart, nowTime);
                // 保存记录
@@ -110,7 +111,7 @@
                String mainId = powerMaxdemandMainService.add(mainEntity);
                Map<String, Object> params1 = new HashMap<>();
                params1.put("pCode", demand.getCode());
                params1.put("groupName", demand.getName());
                List<PowerNetDropdownEntity> dropdownList = powerNetDropdownService.list(params1);
                if (CollectionUtils.isEmpty(dropdownList)) {
                    logger.info("dropdownList is empty");
doc/鞍钢数据接口文档_master.doc
Binary files differ