diff --git a/Service/Ammeter/EmeterDayEnergyService.cs b/Service/Ammeter/EmeterDayEnergyService.cs index b6771af..b6c5577 100644 --- a/Service/Ammeter/EmeterDayEnergyService.cs +++ b/Service/Ammeter/EmeterDayEnergyService.cs @@ -38,7 +38,7 @@ namespace Service.Ammeter DateTime sevenDaysAgo = DateTime.Today.AddDays(-7); List result = this.BaseDal.Queryable() - .Where(e => e.Et >= sevenDaysAgo) + .Where(e => e.St >= sevenDaysAgo) .GroupBy(e => e.Code) .Select(e => new EmeterDayEnergy { diff --git a/WebStarter/Controllers/Ammeter/AmmeterController.cs b/WebStarter/Controllers/Ammeter/AmmeterController.cs index b84187a..84c8cbe 100644 --- a/WebStarter/Controllers/Ammeter/AmmeterController.cs +++ b/WebStarter/Controllers/Ammeter/AmmeterController.cs @@ -54,7 +54,7 @@ namespace WebStarter.Controllers.Ammeter /// /// 统计分析/电能表累计值信息 /// - [HttpGet("/TEgEmeterTotalEnergyValue/{Code}")] + [HttpGet("TEgEmeterTotalEnergyValue/{Code}")] public async Task>> GetNewEmeterMinutesEnergy(string Code) { var query = @" diff --git a/WebStarter/db/lxw0527.sql b/WebStarter/db/lxw0527.sql index b390f04..57bcc0c 100644 --- a/WebStarter/db/lxw0527.sql +++ b/WebStarter/db/lxw0527.sql @@ -26,3 +26,44 @@ CREATE TABLE `manual_operation_record` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- 修改电价模型表,字段类型 ALTER TABLE elec_price_model_version_detail MODIFY COLUMN price DOUBLE; +-- ---------------------------- +-- Table structure for equip_alarm_record设备报警记录 +-- ---------------------------- +DROP TABLE IF EXISTS `equip_alarm_record`; +CREATE TABLE `equip_alarm_record` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'id', + `equip_type_code` int NULL DEFAULT NULL COMMENT '设备类型编码', + `equip_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '设备编码', + `error_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '报警编码', + `error_level` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '报警等级', + `error_msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '报警描述', + `process_method` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '处理方法', + `created_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人', + `created_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updated_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新人', + `updated_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '设备报警记录' ROW_FORMAT = DYNAMIC; + +SET FOREIGN_KEY_CHECKS = 1; + +-- ---------------------------- +-- Table structure for equip_alarm_process_record设备报警处理记录 +-- ---------------------------- +DROP TABLE IF EXISTS `equip_alarm_process_record`; +CREATE TABLE `equip_alarm_process_record` ( + `id` int NOT NULL COMMENT 'id', + `equip_type_code` int NULL DEFAULT NULL COMMENT '设备类型编码', + `equip_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '设备编码', + `error_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '报警编码', + `error_level` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '报警等级', + `error_msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '报警描述', + `process_method` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '处理方法', + `process_time` datetime NULL DEFAULT NULL COMMENT '处理时间', + `created_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人', + `created_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updated_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新人', + `updated_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '设备报警处理记录' ROW_FORMAT = DYNAMIC; + +SET FOREIGN_KEY_CHECKS = 1; \ No newline at end of file