From edea7945a0c5aa07afe9935a59b6b267a8ec278b Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Thu, 13 Feb 2025 10:14:02 +0800 Subject: [PATCH] =?UTF-8?q?2/13=20=E8=BF=9E=E6=8E=A5=E7=81=AF=E7=BB=841.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collect/IoCollectLedGroupService.java | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/glxp/api/service/collect/IoCollectLedGroupService.java b/src/main/java/com/glxp/api/service/collect/IoCollectLedGroupService.java index eb91d0e4a..52bd45ed8 100644 --- a/src/main/java/com/glxp/api/service/collect/IoCollectLedGroupService.java +++ b/src/main/java/com/glxp/api/service/collect/IoCollectLedGroupService.java @@ -1,6 +1,7 @@ package com.glxp.api.service.collect; import cn.hutool.core.thread.ThreadUtil; +import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONUtil; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; @@ -8,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.github.pagehelper.PageHelper; import com.glxp.api.common.res.BaseResponse; +import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.dao.collect.IoCollectLedGroupMapper; import com.glxp.api.entity.basic.SysWorkplaceQueue; import com.glxp.api.entity.collect.IoCollectLedGroup; @@ -15,10 +17,12 @@ import com.glxp.api.entity.collect.IoCollectOrder; import com.glxp.api.entity.collect.IoCollectOrderBiz; import com.glxp.api.entity.collect.SysOrderLed; import com.glxp.api.entity.thrsys.CodeRel; +import com.glxp.api.entity.thrsys.ThrManufacturerEntity; import com.glxp.api.enums.led.LedColorStatusEnum; import com.glxp.api.exception.JsonException; import com.glxp.api.req.collect.CollectLedGroupRequest; import com.glxp.api.req.collect.LedGroupRequest; +import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.collect.IoCollectLedGroupResponse; import com.glxp.api.service.basic.SysWorkplaceQueueService; import com.glxp.api.util.IntUtil; @@ -73,6 +77,7 @@ public class IoCollectLedGroupService extends ServiceImpl openLed(List collectOrderBizs) { + log.error("获取灯组=============="); LedGroupRequest ledGroupRequest = new LedGroupRequest(); for (IoCollectOrderBiz collectOrderBiz : collectOrderBizs) { @@ -113,11 +118,17 @@ public class IoCollectLedGroupService extends ServiceImpl response = - JSONObject.parseObject(result, new TypeReference>() { - }); - return response; + try { + String result = okHttpCli.doPostJson("http://192.168.0.166:9099/wms/associate/lighttagsled", json); + BaseResponse response = + JSONObject.parseObject(result, new TypeReference>() { + }); + return response; + } catch (Exception e) { + log.error("灯组获取异常", e); + return ResultVOUtils.error(500, "连接灯组异常!"); + } + }