|  |  | 
 |  |  | package com.dy.rtuMw.web.comResult; | 
 |  |  |  | 
 |  |  | import com.dy.common.contant.Constant; | 
 |  |  | import com.dy.common.mw.protocol.Command; | 
 |  |  | import com.dy.common.mw.protocol.Data; | 
 |  |  | import com.dy.rtuMw.server.ServerProperties; | 
 |  |  | import org.apache.logging.log4j.LogManager; | 
 |  |  | import org.apache.logging.log4j.Logger; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | 
 |  |  |  * @Author liurunyu | 
 |  |  |  * @Date 2023/12/21 20:28 | 
 |  |  |  * @LastEditTime 2023/12/21 20:28 | 
 |  |  |  * @Description | 
 |  |  |  * @Description 通信中间件对外进行web调用,把命令结果发送出去 | 
 |  |  |  */ | 
 |  |  | @Component() | 
 |  |  | public class CommandResultDeal { | 
 |  |  | 
 |  |  |             restTemplate.getMessageConverters().set(1,new StringHttpMessageConverter(StandardCharsets.UTF_8)); | 
 |  |  |             HttpHeaders headers = new HttpHeaders(); | 
 |  |  |             headers.setContentType(MediaType.parseMediaType("application/json;charset=UTF-8")); | 
 |  |  |             headers.set(Constant.UserTokenKeyInHeader, ServerProperties.orgTag); | 
 |  |  |             HttpEntity<?> httpEntity = new HttpEntity<>(data, headers); | 
 |  |  |             ResponseEntity<WebResponseVo> response = null; | 
 |  |  |             try { |