- 所有订单列表联查 wms_order_wave_index 输出 wave_index(9 个工作台列表/复核散单列表/波次策略兜底列表,无记录降级 0) - 新增 wave_index 虚拟筛选入参:between/eq/in/gt/lt/ge/le/notbetween,between 要求 value 为长度 2 的数组;复核散单列表支持 wave_index_min/wave_index_max - 订单导出(waybill/item 模式)接入 wave_index 联查并新增波次序号列 - 新增 app/model/order_wave_index.js 副表模型 - 同步 methods/system.json 接口说明与 methods/changes/system.json 变更记录
64 lines
1.5 KiB
JavaScript
64 lines
1.5 KiB
JavaScript
'use strict';
|
||
|
||
/**
|
||
* 订单波次顺序定位副表模型。
|
||
* 表结构:database/migrations/20260513113000-create-wms_order_wave_index.js
|
||
* @param {import('egg').Application} app Egg 应用实例。
|
||
* @return {import('sequelize').ModelCtor<import('sequelize').Model>} Sequelize 模型。
|
||
*/
|
||
module.exports = app => {
|
||
const { BIGINT, INTEGER, DATE } = app.Sequelize;
|
||
|
||
const OrderWaveIndex = app.model.define('wms_order_wave_index', {
|
||
id: {
|
||
type: BIGINT(20).UNSIGNED,
|
||
primaryKey: true,
|
||
autoIncrement: true,
|
||
allowNull: false,
|
||
comment: '主键ID',
|
||
},
|
||
warehouse_id: {
|
||
type: BIGINT(20).UNSIGNED,
|
||
allowNull: false,
|
||
defaultValue: 0,
|
||
comment: '仓库ID',
|
||
},
|
||
order_id: {
|
||
type: BIGINT(20).UNSIGNED,
|
||
allowNull: false,
|
||
defaultValue: 0,
|
||
comment: '订单ID',
|
||
},
|
||
wave_id: {
|
||
type: BIGINT(20).UNSIGNED,
|
||
allowNull: false,
|
||
defaultValue: 0,
|
||
comment: '波次ID',
|
||
},
|
||
wave_index: {
|
||
type: INTEGER(10).UNSIGNED,
|
||
allowNull: false,
|
||
defaultValue: 0,
|
||
comment: '订单在波次中的全局顺序',
|
||
},
|
||
platforms_index: {
|
||
type: INTEGER(10).UNSIGNED,
|
||
allowNull: false,
|
||
defaultValue: 0,
|
||
comment: '订单在平台分组内顺序',
|
||
},
|
||
create_at: {
|
||
type: DATE,
|
||
allowNull: false,
|
||
comment: '创建时间',
|
||
},
|
||
}, {
|
||
tableName: 'wms_order_wave_index',
|
||
timestamps: false,
|
||
underscored: true,
|
||
comment: '订单波次顺序定位副表',
|
||
});
|
||
|
||
return OrderWaveIndex;
|
||
};
|