OfflineController.java
1.55 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
45
46
47
48
49
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;
}
}