|
@ -6,6 +6,7 @@ import com.yihu.wlyy.service.app.statisticsES.StatisticsESService;
|
|
import com.yihu.wlyy.util.Constant;
|
|
import com.yihu.wlyy.util.Constant;
|
|
import com.yihu.wlyy.util.ValueComparator;
|
|
import com.yihu.wlyy.util.ValueComparator;
|
|
import com.yihu.wlyy.web.BaseController;
|
|
import com.yihu.wlyy.web.BaseController;
|
|
|
|
import com.yihu.wlyy.web.quota.vo.SaveModel;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONArray;
|
|
@ -1369,9 +1370,9 @@ public class EsStatisticsController extends BaseController {
|
|
* 获取转签率和续签率
|
|
* 获取转签率和续签率
|
|
* 前端:续签进展
|
|
* 前端:续签进展
|
|
*
|
|
*
|
|
* @param index 42,43,44 (52,53,54 服务类型维度)
|
|
|
|
|
|
* //@param index 42,43,44 (52,53,54 服务类型维度)
|
|
* @param level 等级 4 市 3区 2社区 1团队
|
|
* @param level 等级 4 市 3区 2社区 1团队
|
|
* @param code 市 默认是厦门市 350200 区 就是区的code 社区就是社区的code 团队就是团队的code
|
|
|
|
|
|
* @param area 市 默认是厦门市 350200 区 就是区的code 社区就是社区的code 团队就是团队的code
|
|
* @param year 年份 非比传
|
|
* @param year 年份 非比传
|
|
* @param lowCode 服务类型维度code(老年人3,高血压4,糖尿病5)
|
|
* @param lowCode 服务类型维度code(老年人3,高血压4,糖尿病5)
|
|
* @return
|
|
* @return
|
|
@ -1379,17 +1380,46 @@ public class EsStatisticsController extends BaseController {
|
|
@RequestMapping(value = "/getRenewPercentAndChangePercent", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/getRenewPercentAndChangePercent", method = RequestMethod.GET)
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public String getRenewPercentAndChangePercent(
|
|
public String getRenewPercentAndChangePercent(
|
|
@RequestParam(required = true) String index,//续签index
|
|
|
|
@RequestParam(required = true) String level,
|
|
|
|
@RequestParam(required = true) String code,
|
|
|
|
|
|
//@RequestParam(required = true) String index,//续签index
|
|
|
|
@RequestParam(required = true) int level,
|
|
|
|
@RequestParam(required = true) String area,
|
|
@RequestParam(required = false) String year,
|
|
@RequestParam(required = false) String year,
|
|
@RequestParam(required = false) String lowCode) {
|
|
@RequestParam(required = false) String lowCode) {
|
|
try {
|
|
try {
|
|
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getRenewPercentAndChangePercent(index,level, code, year,lowCode));
|
|
|
|
|
|
//return write(200, "查询成功", "data", statisticsService.getRenewPercentAndChangePercent(index,level, code, year,lowCode));
|
|
|
|
return write(200,"查询成功!","data",statisticsESService.getRenewPercentAndChangePercent(changeLevel(level),area,year,lowCode));
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
error(e);
|
|
error(e);
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 将参数转换成需要的SaveModel里的标识
|
|
|
|
* @param level 等级 4 市 3区 2社区 1团队
|
|
|
|
* @return
|
|
|
|
* @author zhangdan
|
|
|
|
* @time 2017-10-18
|
|
|
|
*/
|
|
|
|
public int changeLevel(int level){
|
|
|
|
int resultLevel =0;
|
|
|
|
if (level==1){
|
|
|
|
//团队转成SaveModel里的标识
|
|
|
|
resultLevel = Integer.valueOf(SaveModel.teamLevel);
|
|
|
|
}else if(level==2){
|
|
|
|
//社区转成SaveModel里的标识
|
|
|
|
resultLevel = Integer.valueOf(SaveModel.OrgLevel);
|
|
|
|
}else if (level ==3){
|
|
|
|
//区转成SaveModel里的标识
|
|
|
|
resultLevel = Integer.valueOf(SaveModel.townLevel);
|
|
|
|
}else if (level==4){
|
|
|
|
//市转成SaveModel里的标识
|
|
|
|
resultLevel = Integer.valueOf(SaveModel.cityLevel);
|
|
|
|
}
|
|
|
|
if(resultLevel==0){
|
|
|
|
resultLevel = level;
|
|
|
|
}
|
|
|
|
return resultLevel;
|
|
|
|
}
|
|
}
|
|
}
|