refactor: 重构工艺工序相关命名与数据模型

1.  全局替换"工序"为"工艺"统一术语,包括页面文案、枚举、注释
2.  重构工单与工件工艺数据模型:
    - 新增工艺组合表flow_material作为备料/齐套唯一源头
    - 新增工位状态表station_state支持自主停单/恢复接单
    - 移除station_process派工表,改用工单工艺组合作为路线唯一源头
    - 替换processCode为flowId作为工艺关联标识
    - 重构工件当前进度字段为currentStationNo
3.  删除冗余的静态备份资源文件
4.  调整物料选择组件默认启用仅显示激活物料
5.  优化工单创建/编辑逻辑,新增工艺组合校验与保存
This commit is contained in:
SunYF
2026-09-22 11:32:29 +08:00
parent 932700ca65
commit d609ff8a9e
185 changed files with 8623 additions and 4501 deletions
+8 -8
View File
@@ -21,8 +21,8 @@ type WorkpieceBind struct {
Sn string `json:"sn,omitempty"`
// 工单号
OrderNo string `json:"orderNo,omitempty"`
// 装配工序 1~12
ProcessCode int `json:"processCode,omitempty"`
// 装配工艺ID
FlowId int `json:"flowId,omitempty"`
// 绑定工位
StationNo string `json:"stationNo,omitempty"`
// 物料编码
@@ -51,7 +51,7 @@ func (*WorkpieceBind) scanValues(columns []string) ([]any, error) {
values := make([]any, len(columns))
for i := range columns {
switch columns[i] {
case workpiecebind.FieldID, workpiecebind.FieldProcessCode:
case workpiecebind.FieldID, workpiecebind.FieldFlowId:
values[i] = new(sql.NullInt64)
case workpiecebind.FieldSn, workpiecebind.FieldOrderNo, workpiecebind.FieldStationNo, workpiecebind.FieldMaterialCode, workpiecebind.FieldMaterialName, workpiecebind.FieldSpec, workpiecebind.FieldUnit, workpiecebind.FieldManageMode, workpiecebind.FieldBindValue, workpiecebind.FieldBindType, workpiecebind.FieldOperator:
values[i] = new(sql.NullString)
@@ -90,11 +90,11 @@ func (_m *WorkpieceBind) assignValues(columns []string, values []any) error {
} else if value.Valid {
_m.OrderNo = value.String
}
case workpiecebind.FieldProcessCode:
case workpiecebind.FieldFlowId:
if value, ok := values[i].(*sql.NullInt64); !ok {
return fmt.Errorf("unexpected type %T for field processCode", values[i])
return fmt.Errorf("unexpected type %T for field flowId", values[i])
} else if value.Valid {
_m.ProcessCode = int(value.Int64)
_m.FlowId = int(value.Int64)
}
case workpiecebind.FieldStationNo:
if value, ok := values[i].(*sql.NullString); !ok {
@@ -198,8 +198,8 @@ func (_m *WorkpieceBind) String() string {
builder.WriteString("orderNo=")
builder.WriteString(_m.OrderNo)
builder.WriteString(", ")
builder.WriteString("processCode=")
builder.WriteString(fmt.Sprintf("%v", _m.ProcessCode))
builder.WriteString("flowId=")
builder.WriteString(fmt.Sprintf("%v", _m.FlowId))
builder.WriteString(", ")
builder.WriteString("stationNo=")
builder.WriteString(_m.StationNo)