import { requestClient } from '#/api/request';
|
|
export namespace MesBagCodeHomeApi {
|
/** 基础数据与一袋一码 状态分布项 */
|
export interface StatusItem {
|
status: number; // 状态值
|
count: number; // 数量
|
}
|
|
/** 基础数据与一袋一码 首页汇总统计 */
|
export interface Summary {
|
mdmItemCount: number; // 品种总数(mdm_item)
|
mesItemCount: number; // MES 品种数(mes_md_item)
|
itemTypeCount: number; // 品种分类数
|
unitMeasureCount: number; // 计量单位数
|
lineCount: number; // 产线数
|
batchCount: number; // 批次总数
|
bagCodeCount: number; // 袋码总数
|
palletCount: number; // 托盘码总数
|
batchStatusList: StatusItem[]; // 批次状态分布
|
bagCodeStatusList: StatusItem[]; // 袋码状态分布
|
}
|
|
/** 基础数据与一袋一码 袋码生成趋势 */
|
export interface Trend {
|
date: string; // 日期
|
count: number; // 袋码生成数量
|
}
|
}
|
|
/** 获得基础数据与一袋一码 首页汇总统计 */
|
export function getBagCodeHomeSummary() {
|
return requestClient.get<MesBagCodeHomeApi.Summary>(
|
'/mes/bag-code-home-statistics/summary',
|
);
|
}
|
|
/** 获得袋码生成趋势 */
|
export function getBagCodeHomeTrend(days?: number) {
|
return requestClient.get<MesBagCodeHomeApi.Trend[]>(
|
'/mes/bag-code-home-statistics/trend',
|
{ params: { days } },
|
);
|
}
|