|
@ -6,7 +6,9 @@ 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 io.swagger.annotations.ApiParam;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONObject;
|
|
import org.json.JSONObject;
|
|
@ -27,7 +29,7 @@ import java.util.TreeMap;
|
|
* Created by chenweida on 2017/10/13.
|
|
* Created by chenweida on 2017/10/13.
|
|
*/
|
|
*/
|
|
@Controller
|
|
@Controller
|
|
@RequestMapping(value = "/esstatistics", produces = MediaType.APPLICATION_JSON_UTF8_VALUE,method = {RequestMethod.GET,RequestMethod.POST})
|
|
|
|
|
|
@RequestMapping(value = "/esstatistics", produces = MediaType.APPLICATION_JSON_UTF8_VALUE, method = {RequestMethod.GET, RequestMethod.POST})
|
|
@Api(description = "ES统计查询")
|
|
@Api(description = "ES统计查询")
|
|
public class EsStatisticsController extends BaseController {
|
|
public class EsStatisticsController extends BaseController {
|
|
|
|
|
|
@ -37,6 +39,7 @@ public class EsStatisticsController extends BaseController {
|
|
StatisticsService statisticsService;
|
|
StatisticsService statisticsService;
|
|
@Autowired
|
|
@Autowired
|
|
StatisticsAllService statisticsAllService;
|
|
StatisticsAllService statisticsAllService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取统计时间
|
|
* 获取统计时间
|
|
*
|
|
*
|
|
@ -52,6 +55,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 指标按间隔统计 增量
|
|
* 指标按间隔统计 增量
|
|
* 按年度统计是根据前端传的 startDate
|
|
* 按年度统计是根据前端传的 startDate
|
|
@ -235,8 +239,8 @@ public class EsStatisticsController extends BaseController {
|
|
JSONArray jsonArray2 = null;
|
|
JSONArray jsonArray2 = null;
|
|
if (Constant.getNowYearByDate(endDate).equals(year)) {
|
|
if (Constant.getNowYearByDate(endDate).equals(year)) {
|
|
jsonArray2 = statisticsESService.getLowLevelIncrementDetail(endDate, endDate, area, level, indexes[1], sort, lowLevel);
|
|
jsonArray2 = statisticsESService.getLowLevelIncrementDetail(endDate, endDate, area, level, indexes[1], sort, lowLevel);
|
|
}else{
|
|
|
|
String date=Integer.valueOf(year)+1+"-06-30";
|
|
|
|
|
|
} else {
|
|
|
|
String date = Integer.valueOf(year) + 1 + "-06-30";
|
|
jsonArray2 = statisticsESService.getLowLevelIncrementDetail(date, date, area, level, indexes[1], sort, lowLevel);
|
|
jsonArray2 = statisticsESService.getLowLevelIncrementDetail(date, date, area, level, indexes[1], sort, lowLevel);
|
|
}
|
|
}
|
|
jsonArrays.add(jsonArray2);
|
|
jsonArrays.add(jsonArray2);
|
|
@ -272,13 +276,13 @@ public class EsStatisticsController extends BaseController {
|
|
for (Map.Entry<String, JSONObject> one : index1.entrySet()) {
|
|
for (Map.Entry<String, JSONObject> one : index1.entrySet()) {
|
|
JSONObject map1 = one.getValue();
|
|
JSONObject map1 = one.getValue();
|
|
JSONObject map2 = index2.get(one.getKey());
|
|
JSONObject map2 = index2.get(one.getKey());
|
|
String amount1="0";
|
|
|
|
if(map1!=null&&map1.has("amount")){
|
|
|
|
amount1=map1.get("amount").toString();
|
|
|
|
|
|
String amount1 = "0";
|
|
|
|
if (map1 != null && map1.has("amount")) {
|
|
|
|
amount1 = map1.get("amount").toString();
|
|
}
|
|
}
|
|
String amount2="0";
|
|
|
|
if(map2!=null&&map2.has("amount")){
|
|
|
|
amount2=map2.get("amount").toString();
|
|
|
|
|
|
String amount2 = "0";
|
|
|
|
if (map2 != null && map2.has("amount")) {
|
|
|
|
amount2 = map2.get("amount").toString();
|
|
}
|
|
}
|
|
|
|
|
|
String amount = amount1 + "," + amount2;
|
|
String amount = amount1 + "," + amount2;
|
|
@ -352,8 +356,8 @@ public class EsStatisticsController extends BaseController {
|
|
try {
|
|
try {
|
|
JSONObject result = new JSONObject();
|
|
JSONObject result = new JSONObject();
|
|
//year没传默认是今年
|
|
//year没传默认是今年
|
|
if(org.springframework.util.StringUtils.isEmpty(year)){
|
|
|
|
year= Constant.getNowYear();
|
|
|
|
|
|
if (org.springframework.util.StringUtils.isEmpty(year)) {
|
|
|
|
year = Constant.getNowYear();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -364,11 +368,11 @@ public class EsStatisticsController extends BaseController {
|
|
// JSONObject signRate = statisticsAllService.getSignRate(endDate, area, level,year);
|
|
// JSONObject signRate = statisticsAllService.getSignRate(endDate, area, level,year);
|
|
// JSONObject signTaskRate = statisticsAllService.getSignTaskRate(endDate, area, level,year);
|
|
// JSONObject signTaskRate = statisticsAllService.getSignTaskRate(endDate, area, level,year);
|
|
|
|
|
|
long sign = statisticsESService.getIndexTotal(endDate, area, level, "13","2");
|
|
|
|
|
|
long sign = statisticsESService.getIndexTotal(endDate, area, level, "13", "2");
|
|
long weiJf = statisticsESService.getWeiJiaoFei(endDate, area, level);
|
|
long weiJf = statisticsESService.getWeiJiaoFei(endDate, area, level);
|
|
JSONObject jo = statisticsESService.getRenewPercent(level + "", area, Constant.getNowYear());
|
|
JSONObject jo = statisticsESService.getRenewPercent(level + "", area, Constant.getNowYear());
|
|
JSONObject signRate = statisticsESService.getSignRate(endDate, area, level,year);
|
|
|
|
JSONObject signTaskRate = statisticsESService.getSignTaskRate(endDate, area, level,year);
|
|
|
|
|
|
JSONObject signRate = statisticsESService.getSignRate(endDate, area, level, year);
|
|
|
|
JSONObject signTaskRate = statisticsESService.getSignTaskRate(endDate, area, level, year);
|
|
|
|
|
|
result.put("sign", sign);
|
|
result.put("sign", sign);
|
|
result.put("expenses", weiJf);
|
|
result.put("expenses", weiJf);
|
|
@ -378,11 +382,11 @@ public class EsStatisticsController extends BaseController {
|
|
result.put("renewRange", jo.get("renewRange"));//续签率 50.00%
|
|
result.put("renewRange", jo.get("renewRange"));//续签率 50.00%
|
|
} else {
|
|
} else {
|
|
//如果年度不是当前年度 就根据endDate 找到那个年度的最后一天的数据
|
|
//如果年度不是当前年度 就根据endDate 找到那个年度的最后一天的数据
|
|
if(!Constant.getNowYear().equals(year)){
|
|
|
|
endDate=(Integer.valueOf(year)+1)+"-06-30";
|
|
|
|
|
|
if (!Constant.getNowYear().equals(year)) {
|
|
|
|
endDate = (Integer.valueOf(year) + 1) + "-06-30";
|
|
}
|
|
}
|
|
// result = statisticsAllService.getGroupInfo(endDate, lowCode, area, level,year);
|
|
// result = statisticsAllService.getGroupInfo(endDate, lowCode, area, level,year);
|
|
result = statisticsESService.getGroupInfo(endDate, lowCode, area, level,year);
|
|
|
|
|
|
result = statisticsESService.getGroupInfo(endDate, lowCode, area, level, year);
|
|
}
|
|
}
|
|
|
|
|
|
return write(200, "查询成功", "data", result);
|
|
return write(200, "查询成功", "data", result);
|
|
@ -409,6 +413,8 @@ public class EsStatisticsController extends BaseController {
|
|
int level,
|
|
int level,
|
|
@RequestParam(required = false) String year) {
|
|
@RequestParam(required = false) String year) {
|
|
try {
|
|
try {
|
|
|
|
|
|
|
|
level=changeLevel(level);
|
|
JSONArray result = statisticsESService.getSixFiveStatistics(endDate, area, level);
|
|
JSONArray result = statisticsESService.getSixFiveStatistics(endDate, area, level);
|
|
|
|
|
|
return write(200, "查询成功", "data", result);
|
|
return write(200, "查询成功", "data", result);
|
|
@ -448,11 +454,11 @@ public class EsStatisticsController extends BaseController {
|
|
|
|
|
|
if (index != null) {
|
|
if (index != null) {
|
|
for (String idx : indexes) {
|
|
for (String idx : indexes) {
|
|
if(org.springframework.util.StringUtils.isEmpty(year)){
|
|
|
|
year=Constant.getNowYear();
|
|
|
|
|
|
if (org.springframework.util.StringUtils.isEmpty(year)) {
|
|
|
|
year = Constant.getNowYear();
|
|
}
|
|
}
|
|
// JSONObject json = statisticsAllService.getDateTotal(startDate, endDate, interval, area, level, idx, lowCode,year);
|
|
// JSONObject json = statisticsAllService.getDateTotal(startDate, endDate, interval, area, level, idx, lowCode,year);
|
|
JSONObject json = statisticsESService.getDateTotal(startDate, endDate, interval, area, level, idx, lowCode,year);
|
|
|
|
|
|
JSONObject json = statisticsESService.getDateTotal(startDate, endDate, interval, area, level, idx, lowCode, year);
|
|
result.put("index_" + idx, json);
|
|
result.put("index_" + idx, json);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@ -487,31 +493,33 @@ public class EsStatisticsController extends BaseController {
|
|
@RequestParam(required = false) String lowCode) {
|
|
@RequestParam(required = false) String lowCode) {
|
|
try {
|
|
try {
|
|
String[] indexes = index.split(",");
|
|
String[] indexes = index.split(",");
|
|
|
|
level=changeLevel(level);
|
|
|
|
lowLevel=changeLevel(Integer.valueOf(lowLevel))+"";
|
|
JSONObject result = new JSONObject();
|
|
JSONObject result = new JSONObject();
|
|
String year=Constant.getNowYearByDate(date);
|
|
|
|
|
|
String year = Constant.getNowYearByDate(date);
|
|
if (StringUtils.isNotEmpty(lowCode)) {
|
|
if (StringUtils.isNotEmpty(lowCode)) {
|
|
// 指定level下特定查询级别
|
|
// 指定level下特定查询级别
|
|
if (index.equals("17")) {
|
|
if (index.equals("17")) {
|
|
//sort=1&date=2017-07-13&level=4&index=17&area=350200&lowLevel=1&lowCode=3
|
|
//sort=1&date=2017-07-13&level=4&index=17&area=350200&lowLevel=1&lowCode=3
|
|
result.put("index_" + index, statisticsESService.getLevelTwoLowLevelTotalTeamLeader(date, area, level, index, sort, lowLevel, lowCode,year));
|
|
|
|
|
|
result.put("index_" + index, statisticsESService.getLevelTwoLowLevelTotalTeamLeader(date, area, level, index, sort, lowLevel, lowCode, year));
|
|
} else {
|
|
} else {
|
|
result.put("index_" + index, statisticsESService.getLevelTwoLowLevelTotal(date, area, level, index, sort, lowLevel, lowCode,year));
|
|
|
|
|
|
result.put("index_" + index, statisticsESService.getLevelTwoLowLevelTotal(date, area, level, index, sort, lowLevel, lowCode, year));
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
// 未指定level下特定查询级别
|
|
// 未指定level下特定查询级别
|
|
for (String idx : indexes) {
|
|
for (String idx : indexes) {
|
|
if (idx.equals("18") || index.equals("19")) {
|
|
if (idx.equals("18") || index.equals("19")) {
|
|
result.put("index_" + idx, statisticsAllService.getLowLevelTotalSpecial(date, area, level, idx, sort, lowLevel));
|
|
result.put("index_" + idx, statisticsAllService.getLowLevelTotalSpecial(date, area, level, idx, sort, lowLevel));
|
|
} else if ( index.equals("21")) {
|
|
|
|
|
|
} else if (index.equals("21")) {
|
|
result.put("index_" + idx, statisticsESService.getLowLevelTotal2(date, area, level, idx, sort, lowLevel));
|
|
result.put("index_" + idx, statisticsESService.getLowLevelTotal2(date, area, level, idx, sort, lowLevel));
|
|
} else if (idx.equals("28")) {
|
|
} else if (idx.equals("28")) {
|
|
//level=4&area=350200&sort=1&index=28&date=undefined&lowLevel=2
|
|
//level=4&area=350200&sort=1&index=28&date=undefined&lowLevel=2
|
|
result.put("index_" + idx, statisticsESService.getAvgAllInfo(level, area, lowLevel));
|
|
result.put("index_" + idx, statisticsESService.getAvgAllInfo(level, area, lowLevel));
|
|
} else if (idx.equals("13")) {
|
|
} else if (idx.equals("13")) {
|
|
// sort=1&date=2017-07-13&level=4&index=13&area=350200&lowCode=
|
|
// sort=1&date=2017-07-13&level=4&index=13&area=350200&lowCode=
|
|
result.put("index_" + idx, statisticsESService.getLowLevelTotalTeamLeader(date, area, level, idx, sort, lowLevel,year));
|
|
|
|
|
|
result.put("index_" + idx, statisticsESService.getLowLevelTotalTeamLeader(date, area, level, idx, sort, lowLevel, year));
|
|
} else {
|
|
} else {
|
|
result.put("index_" + idx, statisticsESService.getLowLevelTotal(date, area, level, idx, sort, lowLevel,year));
|
|
|
|
|
|
result.put("index_" + idx, statisticsESService.getLowLevelTotal(date, area, level, idx, sort, lowLevel, year));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@ -573,7 +581,7 @@ public class EsStatisticsController extends BaseController {
|
|
JSONObject result = new JSONObject();
|
|
JSONObject result = new JSONObject();
|
|
|
|
|
|
for (String idx : indexes) {
|
|
for (String idx : indexes) {
|
|
Long total = statisticsESService.getIndexTotal(endDate, area, level, idx,"2");
|
|
|
|
|
|
Long total = statisticsESService.getIndexTotal(endDate, area, level, idx, "2");
|
|
result.put("index_" + idx, total);
|
|
result.put("index_" + idx, total);
|
|
}
|
|
}
|
|
|
|
|
|
@ -627,9 +635,9 @@ public class EsStatisticsController extends BaseController {
|
|
|
|
|
|
JSONObject data = null;
|
|
JSONObject data = null;
|
|
if (Constant.getNowYear().equals(year)) {
|
|
if (Constant.getNowYear().equals(year)) {
|
|
data = statisticsESService.getConsultingStatisticsList(level, area, lowlevel,null);
|
|
|
|
|
|
data = statisticsESService.getConsultingStatisticsList(level, area, lowlevel, null);
|
|
} else if (org.springframework.util.StringUtils.isEmpty(year)) {
|
|
} else if (org.springframework.util.StringUtils.isEmpty(year)) {
|
|
data = statisticsESService.getConsultingStatisticsList(level, area, lowlevel,null);
|
|
|
|
|
|
data = statisticsESService.getConsultingStatisticsList(level, area, lowlevel, null);
|
|
// data = statisticsService.getConsultingStatisticsListAll(level, area, lowlevel, year);
|
|
// data = statisticsService.getConsultingStatisticsListAll(level, area, lowlevel, year);
|
|
} else {
|
|
} else {
|
|
|
|
|
|
@ -645,6 +653,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 咨询统计
|
|
* 咨询统计
|
|
* 咨询分析页面具体交互与业务分析内一致,即按市、区、社区、机构有不同展示,可一级级进入查看
|
|
* 咨询分析页面具体交互与业务分析内一致,即按市、区、社区、机构有不同展示,可一级级进入查看
|
|
@ -673,7 +682,7 @@ public class EsStatisticsController extends BaseController {
|
|
// //去数据库查找年份
|
|
// //去数据库查找年份
|
|
// data = statisticsService.getConsultingTitleWithYear(level, area, year);
|
|
// data = statisticsService.getConsultingTitleWithYear(level, area, year);
|
|
// }
|
|
// }
|
|
data = statisticsESService.getConsultingTitle(level, area,year);
|
|
|
|
|
|
data = statisticsESService.getConsultingTitle(level, area, year);
|
|
if (data != null) {
|
|
if (data != null) {
|
|
return write(200, "查询成功", "data", data);
|
|
return write(200, "查询成功", "data", data);
|
|
} else {
|
|
} else {
|
|
@ -706,7 +715,7 @@ public class EsStatisticsController extends BaseController {
|
|
// } else {
|
|
// } else {
|
|
// return write(200, "查询成功", "data", statisticsService.getCoutListByTimeYear(level, area, year));
|
|
// return write(200, "查询成功", "data", statisticsService.getCoutListByTimeYear(level, area, year));
|
|
// }
|
|
// }
|
|
return write(200, "查询成功", "data", statisticsESService.getCoutListByTime(level,area,year));
|
|
|
|
|
|
return write(200, "查询成功", "data", statisticsESService.getCoutListByTime(level, area, year));
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
@ -730,6 +739,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取得分平均数
|
|
* 获取得分平均数
|
|
*
|
|
*
|
|
@ -766,6 +776,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 统计当前团队,签约人数,服务次数,平均满意度
|
|
* 统计当前团队,签约人数,服务次数,平均满意度
|
|
*
|
|
*
|
|
@ -815,6 +826,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取咨询数和未回复数
|
|
* 获取咨询数和未回复数
|
|
*
|
|
*
|
|
@ -836,6 +848,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取机构内服务排行
|
|
* 获取机构内服务排行
|
|
*
|
|
*
|
|
@ -877,6 +890,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 判断团队是否是团队长
|
|
* 判断团队是否是团队长
|
|
*
|
|
*
|
|
@ -915,6 +929,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 计算团队医生月或周咨询未回复和总数折线图
|
|
* 计算团队医生月或周咨询未回复和总数折线图
|
|
*
|
|
*
|
|
@ -939,6 +954,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取团队内这成员,未回复数,总数,结束咨询数
|
|
* 获取团队内这成员,未回复数,总数,结束咨询数
|
|
*
|
|
*
|
|
@ -962,6 +978,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取Doctor咨询结果
|
|
* 获取Doctor咨询结果
|
|
*
|
|
*
|
|
@ -984,6 +1001,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取团队随访量折线统计图
|
|
* 获取团队随访量折线统计图
|
|
*
|
|
*
|
|
@ -1006,6 +1024,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@RequestMapping("/getTeamDoctorFollowupLine")
|
|
@RequestMapping("/getTeamDoctorFollowupLine")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public String getTeamDoctorFollowupLine(@RequestParam(required = true) String type,
|
|
public String getTeamDoctorFollowupLine(@RequestParam(required = true) String type,
|
|
@ -1020,6 +1039,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 根据团队获取团队底下用户列表
|
|
* 根据团队获取团队底下用户列表
|
|
*
|
|
*
|
|
@ -1044,6 +1064,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取医生随访头信息
|
|
* 获取医生随访头信息
|
|
*
|
|
*
|
|
@ -1066,6 +1087,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取待预约量团队统计则线图
|
|
* 获取待预约量团队统计则线图
|
|
*
|
|
*
|
|
@ -1088,6 +1110,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取团队医生预约量团队统计则线图
|
|
* 获取团队医生预约量团队统计则线图
|
|
*
|
|
*
|
|
@ -1112,6 +1135,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取团队待预约量医生列表信息
|
|
* 获取团队待预约量医生列表信息
|
|
*
|
|
*
|
|
@ -1136,6 +1160,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取团队医生待预信息
|
|
* 获取团队医生待预信息
|
|
*
|
|
*
|
|
@ -1158,6 +1183,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取团队健康指导折线图
|
|
* 获取团队健康指导折线图
|
|
*
|
|
*
|
|
@ -1180,6 +1206,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取团队医生则线图
|
|
* 获取团队医生则线图
|
|
*
|
|
*
|
|
@ -1204,6 +1231,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取团队指导总数List
|
|
* 获取团队指导总数List
|
|
*
|
|
*
|
|
@ -1228,6 +1256,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取医生健康指导头部信息
|
|
* 获取医生健康指导头部信息
|
|
*
|
|
*
|
|
@ -1250,6 +1279,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取团队健康教育折线统计
|
|
* 获取团队健康教育折线统计
|
|
*
|
|
*
|
|
@ -1272,6 +1302,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取团队健康
|
|
* 获取团队健康
|
|
*
|
|
*
|
|
@ -1295,6 +1326,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取团队成员健康教育列表
|
|
* 获取团队成员健康教育列表
|
|
*
|
|
*
|
|
@ -1319,6 +1351,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@RequestMapping("/getTeamDoctorEduTitle")
|
|
@RequestMapping("/getTeamDoctorEduTitle")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public String getTeamDoctorEduTitle(@RequestParam(required = true) String teamCode,
|
|
public String getTeamDoctorEduTitle(@RequestParam(required = true) String teamCode,
|
|
@ -1332,6 +1365,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@RequestMapping("/getDotorInfo")
|
|
@RequestMapping("/getDotorInfo")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public String getDotorInfo(String code) {
|
|
public String getDotorInfo(String code) {
|
|
@ -1342,6 +1376,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@RequestMapping("/getTeamRenewChangeLine")
|
|
@RequestMapping("/getTeamRenewChangeLine")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public String getTeamRenewChangeLine(@RequestParam(required = true) String teamCode,
|
|
public String getTeamRenewChangeLine(@RequestParam(required = true) String teamCode,
|
|
@ -1355,24 +1390,27 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@RequestMapping("/cleanDoctorScore")
|
|
@RequestMapping("/cleanDoctorScore")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public String cleanDoctorScore(){
|
|
|
|
try{
|
|
|
|
|
|
public String cleanDoctorScore() {
|
|
|
|
try {
|
|
return write(200, "清洗完成", "data", statisticsAllService.cleanDoctorScore());
|
|
return write(200, "清洗完成", "data", statisticsAllService.cleanDoctorScore());
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
error(e);
|
|
error(e);
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取转签率和续签率
|
|
* 获取转签率和续签率
|
|
* 前端:续签进展
|
|
* 前端:续签进展
|
|
*
|
|
|
|
|
|
* <p>
|
|
* //@param index 42,43,44 (52,53,54 服务类型维度)
|
|
* //@param index 42,43,44 (52,53,54 服务类型维度)
|
|
* @param level 等级 4 市 3区 2社区 1团队
|
|
|
|
* @param area 市 默认是厦门市 350200 区 就是区的code 社区就是社区的code 团队就是团队的code
|
|
|
|
* @param year 年份 非比传
|
|
|
|
|
|
*
|
|
|
|
* @param level 等级 4 市 3区 2社区 1团队
|
|
|
|
* @param area 市 默认是厦门市 350200 区 就是区的code 社区就是社区的code 团队就是团队的code
|
|
|
|
* @param year 年份 非比传
|
|
* @param lowCode 服务类型维度code(老年人3,高血压4,糖尿病5)
|
|
* @param lowCode 服务类型维度code(老年人3,高血压4,糖尿病5)
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ -1387,12 +1425,13 @@ public class EsStatisticsController extends BaseController {
|
|
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));
|
|
|
|
|
|
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, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取转签人数,转签原因分析,转签分布
|
|
* 获取转签人数,转签原因分析,转签分布
|
|
* 前端:签约数据分析,团队转签详情
|
|
* 前端:签约数据分析,团队转签详情
|
|
@ -1446,6 +1485,7 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 去年的签约量,续签量和续签率 列表
|
|
* 去年的签约量,续签量和续签率 列表
|
|
*
|
|
*
|
|
@ -1481,7 +1521,7 @@ public class EsStatisticsController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
result.put("index_"+index, statisticsAllService.getLevelTwoLowLevelTotalSignAndRenew(area, level, index, sort, lowLevel, year,lowCode));
|
|
|
|
|
|
result.put("index_" + index, statisticsAllService.getLevelTwoLowLevelTotalSignAndRenew(area, changeLevel(level), index, sort, String.valueOf(changeLevel(Integer.valueOf(lowLevel))), year, lowCode));
|
|
|
|
|
|
return write(200, "查询成功", "data", result);
|
|
return write(200, "查询成功", "data", result);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@ -1492,11 +1532,11 @@ public class EsStatisticsController extends BaseController {
|
|
|
|
|
|
@RequestMapping("/getLevelTotalSingle")
|
|
@RequestMapping("/getLevelTotalSingle")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public String getLevelTotalSingle(@ApiParam(name="date", value="日期标识") @RequestParam(required = true)String date,
|
|
|
|
@ApiParam(name="area", value="区域code") @RequestParam(required = true)String area,
|
|
|
|
@ApiParam(name="level", value="级别") @RequestParam(required = true)int level){
|
|
|
|
try{
|
|
|
|
return write(200, "查询成功", "data", statisticsESService.getLowLevelTotalSingle2(date,area,level));
|
|
|
|
|
|
public String getLevelTotalSingle(@ApiParam(name = "date", value = "日期标识") @RequestParam(required = true) String date,
|
|
|
|
@ApiParam(name = "area", value = "区域code") @RequestParam(required = true) String area,
|
|
|
|
@ApiParam(name = "level", value = "级别") @RequestParam(required = true) int level) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsESService.getLowLevelTotalSingle2(date, area, level));
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
error(e);
|
|
error(e);
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
@ -1505,29 +1545,30 @@ public class EsStatisticsController extends BaseController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 将参数转换成需要的SaveModel里的标识
|
|
* 将参数转换成需要的SaveModel里的标识
|
|
|
|
*
|
|
* @param level 等级 4 市 3区 2社区 1团队
|
|
* @param level 等级 4 市 3区 2社区 1团队
|
|
* @return
|
|
* @return
|
|
* @author zhangdan
|
|
* @author zhangdan
|
|
* @time 2017-10-18
|
|
* @time 2017-10-18
|
|
*/
|
|
*/
|
|
public int changeLevel(int level){
|
|
|
|
int resultLevel =0;
|
|
|
|
if (level==1){
|
|
|
|
|
|
public int changeLevel(int level) {
|
|
|
|
int resultLevel = 0;
|
|
|
|
if (level == 1) {
|
|
//团队转成SaveModel里的标识
|
|
//团队转成SaveModel里的标识
|
|
resultLevel = Integer.valueOf(SaveModel.teamLevel);
|
|
resultLevel = Integer.valueOf(SaveModel.teamLevel);
|
|
}else if(level==2){
|
|
|
|
|
|
} else if (level == 2) {
|
|
//社区转成SaveModel里的标识
|
|
//社区转成SaveModel里的标识
|
|
resultLevel = Integer.valueOf(SaveModel.OrgLevel);
|
|
resultLevel = Integer.valueOf(SaveModel.OrgLevel);
|
|
}else if (level ==3){
|
|
|
|
|
|
} else if (level == 3) {
|
|
//区转成SaveModel里的标识
|
|
//区转成SaveModel里的标识
|
|
resultLevel = Integer.valueOf(SaveModel.townLevel);
|
|
resultLevel = Integer.valueOf(SaveModel.townLevel);
|
|
}else if (level==4){
|
|
|
|
|
|
} else if (level == 4) {
|
|
//市转成SaveModel里的标识
|
|
//市转成SaveModel里的标识
|
|
resultLevel = Integer.valueOf(SaveModel.cityLevel);
|
|
resultLevel = Integer.valueOf(SaveModel.cityLevel);
|
|
}
|
|
}
|
|
if(resultLevel==0){
|
|
|
|
|
|
if (resultLevel == 0) {
|
|
resultLevel = level;
|
|
resultLevel = level;
|
|
}
|
|
}
|
|
return resultLevel;
|
|
|
|
|
|
return resultLevel;
|
|
}
|
|
}
|
|
}
|
|
}
|