|
|
|
@ -35,6 +35,7 @@ import org.springframework.beans.BeansException;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
import org.springframework.util.StopWatch;
|
|
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
@ -395,14 +396,29 @@ public class MesProduceSnPrintService implements IMesProduceSnPrintService {
|
|
|
|
|
@Override
|
|
|
|
|
public List<MesPrintQueue> findMesPrintQueueList(MesPrintQueue printQueue) {
|
|
|
|
|
|
|
|
|
|
StopWatch stopWatch = new StopWatch();
|
|
|
|
|
|
|
|
|
|
stopWatch.start();
|
|
|
|
|
|
|
|
|
|
String clazz = MesExtEnumUtil.PRINT_QUEUE_TYPE.valueOfClazz(printQueue.getPrintQueueType());
|
|
|
|
|
|
|
|
|
|
List<MesPrintQueue> printQueueList = null;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
IPrintQueueStrategyService strategyService = (IPrintQueueStrategyService) SpringContextsUtil.getBean(clazz);
|
|
|
|
|
|
|
|
|
|
printQueueList = strategyService.execute(printQueue);
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
|
|
log.info("打印队列查询 --- {} --- 执行异常 --- {}", MesExtEnumUtil.PRINT_QUEUE_TYPE.valueOfDescription(printQueue.getPrintQueueType()), e.toString());
|
|
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
|
|
stopWatch.stop();
|
|
|
|
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(printQueueList)) log.info("打印队列查询 --- {} --- 执行耗时: {} ms ---", MesExtEnumUtil.PRINT_QUEUE_TYPE.valueOfDescription(printQueue.getPrintQueueType()), stopWatch.getTotalTimeMillis());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return printQueueList;
|
|
|
|
|