style(backend): 格式化代码并修复floating-promises以通过pre-push检查

This commit is contained in:
yml2213
2026-09-12 17:46:47 +08:00
parent 8cc3aa2a35
commit fea82bff36
12 changed files with 55 additions and 71 deletions
+4 -4
View File
@@ -14,10 +14,10 @@ export function randomId(prefix: string, bytes = 6): string {
*/
export function generateWorkOrderNo(date: Date = new Date()): string {
const yy = String(date.getFullYear()).slice(-2)
const mm = String(date.getMonth() + 1).padStart(2, "0")
const dd = String(date.getDate()).padStart(2, "0")
const hh = String(date.getHours()).padStart(2, "0")
const min = String(date.getMinutes()).padStart(2, "0")
const mm = String(date.getMonth() + 1).padStart(2, '0')
const dd = String(date.getDate()).padStart(2, '0')
const hh = String(date.getHours()).padStart(2, '0')
const min = String(date.getMinutes()).padStart(2, '0')
const rand = Math.floor(1000 + Math.random() * 9000)
return `WO${yy}${mm}${dd}${hh}${min}${rand}`
}