From 05f41513a5e51fb66691f6d8ba2a8adef2a415a5 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 14 九月 2023 20:46:42 +0800
Subject: [PATCH] 获取工艺参数时异步刷新plc地址

---
 api/v1/plc.go |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/api/v1/plc.go b/api/v1/plc.go
index 3ed79a8..a837e7a 100644
--- a/api/v1/plc.go
+++ b/api/v1/plc.go
@@ -29,8 +29,8 @@
 	if !ok {
 		return
 	}
-	finishNumber, _ := service.PlcCacheGet(constvar.PlcCacheKeyFinishNumber)
-	totalNumber, _ := service.PlcCacheGet(constvar.PlcCacheKeyTotalNumber)
+	finishNumber, _ := service.PlcCacheGet(params.Position, constvar.PlcCacheKeyFinishNumber)
+	totalNumber, _ := service.PlcCacheGet(params.Position, constvar.PlcCacheKeyTotalNumber)
 	resp := new(response.ProductProgress)
 	resp.FinishNumber = cast.ToInt(finishNumber)
 	resp.TotalNumber = cast.ToInt(totalNumber)

--
Gitblit v1.8.0