SheetController.java 1.85 KB
package com.bsth.controller.report;

import java.util.List;
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.RestController;

import com.bsth.controller.BaseController;
import com.bsth.entity.sheet.Sheet;
import com.bsth.service.report.SheetService;

@RestController
@RequestMapping("sheet")
public class SheetController  extends BaseController<Sheet, Integer>{
	@Autowired
	SheetService sheetService;
	@RequestMapping(value = "/saveListSheet",method = RequestMethod.POST)
	public String saveListSheet(@RequestParam String date){
		String result="";
		try {
			result = sheetService.saveSheetList(date);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return result;
	}
	
	
	@RequestMapping(value = "/sheetList",method = RequestMethod.GET)
	public List<Sheet> sheetList(@RequestParam Integer id){
		List<Sheet> list=sheetService.sheetList(id);
		return list;
	}
	@RequestMapping(value = "/exportList",method = RequestMethod.GET)
	public List<Sheet> exportList(@RequestParam Integer id){
		List<Sheet> list=sheetService.exportList(id);
		return list;
	}
	
	@RequestMapping(value = "/countList",method = RequestMethod.GET)
	public List<Map<String, Object>> countList(@RequestParam Map<String, Object> map){
		List<Map<String, Object>> list=sheetService.countList(map);
		return list;
	}
	
	@RequestMapping(value = "/listSheet",method = RequestMethod.GET)
	public List<Map<String, Object>> listSheet(@RequestParam Map<String, Object> map){
		List<Map<String, Object>> list=sheetService.listSheet(map);
		return list;
	}
}