Files
wms-ui/src/apis/downRecord/downRecord.ts
2026-02-26 17:31:18 +08:00

49 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import http from '@/utils/http'
const BASE_URL = '/sysDownRecord/record'
export interface DownRecordResp {
id: string
equipmentId: string
gh: string
peopleName: string
equipmentName: string
ruleName: string
peopleId: string
downTime: string
ruleId: string
downResult: number
operType: number
createTime: string
msg: string
createUserString: string
updateUserString: string
disabled: boolean
}
export interface DownRecordQuery {
equipmentId: number | undefined
peopleName: string | undefined
downTime: string | undefined
downTimeStart: string | undefined
downTimeEnd: string | undefined
downResult: number | undefined
sort: Array<string>
}
type Long = number
export interface DownRecordPageQuery extends DownRecordQuery, PageQuery {}
/** @desc 查询设备下发记录列表 */
export function listDownRecord(query: DownRecordPageQuery) {
return http.get<PageRes<DownRecordResp[]>>(`${BASE_URL}`, query)
}
/** @desc 导出设备下发记录 */
export function exportDownRecord(query: DownRecordQuery) {
return http.download(`${BASE_URL}/export`, query)
}
/** @desc 重新下发仅支持单个下发传入设备ID+人员ID+规则ID */
export function downSinglePeople(equipmentId: Long, peopleId: Long, ruleId: Long){
return http.get(`${BASE_URL}/down/${equipmentId}/${peopleId}/${ruleId}`)
}