OfflineController.java 1.55 KB
package com.bsth.controller.excep;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.bsth.controller.BaseController;
import com.bsth.entity.excep.Offline;
import com.bsth.entity.sys.SysUser;
import com.bsth.service.excep.OfflineService;
import com.bsth.util.PageObject;

@RestController
@RequestMapping("offline")
public class OfflineController extends BaseController<SysUser, Integer>{
	@Autowired
	private OfflineService offlineService;
	
	@RequestMapping(value = "/pagequery",method = RequestMethod.GET)
	public PageObject<Offline> pagequery(@RequestParam Map<String, Object> map){
		PageObject<Offline> pageObject = null;
		map.put("curPage", map.get("page").toString());
		map.put("pageData","10");
		pageObject=offlineService.Pagequery(map);
		return pageObject;
		
	}
	

	@RequestMapping(value = "/getReport", method = RequestMethod.POST)
	public Map<String, Object> getReport(@RequestParam Map<String, Object> map) {
		Map<String, Object> modelMap = new HashMap<String, Object>();
		try {
			map.put("isShow", 1);
			modelMap = offlineService.getReport(map);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return modelMap;
	}
	
	
}