|
|
|
@ -33,16 +33,14 @@ import com.foreverwin.modular.core.util.CommonMethods;
|
|
|
|
|
import com.foreverwin.modular.core.util.FrontPage;
|
|
|
|
|
import com.sap.me.messaging.MessageTypeBOHandle;
|
|
|
|
|
import com.sap.me.user.UserGroupBOHandle;
|
|
|
|
|
import org.apache.activemq.ActiveMQConnection;
|
|
|
|
|
import org.apache.activemq.ActiveMQConnectionFactory;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.context.i18n.LocaleContextHolder;
|
|
|
|
|
import org.springframework.jms.core.JmsMessagingTemplate;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import javax.jms.ConnectionFactory;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
import java.util.*;
|
|
|
|
@ -68,7 +66,9 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl<ProdReadyTaskMapper, P
|
|
|
|
|
public static final String STATUS_FINISH = "FINISH";
|
|
|
|
|
public static final String STATUS_CANCEL = "CANCEL";
|
|
|
|
|
public static final String MESSAGE_TYPE_WLZB = "WLZB";
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
@Qualifier("defaultJmsTemplate")
|
|
|
|
|
private JmsMessagingTemplate jmsMessagingTemplate;
|
|
|
|
|
@Value("${spring.activemq.brokerUrl}")
|
|
|
|
|
String brokerURL;
|
|
|
|
|
@Value("${print.server}")
|
|
|
|
@ -555,11 +555,6 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl<ProdReadyTaskMapper, P
|
|
|
|
|
messageObject.put("RESOURCE", resource);
|
|
|
|
|
messageObject.put("RESOURCE_TYPE", resourceType);
|
|
|
|
|
String causeMessage = null;
|
|
|
|
|
ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(
|
|
|
|
|
ActiveMQConnection.DEFAULT_USER,
|
|
|
|
|
ActiveMQConnection.DEFAULT_PASSWORD, brokerURL);
|
|
|
|
|
|
|
|
|
|
JmsMessagingTemplate jmsMessagingTemplate = new JmsMessagingTemplate(connectionFactory);
|
|
|
|
|
jmsMessagingTemplate.getJmsTemplate().setReceiveTimeout(TimeUnit.SECONDS.toMillis(30));
|
|
|
|
|
String message = jmsMessagingTemplate.convertSendAndReceive(queue, messageObject.toString(), String.class);
|
|
|
|
|
|
|
|
|
|