style(backend): 格式化代码并修复floating-promises以通过pre-push检查
This commit is contained in:
@@ -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}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user