|
|
|
@ -6,6 +6,7 @@ import com.rabbitmq.client.Channel; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import org.apache.commons.lang.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.amqp.rabbit.annotation.Exchange; |
|
|
|
@ -44,74 +45,74 @@ public class BasedataMontDataMqAcceptHandle { |
|
|
|
@RabbitHandler |
|
|
|
public void onOrderMessage(@Payload String order, Channel channel, @Headers Map<String, Object> headers) throws Exception { |
|
|
|
JSONObject jsonObject = JSONObject.parseObject(order); |
|
|
|
String Type = jsonObject.getString("Type"); |
|
|
|
String type = jsonObject.getString("Type"); |
|
|
|
String uuid = jsonObject.getString("uuid"); |
|
|
|
log.info("[METADATA] RECV MSG FROM RABBITMQ 会话: {}, 类型: {}, 消息体: {}", uuid, Type, order); |
|
|
|
if (null != Type && !Type.isEmpty()) { |
|
|
|
log.info("[METADATA] RECV MSG FROM RABBITMQ 会话: {}, 类型: {}, 消息体: {}", uuid, type, order); |
|
|
|
if (!StringUtils.isEmpty(type)) { |
|
|
|
Long deliveryTag = (Long) headers.get("amqp_deliveryTag"); |
|
|
|
channel.basicAck(deliveryTag, false); |
|
|
|
IBasedataMontDataHandleService basedataMontDataHandleService; |
|
|
|
if ("21".equals(Type)) { |
|
|
|
if ("21".equals(type)) { |
|
|
|
basedataMontDataHandleService = this.registerMontDataHandelBean.getServiceImpl("basedataMont-21"); |
|
|
|
basedataMontDataHandleService.handMontData(jsonObject); |
|
|
|
} |
|
|
|
|
|
|
|
if ("10004".equals(Type)) { |
|
|
|
if ("10004".equals(type)) { |
|
|
|
basedataMontDataHandleService = this.registerMontDataHandelBean.getServiceImpl("basedataMont-10004"); |
|
|
|
basedataMontDataHandleService.handMontData(jsonObject); |
|
|
|
} |
|
|
|
|
|
|
|
if ("20001".equals(Type)) { |
|
|
|
if ("20001".equals(type)) { |
|
|
|
basedataMontDataHandleService = this.registerMontDataHandelBean.getServiceImpl("basedataMont-20001"); |
|
|
|
basedataMontDataHandleService.handMontData(jsonObject); |
|
|
|
} |
|
|
|
|
|
|
|
if ("5".equals(Type)) { |
|
|
|
if ("5".equals(type)) { |
|
|
|
basedataMontDataHandleService = this.registerMontDataHandelBean.getServiceImpl("basedataMont-5"); |
|
|
|
basedataMontDataHandleService.handMontData(jsonObject); |
|
|
|
} |
|
|
|
|
|
|
|
if ("3".equals(Type)) { |
|
|
|
if ("3".equals(type)) { |
|
|
|
basedataMontDataHandleService = this.registerMontDataHandelBean.getServiceImpl("basedataMont-3"); |
|
|
|
basedataMontDataHandleService.handMontData(jsonObject); |
|
|
|
} |
|
|
|
|
|
|
|
if ("4".equals(Type)) { |
|
|
|
if ("4".equals(type)) { |
|
|
|
basedataMontDataHandleService = this.registerMontDataHandelBean.getServiceImpl("basedataMont-4"); |
|
|
|
basedataMontDataHandleService.handMontData(jsonObject); |
|
|
|
} |
|
|
|
|
|
|
|
if ("2".equals(Type)) { |
|
|
|
if ("2".equals(type)) { |
|
|
|
basedataMontDataHandleService = this.registerMontDataHandelBean.getServiceImpl("basedataMont-2"); |
|
|
|
basedataMontDataHandleService.handMontData(jsonObject); |
|
|
|
} |
|
|
|
|
|
|
|
if ("1".equals(Type)) { |
|
|
|
if ("1".equals(type)) { |
|
|
|
basedataMontDataHandleService = this.registerMontDataHandelBean.getServiceImpl("basedataMont-1"); |
|
|
|
basedataMontDataHandleService.handMontData(jsonObject); |
|
|
|
} |
|
|
|
|
|
|
|
if ("61".equals(Type)) { |
|
|
|
if ("61".equals(type)) { |
|
|
|
basedataMontDataHandleService = this.registerMontDataHandelBean.getServiceImpl("basedataMont-61"); |
|
|
|
basedataMontDataHandleService.handMontData(jsonObject); |
|
|
|
} |
|
|
|
|
|
|
|
if ("41".equals(Type)) { |
|
|
|
if ("41".equals(type)) { |
|
|
|
basedataMontDataHandleService = this.registerMontDataHandelBean.getServiceImpl("basedataMont-41"); |
|
|
|
basedataMontDataHandleService.handMontData(jsonObject); |
|
|
|
} |
|
|
|
|
|
|
|
if ("modelup-1024".equals(Type)) { |
|
|
|
if ("modelup-1024".equals(type)) { |
|
|
|
basedataMontDataHandleService = this.registerMontDataHandelBean.getServiceImpl("basedataMont-modelup-1024"); |
|
|
|
basedataMontDataHandleService.handMontData(jsonObject); |
|
|
|
} |
|
|
|
|
|
|
|
if ("heartbeat".equals(Type)) { |
|
|
|
if ("heartbeat".equals(type)) { |
|
|
|
basedataMontDataHandleService = this.registerMontDataHandelBean.getServiceImpl("basedataMont-heartbeat"); |
|
|
|
basedataMontDataHandleService.handMontData(jsonObject); |
|
|
|
} |
|
|
|
|
|
|
|
if ("modelup-1024-test".equals(Type)) { |
|
|
|
if ("modelup-1024-test".equals(type)) { |
|
|
|
basedataMontDataHandleService = this.registerMontDataHandelBean.getServiceImpl("basedataMont-modelup-1024-test"); |
|
|
|
basedataMontDataHandleService.handMontData(jsonObject); |
|
|
|
} |
|
|
|
|