feat: AGV点位锁与缓存迁移 + 工位终端去离线队列 + WMS出入库增强
【MES】 - AGV点位/线路点位/AGV任务/工单 ent schema 重构(全量重生成 ent 代码) - 新增派车锁 agv_point_lock.go:目标点位占用即拒车,JBT21 库房接驳台卸货后保持锁定待库管手动解锁 - 新增进程内 TTL 缓存 cache.go,由 Redis 看板缓存迁移至内存(singleflight 防击穿,去除外部依赖) - AGV 三段链安全机制、车辆状态/接驳台左右互换、补料损耗闭环完善 - 来料检/工序卡/工单/质检/日排产/AGV 前端与帮助文档更新 - 新增 migrations/、sql/ 目录 【WMS】 - 出库、Excel 导出、物料、路由处理增强 - 配置与 DB 初始化调整;基础数据/成品入库/入库前端调整 【工位终端】 - 移除离线同步队列(syncer 包、sync.go、SyncQueueDialog.vue),改为实时直连上报 MES(断网即失败报错),以本人身份操作 - 本地 SQLite 仅保留操作日志 + 内置账号 + 登录态;保留空闲自动登出 【文档】 - 删除 AGV海康litev1.5.md;案例.md 更新
This commit is contained in:
@@ -42,20 +42,6 @@ func (_u *AgvTaskUpdate) SetNillableTaskNo(v *string) *AgvTaskUpdate {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetHikTaskCode sets the "hik_task_code" field.
|
||||
func (_u *AgvTaskUpdate) SetHikTaskCode(v string) *AgvTaskUpdate {
|
||||
_u.mutation.SetHikTaskCode(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableHikTaskCode sets the "hik_task_code" field if the given value is not nil.
|
||||
func (_u *AgvTaskUpdate) SetNillableHikTaskCode(v *string) *AgvTaskUpdate {
|
||||
if v != nil {
|
||||
_u.SetHikTaskCode(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetSourceDock sets the "source_dock" field.
|
||||
func (_u *AgvTaskUpdate) SetSourceDock(v string) *AgvTaskUpdate {
|
||||
_u.mutation.SetSourceDock(v)
|
||||
@@ -194,6 +180,20 @@ func (_u *AgvTaskUpdate) SetNillableBizNo(v *string) *AgvTaskUpdate {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetTemplateType sets the "template_type" field.
|
||||
func (_u *AgvTaskUpdate) SetTemplateType(v string) *AgvTaskUpdate {
|
||||
_u.mutation.SetTemplateType(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableTemplateType sets the "template_type" field if the given value is not nil.
|
||||
func (_u *AgvTaskUpdate) SetNillableTemplateType(v *string) *AgvTaskUpdate {
|
||||
if v != nil {
|
||||
_u.SetTemplateType(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetChainNo sets the "chain_no" field.
|
||||
func (_u *AgvTaskUpdate) SetChainNo(v string) *AgvTaskUpdate {
|
||||
_u.mutation.SetChainNo(v)
|
||||
@@ -372,11 +372,6 @@ func (_u *AgvTaskUpdate) check() error {
|
||||
return &ValidationError{Name: "task_no", err: fmt.Errorf(`ent: validator failed for field "AgvTask.task_no": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.HikTaskCode(); ok {
|
||||
if err := agvtask.HikTaskCodeValidator(v); err != nil {
|
||||
return &ValidationError{Name: "hik_task_code", err: fmt.Errorf(`ent: validator failed for field "AgvTask.hik_task_code": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.SourceDock(); ok {
|
||||
if err := agvtask.SourceDockValidator(v); err != nil {
|
||||
return &ValidationError{Name: "source_dock", err: fmt.Errorf(`ent: validator failed for field "AgvTask.source_dock": %w`, err)}
|
||||
@@ -422,6 +417,11 @@ func (_u *AgvTaskUpdate) check() error {
|
||||
return &ValidationError{Name: "biz_no", err: fmt.Errorf(`ent: validator failed for field "AgvTask.biz_no": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.TemplateType(); ok {
|
||||
if err := agvtask.TemplateTypeValidator(v); err != nil {
|
||||
return &ValidationError{Name: "template_type", err: fmt.Errorf(`ent: validator failed for field "AgvTask.template_type": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.ChainNo(); ok {
|
||||
if err := agvtask.ChainNoValidator(v); err != nil {
|
||||
return &ValidationError{Name: "chain_no", err: fmt.Errorf(`ent: validator failed for field "AgvTask.chain_no": %w`, err)}
|
||||
@@ -466,9 +466,6 @@ func (_u *AgvTaskUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
if value, ok := _u.mutation.TaskNo(); ok {
|
||||
_spec.SetField(agvtask.FieldTaskNo, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.HikTaskCode(); ok {
|
||||
_spec.SetField(agvtask.FieldHikTaskCode, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.SourceDock(); ok {
|
||||
_spec.SetField(agvtask.FieldSourceDock, field.TypeString, value)
|
||||
}
|
||||
@@ -502,6 +499,9 @@ func (_u *AgvTaskUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
if value, ok := _u.mutation.BizNo(); ok {
|
||||
_spec.SetField(agvtask.FieldBizNo, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.TemplateType(); ok {
|
||||
_spec.SetField(agvtask.FieldTemplateType, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.ChainNo(); ok {
|
||||
_spec.SetField(agvtask.FieldChainNo, field.TypeString, value)
|
||||
}
|
||||
@@ -574,20 +574,6 @@ func (_u *AgvTaskUpdateOne) SetNillableTaskNo(v *string) *AgvTaskUpdateOne {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetHikTaskCode sets the "hik_task_code" field.
|
||||
func (_u *AgvTaskUpdateOne) SetHikTaskCode(v string) *AgvTaskUpdateOne {
|
||||
_u.mutation.SetHikTaskCode(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableHikTaskCode sets the "hik_task_code" field if the given value is not nil.
|
||||
func (_u *AgvTaskUpdateOne) SetNillableHikTaskCode(v *string) *AgvTaskUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetHikTaskCode(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetSourceDock sets the "source_dock" field.
|
||||
func (_u *AgvTaskUpdateOne) SetSourceDock(v string) *AgvTaskUpdateOne {
|
||||
_u.mutation.SetSourceDock(v)
|
||||
@@ -726,6 +712,20 @@ func (_u *AgvTaskUpdateOne) SetNillableBizNo(v *string) *AgvTaskUpdateOne {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetTemplateType sets the "template_type" field.
|
||||
func (_u *AgvTaskUpdateOne) SetTemplateType(v string) *AgvTaskUpdateOne {
|
||||
_u.mutation.SetTemplateType(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableTemplateType sets the "template_type" field if the given value is not nil.
|
||||
func (_u *AgvTaskUpdateOne) SetNillableTemplateType(v *string) *AgvTaskUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetTemplateType(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetChainNo sets the "chain_no" field.
|
||||
func (_u *AgvTaskUpdateOne) SetChainNo(v string) *AgvTaskUpdateOne {
|
||||
_u.mutation.SetChainNo(v)
|
||||
@@ -917,11 +917,6 @@ func (_u *AgvTaskUpdateOne) check() error {
|
||||
return &ValidationError{Name: "task_no", err: fmt.Errorf(`ent: validator failed for field "AgvTask.task_no": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.HikTaskCode(); ok {
|
||||
if err := agvtask.HikTaskCodeValidator(v); err != nil {
|
||||
return &ValidationError{Name: "hik_task_code", err: fmt.Errorf(`ent: validator failed for field "AgvTask.hik_task_code": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.SourceDock(); ok {
|
||||
if err := agvtask.SourceDockValidator(v); err != nil {
|
||||
return &ValidationError{Name: "source_dock", err: fmt.Errorf(`ent: validator failed for field "AgvTask.source_dock": %w`, err)}
|
||||
@@ -967,6 +962,11 @@ func (_u *AgvTaskUpdateOne) check() error {
|
||||
return &ValidationError{Name: "biz_no", err: fmt.Errorf(`ent: validator failed for field "AgvTask.biz_no": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.TemplateType(); ok {
|
||||
if err := agvtask.TemplateTypeValidator(v); err != nil {
|
||||
return &ValidationError{Name: "template_type", err: fmt.Errorf(`ent: validator failed for field "AgvTask.template_type": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.ChainNo(); ok {
|
||||
if err := agvtask.ChainNoValidator(v); err != nil {
|
||||
return &ValidationError{Name: "chain_no", err: fmt.Errorf(`ent: validator failed for field "AgvTask.chain_no": %w`, err)}
|
||||
@@ -1028,9 +1028,6 @@ func (_u *AgvTaskUpdateOne) sqlSave(ctx context.Context) (_node *AgvTask, err er
|
||||
if value, ok := _u.mutation.TaskNo(); ok {
|
||||
_spec.SetField(agvtask.FieldTaskNo, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.HikTaskCode(); ok {
|
||||
_spec.SetField(agvtask.FieldHikTaskCode, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.SourceDock(); ok {
|
||||
_spec.SetField(agvtask.FieldSourceDock, field.TypeString, value)
|
||||
}
|
||||
@@ -1064,6 +1061,9 @@ func (_u *AgvTaskUpdateOne) sqlSave(ctx context.Context) (_node *AgvTask, err er
|
||||
if value, ok := _u.mutation.BizNo(); ok {
|
||||
_spec.SetField(agvtask.FieldBizNo, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.TemplateType(); ok {
|
||||
_spec.SetField(agvtask.FieldTemplateType, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.ChainNo(); ok {
|
||||
_spec.SetField(agvtask.FieldChainNo, field.TypeString, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user