feat():下发钢卷设定值请求到模型程序
This commit is contained in:
@@ -3,12 +3,9 @@ package com.fizz.business.controller;
|
|||||||
import com.fizz.business.domain.CrmPdoExcoil;
|
import com.fizz.business.domain.CrmPdoExcoil;
|
||||||
import com.fizz.business.form.CrmPdoExcoilForm;
|
import com.fizz.business.form.CrmPdoExcoilForm;
|
||||||
import com.fizz.business.service.CrmPdoExcoilService;
|
import com.fizz.business.service.CrmPdoExcoilService;
|
||||||
import com.ruoyi.common.annotation.Anonymous;
|
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|||||||
@@ -71,19 +71,20 @@ public class RabbitQueueListener {
|
|||||||
// 获取 messageId
|
// 获取 messageId
|
||||||
String messageId = (String) headers.get("amqp_messageId");
|
String messageId = (String) headers.get("amqp_messageId");
|
||||||
|
|
||||||
|
// 去掉字符串两端的引号
|
||||||
|
message = message.replaceAll("^\"|\"$", "");
|
||||||
// 处理消息逻辑
|
// 处理消息逻辑
|
||||||
if ("TOTAL_PRESET_DONE".equalsIgnoreCase(messageId)) {
|
if ("TOTAL_PRESET_DONE".equalsIgnoreCase(messageId)) {
|
||||||
|
|
||||||
List<ModSetupResultVO> setup = modSetupResultService.getSetupByCoilid(message);
|
List<ModSetupResultVO> setup = modSetupResultService.getSetupByCoilid(message);
|
||||||
|
|
||||||
|
|
||||||
ModSetupResultKeyVO modSetupResultKeyVO = new ModSetupResultKeyVO();
|
ModSetupResultKeyVO modSetupResultKeyVO = new ModSetupResultKeyVO();
|
||||||
modSetupResultKeyVO.setKey(ModSetupResultServiceImpl.WS_EKY);
|
modSetupResultKeyVO.setKey(ModSetupResultServiceImpl.WS_EKY);
|
||||||
modSetupResultKeyVO.setLists(setup);
|
modSetupResultKeyVO.setLists(setup);
|
||||||
//socket
|
//socket
|
||||||
WebSocketUtil.sendMessage(WsTypeEnum.calc_setup_result,JSONUtil.toJsonStr(modSetupResultKeyVO));
|
WebSocketUtil.sendMessage(WsTypeEnum.calc_setup_result,JSONUtil.toJsonStr(modSetupResultKeyVO));
|
||||||
} else if ("TOTAL_PRESET_FAILED".equalsIgnoreCase(messageId)) {
|
} else if ("TOTAL_PRESET_FAILED".equalsIgnoreCase(messageId)) {
|
||||||
WebSocketUtil.sendMessage(WsTypeEnum.calc_setup_result,JSONUtil.toJsonStr("计算失败"));
|
WebSocketUtil.sendMessage(WsTypeEnum.calc_setup_result,JSONUtil.toJsonStr(Lists.newArrayList()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user