监测中心异常监测记录处理

作者: 来源:本站原创 点击数: 发布时间:2021年11月03日

问题描述:监测中心的超期栏目监测异常,最后监测时间显示为2027年。

b15062aa037a45b09a0bba5e46cee7e5.Png

问题分析:由于服务器系统时间不对,导致系统监测时间也出现错误;错误时间是2027年,即使服务器时间恢复正常,后台还是显示的是2027年这一条监测记录。

解决方案:清除这些错误异常监测记录,才能显示正常的时间。

(1)查询PE_MonitoringCenter_MonitoringHistory表中错误历史监测记录的HistoryId

9d68968e71ec49f2a0f56dd4bea92d7b.Png

(2)使用如下sql语句清理异常监测记录(1,2处替换为错误历史纪录的HistoryId,可填写多个id)

delete from PE_MonitoringCenter_MonitoringBlank where MonitoringSummaryId in (select SummaryId from PE_MonitoringCenter_MonitoringSummary where MonitoringHistoryId in (select HistoryId from PE_MonitoringCenter_MonitoringHistory where HistoryId in (1,2)))
‎delete from PE_MonitoringCenter_MonitoringBrokenLink where MonitoringSummaryId in (select SummaryId from PE_MonitoringCenter_MonitoringSummary where MonitoringHistoryId in (select HistoryId from PE_MonitoringCenter_MonitoringHistory where HistoryId in (1,2)))
‎delete from PE_MonitoringCenter_MonitoringLetterBoxOverdue where MonitoringSummaryId in (select SummaryId from PE_MonitoringCenter_MonitoringSummary where MonitoringHistoryId in (select HistoryId from PE_MonitoringCenter_MonitoringHistory where HistoryId in (1,2)))
‎delete from PE_MonitoringCenter_MonitoringLetterBoxSoonOverdue where MonitoringSummaryId in (select SummaryId from PE_MonitoringCenter_MonitoringSummary where MonitoringHistoryId in (select HistoryId from PE_MonitoringCenter_MonitoringHistory where HistoryId in (1,2)))
‎delete from PE_MonitoringCenter_MonitoringOnlineInterview where MonitoringSummaryId in (select SummaryId from PE_MonitoringCenter_MonitoringSummary where MonitoringHistoryId in (select HistoryId from PE_MonitoringCenter_MonitoringHistory where HistoryId in (1,2)))
‎delete from PE_MonitoringCenter_MonitoringOverdue where MonitoringSummaryId in (select SummaryId from PE_MonitoringCenter_MonitoringSummary where MonitoringHistoryId in (select HistoryId from PE_MonitoringCenter_MonitoringHistory where HistoryId in (1,2)))
‎delete from PE_MonitoringCenter_MonitoringPetitionOverdue where MonitoringSummaryId in (select SummaryId from PE_MonitoringCenter_MonitoringSummary where MonitoringHistoryId in (select HistoryId from PE_MonitoringCenter_MonitoringHistory where HistoryId in (1,2)))
‎delete from PE_MonitoringCenter_MonitoringPetitionSoonOverdue where MonitoringSummaryId in (select SummaryId from PE_MonitoringCenter_MonitoringSummary where MonitoringHistoryId in (select HistoryId from PE_MonitoringCenter_MonitoringHistory where HistoryId in (1,2)))
‎delete from PE_MonitoringCenter_MonitoringQuestionnaire where MonitoringSummaryId in (select SummaryId from PE_MonitoringCenter_MonitoringSummary where MonitoringHistoryId in (select HistoryId from PE_MonitoringCenter_MonitoringHistory where HistoryId in (1,2)))
‎delete from PE_MonitoringCenter_MonitoringSensitiveWord where MonitoringSummaryId in (select SummaryId from PE_MonitoringCenter_MonitoringSummary where MonitoringHistoryId in (select HistoryId from PE_MonitoringCenter_MonitoringHistory where HistoryId in (1,2)))
‎delete from PE_MonitoringCenter_MonitoringSoonOverdue where MonitoringSummaryId in (select SummaryId from PE_MonitoringCenter_MonitoringSummary where MonitoringHistoryId in (select HistoryId from PE_MonitoringCenter_MonitoringHistory where HistoryId in (1,2)))
‎delete from PE_MonitoringCenter_MonitoringTypoWord where MonitoringSummaryId in (select SummaryId from PE_MonitoringCenter_MonitoringSummary where MonitoringHistoryId in (select HistoryId from PE_MonitoringCenter_MonitoringHistory where HistoryId in (1,2)))
‎delete from PE_MonitoringCenter_MonitoringVote where MonitoringSummaryId in (select SummaryId from PE_MonitoringCenter_MonitoringSummary where MonitoringHistoryId in (select HistoryId from PE_MonitoringCenter_MonitoringHistory where HistoryId in (1,2)))
‎delete from PE_MonitoringCenter_MonitoringSummary where MonitoringHistoryId in (select HistoryId from PE_MonitoringCenter_MonitoringHistory where HistoryId in (1,2))
‎delete from PE_MonitoringCenter_MonitoringHistory where HistoryId in (1,2)