[BGService]明志沒有水錶先註解

This commit is contained in:
張家睿 2024-09-10 10:01:14 +08:00
parent ddccee9644
commit 9eb49eb2ae
2 changed files with 28 additions and 28 deletions

View File

@ -1592,25 +1592,25 @@ namespace BackendWorkerService.Quartz.Jobs
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime(6) NULL DEFAULT NULL,
PRIMARY KEY (`device_number`, `point`, `start_timestamp`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;
CREATE TABLE IF NOT EXISTS `archive_water_meter_day_{dbDateName}` (
`device_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`point` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`start_timestamp` datetime(6) NOT NULL,
`end_timestamp` datetime(6) NULL DEFAULT NULL,
`count_rawdata` int(11) NULL DEFAULT NULL,
`min_rawdata` decimal(15, 3) NULL DEFAULT NULL,
`max_rawdata` decimal(15, 3) NULL DEFAULT NULL,
`avg_rawdata` decimal(15, 3) NULL DEFAULT NULL,
`sum_rawdata` decimal(15, 3) NULL DEFAULT NULL,
`is_complete` tinyint(3) UNSIGNED NULL DEFAULT NULL COMMENT '0: 1:',
`repeat_times` int(11) NULL DEFAULT 0 COMMENT '',
`fail_reason` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '',
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime(6) NULL DEFAULT NULL,
PRIMARY KEY (`device_number`, `point`, `start_timestamp`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;";
// 明志沒有水錶
//@"CREATE TABLE IF NOT EXISTS `archive_water_meter_day_{dbDateName}` (
// `device_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
// `point` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
// `start_timestamp` datetime(6) NOT NULL,
// `end_timestamp` datetime(6) NULL DEFAULT NULL,
// `count_rawdata` int(11) NULL DEFAULT NULL,
// `min_rawdata` decimal(15, 3) NULL DEFAULT NULL,
// `max_rawdata` decimal(15, 3) NULL DEFAULT NULL,
// `avg_rawdata` decimal(15, 3) NULL DEFAULT NULL,
// `sum_rawdata` decimal(15, 3) NULL DEFAULT NULL,
// `is_complete` tinyint(3) UNSIGNED NULL DEFAULT NULL COMMENT '是否完成0:未完成 1:完成',
// `repeat_times` int(11) NULL DEFAULT 0 COMMENT '重複次數',
// `fail_reason` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '失敗原因',
// `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
// `updated_at` datetime(6) NULL DEFAULT NULL,
// PRIMARY KEY (`device_number`, `point`, `start_timestamp`) USING BTREE
// ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;";
backgroundServiceRepository.ExecuteSql(sql);
}
catch (Exception exception)

View File

@ -1192,7 +1192,7 @@ namespace BackendWorkerService.Services.Implement
//if (device_number == "NTPC_D8_EE_E4_RF_Total_WHT_N1" || device_number == "NTPC_D8_EE_E4_RF_H2_WHT_N1")
//{
logger.LogError(@$"{device_number} json = {archiveJsonResult}");
logger.LogInformation(@$"{device_number} json = {archiveJsonResult}");
//}
if (archiveJsonResult.ContainsKey("err")) //抓取錯誤
{