| | |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.amqp.rabbit.annotation.RabbitListener; |
| | | import org.springframework.amqp.rabbit.core.RabbitTemplate; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | private RabbitTemplate rabbitTemplate; |
| | | |
| | | private static final Logger logger = LoggerFactory.getLogger(ConsumptionRecordServiceImpl.class); |
| | | |
| | | @Value("${spring.profiles.active}") |
| | | private String envName; |
| | | /** |
| | | * 列表 |
| | | * |
| | |
| | | * 发消息到消息队列 |
| | | * @return |
| | | */ |
| | | @RabbitListener(queues = "BoneAgeEvaluationData") |
| | | //@RabbitListener(queues = "BoneAgeEvaluationData") |
| | | private void MessageToBI(ConsumptionRequest consumptionRequest) |
| | | { |
| | | //发消息到队列 |
| | |
| | | "\",\"departmentId\":\"" + consumptionRequest.getDepartmentId() + |
| | | "\",\"doctorId\":\"" + consumptionRequest.getDoctorId() + |
| | | "\",\"date\":\"" + DateUtils.formatDate(new Date(),"yyyy-MM-dd")+"\"}"; |
| | | rabbitTemplate.convertAndSend(ConsumptionConstant.EXCHANGE_DATA, ConsumptionConstant.ROUTINGKEY_DATA, context); |
| | | rabbitTemplate.convertAndSend(ConsumptionConstant.EXCHANGE_DATA, ConsumptionConstant.ROUTINGKEY_DATA+envName, context); |
| | | |
| | | log.error("骨龄评价扣费消息已发送:"+context); |
| | | } |
| | | } |