From 300096d7ea1a201598c905ef3510b4bcea97283b Mon Sep 17 00:00:00 2001 From: wangbin Date: Mon, 7 Jul 2025 15:45:37 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=8A=A5=E5=88=B0=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E5=AE=9E=E5=88=B0=E6=9C=AA=E5=88=B0=E4=BA=BA?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/main.go b/main.go index a78a295..e981b68 100644 --- a/main.go +++ b/main.go @@ -1513,6 +1513,9 @@ func OnDeviceEventHandler(eventSource FLXDevice.EventArgSource, eventType FLXDev UpdateStatisticsNumShow() localcache.OnChangeProcess() CheckInStart() + if localcache.CurrentScreenSessionStatus == Common.SessionStatus_StartReport || localcache.CurrentScreenSessionStatus == Common.SessionStatus_Reporting { + OpenDevice() + } } //测试 开始会议后直接开始报到 看看 TAO能不能接收到 @@ -1545,6 +1548,8 @@ func OnDeviceEventHandler(eventSource FLXDevice.EventArgSource, eventType FLXDev OpenDevice() CheckInStart() localcache.OnChangeProcess() + //开始报到时 清空实到未到人数 + InitUpdateStatisticsNumShow() case FLXNetworkController.FlxNetworkComPara_Main_Pause_Register: //暂停报到 @@ -1758,6 +1763,42 @@ func UpdateStatisticsNumShow() { SUpdateStatisticsNumShow() } +// 重新初始化实到未到信息,用于二次报道时初始化 +func InitUpdateStatisticsNumShow() { + + defer func() { + if r := recover(); r != nil { + log.Error("UpdateStatisticsNumShow:", r) + } + }() + + AN := 0 + SH := 0 + for id := range localcache.AllPerson { + if localcache.AllPerson[id].AP_VotePower == 1 { + SH = SH + 1 + // if localcache.AllPerson[id].AP_CheckState == 1 { + // AN = AN + 1 + // } + } + + } + localcache.ShouldNum = SH + localcache.ArriveNum = AN + localcache.NoArriveNum = localcache.ShouldNum - localcache.ArriveNum + lblRShoudNum.Text = strconv.Itoa(localcache.ShouldNum) + lblRArriveNum.Text = strconv.Itoa(localcache.ArriveNum) + lblRNoNum.Text = strconv.Itoa(localcache.NoArriveNum) + localcache.CArriveNum = len(localcache.CArrivePersonsID) + lblRCArriveNum.Text = strconv.Itoa(localcache.CArriveNum) + + lblRShoudNum.Refresh() + lblRArriveNum.Refresh() + lblRNoNum.Refresh() + lblRCArriveNum.Refresh() + +} + // 获取会议信息 func GetAgenda(AgID string) {