fix(panel): scatterPacking 移除 wave 波次数(散单无波次语义,0.3.293)
This commit is contained in:
parent
ef933bc353
commit
eb4ce994ba
@ -862,7 +862,7 @@ class WarehousePanelService extends Service {
|
|||||||
* @param {Date} todayStart 今日开始
|
* @param {Date} todayStart 今日开始
|
||||||
* @param {Date} tomorrowStart 明日开始
|
* @param {Date} tomorrowStart 明日开始
|
||||||
* @param {boolean} isGroup true=团购(wave_scope 1/3,top 按打包台);false=散单(wave_scope 非 1/3,top 按打包员)
|
* @param {boolean} isGroup true=团购(wave_scope 1/3,top 按打包台);false=散单(wave_scope 非 1/3,top 按打包员)
|
||||||
* @return {Promise<Object>} { orders, goods, sku, wave, top }
|
* @return {Promise<Object>} 团购 { orders, goods, sku, wave, top };散单 { orders, goods, sku, top }(无 wave)
|
||||||
*/
|
*/
|
||||||
async queryPackingBlock(warehouseId, todayStart, tomorrowStart, isGroup) {
|
async queryPackingBlock(warehouseId, todayStart, tomorrowStart, isGroup) {
|
||||||
const { model } = this.ctx;
|
const { model } = this.ctx;
|
||||||
@ -917,22 +917,31 @@ class WarehousePanelService extends Service {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
const summary = Array.isArray(summaryRows) && summaryRows.length > 0 ? summaryRows[0] : {};
|
const summary = Array.isArray(summaryRows) && summaryRows.length > 0 ? summaryRows[0] : {};
|
||||||
const top = (topRows || []).map((row, index) => ({
|
const top = (topRows || []).map((row, index) => {
|
||||||
rank: index + 1,
|
const item = {
|
||||||
name: row.name || '',
|
rank: index + 1,
|
||||||
orders: Number(row.orders || 0),
|
name: row.name || '',
|
||||||
goods: Number(row.goods || 0),
|
orders: Number(row.orders || 0),
|
||||||
sku: Number(row.sku || 0),
|
goods: Number(row.goods || 0),
|
||||||
wave: Number(row.wave || 0),
|
sku: Number(row.sku || 0),
|
||||||
}));
|
};
|
||||||
|
// 仅团购块输出波次数(散单块无波次语义)
|
||||||
|
if (isGroup) {
|
||||||
|
item.wave = Number(row.wave || 0);
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
|
||||||
return {
|
const result = {
|
||||||
orders: Number(summary.orders || 0),
|
orders: Number(summary.orders || 0),
|
||||||
goods: Number(summary.goods || 0),
|
goods: Number(summary.goods || 0),
|
||||||
sku: Number(summary.sku || 0),
|
sku: Number(summary.sku || 0),
|
||||||
wave: Number(summary.wave || 0),
|
|
||||||
top,
|
top,
|
||||||
};
|
};
|
||||||
|
if (isGroup) {
|
||||||
|
result.wave = Number(summary.wave || 0);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,4 +1,18 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "0.3.293",
|
||||||
|
"date": "2026-10-12",
|
||||||
|
"type": "updated",
|
||||||
|
"summary": "index.getWarehousePanelData scatterPacking 移除 wave 波次数(散单无波次语义)(0.3.292 → 0.3.293)",
|
||||||
|
"methods": [
|
||||||
|
"index.getWarehousePanelData"
|
||||||
|
],
|
||||||
|
"notes": [
|
||||||
|
"变更内容:scatterPacking(散单打包块)的 summary 与 top 各项移除 wave 字段(散单无波次语义),仅团购块 groupPacking 保留 wave(波次数);orders/goods/sku/top 结构不变。",
|
||||||
|
"代码依据:app/service/systems/warehouse_panel.js#queryPackingBlock(isGroup 时才输出 wave);ESLint 0 错误。",
|
||||||
|
"文档变更范围:methods/system.json 的 module=index 分组仅更新 index.getWarehousePanelData 一条(response.data.description 补散单块无 wave);根版本 0.3.292 → 0.3.293、updatedAt 保持 2026-10-12;methods/changes/system.json 新增本条(插入数组首位);其余 method 未改动。"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "0.3.292",
|
"version": "0.3.292",
|
||||||
"date": "2026-10-12",
|
"date": "2026-10-12",
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"module": "system",
|
"module": "system",
|
||||||
"description": "系统接口标准入口,method 对应系统内置方法,全部使用 POST 请求,参数统一放在 body 内",
|
"description": "系统接口标准入口,method 对应系统内置方法,全部使用 POST 请求,参数统一放在 body 内",
|
||||||
"version": "0.3.292",
|
"version": "0.3.293",
|
||||||
"updatedAt": "2026-10-12",
|
"updatedAt": "2026-10-12",
|
||||||
"headers": [
|
"headers": [
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user