فهرست منبع

卷帘门增加日志

zhangxin 1 سال پیش
والد
کامیت
6057dbf40f
1فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 6 1
      warewms-ams/src/main/java/com/ruoyi/ams/xuankuang/service/BeltLineClientService.java

+ 6 - 1
warewms-ams/src/main/java/com/ruoyi/ams/xuankuang/service/BeltLineClientService.java

@@ -1,7 +1,8 @@
 package com.ruoyi.ams.xuankuang.service;
 
-import com.ruoyi.common.core.domain.AjaxResult;
+import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.hard.xuankang.BeltLineClient;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -11,6 +12,7 @@ import org.springframework.stereotype.Service;
  * @date 2023/6/26 14:44
  */
 @Service
+@Slf4j
 public class BeltLineClientService {
     @Autowired
     private BeltLineClient beltLineClient;
@@ -19,11 +21,13 @@ public class BeltLineClientService {
     public boolean openTheConveyorLine() {
         //读输送线机械状态
         Number station = beltLineClient.readMechanicalState();
+        log.info("BeltLineClientService - openTheConveyorLine station info is :{}", JSONObject.toJSONString(station));
         if (station.intValue() == 1) {
             return Boolean.TRUE;
         }
         //读模式
         Number number = beltLineClient.readMode();
+        log.info("BeltLineClientService - openTheConveyorLine number info is :{}", JSONObject.toJSONString(number));
         //判断模式是否为在线
         if (number.intValue() == 1) {
             //写通过请求
@@ -32,6 +36,7 @@ public class BeltLineClientService {
             beltLineClient.writeDirection(1);
             //读状态
             Number number1 = beltLineClient.readState();
+            log.info("BeltLineClientService - openTheConveyorLine number1 info is :{}", JSONObject.toJSONString(number1));
             return number1.intValue() == 3;
         }
         return Boolean.FALSE;