/**
  * @Description 获取列表数据
  *
  * @param request
  * @param model
  * @author davidwan
  */
 private void getList(HttpServletRequest request, Model model) {
   int pageSize = WebUtil.getInt(request, "page_size", ConfigValue.PAGE_SIZE);
   int pageIndex = WebUtil.getInt(request, "page_index", 0);
   String name = WebUtil.getString(request, "name", "");
   StaffContractFile entity = new StaffContractFile();
   if (StringUtils.isNotBlank(name)) {
     // entity.setName(name);
   }
   PageInfo<StaffContractFile> pageInfo =
       staffContractFileService.queryPageList(entity, pageIndex, pageSize);
   model.addAttribute("list", pageInfo.getData());
   model.addAttribute("pageInfo", pageInfo);
 }
 /**
  * @Title: add @Description: Ajax保存添加数据
  *
  * @param entity
  * @return JsonResult
  */
 @RequestMapping(value = "/add", method = RequestMethod.POST)
 public @ResponseBody JsonResult add(StaffContractFile entity) {
   return staffContractFileService.create(entity);
 }
 /**
  * @Description 进入详情页面
  *
  * @param id
  * @param model
  * @return String
  * @author davidwan
  */
 @RequestMapping("/view")
 public String view(Integer id, Model model) {
   StaffContractFile entity = staffContractFileService.findById(id);
   model.addAttribute("model", entity);
   return getPathView();
 }
 /**
  * @Title: batchDelete @Description: Ajax批量删除
  *
  * @param ids
  * @return JsonResult
  */
 @RequestMapping(value = "/batchdelete", method = RequestMethod.POST)
 public @ResponseBody JsonResult batchDelete(String ids) {
   return staffContractFileService.removeByIds(ids);
 }
 /**
  * @Title: delete @Description: Ajax删除
  *
  * @param id
  * @return JsonResult
  */
 @RequestMapping(value = "/delete", method = RequestMethod.POST)
 @ResponseBody
 public JsonResult delete(Integer id) {
   return staffContractFileService.removeById(id);
 }
 /**
  * @Title: update @Description: Ajax保存修改信息
  *
  * @param entity
  * @return JsonResult
  */
 @RequestMapping(value = "/update", method = RequestMethod.POST)
 public @ResponseBody JsonResult update(StaffContractFile entity) {
   return staffContractFileService.modify(entity);
 }