Esempio n. 1
0
  /** 查询 */
  public ActionForward queryAdcOvertimeItemForManage(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {

    BaseActionForm aForm = (BaseActionForm) form;
    Dto dto = aForm.getParamAsDto(request);
    String deptid = request.getParameter("deptid");
    if (G4Utils.isNotEmpty(deptid)) {
      setSessionAttribute(request, "deptid", deptid);
    }
    if (!G4Utils.isEmpty(request.getParameter("firstload"))) {
      dto.put("deptid", super.getSessionContainer(request).getUserInfo().getDeptid());
    } else {
      dto.put("deptid", super.getSessionAttribute(request, "deptid"));
    }
    dto.put("cascadeid", organizationService.queryCascadeidByDeptid(dto.getAsInteger("deptid")));
    dto.remove("deptid");
    super.setSessionAttribute(request, "QUERYADCOVERTIMEITEM_QUERYDTO", dto);
    List items = g4Reader.queryForPage("AdcOvertime.queryAdcOvertimeItemForManage", dto);
    Integer pageCount =
        (Integer)
            g4Reader.queryForObject("AdcOvertime.queryAdcOvertimeItemForManageForPageCount", dto);
    String jsonString =
        JsonHelper.encodeList2PageJson(items, pageCount, G4Constants.FORMAT_DateTime);
    write(jsonString, response);
    return mapping.findForward(null);
  }
Esempio n. 2
0
 /**
  * 查询文件列表
  *
  * @param mapping
  * @param form
  * @param request
  * @param response
  * @return
  * @throws Exception
  */
 public ActionForward queryFileDatas(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws Exception {
   BaseActionForm aForm = (BaseActionForm) form;
   Dto dto = aForm.getParamAsDto(request);
   List list = g4Reader.queryForPage("Demo.queryFiles", dto);
   Integer countInteger = (Integer) g4Reader.queryForObject("Demo.countFiles", dto);
   String jsonString = JsonHelper.encodeList2PageJson(list, countInteger, null);
   super.write(jsonString, response);
   return mapping.findForward(null);
 }
Esempio n. 3
0
 /**
  * 查询表格数据
  *
  * @param mapping
  * @param form
  * @param request
  * @param response
  * @return
  * @throws Exception
  */
 public ActionForward queryXsyjDatas(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws Exception {
   CommonActionForm aForm = (CommonActionForm) form;
   Dto dto = aForm.getParamAsDto(request);
   List list = g4Reader.queryForPage("Demo.getFcfDataList", dto);
   String jsonString =
       JsonHelper.encodeList2PageJson(list, new Integer(12), G4Constants.FORMAT_Date);
   super.write(jsonString, response);
   return mapping.findForward(null);
 }
Esempio n. 4
0
 /**
  * 查询参数列表
  *
  * @param
  * @return
  */
 public ActionForward queryParamsForManage(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws Exception {
   CommonActionForm aForm = (CommonActionForm) form;
   Dto dto = aForm.getParamAsDto(request);
   List paramList = g4Reader.queryForPage("Param.queryParamsForManage", dto);
   Integer pageCount =
       (Integer) g4Reader.queryForObject("Param.queryParamsForManageForPageCount", dto);
   String jsonString = JsonHelper.encodeList2PageJson(paramList, pageCount, null);
   write(jsonString, response);
   return mapping.findForward(null);
 }
Esempio n. 5
0
  /** 查询明细表 */
  public ActionForward queryAdcOvertimeDetailItemForManage(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {

    BaseActionForm aForm = (BaseActionForm) form;
    Dto dto = aForm.getParamAsDto(request);
    List items = g4Reader.queryForPage("AdcOvertime.queryAdcOvertimeDetailItemForManage", dto);
    Integer pageCount =
        (Integer)
            g4Reader.queryForObject(
                "AdcOvertime.queryAdcOvertimeDetailItemForManageForPageCount", dto);
    String jsonString = JsonHelper.encodeList2PageJson(items, pageCount, null);
    write(jsonString, response);
    return mapping.findForward(null);
  }
Esempio n. 6
0
  /** 查询 */
  public ActionForward queryAdcOvertimeItemForCheck(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {

    BaseActionForm aForm = (BaseActionForm) form;
    Dto dto = aForm.getParamAsDto(request);
    String deptid = request.getParameter("deptid");
    if (G4Utils.isEmpty(deptid)) {
      dto.put("deptid", super.getSessionContainer(request).getUserInfo().getDeptid());
    }
    List items = g4Reader.queryForPage("AdcOvertime.queryAdcOvertimeItemForCheck", dto);
    Integer pageCount =
        (Integer)
            g4Reader.queryForObject("AdcOvertime.queryAdcOvertimeItemForCheckForPageCount", dto);
    String jsonString = JsonHelper.encodeList2PageJson(items, pageCount, null);
    write(jsonString, response);
    return mapping.findForward(null);
  }