OtcRealTimeAction.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
45
46
47
package com.cjs.cms.action.report;
import java.util.HashMap;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.cjs.cms.biz.report.ReportBiz;
import com.cjs.cms.dao.report.OtcRealTimeDao;
import com.cjs.cms.util.lang.JsonUtil;
import com.cjs.cms.util.lang.PageUtils;
/**
* 成交
*
* @author tongyufu
*
*/
@RestController
@RequestMapping("/report/trade")
public class OtcRealTimeAction {
@Autowired
private ReportBiz reportBiz;
@Autowired
private OtcRealTimeDao otcRealTimeDao;
/** 成交统计 */
@RequestMapping("queryOtcTradeSum")
public String queryOtcTradeSum(@RequestParam Map<String, Object> params) {
reportBiz.formatDate(params);
PageUtils.processOralcePage(params);
List<Map<String, Object>> trades = otcRealTimeDao.queryOtcTradeSum(params);
int total = otcRealTimeDao.queryOtcTradeSumTotal(params);
Map<String, Object> footer = otcRealTimeDao.queryOtcTradeSumFoot(params);
if (footer == null) {
footer = new HashMap<String, Object>();
}
footer.put("OTC_CODE", "汇总");
return JsonUtil.toPageJson(trades, total, footer);
}
}