zhangqian
2023-09-19 da45d6a3177761d4bf7ea570937d4e2443428b36
api/v1/plc.go
@@ -36,7 +36,7 @@
   resp.TotalNumber = cast.ToInt(totalNumber)
   plcStatus := 1 //断开连接
   isConnect := apacheplc4x.IsConnect()
   isConnect := service.PlcIsConnect()
   if isConnect {
      if resp.FinishNumber > 0 { //生产
         plcStatus = 2
@@ -67,12 +67,10 @@
// @Tags      生产数量
// @Summary   实时获取生产进度
// @Produce   application/json
// @Param     object  body    request.SendProcessParams true  "查询参数"
// @Success   200   {object}  contextx.Response{data=response.ProductProgress}  "成功"
// @Router    /v1/plc/productProgressRealTime [post]
func (slf *PlcApi) GetProductProgressRealTime(c *gin.Context) {
   var params request.GetProductProgress
   ctx, ok := contextx.NewContext(c, &params)
   ctx, ok := contextx.NewContext(c, nil)
   if !ok {
      return
   }