Exemple #1
0
  @RequestMapping(value = "/bsar/ar/getRshtLabel", method = RequestMethod.POST)
  public Model getRshtLabel(Model model, @RequestBody ReceiptCmd receiptCmd) {

    String temp = null;
    logger.debug("확인용" + receiptCmd.getLanguage());
    try {

      model.addAttribute(
          "rshtLabel",
          new ObjectMapper()
              .defaultPrettyPrintingWriter()
              .writeValueAsString(receiptService.getRshtLabel(receiptCmd)));

    } catch (AcubeCommonException me) {

      logger.error("[getRshtLabel] " + me.toString(), me);
      model.addAttribute("RESULT", "FAIL");
      model.addAttribute("MESSAGE", me.toString());
    } catch (Exception e) {

      logger.error("[getRshtLabel] " + e.toString(), e);
      model.addAttribute("RESULT", "FAIL");
      model.addAttribute("MESSAGE", "err.500");
    } finally {
      if (logger.isDebugEnabled()) {
        logger.debug("[getRshtLabel] END");
      }
    }
    return model;
  }
Exemple #2
0
  // 영수증 재발행
  @RequestMapping(value = "/bsar/ar/arReceiptReport", method = RequestMethod.GET)
  public String receiptReportOpen(Model model, ReceiptCmd receiptCmd) {

    try {

      model.addAttribute("recpData", "");
      model.addAttribute("arPymDialogName", "");
      model.addAttribute("callBackFunc", "");
      receiptCmd.setLanguage("mn");
      model.addAttribute("receiptCmd", receiptCmd);

      // model.addAttribute("rshtItemCnt", attributeValue)

    } catch (AcubeCommonException me) {

      logger.error("[receiptReprint] " + me.toString(), me);
      model.addAttribute("RESULT", "FAIL");
      model.addAttribute("MESSAGE", me.toString());
    } catch (Exception e) {

      logger.error("[receiptReprint] " + e.toString(), e);
      model.addAttribute("RESULT", "FAIL");
      model.addAttribute("MESSAGE", "err.500");
    } finally {
      if (logger.isDebugEnabled()) {
        logger.debug("[receiptReprint] END");
      }
    }

    // return new ModelAndView("bsar/ar/arReceipt","data",data);
    return "bsar/ar/arReceiptReport";
  }
Exemple #3
0
  @SuppressWarnings({"rawtypes", "unchecked"})
  @RequestMapping(value = "/bsar/ar/arReceipt", method = RequestMethod.POST)
  // public String receiptOpen(Model model, @RequestParam(required=false)
  // String callBackFunc,@RequestParam(required=false) String language,
  // @RequestBody OtimeVO otimeVO){
  public String receiptOpen(Model model, ReceiptCmd receiptCmd, @RequestBody OtimeVO otimeVO) {

    ObjectMapper om = new ObjectMapper();

    String temp = null;

    try {

      temp = om.defaultPrettyPrintingWriter().writeValueAsString(otimeVO);

      model.addAttribute("recpData", temp);
      model.addAttribute("receipt", receiptService.getReceipt(receiptCmd));
      model.addAttribute(
          "rshtLabel",
          new ObjectMapper()
              .defaultPrettyPrintingWriter()
              .writeValueAsString(receiptService.getRshtLabel(receiptCmd)));

      model.addAttribute("arPymDialogName", receiptCmd.getArPymDialogName());
      // model.addAttribute("callBackFunc",callBackFunc);
      model.addAttribute("callBackFunc", receiptCmd.getCallBackFunc());

    } catch (AcubeCommonException me) {

      logger.error("[receiptOpen] " + me.toString(), me);
      model.addAttribute("RESULT", "FAIL");
      model.addAttribute("MESSAGE", me.toString());
    } catch (Exception e) {

      logger.error("[receiptOpen] " + e.toString(), e);
      model.addAttribute("RESULT", "FAIL");
      model.addAttribute("MESSAGE", "err.500");
    } finally {
      if (logger.isDebugEnabled()) {
        logger.debug("[receiptOpen] END");
      }
    }

    // return new ModelAndView("bsar/ar/arReceipt","data",data);
    return "bsar/ar/arReceipt";
  }