feat: 完成多模块迭代更新
- 新增过程巡检按步骤上报、数量不符上报、工位退料功能 - 增加工单工程编号三级归属字段 - 新增物料安全库存与缺货预警 - 新增附件管理、退库单管理模块 - 优化生产看板展示逻辑与前端页面文案 - 清理冗余的工艺路线相关代码与备份文件
This commit is contained in:
@@ -251,6 +251,10 @@ var (
|
||||
{Name: "photo", Type: field.TypeString, Size: 255, Default: ""},
|
||||
{Name: "remark", Type: field.TypeString, Size: 500, Default: ""},
|
||||
{Name: "operator", Type: field.TypeString, Size: 64, Default: ""},
|
||||
{Name: "process_code", Type: field.TypeInt, Default: 0},
|
||||
{Name: "step_id", Type: field.TypeInt, Default: 0},
|
||||
{Name: "step_name", Type: field.TypeString, Size: 128, Default: ""},
|
||||
{Name: "measured_value", Type: field.TypeString, Size: 64, Default: ""},
|
||||
{Name: "created_at", Type: field.TypeTime},
|
||||
}
|
||||
// InspectionRecordTable holds the schema information for the "inspection_record" table.
|
||||
@@ -307,6 +311,51 @@ var (
|
||||
},
|
||||
},
|
||||
}
|
||||
// MaterialQtyReportColumns holds the columns for the "material_qty_report" table.
|
||||
MaterialQtyReportColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
{Name: "station_no", Type: field.TypeInt, Default: 0},
|
||||
{Name: "order_no", Type: field.TypeString, Size: 64, Default: ""},
|
||||
{Name: "sn", Type: field.TypeString, Size: 64, Default: ""},
|
||||
{Name: "material_code", Type: field.TypeString, Size: 64, Default: ""},
|
||||
{Name: "material_name", Type: field.TypeString, Size: 128, Default: ""},
|
||||
{Name: "plan_qty", Type: field.TypeInt, Default: 0},
|
||||
{Name: "actual_qty", Type: field.TypeInt, Default: 0},
|
||||
{Name: "diff_qty", Type: field.TypeInt, Default: 0},
|
||||
{Name: "cause", Type: field.TypeString, Size: 255, Default: ""},
|
||||
{Name: "status", Type: field.TypeString, Size: 10, Default: "PENDING"},
|
||||
{Name: "operator", Type: field.TypeString, Size: 64, Default: ""},
|
||||
{Name: "created_at", Type: field.TypeTime},
|
||||
{Name: "resolved_at", Type: field.TypeTime, Nullable: true},
|
||||
}
|
||||
// MaterialQtyReportTable holds the schema information for the "material_qty_report" table.
|
||||
MaterialQtyReportTable = &schema.Table{
|
||||
Name: "material_qty_report",
|
||||
Columns: MaterialQtyReportColumns,
|
||||
PrimaryKey: []*schema.Column{MaterialQtyReportColumns[0]},
|
||||
Indexes: []*schema.Index{
|
||||
{
|
||||
Name: "materialqtyreport_status",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{MaterialQtyReportColumns[10]},
|
||||
},
|
||||
{
|
||||
Name: "materialqtyreport_station_no",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{MaterialQtyReportColumns[1]},
|
||||
},
|
||||
{
|
||||
Name: "materialqtyreport_order_no",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{MaterialQtyReportColumns[2]},
|
||||
},
|
||||
{
|
||||
Name: "materialqtyreport_created_at",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{MaterialQtyReportColumns[12]},
|
||||
},
|
||||
},
|
||||
}
|
||||
// MaterialRequestColumns holds the columns for the "material_request" table.
|
||||
MaterialRequestColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
@@ -472,22 +521,6 @@ var (
|
||||
},
|
||||
},
|
||||
}
|
||||
// ProcessRouteColumns holds the columns for the "process_route" table.
|
||||
ProcessRouteColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
{Name: "name", Type: field.TypeString, Size: 128},
|
||||
{Name: "product_type_id", Type: field.TypeInt, Nullable: true},
|
||||
{Name: "status", Type: field.TypeString, Size: 20, Default: "ACTIVE"},
|
||||
{Name: "remark", Type: field.TypeString, Size: 255, Default: ""},
|
||||
{Name: "created_at", Type: field.TypeTime},
|
||||
{Name: "updated_at", Type: field.TypeTime, Nullable: true},
|
||||
}
|
||||
// ProcessRouteTable holds the schema information for the "process_route" table.
|
||||
ProcessRouteTable = &schema.Table{
|
||||
Name: "process_route",
|
||||
Columns: ProcessRouteColumns,
|
||||
PrimaryKey: []*schema.Column{ProcessRouteColumns[0]},
|
||||
}
|
||||
// ProcessStepColumns holds the columns for the "process_step" table.
|
||||
ProcessStepColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
@@ -564,23 +597,6 @@ var (
|
||||
},
|
||||
},
|
||||
}
|
||||
// RouteSegmentColumns holds the columns for the "route_segment" table.
|
||||
RouteSegmentColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
{Name: "route_id", Type: field.TypeInt},
|
||||
{Name: "seq", Type: field.TypeInt, Default: 1},
|
||||
{Name: "flow_id", Type: field.TypeInt, Nullable: true},
|
||||
{Name: "stations", Type: field.TypeJSON, Nullable: true, SchemaType: map[string]string{"postgres": "jsonb"}},
|
||||
{Name: "segment_type", Type: field.TypeString, Size: 20, Default: "LINE"},
|
||||
{Name: "remark", Type: field.TypeString, Size: 255, Default: ""},
|
||||
{Name: "created_at", Type: field.TypeTime},
|
||||
}
|
||||
// RouteSegmentTable holds the schema information for the "route_segment" table.
|
||||
RouteSegmentTable = &schema.Table{
|
||||
Name: "route_segment",
|
||||
Columns: RouteSegmentColumns,
|
||||
PrimaryKey: []*schema.Column{RouteSegmentColumns[0]},
|
||||
}
|
||||
// ScanRecordColumns holds the columns for the "scan_record" table.
|
||||
ScanRecordColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
@@ -923,8 +939,9 @@ var (
|
||||
{Name: "finished_num", Type: field.TypeInt, Default: 0},
|
||||
{Name: "fail_num", Type: field.TypeInt, Default: 0},
|
||||
{Name: "process_seq", Type: field.TypeString, Size: 64, Default: ""},
|
||||
{Name: "route_id", Type: field.TypeInt, Nullable: true},
|
||||
{Name: "route_snapshot", Type: field.TypeJSON, Nullable: true, SchemaType: map[string]string{"postgres": "jsonb"}},
|
||||
{Name: "contract_no", Type: field.TypeString, Size: 64, Default: ""},
|
||||
{Name: "project_no", Type: field.TypeString, Size: 64, Default: ""},
|
||||
{Name: "product_serial", Type: field.TypeString, Size: 64, Default: ""},
|
||||
{Name: "status", Type: field.TypeString, Size: 20, Default: "CREATED"},
|
||||
{Name: "plan_start", Type: field.TypeTime, Nullable: true},
|
||||
{Name: "plan_end", Type: field.TypeTime, Nullable: true},
|
||||
@@ -947,7 +964,7 @@ var (
|
||||
{
|
||||
Name: "workorder_status",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{WorkOrderColumns[11]},
|
||||
Columns: []*schema.Column{WorkOrderColumns[12]},
|
||||
},
|
||||
{
|
||||
Name: "workorder_product_type_id",
|
||||
@@ -1098,16 +1115,15 @@ var (
|
||||
EventLogTable,
|
||||
InspectionRecordTable,
|
||||
LinePointTable,
|
||||
MaterialQtyReportTable,
|
||||
MaterialRequestTable,
|
||||
PermissionTable,
|
||||
PlcMoveCmdTable,
|
||||
PlcSendLogTable,
|
||||
ProcessFlowTable,
|
||||
ProcessRouteTable,
|
||||
ProcessStepTable,
|
||||
ProductTypeTable,
|
||||
RoleTable,
|
||||
RouteSegmentTable,
|
||||
ScanRecordTable,
|
||||
SemiFlowTable,
|
||||
StationTable,
|
||||
@@ -1153,6 +1169,9 @@ func init() {
|
||||
LinePointTable.Annotation = &entsql.Annotation{
|
||||
Table: "line_point",
|
||||
}
|
||||
MaterialQtyReportTable.Annotation = &entsql.Annotation{
|
||||
Table: "material_qty_report",
|
||||
}
|
||||
MaterialRequestTable.Annotation = &entsql.Annotation{
|
||||
Table: "material_request",
|
||||
}
|
||||
@@ -1168,9 +1187,6 @@ func init() {
|
||||
ProcessFlowTable.Annotation = &entsql.Annotation{
|
||||
Table: "process_flow",
|
||||
}
|
||||
ProcessRouteTable.Annotation = &entsql.Annotation{
|
||||
Table: "process_route",
|
||||
}
|
||||
ProcessStepTable.Annotation = &entsql.Annotation{
|
||||
Table: "process_step",
|
||||
}
|
||||
@@ -1180,9 +1196,6 @@ func init() {
|
||||
RoleTable.Annotation = &entsql.Annotation{
|
||||
Table: "role",
|
||||
}
|
||||
RouteSegmentTable.Annotation = &entsql.Annotation{
|
||||
Table: "route_segment",
|
||||
}
|
||||
ScanRecordTable.Annotation = &entsql.Annotation{
|
||||
Table: "scan_record",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user