From 283433e329dbd8de66f763caa7add995685b9d50 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期三, 06 九月 2023 21:47:09 +0800 Subject: [PATCH] 生产看板下发多次任务后,数据库中相同工单的数据应不重复 --- crontask/cron_task.go | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/crontask/cron_task.go b/crontask/cron_task.go index 0ad2210..35fde2b 100644 --- a/crontask/cron_task.go +++ b/crontask/cron_task.go @@ -7,6 +7,7 @@ "apsClient/pkg/logx" "apsClient/service" "github.com/go-co-op/gocron" + "github.com/spf13/cast" "time" ) @@ -29,6 +30,7 @@ finishNumber, err := service.PlcRead(plcConfig, constvar.PlcStartAddressTypeFinishNumber) if err == nil && finishNumber != 0 { service.PlcCacheSet(constvar.PlcCacheKeyFinishNumber, finishNumber) + _ = service.NewProgressService().UpdateProgress(cast.ToInt64(finishNumber)) } logx.Infof("plc read finish number:%v, err:%v", finishNumber, err) -- Gitblit v1.8.0