feat: 大屏多订单改为同屏并列展示,物料申请新增跨工位借料来源并移除工单完成日期
This commit is contained in:
@@ -31,6 +31,8 @@ const (
|
||||
CfgPipelineCache = "pipeline_cache"
|
||||
// CfgAllowCrossDay 允许叫非今日排产的料(B5 跨日:1=允许(默认,工位端预警提示),0=禁止)
|
||||
CfgAllowCrossDay = "call.allow_cross_day"
|
||||
// CfgAllowBorrow 允许跨工位借料(1=允许(默认);0=禁止,超额叫料直接拒绝)
|
||||
CfgAllowBorrow = "call.allow_borrow"
|
||||
// CfgTorqueNgAlert 拧紧不合格报警开关(B2.1):1=开启(默认,拧紧扭矩不合格立即落预警),0=关闭(只写 step_data + 置待处置标记,不落预警)
|
||||
CfgTorqueNgAlert = "torque.ng.alert.enabled"
|
||||
// CfgDashboardRefreshSeconds 看板大屏轮询兜底刷新间隔(秒,1~10):仅影响 SSE 实时通道不可用时的 HTTP 轮询周期(默认 5)
|
||||
@@ -58,6 +60,7 @@ type SettingsVO struct {
|
||||
LogRetentionDays int `json:"logRetentionDays"` // 事件日志保留天数(0=不清理)
|
||||
PipelineCache int `json:"pipelineCache"` // 滚筒线缓存模式(1=缓存并行,0=串行;预留,PLC 真机接入时生效)
|
||||
AllowCrossDay int `json:"allowCrossDay"` // 允许叫非今日排产的料(1=允许(默认),0=禁止)
|
||||
AllowBorrow int `json:"allowBorrow"` // 允许跨工位借料(1=允许(默认),0=禁止;关闭后超额叫料直接拒绝)
|
||||
TorqueNgAlert bool `json:"torqueNgAlert"` // 拧紧不合格报警开关(1=开启,0=关闭)
|
||||
DashboardRefreshSeconds int `json:"dashboardRefreshSeconds"` // 看板轮询兜底刷新间隔(秒,1~10)
|
||||
ArchiveRemindDays int `json:"archiveRemindDays"` // 数据归档提醒周期(天,0=关闭)
|
||||
@@ -82,6 +85,7 @@ type SettingsReq struct {
|
||||
LogRetentionDays *int `json:"logRetentionDays"`
|
||||
PipelineCache *int `json:"pipelineCache"`
|
||||
AllowCrossDay *int `json:"allowCrossDay"`
|
||||
AllowBorrow *int `json:"allowBorrow"`
|
||||
TorqueNgAlert *bool `json:"torqueNgAlert"` // B2.1 拧紧不合格报警开关(nil=不改)
|
||||
DashboardRefreshSeconds *int `json:"dashboardRefreshSeconds"` // 看板轮询兜底刷新间隔(秒,nil=不改)
|
||||
ArchiveRemindDays *int `json:"archiveRemindDays"` // 数据归档提醒周期(天,nil=不改)
|
||||
@@ -97,6 +101,7 @@ var settingsDefaults = map[string]int{
|
||||
CfgLogRetention: 0,
|
||||
CfgPipelineCache: 0,
|
||||
CfgAllowCrossDay: 1,
|
||||
CfgAllowBorrow: 1,
|
||||
CfgTorqueNgAlert: 1, // B2.1 默认开启拧紧不合格报警
|
||||
CfgDashboardRefreshSeconds: 5, // 看板轮询兜底刷新间隔(秒)
|
||||
CfgArchiveRemindDays: 7, // 数据归档提醒周期(天)
|
||||
@@ -119,6 +124,7 @@ func (s *Service) GetSettings(ctx context.Context) (*SettingsVO, error) {
|
||||
LogRetentionDays: cfgIntFrom(kv, CfgLogRetention),
|
||||
PipelineCache: cfgIntFrom(kv, CfgPipelineCache),
|
||||
AllowCrossDay: cfgIntFrom(kv, CfgAllowCrossDay),
|
||||
AllowBorrow: cfgIntFrom(kv, CfgAllowBorrow),
|
||||
TorqueNgAlert: s.CfgInt(ctx, CfgTorqueNgAlert, 1) == 1, // B2.1 默认开启
|
||||
DashboardRefreshSeconds: cfgIntFrom(kv, CfgDashboardRefreshSeconds),
|
||||
ArchiveRemindDays: cfgIntFrom(kv, CfgArchiveRemindDays),
|
||||
@@ -157,6 +163,7 @@ func (s *Service) SaveSettings(ctx context.Context, req SettingsReq, operator st
|
||||
{CfgLogRetention, req.LogRetentionDays, 0, 3650, "事件日志保留天数(0=不清理)"},
|
||||
{CfgPipelineCache, req.PipelineCache, 0, 1, "滚筒线缓存模式(1=启用缓存位并行流转,0=串行不缓存);预留配置,PLC 真机接入时生效"},
|
||||
{CfgAllowCrossDay, req.AllowCrossDay, 0, 1, "允许叫非今日排产的料(1=允许,工位端预警提示;0=禁止)"},
|
||||
{CfgAllowBorrow, req.AllowBorrow, 0, 1, "允许跨工位借料(1=允许(默认),工位端手动分配借料来源;0=禁止,超额叫料直接拒绝)"},
|
||||
{CfgDashboardRefreshSeconds, req.DashboardRefreshSeconds, 1, 10, "看板轮询兜底刷新间隔(秒,1~10,仅 SSE 不可用时的 HTTP 轮询周期)"},
|
||||
{CfgArchiveRemindDays, req.ArchiveRemindDays, 0, 365, "数据归档提醒周期(天,0=关闭;距上次成功备份超过该天数时提醒)"},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user