|
@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
* Created by lyr on 2016/08/16.
|
|
* Created by lyr on 2016/08/16.
|
|
@ -209,6 +209,53 @@ public class StatisticsController extends BaseController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 指标截止日期累积量
|
|
|
|
* 根据2个ID合并指标
|
|
|
|
*
|
|
|
|
* @param endDate
|
|
|
|
* @param area
|
|
|
|
* @param level
|
|
|
|
* @param index
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/lowlevel_total_mesh")
|
|
|
|
@ResponseBody
|
|
|
|
public String getIndexLowLevelTotalMesh(@RequestParam(required = true) String endDate, // 2007-10-02
|
|
|
|
@RequestParam(required = true) String area,//区域 350205
|
|
|
|
@RequestParam(required = true) int level,//等级
|
|
|
|
@RequestParam(required = true) String index,//指标code
|
|
|
|
@RequestParam(required = true) int sort,//1是倒叙 0是正序
|
|
|
|
@RequestParam(required = false) String lowLevel) {
|
|
|
|
try {
|
|
|
|
String[] indexes = index.split(",");
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
JSONArray returnJa = new JSONArray();
|
|
|
|
List<JSONArray> jsonArrays = new ArrayList<>();
|
|
|
|
for (String idx : indexes) {
|
|
|
|
JSONArray jsonArray = statisticsService.getLowLevelTotalDetail(endDate, area, level, idx, sort, lowLevel);
|
|
|
|
jsonArrays.add(jsonArray);
|
|
|
|
}
|
|
|
|
//遍历合并2个指标中key值一样的
|
|
|
|
for (int i = 0; i < jsonArrays.get(0).length(); i++) {
|
|
|
|
for (int j = 0; j < jsonArrays.get(1).length(); j++) {
|
|
|
|
JSONObject map1 = jsonArrays.get(0).getJSONObject(i);
|
|
|
|
JSONObject map2 = jsonArrays.get(1).getJSONObject(j);
|
|
|
|
if (map1.get("code").equals(map2.get("code"))) {
|
|
|
|
String amount = map1.get("amount").toString() + "," + map2.get("amount").toString();
|
|
|
|
map1.put("amount", amount);
|
|
|
|
returnJa.put(map1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
result.put("index", returnJa);
|
|
|
|
return write(200, "查询成功", "data", result);
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 指标期间增长量
|
|
* 指标期间增长量
|
|
*
|
|
*
|
|
@ -344,9 +391,9 @@ public class StatisticsController extends BaseController {
|
|
*
|
|
*
|
|
* @param date
|
|
* @param date
|
|
* @param area
|
|
* @param area
|
|
* @param level level1_type等级 1:团队 2社区机构 3区级 4市级
|
|
|
|
|
|
* @param level level1_type等级 1:团队 2社区机构 3区级 4市级
|
|
* @param index quotoCode 18/19两率
|
|
* @param index quotoCode 18/19两率
|
|
* @param sort 1降序排列-1升序排列
|
|
|
|
|
|
* @param sort 1降序排列-1升序排列
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@RequestMapping("/lowlevel_all")
|
|
@RequestMapping("/lowlevel_all")
|
|
@ -402,8 +449,8 @@ public class StatisticsController extends BaseController {
|
|
JSONObject sszq = statisticsAllService.getSszqAndGwrq(endDate, area, level, "18");
|
|
JSONObject sszq = statisticsAllService.getSszqAndGwrq(endDate, area, level, "18");
|
|
JSONObject gwrq = statisticsAllService.getSszqAndGwrq(endDate, area, level, "19");
|
|
JSONObject gwrq = statisticsAllService.getSszqAndGwrq(endDate, area, level, "19");
|
|
|
|
|
|
result.put("sszq",sszq);
|
|
|
|
result.put("gwrq",gwrq);
|
|
|
|
|
|
result.put("sszq", sszq);
|
|
|
|
result.put("gwrq", gwrq);
|
|
|
|
|
|
return write(200, "查询成功", "data", result);
|
|
return write(200, "查询成功", "data", result);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|