public static void sparkFare(ApplicationContext applicationcontext) throws ParseException {
   try {
     CalcDependenciesService calcDependenciesService =
         applicationcontext.getBean("calcDependenciesService", CalcDependenciesService.class);
     HashMap calcDependencies = calcDependenciesService.getCalcDependencies();
     Date deptDate = DateUtils.parseDate("2016-01-25", "yyyy-MM-dd");
     Document doc = new Document();
     Document flightInfo = new Document();
     flightInfo.append("carrier", "MU");
     flightInfo.append("flightNo", "5111");
     flightInfo.append("oriEng", "SHA");
     flightInfo.append("desEng", "PEK");
     flightInfo.append("flightDt", deptDate);
     doc.append("flightInfo", flightInfo);
     doc.append("routetype", "OW");
     doc.append("currency", "CNY");
     doc.append("channel", new Double(38));
     AtomicFareCalc.getInstance().fareCalc(doc, calcDependencies);
   } catch (BeansException e) {
     e.printStackTrace();
   }
 }
 @SuppressWarnings("rawtypes")
 public static void sparkFare(ApplicationContext applicationcontext) throws ParseException {
   try {
     CalcDependenciesService calcDependenciesService =
         applicationcontext.getBean("calcDependenciesService", CalcDependenciesService.class);
     HashMap calcDependencies = calcDependenciesService.getCalcDependencies();
     Date deptDate = DateUtils.parseDate("2016-07-09", "yyyy-MM-dd");
     Date depTime = DateUtils.parseDate("2016-07-09 20:50", "yyyy-MM-dd HH:mm");
     Document doc = new Document();
     doc.append("carrier", "FM");
     doc.append("flightNo", "9136");
     doc.append("oriEng", "BAV");
     doc.append("desEng", "PVG");
     doc.append("flightDt", deptDate);
     doc.append("depTime", depTime);
     doc.append("routetype", "OW");
     doc.append("currency", "USD");
     doc.append("channel", new Double(3));
     AtomicFareCalc.getInstance().fareCalc(doc, calcDependencies);
   } catch (BeansException e) {
     e.printStackTrace();
   }
 }