export const STATISTIC_COUNT_REPORT_TITLE = '日出入库汇总统计' export function createStatisticCountSearchState() { return { condition: '', dayTime: '', matnrCode: '', maktx: '', batch: '' } } export function buildStatisticCountPageQueryParams(params = {}) { const values = { condition: params.condition, dayTime: params.dayTime, matnrCode: params.matnrCode, maktx: params.maktx, batch: params.batch } return Object.entries(values).reduce( (result, [key, value]) => { if (value === undefined || value === null) { return result } if (typeof value === 'string') { const normalized = value.trim() if (!normalized) { return result } result[key] = normalized return result } result[key] = value return result }, { current: Number(params.current) || 1, pageSize: Number(params.pageSize || params.size) || 20 } ) } export function normalizeStatisticCountRow(row = {}) { return { ...row, count: Number(row.count || 0), anfme: Number(row.anfme || 0), inAnfmeCount: Number(row.inAnfmeCount || 0), outAnfmeCount: Number(row.outAnfmeCount || 0), inAnfme: Number(row.inAnfme || 0), outAnfme: Number(row.outAnfme || 0) } }