Package org.g4studio.core.metatype

Examples of org.g4studio.core.metatype.Dto


   * @return
   */
  public ActionForward queryCatalogs4Print(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm)form;
    Dto inDto = aForm.getParamAsDto(request);
    super.setSessionAttribute(request, "QUERYCATALOGS4PRINT_QUERYDTO", inDto);
    List catalogList = g4Reader.queryForPage("Demo.queryCatalogsForPrint", inDto);
    Integer pageCount = (Integer) g4Reader.queryForObject("Demo.queryCatalogsForPrintForPageCount", inDto);
    String jsonString = encodeList2PageJson(catalogList, pageCount, G4Constants.FORMAT_DateTime);
    write(jsonString, response);
View Full Code Here


  /**
   * 构造报表数据对象
   */
  public ActionForward buildReportDataObject(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    Dto dto = new BaseDto();
    dto.put("reportTitle", "北京市第一人民医院收费项目明细报表(演示)");
    dto.put("jbr", getSessionContainer(request).getUserInfo().getUsername());
    dto.put("jbsj", G4Utils.getCurrentTime());
    Dto inDto = (BaseDto)getSessionAttribute(request, "QUERYCATALOGS4PRINT_QUERYDTO");
    List catalogList = g4Reader.queryForList("Demo.queryCatalogsForPrintLimitRows", inDto);
    int toIndex = 80;
    if (catalogList.size() <=toIndex) {
      toIndex = catalogList.size() - 1;
    }
    List subList = catalogList.subList(0, toIndex);
    for (int i = 0; i < subList.size(); i++) {
      Dto dto2 = (BaseDto)subList.get(i);
      dto2.put("zfbl", dto2.getAsBigDecimal("zfbl"));
    }
    ReportData reportData = new ReportData();
    reportData.setParametersDto(dto);
    reportData.setFieldsList(subList);
    reportData.setReportFilePath("/report/jasper/demo/hisCatalogReport.jasper");
View Full Code Here

  private String getPanelScript() {
    Reader g4Reader = (Reader) SpringBeanLoader.getSpringBean("g4Reader");
    // String rootName =
    // (String)g4Reader.queryForObject("getMenuNameForCNPath", "01");
    HttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest();
    Dto dto = new BaseDto();
    dto.put("contextPath", request.getContextPath());
    dto.put("northTitle", northTitle);
    dto.put("centerTitle",
        G4Utils.isEmpty(WebUtils.getParamValue("MENU_FIRST", request)) ? "请配置" : WebUtils.getParamValue(
            "MENU_FIRST", request));
    dto.put("welcomePageTitle", G4Utils.isEmpty(WebUtils.getParamValue("WELCOME_PAGE_TITLE", request)) ? "请配置" : WebUtils.getParamValue(
        "WELCOME_PAGE_TITLE", request));
    dto.put("banner", request.getContextPath() + WebUtils.getParamValue("INDEX_BANNER", request));
    dto.put("westTitle", westTitle);
    dto.put("scriptStart", scriptStart);
    dto.put("scriptEnd", scriptEnd);
    dto.put("copyright", WebUtils.getParamValue("BOTTOM_COPYRIGHT", request));
    String activeOnTop = "true";
    if ("0".equals(WebUtils.getParamValue("WEST_CARDMENU_ACTIVEONTOP", request))) {
      activeOnTop = "false";
    }
    dto.put("activeOnTop", activeOnTop);
    SessionContainer sessionContainer = WebUtils.getSessionContainer(request);
    String userid = sessionContainer.getUserInfo().getUserid();
    Dto dto2 = new BaseDto();
    dto2.put("userid", userid);
    String account = sessionContainer.getUserInfo().getAccount();
    account = account == null ? "" : account;
    String accountType = SystemConstants.ACCOUNTTYPE_NORMAL;
    if (account.equalsIgnoreCase(WebUtils.getParamValue("DEFAULT_ADMIN_ACCOUNT", request))) {
      accountType = SystemConstants.ACCOUNTTYPE_SUPER;
    } else if (account.equalsIgnoreCase(WebUtils.getParamValue("DEFAULT_DEVELOP_ACCOUNT", request))) {
      accountType = SystemConstants.ACCOUNTTYPE_DEVELOPER;
    }
    dto2.put("accountType", accountType);
    dto.put("accountType", accountType);
    List cardList = tagSupportService.getCardList(dto2).getDefaultAList();
    for (int i = 0; i < cardList.size(); i++) {
      MenuVo cardVo = (MenuVo) cardList.get(i);
      if (i != cardList.size() - 1) {
        cardVo.setIsNotLast("true");
      }
    }
    dto.put("date", G4Utils.getCurDate());
    dto.put("week", G4Utils.getWeekDayByDate(G4Utils.getCurDate()));
    dto.put("welcome", getWelcomeMsg());
    dto.put("cardList", cardList);
    dto.put("username", sessionContainer.getUserInfo().getUsername());
    dto.put("account", sessionContainer.getUserInfo().getAccount());
    Dto qDto = new BaseDto();
    qDto.put("deptid", sessionContainer.getUserInfo().getDeptid());
    dto.put("deptname", tagSupportService.getDepartmentInfo(qDto).getAsString("deptname"));
    Dto themeDto = new BaseDto();
    themeDto.put("userid", WebUtils.getSessionContainer(request).getUserInfo().getUserid());
    Dto resultDto = new BaseDto();
    resultDto = tagSupportService.getEauserSubInfo(themeDto);
    String theme = resultDto.getAsString("theme");
    theme = G4Utils.isEmpty(theme) ? "default" : theme;
    dto.put("theme", theme);
    String layout = null;
    if(G4Utils.isNotEmpty(resultDto))
      layout = resultDto.getAsString("layout");
    String defaultLayout = WebUtils.getParamValue("APP_LAYOUT", request);
    layout = G4Utils.isEmpty(layout) ? defaultLayout : layout;
    dto.put("layout", layout);
    dto.put("themeColor", getThemeColor(theme));
    TemplateEngine engine = TemplateEngineFactory.getTemplateEngine(TemplateType.VELOCITY);
View Full Code Here

   * @throws Exception
   */
  public ActionForward queryBalanceInfo(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm) form;
    Dto dto = aForm.getParamAsDto(request);
    List list = g4Reader.queryForPage("Demo.queryBalanceInfo2", dto);
    Integer countInteger = (Integer) g4Reader.queryForObject("Demo.countBalanceInfo2", dto);
    String jsonString = JsonHelper.encodeList2PageJson(list, countInteger, G4Constants.FORMAT_Date);
    super.write(jsonString, response);
    return mapping.findForward(null);
View Full Code Here

   * @throws Exception
   */
  public ActionForward querySfxm(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm cForm = (BaseActionForm) form;
    Dto inDto = cForm.getParamAsDto(request);
    Dto outDto = (BaseDto)g4Reader.queryForObject("Demo.queryCatalogs2", inDto);
    if (G4Utils.isEmpty(outDto)) {
      outDto = new BaseDto();
      outDto.put("msg", "没有查询到数据");
    }else {
      outDto.put("msg", "ok");
    }
    String jsonString = JsonHelper.encodeDto2FormLoadJson(outDto, G4Constants.FORMAT_Date);
    write(jsonString, response);
    return mapping.findForward(null);
  }
View Full Code Here

   * @throws Exception
   */
  public ActionForward updateSfxm(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm cForm = (BaseActionForm) form;
    Dto inDto = cForm.getParamAsDto(request);
    inDto.put("ggsj", inDto.getAsTimestamp("ggsj"));
    demoService.updateSfxmDomain(inDto);
    setOkTipMsg("数据修改成功", response);
    return mapping.findForward(null);
  }
View Full Code Here

   * @throws Exception
   */
  public ActionForward saveSfxmDomain(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm) form;
    Dto inDto = aForm.getParamAsDto(request);
    inDto.put("ggsj", inDto.getAsTimestamp("ggsj"));
    inDto.put("yybm", "03010001");
    demoService.saveSfxmDomain(inDto);
    setOkTipMsg("收费项目数据保存成功", response);
    return mapping.findForward(null);
  }
View Full Code Here

  private String generateCardTrees(Dto pDto) {
    Reader sqlRunner = (Reader) SpringBeanLoader.getSpringBean("g4Reader");
    HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
    SessionContainer sessionContainer = WebUtils.getSessionContainer(request);
    String userid = sessionContainer.getUserInfo().getUserid();
    Dto qDto = new BaseDto();
    qDto.put("userid", userid);
    List cardList = (List) pDto.get("cardList");
    String treesString = scriptStart + "Ext.onReady(function(){";
    for (int i = 0; i < cardList.size(); i++) {
      MenuVo cardVo = (MenuVo) cardList.get(i);
      qDto.put("menuid", cardVo.getMenuid());
      qDto.put("accountType", pDto.getAsString("accountType"));
      List menuList = tagSupportService.getCardTreeList(qDto).getDefaultAList();
      String rootName = (String) sqlRunner.queryForObject("Organization.getMenuNameForCNPath", "01");
      Dto pathDto = new BaseDto();
      pathDto.put("01", rootName);
      Dto dto = new BaseDto();
      dto.put("menuList", generateMenuPathName(menuList, pathDto));
      dto.put("menuid", cardVo.getMenuid());
      TemplateEngine engine = TemplateEngineFactory.getTemplateEngine(TemplateType.VELOCITY);
      DefaultTemplate template = new FileTemplate();
      template.setTemplateResource(TagHelper.getTemplatePath(getClass().getName(), "CardTreesTag.tpl"));
      StringWriter writer = engine.mergeTemplate(template, dto);
      treesString = treesString + "\n" + writer.toString();
View Full Code Here

   * @throws Exception
   */
  public ActionForward querySfxmDatas(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm) form;
    Dto dto = aForm.getParamAsDto(request);
    List list = g4Reader.queryForPage("Demo.queryCatalogsForGridDemo", dto);
    setSessionAttribute(request, "printList", list);
    Integer countInteger = (Integer) g4Reader.queryForObject("Demo.countCatalogsForGridDemo", dto);
    String jsonString = JsonHelper.encodeList2PageJson(list, countInteger, G4Constants.FORMAT_Date);
    write(jsonString, response);
View Full Code Here

   * @throws Exception
   */
  public ActionForward deleteSfxm(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm) form;
    Dto inDto = aForm.getParamAsDto(request);
    demoService.deleteSfxm(inDto);
    setOkTipMsg("收费项目删除成功", response);
    return mapping.findForward(null);
  }
View Full Code Here

TOP

Related Classes of org.g4studio.core.metatype.Dto

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.