fix(monitor): OEM维修第五档提醒消息区分扣费比例
- 第四档:⏰ 图标 + '距离第四档(扣50%)超时还剩1小时' - 第五档:🚨 图标 + '距离第五档(扣100%)超时还剩1小时' - 第五档额外提示:'即将进入全额扣费,请立即处理'
This commit is contained in:
parent
b7b2b34a1f
commit
3fd09dec25
|
|
@ -188,11 +188,15 @@ export class ReminderEngine {
|
|||
continue
|
||||
}
|
||||
const rackRB = getRack ? await getRack(r.server_ip, r.server_sn) : null
|
||||
let text = `⏰ OEM维修工单提醒(距离${r.tier_name}超时还剩1小时)\n\n`
|
||||
// 第五档用紧急图标,其他档位用普通图标
|
||||
const tierIcon = r.tier_name === '第五档' ? '🚨' : '⏰'
|
||||
const tierDesc = r.tier_name === '第五档' ? '扣100%' : r.tier_name === '第四档' ? '扣50%' : ''
|
||||
let text = `${tierIcon} OEM维修工单提醒(距离${r.tier_name}${tierDesc ? `(${tierDesc})` : ''}超时还剩1小时)\n\n`
|
||||
if (r.order_number) text += `工单号:${r.order_number}\n`
|
||||
text += `服务器IP:${r.server_ip || '未知'}\n服务器SN:${r.server_sn}\n`
|
||||
if (rackRB) text += `机架位置:${rackRB}\n`
|
||||
text += `${r.tier_name}到期时间:${r.deadline_time}\n服务器尚未录入恢复时间,请及时处理!`
|
||||
if (r.tier_name === '第五档') text += `\n\n⚠️ 请注意:第五档超时后将触发全额扣费(100%),请立即处理!`
|
||||
if (await pushText(text)) {
|
||||
this.db.prepare("UPDATE reminder_state SET notification_phase = 'before', notified_at = datetime('now', '+8 hours') WHERE id = ?").run(r.id)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue