feat(mes/wms/终端): 签字循环业务重构 + 叫料池实物账两列 + 工位流水按包真分页 + 下线单据提示条(2026-11-30 现场整改)
【MES · 签字循环重构(业务重构,非修 bug)】 - 旧模型作废(签字随报工落库、检验员分支永不生效的死代码);新口径: 工人干完点「呼叫签字」→ 检验员巡检端签 OK/NG → OK 后工人再点一次「报工」;NG 整改后重新呼叫(新一轮) - 内容指纹(SHA256):呼叫时算一次落库,报工时重算比对,变了即「签字后改数据作废本轮」要求重呼; 只覆盖步骤录入(值/文本/勾选/拧紧结果),装机绑定不进指纹(独立台账)、改备注不触发 - 轮次统一:一次呼叫=一轮,操作工/检验员共用 round;NG/撤回/重呼=新一轮,旧轮作废历史保留 - 三档状态(作业中/签字中/待整改/可报工)从签字记录推导,不建表不存终端 - 报工闸门:本轮需签步骤齐全(操作工+检验员OK)+ 指纹未变才放行 - 撤回呼叫整轮作废;超时巡检每分钟扫描(阈值 30 分钟可在基础设置调),超时落预警中心+异常角标不进铃铛,60 分钟窗口去重 - 工位终端新增签字交互接口与呼叫/撤回/状态查询;巡检端保留 NG 回看 【MES · 叫料池实物账(十五节 Q1/Q16 + 17.6 裁决)】 - call_pool 新增 receivedQty(已收累计,拒收按退库单冲减)/ returnedQty(已退累计,按退库单号防重)两列实物账,与 sentQty 额度账并存 - 台面在手(可用)= 已收 − 已装 − 已退;在途 = 已发 − 已收 【工位终端 · 物料/叫料页重构(十五节 Q1~Q17 拍板落地)】 - 「本工位物料明细」改名「物料明细」,四数列改为:可用/需求/已发/已收/已装,量为 0 也显示不分左右托盘 - 去除「刷新池子」「刷新」按钮(有长连接);「我的叫料单」扩为类银行流水(叫料/退料/等等) - 叫料/退料数量列直排,提交时弹窗确认数量并选接驳台;管理端叫料与退料 AGV 派车流程统一收归库管 - 工位流水按包真分页(2026-11-29 拍板):后端按包号分组 Count+Limit/Offset,每页 20 包,前端不再内存聚合 【下线 · 单据流转提示条】 - MES/WMS 前端整体删除 NextStepBar / nextStep / nextStepRules(35 条规则表整套下线),页面不再出现常驻「下一步」提示条 【文档】 - 问题临时.md 新增十四节(主控独立审计:终端账号删除/心跳/闸门函数 8 处对码全过)+ 十五节(工位物料叫料 8 条原话逐字留档与 Q1~Q17 拍板底稿) - 新增《工位终端页面.md》;案例.md 同步更新验收口径
This commit is contained in:
@@ -37,6 +37,10 @@ type CallPool struct {
|
||||
ReservedQty int `json:"reservedQty,omitempty"`
|
||||
// 已装量(装配消耗:追溯件绑定扣/撤销回补,非序列号件报工自动扣)
|
||||
InstalledQty int `json:"installedQty,omitempty"`
|
||||
// 已收累计(送达并接收,实物账;拒收冲减)
|
||||
ReceivedQty int `json:"receivedQty,omitempty"`
|
||||
// 已退累计(工位主动退回,实物账;按退库单号防重)
|
||||
ReturnedQty int `json:"returnedQty,omitempty"`
|
||||
// 是否含非今日排产(跨日叫料预警/仓库驳回异常标记)
|
||||
CrossDay bool `json:"crossDay,omitempty"`
|
||||
// 派生快照:贡献需求的排产日期(逗号分隔,可空)
|
||||
@@ -55,7 +59,7 @@ func (*CallPool) scanValues(columns []string) ([]any, error) {
|
||||
switch columns[i] {
|
||||
case callpool.FieldCrossDay:
|
||||
values[i] = new(sql.NullBool)
|
||||
case callpool.FieldID, callpool.FieldStationNo, callpool.FieldSnMode, callpool.FieldReqQty, callpool.FieldAdjQty, callpool.FieldSentQty, callpool.FieldReservedQty, callpool.FieldInstalledQty:
|
||||
case callpool.FieldID, callpool.FieldStationNo, callpool.FieldSnMode, callpool.FieldReqQty, callpool.FieldAdjQty, callpool.FieldSentQty, callpool.FieldReservedQty, callpool.FieldInstalledQty, callpool.FieldReceivedQty, callpool.FieldReturnedQty:
|
||||
values[i] = new(sql.NullInt64)
|
||||
case callpool.FieldMaterialCode, callpool.FieldMaterialName, callpool.FieldUnit, callpool.FieldPlanDates:
|
||||
values[i] = new(sql.NullString)
|
||||
@@ -142,6 +146,18 @@ func (_m *CallPool) assignValues(columns []string, values []any) error {
|
||||
} else if value.Valid {
|
||||
_m.InstalledQty = int(value.Int64)
|
||||
}
|
||||
case callpool.FieldReceivedQty:
|
||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field receivedQty", values[i])
|
||||
} else if value.Valid {
|
||||
_m.ReceivedQty = int(value.Int64)
|
||||
}
|
||||
case callpool.FieldReturnedQty:
|
||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field returnedQty", values[i])
|
||||
} else if value.Valid {
|
||||
_m.ReturnedQty = int(value.Int64)
|
||||
}
|
||||
case callpool.FieldCrossDay:
|
||||
if value, ok := values[i].(*sql.NullBool); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field crossDay", values[i])
|
||||
@@ -232,6 +248,12 @@ func (_m *CallPool) String() string {
|
||||
builder.WriteString("installedQty=")
|
||||
builder.WriteString(fmt.Sprintf("%v", _m.InstalledQty))
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("receivedQty=")
|
||||
builder.WriteString(fmt.Sprintf("%v", _m.ReceivedQty))
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("returnedQty=")
|
||||
builder.WriteString(fmt.Sprintf("%v", _m.ReturnedQty))
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("crossDay=")
|
||||
builder.WriteString(fmt.Sprintf("%v", _m.CrossDay))
|
||||
builder.WriteString(", ")
|
||||
|
||||
@@ -33,6 +33,10 @@ const (
|
||||
FieldReservedQty = "reserved_qty"
|
||||
// FieldInstalledQty holds the string denoting the installedqty field in the database.
|
||||
FieldInstalledQty = "installed_qty"
|
||||
// FieldReceivedQty holds the string denoting the receivedqty field in the database.
|
||||
FieldReceivedQty = "received_qty"
|
||||
// FieldReturnedQty holds the string denoting the returnedqty field in the database.
|
||||
FieldReturnedQty = "returned_qty"
|
||||
// FieldCrossDay holds the string denoting the crossday field in the database.
|
||||
FieldCrossDay = "cross_day"
|
||||
// FieldPlanDates holds the string denoting the plandates field in the database.
|
||||
@@ -58,6 +62,8 @@ var Columns = []string{
|
||||
FieldSentQty,
|
||||
FieldReservedQty,
|
||||
FieldInstalledQty,
|
||||
FieldReceivedQty,
|
||||
FieldReturnedQty,
|
||||
FieldCrossDay,
|
||||
FieldPlanDates,
|
||||
FieldCreatedAt,
|
||||
@@ -97,6 +103,10 @@ var (
|
||||
DefaultReservedQty int
|
||||
// DefaultInstalledQty holds the default value on creation for the "installedQty" field.
|
||||
DefaultInstalledQty int
|
||||
// DefaultReceivedQty holds the default value on creation for the "receivedQty" field.
|
||||
DefaultReceivedQty int
|
||||
// DefaultReturnedQty holds the default value on creation for the "returnedQty" field.
|
||||
DefaultReturnedQty int
|
||||
// DefaultCrossDay holds the default value on creation for the "crossDay" field.
|
||||
DefaultCrossDay bool
|
||||
// DefaultPlanDates holds the default value on creation for the "planDates" field.
|
||||
@@ -171,6 +181,16 @@ func ByInstalledQty(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldInstalledQty, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByReceivedQty orders the results by the receivedQty field.
|
||||
func ByReceivedQty(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldReceivedQty, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByReturnedQty orders the results by the returnedQty field.
|
||||
func ByReturnedQty(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldReturnedQty, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCrossDay orders the results by the crossDay field.
|
||||
func ByCrossDay(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCrossDay, opts...).ToFunc()
|
||||
|
||||
@@ -104,6 +104,16 @@ func InstalledQty(v int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldEQ(FieldInstalledQty, v))
|
||||
}
|
||||
|
||||
// ReceivedQty applies equality check predicate on the "receivedQty" field. It's identical to ReceivedQtyEQ.
|
||||
func ReceivedQty(v int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldEQ(FieldReceivedQty, v))
|
||||
}
|
||||
|
||||
// ReturnedQty applies equality check predicate on the "returnedQty" field. It's identical to ReturnedQtyEQ.
|
||||
func ReturnedQty(v int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldEQ(FieldReturnedQty, v))
|
||||
}
|
||||
|
||||
// CrossDay applies equality check predicate on the "crossDay" field. It's identical to CrossDayEQ.
|
||||
func CrossDay(v bool) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldEQ(FieldCrossDay, v))
|
||||
@@ -599,6 +609,86 @@ func InstalledQtyLTE(v int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldLTE(FieldInstalledQty, v))
|
||||
}
|
||||
|
||||
// ReceivedQtyEQ applies the EQ predicate on the "receivedQty" field.
|
||||
func ReceivedQtyEQ(v int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldEQ(FieldReceivedQty, v))
|
||||
}
|
||||
|
||||
// ReceivedQtyNEQ applies the NEQ predicate on the "receivedQty" field.
|
||||
func ReceivedQtyNEQ(v int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldNEQ(FieldReceivedQty, v))
|
||||
}
|
||||
|
||||
// ReceivedQtyIn applies the In predicate on the "receivedQty" field.
|
||||
func ReceivedQtyIn(vs ...int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldIn(FieldReceivedQty, vs...))
|
||||
}
|
||||
|
||||
// ReceivedQtyNotIn applies the NotIn predicate on the "receivedQty" field.
|
||||
func ReceivedQtyNotIn(vs ...int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldNotIn(FieldReceivedQty, vs...))
|
||||
}
|
||||
|
||||
// ReceivedQtyGT applies the GT predicate on the "receivedQty" field.
|
||||
func ReceivedQtyGT(v int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldGT(FieldReceivedQty, v))
|
||||
}
|
||||
|
||||
// ReceivedQtyGTE applies the GTE predicate on the "receivedQty" field.
|
||||
func ReceivedQtyGTE(v int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldGTE(FieldReceivedQty, v))
|
||||
}
|
||||
|
||||
// ReceivedQtyLT applies the LT predicate on the "receivedQty" field.
|
||||
func ReceivedQtyLT(v int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldLT(FieldReceivedQty, v))
|
||||
}
|
||||
|
||||
// ReceivedQtyLTE applies the LTE predicate on the "receivedQty" field.
|
||||
func ReceivedQtyLTE(v int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldLTE(FieldReceivedQty, v))
|
||||
}
|
||||
|
||||
// ReturnedQtyEQ applies the EQ predicate on the "returnedQty" field.
|
||||
func ReturnedQtyEQ(v int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldEQ(FieldReturnedQty, v))
|
||||
}
|
||||
|
||||
// ReturnedQtyNEQ applies the NEQ predicate on the "returnedQty" field.
|
||||
func ReturnedQtyNEQ(v int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldNEQ(FieldReturnedQty, v))
|
||||
}
|
||||
|
||||
// ReturnedQtyIn applies the In predicate on the "returnedQty" field.
|
||||
func ReturnedQtyIn(vs ...int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldIn(FieldReturnedQty, vs...))
|
||||
}
|
||||
|
||||
// ReturnedQtyNotIn applies the NotIn predicate on the "returnedQty" field.
|
||||
func ReturnedQtyNotIn(vs ...int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldNotIn(FieldReturnedQty, vs...))
|
||||
}
|
||||
|
||||
// ReturnedQtyGT applies the GT predicate on the "returnedQty" field.
|
||||
func ReturnedQtyGT(v int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldGT(FieldReturnedQty, v))
|
||||
}
|
||||
|
||||
// ReturnedQtyGTE applies the GTE predicate on the "returnedQty" field.
|
||||
func ReturnedQtyGTE(v int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldGTE(FieldReturnedQty, v))
|
||||
}
|
||||
|
||||
// ReturnedQtyLT applies the LT predicate on the "returnedQty" field.
|
||||
func ReturnedQtyLT(v int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldLT(FieldReturnedQty, v))
|
||||
}
|
||||
|
||||
// ReturnedQtyLTE applies the LTE predicate on the "returnedQty" field.
|
||||
func ReturnedQtyLTE(v int) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldLTE(FieldReturnedQty, v))
|
||||
}
|
||||
|
||||
// CrossDayEQ applies the EQ predicate on the "crossDay" field.
|
||||
func CrossDayEQ(v bool) predicate.CallPool {
|
||||
return predicate.CallPool(sql.FieldEQ(FieldCrossDay, v))
|
||||
|
||||
@@ -144,6 +144,34 @@ func (_c *CallPoolCreate) SetNillableInstalledQty(v *int) *CallPoolCreate {
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetReceivedQty sets the "receivedQty" field.
|
||||
func (_c *CallPoolCreate) SetReceivedQty(v int) *CallPoolCreate {
|
||||
_c.mutation.SetReceivedQty(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableReceivedQty sets the "receivedQty" field if the given value is not nil.
|
||||
func (_c *CallPoolCreate) SetNillableReceivedQty(v *int) *CallPoolCreate {
|
||||
if v != nil {
|
||||
_c.SetReceivedQty(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetReturnedQty sets the "returnedQty" field.
|
||||
func (_c *CallPoolCreate) SetReturnedQty(v int) *CallPoolCreate {
|
||||
_c.mutation.SetReturnedQty(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableReturnedQty sets the "returnedQty" field if the given value is not nil.
|
||||
func (_c *CallPoolCreate) SetNillableReturnedQty(v *int) *CallPoolCreate {
|
||||
if v != nil {
|
||||
_c.SetReturnedQty(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetCrossDay sets the "crossDay" field.
|
||||
func (_c *CallPoolCreate) SetCrossDay(v bool) *CallPoolCreate {
|
||||
_c.mutation.SetCrossDay(v)
|
||||
@@ -273,6 +301,14 @@ func (_c *CallPoolCreate) defaults() {
|
||||
v := callpool.DefaultInstalledQty
|
||||
_c.mutation.SetInstalledQty(v)
|
||||
}
|
||||
if _, ok := _c.mutation.ReceivedQty(); !ok {
|
||||
v := callpool.DefaultReceivedQty
|
||||
_c.mutation.SetReceivedQty(v)
|
||||
}
|
||||
if _, ok := _c.mutation.ReturnedQty(); !ok {
|
||||
v := callpool.DefaultReturnedQty
|
||||
_c.mutation.SetReturnedQty(v)
|
||||
}
|
||||
if _, ok := _c.mutation.CrossDay(); !ok {
|
||||
v := callpool.DefaultCrossDay
|
||||
_c.mutation.SetCrossDay(v)
|
||||
@@ -338,6 +374,12 @@ func (_c *CallPoolCreate) check() error {
|
||||
if _, ok := _c.mutation.InstalledQty(); !ok {
|
||||
return &ValidationError{Name: "installedQty", err: errors.New(`ent: missing required field "CallPool.installedQty"`)}
|
||||
}
|
||||
if _, ok := _c.mutation.ReceivedQty(); !ok {
|
||||
return &ValidationError{Name: "receivedQty", err: errors.New(`ent: missing required field "CallPool.receivedQty"`)}
|
||||
}
|
||||
if _, ok := _c.mutation.ReturnedQty(); !ok {
|
||||
return &ValidationError{Name: "returnedQty", err: errors.New(`ent: missing required field "CallPool.returnedQty"`)}
|
||||
}
|
||||
if _, ok := _c.mutation.CrossDay(); !ok {
|
||||
return &ValidationError{Name: "crossDay", err: errors.New(`ent: missing required field "CallPool.crossDay"`)}
|
||||
}
|
||||
@@ -432,6 +474,14 @@ func (_c *CallPoolCreate) createSpec() (*CallPool, *sqlgraph.CreateSpec) {
|
||||
_spec.SetField(callpool.FieldInstalledQty, field.TypeInt, value)
|
||||
_node.InstalledQty = value
|
||||
}
|
||||
if value, ok := _c.mutation.ReceivedQty(); ok {
|
||||
_spec.SetField(callpool.FieldReceivedQty, field.TypeInt, value)
|
||||
_node.ReceivedQty = value
|
||||
}
|
||||
if value, ok := _c.mutation.ReturnedQty(); ok {
|
||||
_spec.SetField(callpool.FieldReturnedQty, field.TypeInt, value)
|
||||
_node.ReturnedQty = value
|
||||
}
|
||||
if value, ok := _c.mutation.CrossDay(); ok {
|
||||
_spec.SetField(callpool.FieldCrossDay, field.TypeBool, value)
|
||||
_node.CrossDay = value
|
||||
|
||||
@@ -218,6 +218,48 @@ func (_u *CallPoolUpdate) AddInstalledQty(v int) *CallPoolUpdate {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetReceivedQty sets the "receivedQty" field.
|
||||
func (_u *CallPoolUpdate) SetReceivedQty(v int) *CallPoolUpdate {
|
||||
_u.mutation.ResetReceivedQty()
|
||||
_u.mutation.SetReceivedQty(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableReceivedQty sets the "receivedQty" field if the given value is not nil.
|
||||
func (_u *CallPoolUpdate) SetNillableReceivedQty(v *int) *CallPoolUpdate {
|
||||
if v != nil {
|
||||
_u.SetReceivedQty(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// AddReceivedQty adds value to the "receivedQty" field.
|
||||
func (_u *CallPoolUpdate) AddReceivedQty(v int) *CallPoolUpdate {
|
||||
_u.mutation.AddReceivedQty(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetReturnedQty sets the "returnedQty" field.
|
||||
func (_u *CallPoolUpdate) SetReturnedQty(v int) *CallPoolUpdate {
|
||||
_u.mutation.ResetReturnedQty()
|
||||
_u.mutation.SetReturnedQty(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableReturnedQty sets the "returnedQty" field if the given value is not nil.
|
||||
func (_u *CallPoolUpdate) SetNillableReturnedQty(v *int) *CallPoolUpdate {
|
||||
if v != nil {
|
||||
_u.SetReturnedQty(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// AddReturnedQty adds value to the "returnedQty" field.
|
||||
func (_u *CallPoolUpdate) AddReturnedQty(v int) *CallPoolUpdate {
|
||||
_u.mutation.AddReturnedQty(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetCrossDay sets the "crossDay" field.
|
||||
func (_u *CallPoolUpdate) SetCrossDay(v bool) *CallPoolUpdate {
|
||||
_u.mutation.SetCrossDay(v)
|
||||
@@ -387,6 +429,18 @@ func (_u *CallPoolUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
if value, ok := _u.mutation.AddedInstalledQty(); ok {
|
||||
_spec.AddField(callpool.FieldInstalledQty, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.ReceivedQty(); ok {
|
||||
_spec.SetField(callpool.FieldReceivedQty, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.AddedReceivedQty(); ok {
|
||||
_spec.AddField(callpool.FieldReceivedQty, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.ReturnedQty(); ok {
|
||||
_spec.SetField(callpool.FieldReturnedQty, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.AddedReturnedQty(); ok {
|
||||
_spec.AddField(callpool.FieldReturnedQty, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.CrossDay(); ok {
|
||||
_spec.SetField(callpool.FieldCrossDay, field.TypeBool, value)
|
||||
}
|
||||
@@ -607,6 +661,48 @@ func (_u *CallPoolUpdateOne) AddInstalledQty(v int) *CallPoolUpdateOne {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetReceivedQty sets the "receivedQty" field.
|
||||
func (_u *CallPoolUpdateOne) SetReceivedQty(v int) *CallPoolUpdateOne {
|
||||
_u.mutation.ResetReceivedQty()
|
||||
_u.mutation.SetReceivedQty(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableReceivedQty sets the "receivedQty" field if the given value is not nil.
|
||||
func (_u *CallPoolUpdateOne) SetNillableReceivedQty(v *int) *CallPoolUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetReceivedQty(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// AddReceivedQty adds value to the "receivedQty" field.
|
||||
func (_u *CallPoolUpdateOne) AddReceivedQty(v int) *CallPoolUpdateOne {
|
||||
_u.mutation.AddReceivedQty(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetReturnedQty sets the "returnedQty" field.
|
||||
func (_u *CallPoolUpdateOne) SetReturnedQty(v int) *CallPoolUpdateOne {
|
||||
_u.mutation.ResetReturnedQty()
|
||||
_u.mutation.SetReturnedQty(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableReturnedQty sets the "returnedQty" field if the given value is not nil.
|
||||
func (_u *CallPoolUpdateOne) SetNillableReturnedQty(v *int) *CallPoolUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetReturnedQty(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// AddReturnedQty adds value to the "returnedQty" field.
|
||||
func (_u *CallPoolUpdateOne) AddReturnedQty(v int) *CallPoolUpdateOne {
|
||||
_u.mutation.AddReturnedQty(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetCrossDay sets the "crossDay" field.
|
||||
func (_u *CallPoolUpdateOne) SetCrossDay(v bool) *CallPoolUpdateOne {
|
||||
_u.mutation.SetCrossDay(v)
|
||||
@@ -806,6 +902,18 @@ func (_u *CallPoolUpdateOne) sqlSave(ctx context.Context) (_node *CallPool, err
|
||||
if value, ok := _u.mutation.AddedInstalledQty(); ok {
|
||||
_spec.AddField(callpool.FieldInstalledQty, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.ReceivedQty(); ok {
|
||||
_spec.SetField(callpool.FieldReceivedQty, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.AddedReceivedQty(); ok {
|
||||
_spec.AddField(callpool.FieldReceivedQty, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.ReturnedQty(); ok {
|
||||
_spec.SetField(callpool.FieldReturnedQty, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.AddedReturnedQty(); ok {
|
||||
_spec.AddField(callpool.FieldReturnedQty, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.CrossDay(); ok {
|
||||
_spec.SetField(callpool.FieldCrossDay, field.TypeBool, value)
|
||||
}
|
||||
|
||||
@@ -320,6 +320,8 @@ var (
|
||||
{Name: "sent_qty", Type: field.TypeInt, Comment: "已发净额(完成备料实发累加;退库收回扣减回补)", Default: 0},
|
||||
{Name: "reserved_qty", Type: field.TypeInt, Comment: "占用中(待备料叫料单请求量合计)", Default: 0},
|
||||
{Name: "installed_qty", Type: field.TypeInt, Comment: "已装量(装配消耗:追溯件绑定扣/撤销回补,非序列号件报工自动扣)", Default: 0},
|
||||
{Name: "received_qty", Type: field.TypeInt, Comment: "已收累计(送达并接收,实物账;拒收冲减)", Default: 0},
|
||||
{Name: "returned_qty", Type: field.TypeInt, Comment: "已退累计(工位主动退回,实物账;按退库单号防重)", Default: 0},
|
||||
{Name: "cross_day", Type: field.TypeBool, Comment: "是否含非今日排产(跨日叫料预警/仓库驳回异常标记)", Default: false},
|
||||
{Name: "plan_dates", Type: field.TypeString, Size: 255, Comment: "派生快照:贡献需求的排产日期(逗号分隔,可空)", Default: ""},
|
||||
{Name: "created_at", Type: field.TypeTime},
|
||||
@@ -1296,6 +1298,7 @@ var (
|
||||
{Name: "round", Type: field.TypeInt, Comment: "返修重做轮次(1=首做)", Default: 1},
|
||||
{Name: "source", Type: field.TypeString, Size: 20, Comment: "签字来源 station/inspect/migrate", Default: "station"},
|
||||
{Name: "remark", Type: field.TypeString, Size: 256, Comment: "签字备注(签字弹框选填)", Default: ""},
|
||||
{Name: "fingerprint", Type: field.TypeString, Size: 64, Comment: "呼叫签字时的内容指纹(步骤+绑定),报工比对防改数据", Default: ""},
|
||||
{Name: "revoked", Type: field.TypeBool, Comment: "是否已撤销", Default: false},
|
||||
{Name: "revoked_by", Type: field.TypeString, Size: 64, Comment: "撤销人", Default: ""},
|
||||
{Name: "revoked_at", Type: field.TypeTime, Nullable: true, Comment: "撤销时间"},
|
||||
|
||||
@@ -8297,6 +8297,10 @@ type CallPoolMutation struct {
|
||||
addreservedQty *int
|
||||
installedQty *int
|
||||
addinstalledQty *int
|
||||
receivedQty *int
|
||||
addreceivedQty *int
|
||||
returnedQty *int
|
||||
addreturnedQty *int
|
||||
crossDay *bool
|
||||
planDates *string
|
||||
createdAt *time.Time
|
||||
@@ -8911,6 +8915,118 @@ func (m *CallPoolMutation) ResetInstalledQty() {
|
||||
m.addinstalledQty = nil
|
||||
}
|
||||
|
||||
// SetReceivedQty sets the "receivedQty" field.
|
||||
func (m *CallPoolMutation) SetReceivedQty(i int) {
|
||||
m.receivedQty = &i
|
||||
m.addreceivedQty = nil
|
||||
}
|
||||
|
||||
// ReceivedQty returns the value of the "receivedQty" field in the mutation.
|
||||
func (m *CallPoolMutation) ReceivedQty() (r int, exists bool) {
|
||||
v := m.receivedQty
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldReceivedQty returns the old "receivedQty" field's value of the CallPool entity.
|
||||
// If the CallPool object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *CallPoolMutation) OldReceivedQty(ctx context.Context) (v int, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldReceivedQty is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldReceivedQty requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldReceivedQty: %w", err)
|
||||
}
|
||||
return oldValue.ReceivedQty, nil
|
||||
}
|
||||
|
||||
// AddReceivedQty adds i to the "receivedQty" field.
|
||||
func (m *CallPoolMutation) AddReceivedQty(i int) {
|
||||
if m.addreceivedQty != nil {
|
||||
*m.addreceivedQty += i
|
||||
} else {
|
||||
m.addreceivedQty = &i
|
||||
}
|
||||
}
|
||||
|
||||
// AddedReceivedQty returns the value that was added to the "receivedQty" field in this mutation.
|
||||
func (m *CallPoolMutation) AddedReceivedQty() (r int, exists bool) {
|
||||
v := m.addreceivedQty
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// ResetReceivedQty resets all changes to the "receivedQty" field.
|
||||
func (m *CallPoolMutation) ResetReceivedQty() {
|
||||
m.receivedQty = nil
|
||||
m.addreceivedQty = nil
|
||||
}
|
||||
|
||||
// SetReturnedQty sets the "returnedQty" field.
|
||||
func (m *CallPoolMutation) SetReturnedQty(i int) {
|
||||
m.returnedQty = &i
|
||||
m.addreturnedQty = nil
|
||||
}
|
||||
|
||||
// ReturnedQty returns the value of the "returnedQty" field in the mutation.
|
||||
func (m *CallPoolMutation) ReturnedQty() (r int, exists bool) {
|
||||
v := m.returnedQty
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldReturnedQty returns the old "returnedQty" field's value of the CallPool entity.
|
||||
// If the CallPool object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *CallPoolMutation) OldReturnedQty(ctx context.Context) (v int, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldReturnedQty is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldReturnedQty requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldReturnedQty: %w", err)
|
||||
}
|
||||
return oldValue.ReturnedQty, nil
|
||||
}
|
||||
|
||||
// AddReturnedQty adds i to the "returnedQty" field.
|
||||
func (m *CallPoolMutation) AddReturnedQty(i int) {
|
||||
if m.addreturnedQty != nil {
|
||||
*m.addreturnedQty += i
|
||||
} else {
|
||||
m.addreturnedQty = &i
|
||||
}
|
||||
}
|
||||
|
||||
// AddedReturnedQty returns the value that was added to the "returnedQty" field in this mutation.
|
||||
func (m *CallPoolMutation) AddedReturnedQty() (r int, exists bool) {
|
||||
v := m.addreturnedQty
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// ResetReturnedQty resets all changes to the "returnedQty" field.
|
||||
func (m *CallPoolMutation) ResetReturnedQty() {
|
||||
m.returnedQty = nil
|
||||
m.addreturnedQty = nil
|
||||
}
|
||||
|
||||
// SetCrossDay sets the "crossDay" field.
|
||||
func (m *CallPoolMutation) SetCrossDay(b bool) {
|
||||
m.crossDay = &b
|
||||
@@ -9089,7 +9205,7 @@ func (m *CallPoolMutation) Type() string {
|
||||
// order to get all numeric fields that were incremented/decremented, call
|
||||
// AddedFields().
|
||||
func (m *CallPoolMutation) Fields() []string {
|
||||
fields := make([]string, 0, 14)
|
||||
fields := make([]string, 0, 16)
|
||||
if m.stationNo != nil {
|
||||
fields = append(fields, callpool.FieldStationNo)
|
||||
}
|
||||
@@ -9120,6 +9236,12 @@ func (m *CallPoolMutation) Fields() []string {
|
||||
if m.installedQty != nil {
|
||||
fields = append(fields, callpool.FieldInstalledQty)
|
||||
}
|
||||
if m.receivedQty != nil {
|
||||
fields = append(fields, callpool.FieldReceivedQty)
|
||||
}
|
||||
if m.returnedQty != nil {
|
||||
fields = append(fields, callpool.FieldReturnedQty)
|
||||
}
|
||||
if m.crossDay != nil {
|
||||
fields = append(fields, callpool.FieldCrossDay)
|
||||
}
|
||||
@@ -9160,6 +9282,10 @@ func (m *CallPoolMutation) Field(name string) (ent.Value, bool) {
|
||||
return m.ReservedQty()
|
||||
case callpool.FieldInstalledQty:
|
||||
return m.InstalledQty()
|
||||
case callpool.FieldReceivedQty:
|
||||
return m.ReceivedQty()
|
||||
case callpool.FieldReturnedQty:
|
||||
return m.ReturnedQty()
|
||||
case callpool.FieldCrossDay:
|
||||
return m.CrossDay()
|
||||
case callpool.FieldPlanDates:
|
||||
@@ -9197,6 +9323,10 @@ func (m *CallPoolMutation) OldField(ctx context.Context, name string) (ent.Value
|
||||
return m.OldReservedQty(ctx)
|
||||
case callpool.FieldInstalledQty:
|
||||
return m.OldInstalledQty(ctx)
|
||||
case callpool.FieldReceivedQty:
|
||||
return m.OldReceivedQty(ctx)
|
||||
case callpool.FieldReturnedQty:
|
||||
return m.OldReturnedQty(ctx)
|
||||
case callpool.FieldCrossDay:
|
||||
return m.OldCrossDay(ctx)
|
||||
case callpool.FieldPlanDates:
|
||||
@@ -9284,6 +9414,20 @@ func (m *CallPoolMutation) SetField(name string, value ent.Value) error {
|
||||
}
|
||||
m.SetInstalledQty(v)
|
||||
return nil
|
||||
case callpool.FieldReceivedQty:
|
||||
v, ok := value.(int)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetReceivedQty(v)
|
||||
return nil
|
||||
case callpool.FieldReturnedQty:
|
||||
v, ok := value.(int)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetReturnedQty(v)
|
||||
return nil
|
||||
case callpool.FieldCrossDay:
|
||||
v, ok := value.(bool)
|
||||
if !ok {
|
||||
@@ -9341,6 +9485,12 @@ func (m *CallPoolMutation) AddedFields() []string {
|
||||
if m.addinstalledQty != nil {
|
||||
fields = append(fields, callpool.FieldInstalledQty)
|
||||
}
|
||||
if m.addreceivedQty != nil {
|
||||
fields = append(fields, callpool.FieldReceivedQty)
|
||||
}
|
||||
if m.addreturnedQty != nil {
|
||||
fields = append(fields, callpool.FieldReturnedQty)
|
||||
}
|
||||
return fields
|
||||
}
|
||||
|
||||
@@ -9363,6 +9513,10 @@ func (m *CallPoolMutation) AddedField(name string) (ent.Value, bool) {
|
||||
return m.AddedReservedQty()
|
||||
case callpool.FieldInstalledQty:
|
||||
return m.AddedInstalledQty()
|
||||
case callpool.FieldReceivedQty:
|
||||
return m.AddedReceivedQty()
|
||||
case callpool.FieldReturnedQty:
|
||||
return m.AddedReturnedQty()
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
@@ -9421,6 +9575,20 @@ func (m *CallPoolMutation) AddField(name string, value ent.Value) error {
|
||||
}
|
||||
m.AddInstalledQty(v)
|
||||
return nil
|
||||
case callpool.FieldReceivedQty:
|
||||
v, ok := value.(int)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.AddReceivedQty(v)
|
||||
return nil
|
||||
case callpool.FieldReturnedQty:
|
||||
v, ok := value.(int)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.AddReturnedQty(v)
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("unknown CallPool numeric field %s", name)
|
||||
}
|
||||
@@ -9478,6 +9646,12 @@ func (m *CallPoolMutation) ResetField(name string) error {
|
||||
case callpool.FieldInstalledQty:
|
||||
m.ResetInstalledQty()
|
||||
return nil
|
||||
case callpool.FieldReceivedQty:
|
||||
m.ResetReceivedQty()
|
||||
return nil
|
||||
case callpool.FieldReturnedQty:
|
||||
m.ResetReturnedQty()
|
||||
return nil
|
||||
case callpool.FieldCrossDay:
|
||||
m.ResetCrossDay()
|
||||
return nil
|
||||
@@ -35799,6 +35973,7 @@ type StepSignRecordMutation struct {
|
||||
addround *int
|
||||
source *string
|
||||
remark *string
|
||||
fingerprint *string
|
||||
revoked *bool
|
||||
revokedBy *string
|
||||
revokedAt *time.Time
|
||||
@@ -36442,6 +36617,42 @@ func (m *StepSignRecordMutation) ResetRemark() {
|
||||
m.remark = nil
|
||||
}
|
||||
|
||||
// SetFingerprint sets the "fingerprint" field.
|
||||
func (m *StepSignRecordMutation) SetFingerprint(s string) {
|
||||
m.fingerprint = &s
|
||||
}
|
||||
|
||||
// Fingerprint returns the value of the "fingerprint" field in the mutation.
|
||||
func (m *StepSignRecordMutation) Fingerprint() (r string, exists bool) {
|
||||
v := m.fingerprint
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldFingerprint returns the old "fingerprint" field's value of the StepSignRecord entity.
|
||||
// If the StepSignRecord object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *StepSignRecordMutation) OldFingerprint(ctx context.Context) (v string, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldFingerprint is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldFingerprint requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldFingerprint: %w", err)
|
||||
}
|
||||
return oldValue.Fingerprint, nil
|
||||
}
|
||||
|
||||
// ResetFingerprint resets all changes to the "fingerprint" field.
|
||||
func (m *StepSignRecordMutation) ResetFingerprint() {
|
||||
m.fingerprint = nil
|
||||
}
|
||||
|
||||
// SetRevoked sets the "revoked" field.
|
||||
func (m *StepSignRecordMutation) SetRevoked(b bool) {
|
||||
m.revoked = &b
|
||||
@@ -36669,7 +36880,7 @@ func (m *StepSignRecordMutation) Type() string {
|
||||
// order to get all numeric fields that were incremented/decremented, call
|
||||
// AddedFields().
|
||||
func (m *StepSignRecordMutation) Fields() []string {
|
||||
fields := make([]string, 0, 18)
|
||||
fields := make([]string, 0, 19)
|
||||
if m.sn != nil {
|
||||
fields = append(fields, stepsignrecord.FieldSn)
|
||||
}
|
||||
@@ -36709,6 +36920,9 @@ func (m *StepSignRecordMutation) Fields() []string {
|
||||
if m.remark != nil {
|
||||
fields = append(fields, stepsignrecord.FieldRemark)
|
||||
}
|
||||
if m.fingerprint != nil {
|
||||
fields = append(fields, stepsignrecord.FieldFingerprint)
|
||||
}
|
||||
if m.revoked != nil {
|
||||
fields = append(fields, stepsignrecord.FieldRevoked)
|
||||
}
|
||||
@@ -36758,6 +36972,8 @@ func (m *StepSignRecordMutation) Field(name string) (ent.Value, bool) {
|
||||
return m.Source()
|
||||
case stepsignrecord.FieldRemark:
|
||||
return m.Remark()
|
||||
case stepsignrecord.FieldFingerprint:
|
||||
return m.Fingerprint()
|
||||
case stepsignrecord.FieldRevoked:
|
||||
return m.Revoked()
|
||||
case stepsignrecord.FieldRevokedBy:
|
||||
@@ -36803,6 +37019,8 @@ func (m *StepSignRecordMutation) OldField(ctx context.Context, name string) (ent
|
||||
return m.OldSource(ctx)
|
||||
case stepsignrecord.FieldRemark:
|
||||
return m.OldRemark(ctx)
|
||||
case stepsignrecord.FieldFingerprint:
|
||||
return m.OldFingerprint(ctx)
|
||||
case stepsignrecord.FieldRevoked:
|
||||
return m.OldRevoked(ctx)
|
||||
case stepsignrecord.FieldRevokedBy:
|
||||
@@ -36913,6 +37131,13 @@ func (m *StepSignRecordMutation) SetField(name string, value ent.Value) error {
|
||||
}
|
||||
m.SetRemark(v)
|
||||
return nil
|
||||
case stepsignrecord.FieldFingerprint:
|
||||
v, ok := value.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetFingerprint(v)
|
||||
return nil
|
||||
case stepsignrecord.FieldRevoked:
|
||||
v, ok := value.(bool)
|
||||
if !ok {
|
||||
@@ -37084,6 +37309,9 @@ func (m *StepSignRecordMutation) ResetField(name string) error {
|
||||
case stepsignrecord.FieldRemark:
|
||||
m.ResetRemark()
|
||||
return nil
|
||||
case stepsignrecord.FieldFingerprint:
|
||||
m.ResetFingerprint()
|
||||
return nil
|
||||
case stepsignrecord.FieldRevoked:
|
||||
m.ResetRevoked()
|
||||
return nil
|
||||
|
||||
@@ -587,22 +587,30 @@ func init() {
|
||||
callpoolDescInstalledQty := callpoolFields[10].Descriptor()
|
||||
// callpool.DefaultInstalledQty holds the default value on creation for the installedQty field.
|
||||
callpool.DefaultInstalledQty = callpoolDescInstalledQty.Default.(int)
|
||||
// callpoolDescReceivedQty is the schema descriptor for receivedQty field.
|
||||
callpoolDescReceivedQty := callpoolFields[11].Descriptor()
|
||||
// callpool.DefaultReceivedQty holds the default value on creation for the receivedQty field.
|
||||
callpool.DefaultReceivedQty = callpoolDescReceivedQty.Default.(int)
|
||||
// callpoolDescReturnedQty is the schema descriptor for returnedQty field.
|
||||
callpoolDescReturnedQty := callpoolFields[12].Descriptor()
|
||||
// callpool.DefaultReturnedQty holds the default value on creation for the returnedQty field.
|
||||
callpool.DefaultReturnedQty = callpoolDescReturnedQty.Default.(int)
|
||||
// callpoolDescCrossDay is the schema descriptor for crossDay field.
|
||||
callpoolDescCrossDay := callpoolFields[11].Descriptor()
|
||||
callpoolDescCrossDay := callpoolFields[13].Descriptor()
|
||||
// callpool.DefaultCrossDay holds the default value on creation for the crossDay field.
|
||||
callpool.DefaultCrossDay = callpoolDescCrossDay.Default.(bool)
|
||||
// callpoolDescPlanDates is the schema descriptor for planDates field.
|
||||
callpoolDescPlanDates := callpoolFields[12].Descriptor()
|
||||
callpoolDescPlanDates := callpoolFields[14].Descriptor()
|
||||
// callpool.DefaultPlanDates holds the default value on creation for the planDates field.
|
||||
callpool.DefaultPlanDates = callpoolDescPlanDates.Default.(string)
|
||||
// callpool.PlanDatesValidator is a validator for the "planDates" field. It is called by the builders before save.
|
||||
callpool.PlanDatesValidator = callpoolDescPlanDates.Validators[0].(func(string) error)
|
||||
// callpoolDescCreatedAt is the schema descriptor for createdAt field.
|
||||
callpoolDescCreatedAt := callpoolFields[13].Descriptor()
|
||||
callpoolDescCreatedAt := callpoolFields[15].Descriptor()
|
||||
// callpool.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
callpool.DefaultCreatedAt = callpoolDescCreatedAt.Default.(func() time.Time)
|
||||
// callpoolDescUpdatedAt is the schema descriptor for updatedAt field.
|
||||
callpoolDescUpdatedAt := callpoolFields[14].Descriptor()
|
||||
callpoolDescUpdatedAt := callpoolFields[16].Descriptor()
|
||||
// callpool.DefaultUpdatedAt holds the default value on creation for the updatedAt field.
|
||||
callpool.DefaultUpdatedAt = callpoolDescUpdatedAt.Default.(func() time.Time)
|
||||
// callpool.UpdateDefaultUpdatedAt holds the default value on update for the updatedAt field.
|
||||
@@ -2077,24 +2085,30 @@ func init() {
|
||||
stepsignrecord.DefaultRemark = stepsignrecordDescRemark.Default.(string)
|
||||
// stepsignrecord.RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
|
||||
stepsignrecord.RemarkValidator = stepsignrecordDescRemark.Validators[0].(func(string) error)
|
||||
// stepsignrecordDescFingerprint is the schema descriptor for fingerprint field.
|
||||
stepsignrecordDescFingerprint := stepsignrecordFields[14].Descriptor()
|
||||
// stepsignrecord.DefaultFingerprint holds the default value on creation for the fingerprint field.
|
||||
stepsignrecord.DefaultFingerprint = stepsignrecordDescFingerprint.Default.(string)
|
||||
// stepsignrecord.FingerprintValidator is a validator for the "fingerprint" field. It is called by the builders before save.
|
||||
stepsignrecord.FingerprintValidator = stepsignrecordDescFingerprint.Validators[0].(func(string) error)
|
||||
// stepsignrecordDescRevoked is the schema descriptor for revoked field.
|
||||
stepsignrecordDescRevoked := stepsignrecordFields[14].Descriptor()
|
||||
stepsignrecordDescRevoked := stepsignrecordFields[15].Descriptor()
|
||||
// stepsignrecord.DefaultRevoked holds the default value on creation for the revoked field.
|
||||
stepsignrecord.DefaultRevoked = stepsignrecordDescRevoked.Default.(bool)
|
||||
// stepsignrecordDescRevokedBy is the schema descriptor for revokedBy field.
|
||||
stepsignrecordDescRevokedBy := stepsignrecordFields[15].Descriptor()
|
||||
stepsignrecordDescRevokedBy := stepsignrecordFields[16].Descriptor()
|
||||
// stepsignrecord.DefaultRevokedBy holds the default value on creation for the revokedBy field.
|
||||
stepsignrecord.DefaultRevokedBy = stepsignrecordDescRevokedBy.Default.(string)
|
||||
// stepsignrecord.RevokedByValidator is a validator for the "revokedBy" field. It is called by the builders before save.
|
||||
stepsignrecord.RevokedByValidator = stepsignrecordDescRevokedBy.Validators[0].(func(string) error)
|
||||
// stepsignrecordDescRevokeReason is the schema descriptor for revokeReason field.
|
||||
stepsignrecordDescRevokeReason := stepsignrecordFields[17].Descriptor()
|
||||
stepsignrecordDescRevokeReason := stepsignrecordFields[18].Descriptor()
|
||||
// stepsignrecord.DefaultRevokeReason holds the default value on creation for the revokeReason field.
|
||||
stepsignrecord.DefaultRevokeReason = stepsignrecordDescRevokeReason.Default.(string)
|
||||
// stepsignrecord.RevokeReasonValidator is a validator for the "revokeReason" field. It is called by the builders before save.
|
||||
stepsignrecord.RevokeReasonValidator = stepsignrecordDescRevokeReason.Validators[0].(func(string) error)
|
||||
// stepsignrecordDescCreatedAt is the schema descriptor for createdAt field.
|
||||
stepsignrecordDescCreatedAt := stepsignrecordFields[18].Descriptor()
|
||||
stepsignrecordDescCreatedAt := stepsignrecordFields[19].Descriptor()
|
||||
// stepsignrecord.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
stepsignrecord.DefaultCreatedAt = stepsignrecordDescCreatedAt.Default.(func() time.Time)
|
||||
// stepsignrecordDescID is the schema descriptor for id field.
|
||||
|
||||
@@ -43,6 +43,8 @@ type StepSignRecord struct {
|
||||
Source string `json:"source,omitempty"`
|
||||
// 签字备注(签字弹框选填)
|
||||
Remark string `json:"remark,omitempty"`
|
||||
// 呼叫签字时的内容指纹(步骤+绑定),报工比对防改数据
|
||||
Fingerprint string `json:"fingerprint,omitempty"`
|
||||
// 是否已撤销
|
||||
Revoked bool `json:"revoked,omitempty"`
|
||||
// 撤销人
|
||||
@@ -65,7 +67,7 @@ func (*StepSignRecord) scanValues(columns []string) ([]any, error) {
|
||||
values[i] = new(sql.NullBool)
|
||||
case stepsignrecord.FieldID, stepsignrecord.FieldFlowId, stepsignrecord.FieldStepId, stepsignrecord.FieldRound:
|
||||
values[i] = new(sql.NullInt64)
|
||||
case stepsignrecord.FieldSn, stepsignrecord.FieldOrderNo, stepsignrecord.FieldStationNo, stepsignrecord.FieldStepName, stepsignrecord.FieldSignRole, stepsignrecord.FieldResult, stepsignrecord.FieldSignedBy, stepsignrecord.FieldSource, stepsignrecord.FieldRemark, stepsignrecord.FieldRevokedBy, stepsignrecord.FieldRevokeReason:
|
||||
case stepsignrecord.FieldSn, stepsignrecord.FieldOrderNo, stepsignrecord.FieldStationNo, stepsignrecord.FieldStepName, stepsignrecord.FieldSignRole, stepsignrecord.FieldResult, stepsignrecord.FieldSignedBy, stepsignrecord.FieldSource, stepsignrecord.FieldRemark, stepsignrecord.FieldFingerprint, stepsignrecord.FieldRevokedBy, stepsignrecord.FieldRevokeReason:
|
||||
values[i] = new(sql.NullString)
|
||||
case stepsignrecord.FieldSignedAt, stepsignrecord.FieldRevokedAt, stepsignrecord.FieldCreatedAt:
|
||||
values[i] = new(sql.NullTime)
|
||||
@@ -168,6 +170,12 @@ func (_m *StepSignRecord) assignValues(columns []string, values []any) error {
|
||||
} else if value.Valid {
|
||||
_m.Remark = value.String
|
||||
}
|
||||
case stepsignrecord.FieldFingerprint:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field fingerprint", values[i])
|
||||
} else if value.Valid {
|
||||
_m.Fingerprint = value.String
|
||||
}
|
||||
case stepsignrecord.FieldRevoked:
|
||||
if value, ok := values[i].(*sql.NullBool); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field revoked", values[i])
|
||||
@@ -273,6 +281,9 @@ func (_m *StepSignRecord) String() string {
|
||||
builder.WriteString("remark=")
|
||||
builder.WriteString(_m.Remark)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("fingerprint=")
|
||||
builder.WriteString(_m.Fingerprint)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("revoked=")
|
||||
builder.WriteString(fmt.Sprintf("%v", _m.Revoked))
|
||||
builder.WriteString(", ")
|
||||
|
||||
@@ -39,6 +39,8 @@ const (
|
||||
FieldSource = "source"
|
||||
// FieldRemark holds the string denoting the remark field in the database.
|
||||
FieldRemark = "remark"
|
||||
// FieldFingerprint holds the string denoting the fingerprint field in the database.
|
||||
FieldFingerprint = "fingerprint"
|
||||
// FieldRevoked holds the string denoting the revoked field in the database.
|
||||
FieldRevoked = "revoked"
|
||||
// FieldRevokedBy holds the string denoting the revokedby field in the database.
|
||||
@@ -69,6 +71,7 @@ var Columns = []string{
|
||||
FieldRound,
|
||||
FieldSource,
|
||||
FieldRemark,
|
||||
FieldFingerprint,
|
||||
FieldRevoked,
|
||||
FieldRevokedBy,
|
||||
FieldRevokedAt,
|
||||
@@ -131,6 +134,10 @@ var (
|
||||
DefaultRemark string
|
||||
// RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
|
||||
RemarkValidator func(string) error
|
||||
// DefaultFingerprint holds the default value on creation for the "fingerprint" field.
|
||||
DefaultFingerprint string
|
||||
// FingerprintValidator is a validator for the "fingerprint" field. It is called by the builders before save.
|
||||
FingerprintValidator func(string) error
|
||||
// DefaultRevoked holds the default value on creation for the "revoked" field.
|
||||
DefaultRevoked bool
|
||||
// DefaultRevokedBy holds the default value on creation for the "revokedBy" field.
|
||||
@@ -220,6 +227,11 @@ func ByRemark(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRemark, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFingerprint orders the results by the fingerprint field.
|
||||
func ByFingerprint(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFingerprint, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRevoked orders the results by the revoked field.
|
||||
func ByRevoked(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRevoked, opts...).ToFunc()
|
||||
|
||||
@@ -119,6 +119,11 @@ func Remark(v string) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldEQ(FieldRemark, v))
|
||||
}
|
||||
|
||||
// Fingerprint applies equality check predicate on the "fingerprint" field. It's identical to FingerprintEQ.
|
||||
func Fingerprint(v string) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldEQ(FieldFingerprint, v))
|
||||
}
|
||||
|
||||
// Revoked applies equality check predicate on the "revoked" field. It's identical to RevokedEQ.
|
||||
func Revoked(v bool) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldEQ(FieldRevoked, v))
|
||||
@@ -889,6 +894,71 @@ func RemarkContainsFold(v string) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldContainsFold(FieldRemark, v))
|
||||
}
|
||||
|
||||
// FingerprintEQ applies the EQ predicate on the "fingerprint" field.
|
||||
func FingerprintEQ(v string) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldEQ(FieldFingerprint, v))
|
||||
}
|
||||
|
||||
// FingerprintNEQ applies the NEQ predicate on the "fingerprint" field.
|
||||
func FingerprintNEQ(v string) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldNEQ(FieldFingerprint, v))
|
||||
}
|
||||
|
||||
// FingerprintIn applies the In predicate on the "fingerprint" field.
|
||||
func FingerprintIn(vs ...string) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldIn(FieldFingerprint, vs...))
|
||||
}
|
||||
|
||||
// FingerprintNotIn applies the NotIn predicate on the "fingerprint" field.
|
||||
func FingerprintNotIn(vs ...string) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldNotIn(FieldFingerprint, vs...))
|
||||
}
|
||||
|
||||
// FingerprintGT applies the GT predicate on the "fingerprint" field.
|
||||
func FingerprintGT(v string) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldGT(FieldFingerprint, v))
|
||||
}
|
||||
|
||||
// FingerprintGTE applies the GTE predicate on the "fingerprint" field.
|
||||
func FingerprintGTE(v string) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldGTE(FieldFingerprint, v))
|
||||
}
|
||||
|
||||
// FingerprintLT applies the LT predicate on the "fingerprint" field.
|
||||
func FingerprintLT(v string) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldLT(FieldFingerprint, v))
|
||||
}
|
||||
|
||||
// FingerprintLTE applies the LTE predicate on the "fingerprint" field.
|
||||
func FingerprintLTE(v string) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldLTE(FieldFingerprint, v))
|
||||
}
|
||||
|
||||
// FingerprintContains applies the Contains predicate on the "fingerprint" field.
|
||||
func FingerprintContains(v string) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldContains(FieldFingerprint, v))
|
||||
}
|
||||
|
||||
// FingerprintHasPrefix applies the HasPrefix predicate on the "fingerprint" field.
|
||||
func FingerprintHasPrefix(v string) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldHasPrefix(FieldFingerprint, v))
|
||||
}
|
||||
|
||||
// FingerprintHasSuffix applies the HasSuffix predicate on the "fingerprint" field.
|
||||
func FingerprintHasSuffix(v string) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldHasSuffix(FieldFingerprint, v))
|
||||
}
|
||||
|
||||
// FingerprintEqualFold applies the EqualFold predicate on the "fingerprint" field.
|
||||
func FingerprintEqualFold(v string) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldEqualFold(FieldFingerprint, v))
|
||||
}
|
||||
|
||||
// FingerprintContainsFold applies the ContainsFold predicate on the "fingerprint" field.
|
||||
func FingerprintContainsFold(v string) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldContainsFold(FieldFingerprint, v))
|
||||
}
|
||||
|
||||
// RevokedEQ applies the EQ predicate on the "revoked" field.
|
||||
func RevokedEQ(v bool) predicate.StepSignRecord {
|
||||
return predicate.StepSignRecord(sql.FieldEQ(FieldRevoked, v))
|
||||
|
||||
@@ -202,6 +202,20 @@ func (_c *StepSignRecordCreate) SetNillableRemark(v *string) *StepSignRecordCrea
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetFingerprint sets the "fingerprint" field.
|
||||
func (_c *StepSignRecordCreate) SetFingerprint(v string) *StepSignRecordCreate {
|
||||
_c.mutation.SetFingerprint(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableFingerprint sets the "fingerprint" field if the given value is not nil.
|
||||
func (_c *StepSignRecordCreate) SetNillableFingerprint(v *string) *StepSignRecordCreate {
|
||||
if v != nil {
|
||||
_c.SetFingerprint(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetRevoked sets the "revoked" field.
|
||||
func (_c *StepSignRecordCreate) SetRevoked(v bool) *StepSignRecordCreate {
|
||||
_c.mutation.SetRevoked(v)
|
||||
@@ -365,6 +379,10 @@ func (_c *StepSignRecordCreate) defaults() {
|
||||
v := stepsignrecord.DefaultRemark
|
||||
_c.mutation.SetRemark(v)
|
||||
}
|
||||
if _, ok := _c.mutation.Fingerprint(); !ok {
|
||||
v := stepsignrecord.DefaultFingerprint
|
||||
_c.mutation.SetFingerprint(v)
|
||||
}
|
||||
if _, ok := _c.mutation.Revoked(); !ok {
|
||||
v := stepsignrecord.DefaultRevoked
|
||||
_c.mutation.SetRevoked(v)
|
||||
@@ -469,6 +487,14 @@ func (_c *StepSignRecordCreate) check() error {
|
||||
return &ValidationError{Name: "remark", err: fmt.Errorf(`ent: validator failed for field "StepSignRecord.remark": %w`, err)}
|
||||
}
|
||||
}
|
||||
if _, ok := _c.mutation.Fingerprint(); !ok {
|
||||
return &ValidationError{Name: "fingerprint", err: errors.New(`ent: missing required field "StepSignRecord.fingerprint"`)}
|
||||
}
|
||||
if v, ok := _c.mutation.Fingerprint(); ok {
|
||||
if err := stepsignrecord.FingerprintValidator(v); err != nil {
|
||||
return &ValidationError{Name: "fingerprint", err: fmt.Errorf(`ent: validator failed for field "StepSignRecord.fingerprint": %w`, err)}
|
||||
}
|
||||
}
|
||||
if _, ok := _c.mutation.Revoked(); !ok {
|
||||
return &ValidationError{Name: "revoked", err: errors.New(`ent: missing required field "StepSignRecord.revoked"`)}
|
||||
}
|
||||
@@ -580,6 +606,10 @@ func (_c *StepSignRecordCreate) createSpec() (*StepSignRecord, *sqlgraph.CreateS
|
||||
_spec.SetField(stepsignrecord.FieldRemark, field.TypeString, value)
|
||||
_node.Remark = value
|
||||
}
|
||||
if value, ok := _c.mutation.Fingerprint(); ok {
|
||||
_spec.SetField(stepsignrecord.FieldFingerprint, field.TypeString, value)
|
||||
_node.Fingerprint = value
|
||||
}
|
||||
if value, ok := _c.mutation.Revoked(); ok {
|
||||
_spec.SetField(stepsignrecord.FieldRevoked, field.TypeBool, value)
|
||||
_node.Revoked = value
|
||||
|
||||
@@ -232,6 +232,20 @@ func (_u *StepSignRecordUpdate) SetNillableRemark(v *string) *StepSignRecordUpda
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetFingerprint sets the "fingerprint" field.
|
||||
func (_u *StepSignRecordUpdate) SetFingerprint(v string) *StepSignRecordUpdate {
|
||||
_u.mutation.SetFingerprint(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableFingerprint sets the "fingerprint" field if the given value is not nil.
|
||||
func (_u *StepSignRecordUpdate) SetNillableFingerprint(v *string) *StepSignRecordUpdate {
|
||||
if v != nil {
|
||||
_u.SetFingerprint(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetRevoked sets the "revoked" field.
|
||||
func (_u *StepSignRecordUpdate) SetRevoked(v bool) *StepSignRecordUpdate {
|
||||
_u.mutation.SetRevoked(v)
|
||||
@@ -373,6 +387,11 @@ func (_u *StepSignRecordUpdate) check() error {
|
||||
return &ValidationError{Name: "remark", err: fmt.Errorf(`ent: validator failed for field "StepSignRecord.remark": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.Fingerprint(); ok {
|
||||
if err := stepsignrecord.FingerprintValidator(v); err != nil {
|
||||
return &ValidationError{Name: "fingerprint", err: fmt.Errorf(`ent: validator failed for field "StepSignRecord.fingerprint": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.RevokedBy(); ok {
|
||||
if err := stepsignrecord.RevokedByValidator(v); err != nil {
|
||||
return &ValidationError{Name: "revokedBy", err: fmt.Errorf(`ent: validator failed for field "StepSignRecord.revokedBy": %w`, err)}
|
||||
@@ -452,6 +471,9 @@ func (_u *StepSignRecordUpdate) sqlSave(ctx context.Context) (_node int, err err
|
||||
if value, ok := _u.mutation.Remark(); ok {
|
||||
_spec.SetField(stepsignrecord.FieldRemark, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.Fingerprint(); ok {
|
||||
_spec.SetField(stepsignrecord.FieldFingerprint, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.Revoked(); ok {
|
||||
_spec.SetField(stepsignrecord.FieldRevoked, field.TypeBool, value)
|
||||
}
|
||||
@@ -692,6 +714,20 @@ func (_u *StepSignRecordUpdateOne) SetNillableRemark(v *string) *StepSignRecordU
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetFingerprint sets the "fingerprint" field.
|
||||
func (_u *StepSignRecordUpdateOne) SetFingerprint(v string) *StepSignRecordUpdateOne {
|
||||
_u.mutation.SetFingerprint(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableFingerprint sets the "fingerprint" field if the given value is not nil.
|
||||
func (_u *StepSignRecordUpdateOne) SetNillableFingerprint(v *string) *StepSignRecordUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetFingerprint(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetRevoked sets the "revoked" field.
|
||||
func (_u *StepSignRecordUpdateOne) SetRevoked(v bool) *StepSignRecordUpdateOne {
|
||||
_u.mutation.SetRevoked(v)
|
||||
@@ -846,6 +882,11 @@ func (_u *StepSignRecordUpdateOne) check() error {
|
||||
return &ValidationError{Name: "remark", err: fmt.Errorf(`ent: validator failed for field "StepSignRecord.remark": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.Fingerprint(); ok {
|
||||
if err := stepsignrecord.FingerprintValidator(v); err != nil {
|
||||
return &ValidationError{Name: "fingerprint", err: fmt.Errorf(`ent: validator failed for field "StepSignRecord.fingerprint": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.RevokedBy(); ok {
|
||||
if err := stepsignrecord.RevokedByValidator(v); err != nil {
|
||||
return &ValidationError{Name: "revokedBy", err: fmt.Errorf(`ent: validator failed for field "StepSignRecord.revokedBy": %w`, err)}
|
||||
@@ -942,6 +983,9 @@ func (_u *StepSignRecordUpdateOne) sqlSave(ctx context.Context) (_node *StepSign
|
||||
if value, ok := _u.mutation.Remark(); ok {
|
||||
_spec.SetField(stepsignrecord.FieldRemark, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.Fingerprint(); ok {
|
||||
_spec.SetField(stepsignrecord.FieldFingerprint, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.Revoked(); ok {
|
||||
_spec.SetField(stepsignrecord.FieldRevoked, field.TypeBool, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user