按模块说明
一、MES — 叫料单扩展(schema + 逻辑) material_request 新增字段:packageNo(叫料包号,一次提交=一包)、callDate(叫料日,默认当天)、planBreakdown(jsonb,工单×排产日明细 []CallPlanBreakdown);targetDock 语义降级为"期望接驳台(可空,配送时 WMS 确定实际台)"。 新增 internal/logic/call_plan.go:实时计算「叫料需求明细(工单×排产日×物料)」,派生两类提示(当日剩余未叫 / 跨日量明细),不落库、不拦提交;接驳台空台校验 EnsureStationDocksEmpty、托盘回库 DispatchPalletReturnManual、人工清台 ClearDockLedger、配送单派车 DispatchDeliveryAgv、工位物料明细 StationMaterialDetail。 新增 internal/handler/production/call_pkg.go:8 个 MES 内部端点(X-API-TOKEN 网关),供 WMS 调用——叫料需求明细、按包查单、接驳台状态、托盘回库、人工清台、配送单派车、叫料池原始行、工位物料明细、WMS 代叫料。 internal/handler/production/call.go、internal/logic/call.go、agv.go、qty_report.go、routes_production.go、wmsclient/client.go、db.go 同步接入上述逻辑。 二、WMS — 配送单(新功能,叫料与送料彻底拆开) 新增 schema/delivery_order.go + delivery_order_item.go 及 ent 生成代码:delivery_order(PENDING→DISPATCHED→DONE / CANCELLED,一单=一次托盘配送)、delivery_order_item(配送物料明细快照:工单/工艺/排产日)。 新增 internal/handler/delivery.go + 路由 + DeliveryOrders.vue 页面(仓储作业 → 配送单)。 mesclient/client.go 扩展:MES 叫料单结构补 packageNo/callDate/workOrderNo/planBreakdown,新增 PoolRow/DockPalletState/DeliveryAgvItem/getJSON 等。 CallQueue.vue:按叫料包展示,新增「代叫料」「建配送单」按钮与对话框;出库单回写所属配送单号(outbound_order 加字段);AGV 派送改由配送单驱动。 三、工位终端 — 叫料体验升级 MaterialPanel.vue:新增「本工位物料明细」卡(工艺物料全集×工位账四数,量为 0 也显示);叫料改为「叫料包」模式(默认当天、可勾选分批、可选其他排产日、期望接驳台可空),新增叫料日选择器、两条提示横幅(当日剩余未叫 / 跨日量明细)、托盘回库按钮。 InspectPanel.vue/Main.vue/OnlinePanel.vue/OfflinePanel.vue/WorkPanel.vue/SyncQueueDialog.vue/api/index.js/internal/handler/line.go/routes.go 同步接入接驳台状态、托盘回库、下班双台空台校验等。 web/static/index.html 构建刷新。 四、文档 案例.md:重写第 5/6/8/9 节与新「配送单」流程,补「模拟模式跳过接驳台校验」说明,库管员菜单加「配送单」;并修正"本单箱体"等措辞歧义。 客户问题.md:同步本轮拍板口径。 五、构建产物 / 同步 多个 MES 前端页面(.vue)随本次改动统一重新构建刷新;ent 生成代码(MES material_request、WMS delivery_order/outbound_order 相关)随 schema 更新重新生成。
This commit is contained in:
@@ -0,0 +1,166 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package deliveryorderitem
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the deliveryorderitem type in the database.
|
||||
Label = "delivery_order_item"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldDeliveryNo holds the string denoting the deliveryno field in the database.
|
||||
FieldDeliveryNo = "delivery_no"
|
||||
// FieldRequestNo holds the string denoting the requestno field in the database.
|
||||
FieldRequestNo = "request_no"
|
||||
// FieldMaterialCode holds the string denoting the materialcode field in the database.
|
||||
FieldMaterialCode = "material_code"
|
||||
// FieldMaterialName holds the string denoting the materialname field in the database.
|
||||
FieldMaterialName = "material_name"
|
||||
// FieldUnit holds the string denoting the unit field in the database.
|
||||
FieldUnit = "unit"
|
||||
// FieldQty holds the string denoting the qty field in the database.
|
||||
FieldQty = "qty"
|
||||
// FieldStationNo holds the string denoting the stationno field in the database.
|
||||
FieldStationNo = "station_no"
|
||||
// FieldOrderNo holds the string denoting the orderno field in the database.
|
||||
FieldOrderNo = "order_no"
|
||||
// FieldFlowName holds the string denoting the flowname field in the database.
|
||||
FieldFlowName = "flow_name"
|
||||
// FieldPlanDate holds the string denoting the plandate field in the database.
|
||||
FieldPlanDate = "plan_date"
|
||||
// FieldSnMode holds the string denoting the snmode field in the database.
|
||||
FieldSnMode = "sn_mode"
|
||||
// Table holds the table name of the deliveryorderitem in the database.
|
||||
Table = "delivery_order_item"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for deliveryorderitem fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldDeliveryNo,
|
||||
FieldRequestNo,
|
||||
FieldMaterialCode,
|
||||
FieldMaterialName,
|
||||
FieldUnit,
|
||||
FieldQty,
|
||||
FieldStationNo,
|
||||
FieldOrderNo,
|
||||
FieldFlowName,
|
||||
FieldPlanDate,
|
||||
FieldSnMode,
|
||||
}
|
||||
|
||||
// ValidColumn reports if the column name is valid (part of the table columns).
|
||||
func ValidColumn(column string) bool {
|
||||
for i := range Columns {
|
||||
if column == Columns[i] {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var (
|
||||
// DeliveryNoValidator is a validator for the "deliveryNo" field. It is called by the builders before save.
|
||||
DeliveryNoValidator func(string) error
|
||||
// DefaultRequestNo holds the default value on creation for the "requestNo" field.
|
||||
DefaultRequestNo string
|
||||
// RequestNoValidator is a validator for the "requestNo" field. It is called by the builders before save.
|
||||
RequestNoValidator func(string) error
|
||||
// MaterialCodeValidator is a validator for the "materialCode" field. It is called by the builders before save.
|
||||
MaterialCodeValidator func(string) error
|
||||
// DefaultMaterialName holds the default value on creation for the "materialName" field.
|
||||
DefaultMaterialName string
|
||||
// MaterialNameValidator is a validator for the "materialName" field. It is called by the builders before save.
|
||||
MaterialNameValidator func(string) error
|
||||
// DefaultUnit holds the default value on creation for the "unit" field.
|
||||
DefaultUnit string
|
||||
// UnitValidator is a validator for the "unit" field. It is called by the builders before save.
|
||||
UnitValidator func(string) error
|
||||
// DefaultQty holds the default value on creation for the "qty" field.
|
||||
DefaultQty float64
|
||||
// DefaultStationNo holds the default value on creation for the "stationNo" field.
|
||||
DefaultStationNo int
|
||||
// DefaultOrderNo holds the default value on creation for the "orderNo" field.
|
||||
DefaultOrderNo string
|
||||
// OrderNoValidator is a validator for the "orderNo" field. It is called by the builders before save.
|
||||
OrderNoValidator func(string) error
|
||||
// DefaultFlowName holds the default value on creation for the "flowName" field.
|
||||
DefaultFlowName string
|
||||
// FlowNameValidator is a validator for the "flowName" field. It is called by the builders before save.
|
||||
FlowNameValidator func(string) error
|
||||
// DefaultPlanDate holds the default value on creation for the "planDate" field.
|
||||
DefaultPlanDate string
|
||||
// PlanDateValidator is a validator for the "planDate" field. It is called by the builders before save.
|
||||
PlanDateValidator func(string) error
|
||||
// DefaultSnMode holds the default value on creation for the "snMode" field.
|
||||
DefaultSnMode int
|
||||
// IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
IDValidator func(int) error
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the DeliveryOrderItem queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDeliveryNo orders the results by the deliveryNo field.
|
||||
func ByDeliveryNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDeliveryNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRequestNo orders the results by the requestNo field.
|
||||
func ByRequestNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRequestNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMaterialCode orders the results by the materialCode field.
|
||||
func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMaterialCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMaterialName orders the results by the materialName field.
|
||||
func ByMaterialName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMaterialName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUnit orders the results by the unit field.
|
||||
func ByUnit(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUnit, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByQty orders the results by the qty field.
|
||||
func ByQty(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldQty, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStationNo orders the results by the stationNo field.
|
||||
func ByStationNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStationNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOrderNo orders the results by the orderNo field.
|
||||
func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFlowName orders the results by the flowName field.
|
||||
func ByFlowName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFlowName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPlanDate orders the results by the planDate field.
|
||||
func ByPlanDate(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPlanDate, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySnMode orders the results by the snMode field.
|
||||
func BySnMode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSnMode, opts...).ToFunc()
|
||||
}
|
||||
Reference in New Issue
Block a user