SheetController.java
1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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(){
String result="";
try {
result = sheetService.saveSheetList();
} 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 = "/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;
}
}