Pārlūkot izejas kodu

AGV充电任务bug修改

k 1 gadu atpakaļ
vecāks
revīzija
b07699c974

+ 2 - 2
warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/AciService.java

@@ -111,10 +111,10 @@ public class AciService {
                 taskBean.setAciAccept(0);
                 taskBean.setBusinessType(Constant.TASK_BUSINESS_TYPE.TASK_POWER.getValue());
                 taskBean = amsTaskService.selectAmsTaskByModel(taskBean);
-                s = "87CD0008000C000100710008658100010001%04X";
+                s = "87CD0008000C00010071000865810001%04X%04X";
                 if (taskBean != null) {
 
-                    s = String.format(s, Integer.parseInt(taskBean.getDeviceName()));
+                    s = String.format(s, taskBean.getIkey(), Integer.parseInt(taskBean.getDeviceName()));
                     buffer.put(ByteUtil.hexString2ByteArray(s));
                     buffer.flip();
                     socketChannel.write(buffer);

+ 2 - 5
warewms-ams/src/main/java/com/ruoyi/ams/business/BusinessServiceImpl.java

@@ -602,13 +602,10 @@ public class BusinessServiceImpl implements IBusinessService {
         // 充电任务直接传参数
         if (wcsTask.getBusinessType().equals(Constant.TASK_BUSINESS_TYPE.TASK_POWER.getValue())) {
             amsTask.setStFrom(Integer.parseInt(wcsTask.getLocationFrom()));
-        } else {
-            amsTask.setStFrom(locFrom.getAgvStation().intValue());
-        }
-        if (wcsTask.getBusinessType().equals(Constant.TASK_BUSINESS_TYPE.TASK_POWER.getValue())) {
             amsTask.setStTo(Integer.parseInt(wcsTask.getLocationTo()));
-
+            amsTask.setDeviceName(wcsTask.getDeviceName());
         } else {
+            amsTask.setStFrom(locFrom.getAgvStation().intValue());
             amsTask.setStTo(locTo.getAgvStation().intValue());
         }
         amsTask.setExt1(wcsTask.getExt1());