|
@ -118,10 +118,11 @@ public class StatisticsController extends BaseController {
|
|
|
/**
|
|
|
* 指标截止日期累积量
|
|
|
*
|
|
|
* @param endDate
|
|
|
* @param area
|
|
|
* @param level
|
|
|
* @param index
|
|
|
* @param endDate 结束时间
|
|
|
* @param area 父code
|
|
|
* @param level 等级 1 团队,2 机构,3 区,4 市
|
|
|
* @param index 指标代码
|
|
|
* @param level2_type 指标代码 例如性别 1 男 2 女 不传就返回男和女的总和
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping("/total")
|
|
@ -129,13 +130,14 @@ public class StatisticsController extends BaseController {
|
|
|
public String getIndexTotal(@RequestParam(required = true) String endDate,
|
|
|
@RequestParam(required = true) String area,
|
|
|
@RequestParam(required = true) int level,
|
|
|
@RequestParam(required = true) String index) {
|
|
|
@RequestParam(required = true) String index,
|
|
|
@RequestParam(required = false) String level2_type) {
|
|
|
try {
|
|
|
String[] indexes = index.split(",");
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
|
|
for (String idx : indexes) {
|
|
|
result.put("index_" + idx, statisticsService.getTotalAmount(endDate, area, level, idx));
|
|
|
result.put("index_" + idx, statisticsService.getTotalAmount(endDate, area, level, idx,level2_type));
|
|
|
}
|
|
|
|
|
|
return write(200, "查询成功", "data", result);
|
|
@ -181,10 +183,13 @@ public class StatisticsController extends BaseController {
|
|
|
/**
|
|
|
* 指标截止日期增量
|
|
|
*
|
|
|
* @param endDate
|
|
|
* @param area
|
|
|
* @param level
|
|
|
* @param index
|
|
|
* @param endDate 结束时间
|
|
|
* @param area 父code
|
|
|
* @param level 等级 1 团队,2 机构,3 区,4 市
|
|
|
* @param index 指标代码
|
|
|
* @param sort 排序 1倒叙 2是 正序
|
|
|
* @param lowLevel
|
|
|
* @param level2_type 指标代码 例如性别 1 男 2 女 不传就返回男和女的总和
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping("/lowlevel_total")
|
|
@ -194,13 +199,14 @@ public class StatisticsController extends BaseController {
|
|
|
@RequestParam(required = true) int level,
|
|
|
@RequestParam(required = true) String index,
|
|
|
@RequestParam(required = true) int sort,
|
|
|
@RequestParam(required = false) String lowLevel) {
|
|
|
@RequestParam(required = false) String lowLevel,
|
|
|
@RequestParam(required = false) String level2_type) {
|
|
|
try {
|
|
|
String[] indexes = index.split(",");
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
|
|
for (String idx : indexes) {
|
|
|
result.put("index_" + idx, statisticsService.getLowLevelTotalDetail(endDate, area, level, idx, sort, lowLevel));
|
|
|
result.put("index_" + idx, statisticsService.getLowLevelTotalDetail(endDate, area, level, idx, sort, lowLevel,level2_type));
|
|
|
}
|
|
|
|
|
|
return write(200, "查询成功", "data", result);
|
|
@ -233,7 +239,7 @@ public class StatisticsController extends BaseController {
|
|
|
JSONArray returnJa = new JSONArray();
|
|
|
List<JSONArray> jsonArrays = new ArrayList<>();
|
|
|
|
|
|
JSONArray jsonArray1 = statisticsService.getLowLevelTotalDetail(endDate, area, level, indexes[0], sort, lowLevel);
|
|
|
JSONArray jsonArray1 = statisticsService.getLowLevelTotalDetail(endDate, area, level, indexes[0], sort, lowLevel,null);
|
|
|
jsonArrays.add(jsonArray1);
|
|
|
|
|
|
JSONArray jsonArray2 = statisticsService.getLowLevelIncrementDetail(endDate, endDate, area, level, indexes[1], sort, lowLevel);
|