Package org.g4studio.common.web

Examples of org.g4studio.common.web.BaseActionForm


   * @param
   * @return
   */
  public ActionForward queryEvents(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm)form;
    Dto dto = aForm.getParamAsDto(request);
    dto.put("ksrq", G4Utils.Date2String(dto.getAsDate("ksrq"), "yyyyMMdd000000"));
    dto.put("jsrq", G4Utils.Date2String(dto.getAsDate("jsrq"), "yyyyMMdd235959"));
    List eventList = g4Reader.queryForPage("Monitor.queryEventsByDto", dto);
    for (int i = 0; i < eventList.size(); i++) {
      Dto dto2 = (BaseDto)eventList.get(i);
View Full Code Here


   * @param
   * @return
   */
  public ActionForward deleteEvents(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm)form;
    Dto dto = aForm.getParamAsDto(request);
    monitorService.deleteEvent(dto);
    if (dto.getAsString("type").equalsIgnoreCase("reset"))
      setOkTipMsg("清空成功,所有事件已被清除!", response);
    else
      setOkTipMsg("数据删除成功!", response);
View Full Code Here

   * @param
   * @return
   */
  public ActionForward updateUserInfo(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response) throws Exception {
    BaseActionForm cForm = (BaseActionForm)form;
    UserInfoVo userInfoVo = getSessionContainer(request).getUserInfo();
    UserService service = (UserService)getService("userService");
    Dto indDto = cForm.getParamAsDto(request);
    Dto outDto = new BaseDto(G4Constants.TRUE);
    outDto.put("flag", G4Constants.SUCCESS);
    String password = CodeUtil.encryptBase64(indDto.getAsString("password2"), G4Constants.BASE64_KEY);
    if (password.equals(userInfoVo.getPassword())) {
      service.updateUserItem4IndexPage(indDto);
View Full Code Here

   * @param
   * @return
   */
  public ActionForward unlockSystem(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response) throws Exception {
    BaseActionForm cForm = (BaseActionForm)form;
    UserInfoVo userInfoVo = getSessionContainer(request).getUserInfo();
    Dto indDto = cForm.getParamAsDto(request);
    String password = CodeUtil.encryptBase64(indDto.getAsString("password"), G4Constants.BASE64_KEY);
    Dto outDto = new BaseDto(G4Constants.TRUE);
    if (password.equals(userInfoVo.getPassword())) {
      outDto.put("flag", G4Constants.SUCCESS);
    }else {
View Full Code Here

   * @return
   * @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);
    Integer countInteger = (Integer) g4Reader.queryForObject("Demo.countCatalogsForGridDemo", dto);
    String jsonString = JsonHelper.encodeList2PageJson(list, countInteger, G4Constants.FORMAT_Date);
    super.write(jsonString, response);
    return mapping.findForward(null);
View Full Code Here

   * @return
   * @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.queryBalanceInfo", dto);
    Integer countInteger = (Integer) g4Reader.queryForObject("Demo.countBalanceInfo", dto);
    super.setSessionAttribute(request, "GRIDACTION_QUERYBALANCEINFO_DTO", dto);
    String jsonString = encodeList2PageJson(list, countInteger, G4Constants.FORMAT_Date);
    super.write(jsonString, response);
View Full Code Here

   * @return
   * @throws Exception
   */
  public ActionForward saveDirtyDatas(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm) form;
    List list  = aForm.getGridDirtyData(request);
    for (int i = 0; i < list.size(); i++) {
      Dto dto = (BaseDto)list.get(i);
      System.out.println("脏数据:\n" + dto);
      //todo anything what u want
    }
View Full Code Here

   * @param
   * @return
   */
  public ActionForward queryCatalogs4Export(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm) form;
    Dto inDto = aForm.getParamAsDto(request);
    super.setSessionAttribute(request, "QUERYCATALOGS4EXPORT_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

   * @return
   * @throws Exception
   */
  public ActionForward importExcel(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm actionForm = (BaseActionForm) form;
    FormFile theFile = actionForm.getTheFile();
    String metaData = "xmid,xmmc,xmrj,gg,dw,jx,zfbl,cd,ggsj";
    ExcelReader excelReader = new ExcelReader(metaData, theFile.getInputStream());
    List list = excelReader.read(3, 1);
    super.setSessionAttribute(request, "importExcelList", list);
    setOkTipMsg("导入成功", response);
View Full Code Here

TOP

Related Classes of org.g4studio.common.web.BaseActionForm

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.