From 8dfb8feb32bb5e4e460e23dcde42612a26fa2bcb Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期日, 27 八月 2023 01:11:28 +0800
Subject: [PATCH] fix

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

diff --git a/api/v1/plc.go b/api/v1/plc.go
index 254845f..cba0bbd 100644
--- a/api/v1/plc.go
+++ b/api/v1/plc.go
@@ -5,7 +5,6 @@
 	"apsClient/model/response"
 	_ "apsClient/model/response"
 	"apsClient/pkg/contextx"
-	"apsClient/pkg/ecode"
 	"apsClient/service"
 	"github.com/gin-gonic/gin"
 	"github.com/spf13/cast"
@@ -41,29 +40,6 @@
 func (slf *PlcApi) SetProductNumber(c *gin.Context) {
 	ctx, ok := contextx.NewContext(c, nil)
 	if !ok {
-		return
-	}
-
-	taskData, code := service.NewTaskService().GetTask()
-	if code != ecode.OK {
-		ctx.Fail(code)
-		return
-	}
-
-	if taskData.Order == nil {
-		ctx.FailWithMsg(ecode.UnknownErr, "褰撳墠娌℃湁寰呯敓浜у伐鍗�")
-		return
-	}
-
-	plcConfig, code := service.NewDevicePlcService().GetDevicePlc()
-	if code != ecode.OK {
-		ctx.FailWithMsg(ecode.UnknownErr, "璇峰厛閰嶇疆PLC")
-		return
-	}
-
-	err := service.PlcWrite(plcConfig, constvar.PlcStartAddressTypeTotalNumber, taskData.Order.Amount.IntPart())
-	if err != nil {
-		ctx.FailWithMsg(ecode.UnknownErr, "璁剧疆澶辫触锛岃妫�鏌lc閰嶇疆")
 		return
 	}
 	ctx.Ok()

--
Gitblit v1.8.0