移除旧接口和界面

This commit is contained in:
2025-11-21 16:00:37 +08:00
parent 1169381f7a
commit 98252c2b71
8 changed files with 56 additions and 905 deletions

View File

@@ -1,11 +1,10 @@
import http from '../utils/http';
import {
PaginationDTO, DeviceCommandLogDTO, FeedFormulaDTO, PenDTO, FeedUsageRecordDTO, MedicationReasonType,
PaginationDTO, DeviceCommandLogDTO, MedicationReasonType,
MedicationDTO, MedicationLogDTO, NotifierType, NotificationStatus, NotificationDTO, PendingCollectionStatus,
PendingCollectionDTO, LogChangeType, PigBatchLogDTO, PigPurchaseDTO, PigSaleDTO, PigBatchSickPigReasonType,
PigBatchSickPigTreatmentLocation, PigSickLogDTO, PigTransferType, PigTransferLogDTO, ExecutionStatus,
PlanExecutionLogDTO, RawMaterialDTO, RawMaterialPurchaseDTO, StockLogSourceType, RawMaterialStockLogDTO,
SensorType, SensorDataDTO, TaskDTO, TaskExecutionLogDTO, AuditStatus, UserActionLogDTO, WeighingBatchDTO,
PlanExecutionLogDTO, SensorType, SensorDataDTO, TaskDTO, TaskExecutionLogDTO, AuditStatus, UserActionLogDTO, WeighingBatchDTO,
WeighingRecordDTO, ZapcoreLevel, SeverityLevel
} from '../enums';
@@ -37,37 +36,6 @@ import {
* @property {boolean} [received_success]
*/
/**
* @typedef {object} FeedUsageRecordDTO
* @property {number} id
* @property {number} pen_id
* @property {PenDTO} pen
* @property {number} feed_formula_id
* @property {FeedFormulaDTO} feed_formula
* @property {number} amount
* @property {string} recorded_at
* @property {string} remarks
* @property {number} operator_id
*/
/**
* @typedef {object} ListFeedUsageRecordResponse
* @property {Array<FeedUsageRecordDTO>} list
* @property {PaginationDTO} pagination
*/
/**
* @typedef {object} FeedUsageRecordsParams
* @property {number} [page]
* @property {number} [page_size]
* @property {string} [order_by]
* @property {number} [pen_id]
* @property {number} [feed_formula_id]
* @property {string} [start_time]
* @property {string} [end_time]
* @property {number} [operator_id]
*/
/**
* @typedef {object} MedicationLogDTO
* @property {number} id
@@ -364,65 +332,6 @@ import {
* @property {string} [end_time]
*/
/**
* @typedef {object} RawMaterialPurchaseDTO
* @property {number} id
* @property {number} raw_material_id
* @property {RawMaterialDTO} raw_material
* @property {number} amount
* @property {number} unit_price
* @property {number} total_price
* @property {string} supplier
* @property {string} purchase_date
* @property {string} created_at
*/
/**
* @typedef {object} ListRawMaterialPurchaseResponse
* @property {Array<RawMaterialPurchaseDTO>} list
* @property {PaginationDTO} pagination
*/
/**
* @typedef {object} RawMaterialPurchasesParams
* @property {number} [page]
* @property {number} [page_size]
* @property {string} [order_by]
* @property {number} [raw_material_id]
* @property {string} [supplier]
* @property {string} [start_time]
* @property {string} [end_time]
*/
/**
* @typedef {object} RawMaterialStockLogDTO
* @property {number} id
* @property {number} raw_material_id
* @property {number} change_amount
* @property {StockLogSourceType} source_type
* @property {number} source_id
* @property {string} remarks
* @property {string} happened_at
*/
/**
* @typedef {object} ListRawMaterialStockLogResponse
* @property {Array<RawMaterialStockLogDTO>} list
* @property {PaginationDTO} pagination
*/
/**
* @typedef {object} RawMaterialStockLogsParams
* @property {number} [page]
* @property {number} [page_size]
* @property {string} [order_by]
* @property {number} [raw_material_id]
* @property {string} [source_type]
* @property {number} [source_id]
* @property {string} [start_time]
* @property {string} [end_time]
*/
/**
* @typedef {object} SensorDataDTO
* @property {number} area_controller_id
@@ -594,17 +503,6 @@ export const getDeviceCommandLogs = async (params) => {
return processResponse(responseData);
};
/**
* 获取饲料使用记录列表
* @param {FeedUsageRecordsParams} params - 查询参数
* @returns {Promise<{list: Array<FeedUsageRecordDTO>, total: number}>}
*/
export const getFeedUsageRecords = async (params) => {
const newParams = { ...params, page_size: params.page_size };
const responseData = await http.get('/api/v1/monitor/feed-usage-records', { params: newParams });
return processResponse(responseData);
};
/**
* 获取用药记录列表
* @param {MedicationLogsParams} params - 查询参数
@@ -704,28 +602,6 @@ export const getPlanExecutionLogs = async (params) => {
return processResponse(responseData);
};
/**
* 获取原料采购记录列表
* @param {RawMaterialPurchasesParams} params - 查询参数
* @returns {Promise<{list: Array<RawMaterialPurchaseDTO>, total: number}>}
*/
export const getRawMaterialPurchases = async (params) => {
const newParams = { ...params, page_size: params.page_size };
const responseData = await http.get('/api/v1/monitor/raw-material-purchases', { params: newParams });
return processResponse(responseData);
};
/**
* 获取原料库存日志列表
* @param {RawMaterialStockLogsParams} params - 查询参数
* @returns {Promise<{list: Array<RawMaterialStockLogDTO>, total: number}>}
*/
export const getRawMaterialStockLogs = async (params) => {
const newParams = { ...params, page_size: params.page_size };
const responseData = await http.get('/api/v1/monitor/raw-material-stock-logs', { params: newParams });
return processResponse(responseData);
};
/**
* 获取传感器数据列表
* @param {SensorDataParams} params - 查询参数
@@ -783,7 +659,6 @@ export const getWeighingRecords = async (params) => {
export const MonitorApi = {
getDeviceCommandLogs,
getFeedUsageRecords,
getMedicationLogs,
getNotifications,
getPendingCollections,
@@ -793,11 +668,9 @@ export const MonitorApi = {
getPigSickLogs,
getPigTransferLogs,
getPlanExecutionLogs,
getRawMaterialPurchases,
getRawMaterialStockLogs,
getSensorData,
getTaskExecutionLogs,
getUserActionLogs,
getWeighingBatches,
getWeighingRecords,
};
};