From 2a92d9b11ef1dd76749c129e8c96a1e205794670 Mon Sep 17 00:00:00 2001 From: lishuai <1793460677@qq.com> Date: Thu, 27 Jun 2024 14:05:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BF=BD=E5=8A=A0=E8=AF=BA=E5=AE=9D?= =?UTF-8?q?=E5=B0=81=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/impl/XianGongAgvServiceImpl.java | 44 ++++++++++++------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java index 15e8e2f1e..6f23d43ca 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java @@ -61,7 +61,8 @@ public class XianGongAgvServiceImpl implements XianGongAgvService { @Autowired private LuceneExecuteLogService luceneExecuteLogService; -// DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppService.class); + @Autowired + private DeviceAppService deviceAppservice; @Autowired @@ -378,15 +379,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService { jo1.put("blockId", IdUtil.simpleUUID()); jo1.put("location", pointCode); jo1.put("operation", "JackLoad"); -// Device device = deviceAppservice.findDeviceByCode(pointCode); -// StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; -// standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver() ; - jo1.put("operationArgs", new JSONObject() {{ - put("recognize", true); - }}); - ja.add(jo1); - - + inspectInStocckSet(ja, pointCode, jo1); JSONObject jo2 = new JSONObject(); jo2.put("blockId", IdUtil.simpleUUID()); jo2.put("location", pointCode + "OUTGET"); @@ -407,6 +400,25 @@ public class XianGongAgvServiceImpl implements XianGongAgvService { } } + private void inspectInStocckSet(JSONArray ja, String pointCode, JSONObject jo1) { + Device device = deviceAppservice.findDeviceByCode(pointCode); + StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; + if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { + String inspectInStocck = (String)device.getExtraValue().get("inspect_in_stocck"); + if (StrUtil.isNotEmpty( inspectInStocck) && inspectInStocck.equals("true")){ + jo1.put("operationArgs", new JSONObject() {{ + put("recognize",false); + }}); + ja.add(jo1); + }else { + jo1.put("operationArgs", new JSONObject() {{ + put("recognize", true); + }}); + ja.add(jo1); + } + } + } + /** * 下发放货信号 * @@ -851,7 +863,8 @@ public class XianGongAgvServiceImpl implements XianGongAgvService { jo.put("id", instructionCode); //动作块 jo.put("blocks", createBlocksDataTowCCStart(nextPoint)); - + //追加订单封口 + jo.put("complete", true); LuceneLogDto logDto = LuceneLogDto.builder() .device_code("追加叉车运单") .content("指令号:" + instructionCode + ",追加叉车运单参数:" + jo) @@ -1029,6 +1042,8 @@ public class XianGongAgvServiceImpl implements XianGongAgvService { if (AgvActionTypeEnum.OUT_STOCK.getCode().equals(instructionDto.getAgv_action_type()) || AgvActionTypeEnum.IN_OUT_STOCK.getCode().equals(instructionDto.getAgv_action_type())) { jo.put("blocks", createBlocksDataTowEnd(instructionCode, point, instructionDto)); } + //追加订单封口 + jo.put("complete", true); LuceneLogDto logDto = LuceneLogDto.builder() .device_code("追加诺宝运单") .content("指令号:" + instructionCode + ",追加诺宝运单参数:" + jo) @@ -1163,12 +1178,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService { jo1.put("blockId", IdUtil.simpleUUID()); jo1.put("location", startPoint); jo1.put("operation", "JackLoad"); - jo1.put("operationArgs", new JSONObject() {{ - put("recognize", true); - }}); - ja.add(jo1); - - + inspectInStocckSet(ja, startPoint, jo1); JSONObject jo2 = new JSONObject(); jo2.put("blockId", IdUtil.simpleUUID()); jo2.put("location", startPoint + "OUTGET");