From e2ef58086619bf43d323f7f0f60cd15b91942493 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期五, 11 七月 2025 14:34:27 +0800 Subject: [PATCH] no message --- zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/services/Impl/WcsApiServiceImpl.java | 42 ++++++++++-------------------------------- 1 files changed, 10 insertions(+), 32 deletions(-) diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/services/Impl/WcsApiServiceImpl.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/services/Impl/WcsApiServiceImpl.java index f33da51..575b71f 100644 --- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/services/Impl/WcsApiServiceImpl.java +++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/services/Impl/WcsApiServiceImpl.java @@ -61,9 +61,10 @@ @Autowired private PlatformService platformService; - @Resource private SystemProperties systemProperties; + @Autowired + private MobileService mobileService; /** @@ -107,36 +108,7 @@ } else { if (task.getTaskSts() == TaskStsType.WCS_EXECUTE_OUT_ARRIVED.id || task.getTaskSts() == TaskStsType.WCS_EXECUTE_OUT_TASK_DONE.id) { - // 鍒拌揪鎷i�変綅锛屾帶鍒舵挱绉嶅浜伅 - CacheSite cacheSite = cacheSiteService.getOne(new LambdaQueryWrapper<CacheSite>() - .eq(CacheSite::getChannel, task.getTargetSite()) - .isNull(CacheSite::getOrderId).orderByAsc(CacheSite::getId), false); -// List<CacheSite> cacheSites = cacheSiteService.list(new LambdaQueryWrapper<CacheSite>() -// .eq(CacheSite::getBarcode, task.getBarcode())); - if (Objects.isNull(cacheSite)) { - log.error("鏉$爜锛歿}锛屾湭鎵惧埌鎾澧欎寒鐏�", task.getBarcode()); - throw new CoolException("鏈壘鍒版挱绉嶅"); - } - // 鑾峰彇浠诲姟鏄庣粏鏁伴噺 - List<TaskDetl> taskDetlByTaskId = taskDetlService.getTaskDetlByTaskId(task.getId()); - int sum = (int) taskDetlByTaskId.stream().mapToDouble(TaskDetl::getAnfme).sum(); - SlapLightControlParam slapLightControlParam = new SlapLightControlParam(); - slapLightControlParam - .setControllerCode(cacheSite.getMemo()) - .setTagCode(cacheSite.getSiteNo()) - .setColor("GREEN") - .setIndex(cacheSite.getIndex()) - .setMode("LIGHT") - .setDisplay(sum + ""); - // 鍙戣捣浜伅璇锋眰 - log.info("浠诲姟{}鍒拌揪鎷i�変綅锛屾挱绉嶅浜伅涓嬪彂", task.getTaskNo(), JSONObject.toJSONString(slapLightControlParam)); - CommonReponse response = HttpEssUtils.post("鍒拌揪鎷i�変綅锛屾挱绉嶅浜伅", HttpEssUtils.PLT_SEND_COMMAND, slapLightControlParam); - if (response.getCode().equals(0)) { - log.info("浠诲姟{}鍒拌揪鎷i�変綅锛屾挱绉嶅{}浜伅鎴愬姛", task.getTaskNo(), cacheSite.getSiteNo()); - } else { - log.info("浠诲姟{}鍒拌揪鎷i�変綅锛屾挱绉嶅{}浜伅澶辫触", task.getTaskNo(), cacheSite.getSiteNo()); - } boolean update = taskService.update(new LambdaUpdateWrapper<Task>() .set(Task::getTaskSts, TaskStsType.WAVE_SEED.id) @@ -378,14 +350,12 @@ // List<OrderDetl> detlList = orderDetls.stream().filter(detl -> { // return detl.getPickStatus() == OrderPickStatus.ORDER_PICK_STATUS_DONE.val; // }).collect(Collectors.toList()); - //鍒ゆ柇鏁伴噺鏄惁涓庤鍗曟槑缁嗙殑闇�姹傞噺鐩稿悓锛岀浉鍚屽垯璁㈠崟瀹屾垚 List<WaveSeed> seeds = waveSeedService.list(new LambdaQueryWrapper<WaveSeed>().eq(WaveSeed::getOrderNo, orderNo)); if (Objects.isNull(seeds)) { throw new CoolException("鏁版嵁閿欒锛氭挱绉嶆暟鎹笉瀛樺湪锛侊紒"); } - Double tolAnfme = seeds.stream().mapToDouble(WaveSeed::getAnfme).sum(); Double toDouble = seeds.stream().mapToDouble(WaveSeed::getWorkQty).sum(); if (toDouble.compareTo(tolAnfme) >= 0) { @@ -407,6 +377,14 @@ } } } + //璁㈠崟瀹屾垚锛岀伃鐏� + mobileService.sowLightMange(siteNo, one, "DARK"); + log.info("瀹屾垚鐏伅璇锋眰鍦板潃锛歿}锛岃姹傚弬鏁帮細{}", SystemProperties.SLAP_LIGHT, JSONObject.toJSONString(slapParam)); + } else { + //璁㈠崟鏈畬鎴愶紝缁х画浜伅 + mobileService.sowLightMange(siteNo, one, "LIGHT"); + log.info("缁х画浜伅璇锋眰鍦板潃锛歿}锛岃姹傚弬鏁帮細{}", SystemProperties.SLAP_LIGHT, JSONObject.toJSONString(slapParam)); + } params.add("params", JSONObject.toJSONString(slapParam)); log.info("瀹屾垚鐏伅璇锋眰鍦板潃锛歿}锛岃姹傚弬鏁帮細{}", SystemProperties.SLAP_LIGHT, JSONObject.toJSONString(slapParam)); -- Gitblit v1.9.1