mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
1、新增生产单xml导入异步处理;2、excel导入提示优化;
This commit is contained in:
+40
-5
@@ -41,22 +41,22 @@ public class ChenfengRabbitMQAutoConfiguration {
|
||||
|
||||
|
||||
/**
|
||||
* 生产单导入交换机、队列、绑定声明
|
||||
* 生产单excel导入交换机、队列、绑定声明
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public FanoutExchange orderImportFanoutExchange() {
|
||||
public FanoutExchange orderImportDefaultExcelFanoutExchange() {
|
||||
return new FanoutExchange(RabbitMqConstants.ORDER_IMPORT_DEFAULT_EXCEL_EXCHANGE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生产单导入队列声明
|
||||
* 生产单excel导入队列声明
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public Queue orderImportQueue() {
|
||||
public Queue orderImportDefaultExcelQueue() {
|
||||
Map<String, Object> args = new HashMap<>(1);
|
||||
// x-dead-letter-exchange 这里声明当前队列绑定的死信交换机
|
||||
args.put("x-dead-letter-exchange", ORDER_IMPORT_DEAD_LETTER_EXCHANGE);
|
||||
@@ -72,7 +72,42 @@ public class ChenfengRabbitMQAutoConfiguration {
|
||||
*/
|
||||
@Bean
|
||||
public Binding orderImportDefaultExcelBinding() {
|
||||
return BindingBuilder.bind(orderImportQueue()).to(orderImportFanoutExchange());
|
||||
return BindingBuilder.bind(orderImportDefaultExcelQueue()).to(orderImportDefaultExcelFanoutExchange());
|
||||
}
|
||||
|
||||
/**
|
||||
* 生产单xml导入交换机、队列、绑定声明
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public FanoutExchange orderImportDefaultXmlFanoutExchange() {
|
||||
return new FanoutExchange(RabbitMqConstants.ORDER_IMPORT_DEFAULT_XML_EXCHANGE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生产单xml导入队列声明
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public Queue orderImportDefaultXmlQueue() {
|
||||
Map<String, Object> args = new HashMap<>(1);
|
||||
// x-dead-letter-exchange 这里声明当前队列绑定的死信交换机
|
||||
args.put("x-dead-letter-exchange", ORDER_IMPORT_DEAD_LETTER_EXCHANGE);
|
||||
// 设置死信路由键
|
||||
args.put("x-dead-letter-routing-key", ORDER_IMPORT_DEAD_LETTER_ROUTING_KEY);
|
||||
return QueueBuilder.durable(RabbitMqConstants.ORDER_IMPORT_DEFAULT_XML_QUEUE).withArguments(args).build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 生产单xml导入交换机声明
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public Binding orderImportDefaultXmlBinding() {
|
||||
return BindingBuilder.bind(orderImportDefaultXmlQueue()).to(orderImportDefaultXmlFanoutExchange());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+12
-2
@@ -8,15 +8,25 @@ package com.cf.imes.framework.mq.rabbitmq.constant;
|
||||
*/
|
||||
public class RabbitMqConstants {
|
||||
/**
|
||||
* 生产单导入交换机
|
||||
* 生产单导入excel交换机
|
||||
*/
|
||||
public static final String ORDER_IMPORT_DEFAULT_EXCEL_EXCHANGE = "order_import_default_excel_exchange";
|
||||
|
||||
/**
|
||||
* 生产单导入队列
|
||||
* 生产单导入excel队列
|
||||
*/
|
||||
public static final String ORDER_IMPORT_DEFAULT_EXCEL_QUEUE = "order_import_default_excel_queue";
|
||||
|
||||
/**
|
||||
* 生产单导入xml交换机
|
||||
*/
|
||||
public static final String ORDER_IMPORT_DEFAULT_XML_EXCHANGE = "order_import_default_xml_exchange";
|
||||
|
||||
/**
|
||||
* 生产单导入xml队列
|
||||
*/
|
||||
public static final String ORDER_IMPORT_DEFAULT_XML_QUEUE = "order_import_default_xml_queue";
|
||||
|
||||
/**
|
||||
* 生产单导入死信交换机
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user