feat: 完成多模块迭代更新
- 新增过程巡检按步骤上报、数量不符上报、工位退料功能 - 增加工单工程编号三级归属字段 - 新增物料安全库存与缺货预警 - 新增附件管理、退库单管理模块 - 优化生产看板展示逻辑与前端页面文案 - 清理冗余的工艺路线相关代码与备份文件
This commit is contained in:
+29
-6
@@ -4,6 +4,8 @@ package ent
|
||||
|
||||
import (
|
||||
"context"
|
||||
stdsql "database/sql"
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
"entgo.io/ent/dialect"
|
||||
@@ -30,6 +32,8 @@ type Tx struct {
|
||||
InspectionRecord *InspectionRecordClient
|
||||
// LinePoint is the client for interacting with the LinePoint builders.
|
||||
LinePoint *LinePointClient
|
||||
// MaterialQtyReport is the client for interacting with the MaterialQtyReport builders.
|
||||
MaterialQtyReport *MaterialQtyReportClient
|
||||
// MaterialRequest is the client for interacting with the MaterialRequest builders.
|
||||
MaterialRequest *MaterialRequestClient
|
||||
// Permission is the client for interacting with the Permission builders.
|
||||
@@ -40,16 +44,12 @@ type Tx struct {
|
||||
PlcSendLog *PlcSendLogClient
|
||||
// ProcessFlow is the client for interacting with the ProcessFlow builders.
|
||||
ProcessFlow *ProcessFlowClient
|
||||
// ProcessRoute is the client for interacting with the ProcessRoute builders.
|
||||
ProcessRoute *ProcessRouteClient
|
||||
// ProcessStep is the client for interacting with the ProcessStep builders.
|
||||
ProcessStep *ProcessStepClient
|
||||
// ProductType is the client for interacting with the ProductType builders.
|
||||
ProductType *ProductTypeClient
|
||||
// Role is the client for interacting with the Role builders.
|
||||
Role *RoleClient
|
||||
// RouteSegment is the client for interacting with the RouteSegment builders.
|
||||
RouteSegment *RouteSegmentClient
|
||||
// ScanRecord is the client for interacting with the ScanRecord builders.
|
||||
ScanRecord *ScanRecordClient
|
||||
// SemiFlow is the client for interacting with the SemiFlow builders.
|
||||
@@ -218,16 +218,15 @@ func (tx *Tx) init() {
|
||||
tx.EventLog = NewEventLogClient(tx.config)
|
||||
tx.InspectionRecord = NewInspectionRecordClient(tx.config)
|
||||
tx.LinePoint = NewLinePointClient(tx.config)
|
||||
tx.MaterialQtyReport = NewMaterialQtyReportClient(tx.config)
|
||||
tx.MaterialRequest = NewMaterialRequestClient(tx.config)
|
||||
tx.Permission = NewPermissionClient(tx.config)
|
||||
tx.PlcMoveCmd = NewPlcMoveCmdClient(tx.config)
|
||||
tx.PlcSendLog = NewPlcSendLogClient(tx.config)
|
||||
tx.ProcessFlow = NewProcessFlowClient(tx.config)
|
||||
tx.ProcessRoute = NewProcessRouteClient(tx.config)
|
||||
tx.ProcessStep = NewProcessStepClient(tx.config)
|
||||
tx.ProductType = NewProductTypeClient(tx.config)
|
||||
tx.Role = NewRoleClient(tx.config)
|
||||
tx.RouteSegment = NewRouteSegmentClient(tx.config)
|
||||
tx.ScanRecord = NewScanRecordClient(tx.config)
|
||||
tx.SemiFlow = NewSemiFlowClient(tx.config)
|
||||
tx.Station = NewStationClient(tx.config)
|
||||
@@ -304,3 +303,27 @@ func (tx *txDriver) Query(ctx context.Context, query string, args, v any) error
|
||||
}
|
||||
|
||||
var _ dialect.Driver = (*txDriver)(nil)
|
||||
|
||||
// ExecContext allows calling the underlying ExecContext method of the transaction if it is supported by it.
|
||||
// See, database/sql#Tx.ExecContext for more information.
|
||||
func (tx *txDriver) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error) {
|
||||
ex, ok := tx.tx.(interface {
|
||||
ExecContext(context.Context, string, ...any) (stdsql.Result, error)
|
||||
})
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("Tx.ExecContext is not supported")
|
||||
}
|
||||
return ex.ExecContext(ctx, query, args...)
|
||||
}
|
||||
|
||||
// QueryContext allows calling the underlying QueryContext method of the transaction if it is supported by it.
|
||||
// See, database/sql#Tx.QueryContext for more information.
|
||||
func (tx *txDriver) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error) {
|
||||
q, ok := tx.tx.(interface {
|
||||
QueryContext(context.Context, string, ...any) (*stdsql.Rows, error)
|
||||
})
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("Tx.QueryContext is not supported")
|
||||
}
|
||||
return q.QueryContext(ctx, query, args...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user