|
@@ -1,8 +1,10 @@
|
|
|
package com.iamberry.rst.controllers.cm;
|
|
|
|
|
|
+import com.iamberry.rst.core.approval.ApprovalApplyPick;
|
|
|
import com.iamberry.rst.core.cm.ComplaintQuestionInfo;
|
|
|
import com.iamberry.rst.core.cm.ComplaintSmallClassInfo;
|
|
|
import com.iamberry.rst.core.cm.ComplaintTypeInfo;
|
|
|
+import com.iamberry.rst.core.page.PagedResult;
|
|
|
import com.iamberry.rst.faces.cm.ComplaintQuestionInfoService;
|
|
|
import com.iamberry.rst.faces.cm.ComplaintSmallClassInfoService;
|
|
|
import com.iamberry.rst.faces.cm.ComplaintTypeInfoService;
|
|
@@ -11,6 +13,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
@@ -92,15 +95,20 @@ public class ComplaintQuestionInfoController {
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
@RequestMapping(value = "/list_complaintQuestion")
|
|
|
- public ResponseJson listComplaintQuestion(HttpServletRequest request,ComplaintQuestionInfo complaintQuestionInfo) {
|
|
|
- List<ComplaintQuestionInfo> complaintQuestionInfoList = complaintQuestionInfoService.listComplaintQuestionInfo(complaintQuestionInfo);
|
|
|
- if (complaintQuestionInfoList == null || complaintQuestionInfoList.size() < 1) {
|
|
|
- return new ResponseJson(500, "查询失败", 500);
|
|
|
- } else {
|
|
|
- ResponseJson rj =new ResponseJson(200, "查询成功", 200);
|
|
|
- rj.addResponseKeyValue("complaintQuestionInfoList", complaintQuestionInfoList);
|
|
|
- return rj;
|
|
|
+ public ResponseJson listComplaintQuestion(HttpServletRequest request,
|
|
|
+ @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize,
|
|
|
+ @RequestParam(value = "pageNo", defaultValue = "1", required = false) Integer pageNo,
|
|
|
+ @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum,
|
|
|
+ ComplaintQuestionInfo complaintQuestionInfo) {
|
|
|
+ PagedResult<ComplaintQuestionInfo> pagedResult = complaintQuestionInfoService.listComplaintQuestionInfo(pageNo, pageSize, complaintQuestionInfo, totalNum == 0);
|
|
|
+ if (totalNum != 0) {
|
|
|
+ pagedResult.setTotal(totalNum);
|
|
|
}
|
|
|
+ ResponseJson rj =new ResponseJson(200, "查询成功", 200);
|
|
|
+ rj.addResponseKeyValue("complaintQuestionInfoList", pagedResult.getDataList());
|
|
|
+ rj.addResponseKeyValue("pagedResult", pagedResult);
|
|
|
+ return rj;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|