|
@ -401,6 +401,22 @@ public class EsStatisticsController extends BaseController {
|
|
* @param level
|
|
* @param level
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
|
|
@RequestMapping(value = "/sixfive_statistics")
|
|
|
|
@ResponseBody
|
|
|
|
public String getSixFiveStatistics(@RequestParam(required = false) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String area,
|
|
|
|
int level,
|
|
|
|
@RequestParam(required = false) String year) {
|
|
|
|
try {
|
|
|
|
JSONArray result = statisticsESService.getSixFiveStatistics(endDate, area, level);
|
|
|
|
|
|
|
|
return write(200, "查询成功", "data", result);
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -507,4 +523,874 @@ public class EsStatisticsController extends BaseController {
|
|
return error(-1, "查询失败");
|
|
return error(-1, "查询失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取三师转签或高危人群
|
|
|
|
*
|
|
|
|
* @param endDate
|
|
|
|
* @param area
|
|
|
|
* @param level
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping(value = "/sszq_qwrq_info")
|
|
|
|
@ResponseBody
|
|
|
|
public String getSszqAndGwrq(@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String area,
|
|
|
|
@RequestParam(required = true) int level) {
|
|
|
|
try {
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
|
|
|
|
JSONObject sszq = statisticsESService.getSszqAndGwrq(endDate, area, level, "18");
|
|
|
|
JSONObject gwrq = statisticsESService.getSszqAndGwrq(endDate, area, level, "19");
|
|
|
|
|
|
|
|
result.put("sszq", sszq);
|
|
|
|
result.put("gwrq", gwrq);
|
|
|
|
|
|
|
|
return write(200, "查询成功", "data", result);
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 指标截止日期 到达量
|
|
|
|
*
|
|
|
|
* @param endDate
|
|
|
|
* @param area
|
|
|
|
* @param level
|
|
|
|
* @param index
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/index_all")
|
|
|
|
@ResponseBody
|
|
|
|
public String getIndexAll(@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String area,
|
|
|
|
@RequestParam(required = true) int level,
|
|
|
|
@RequestParam(required = true) String index,
|
|
|
|
@RequestParam(required = false) String year) {
|
|
|
|
try {
|
|
|
|
String[] indexes = index.split(",");
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
|
|
|
|
for (String idx : indexes) {
|
|
|
|
Long total = statisticsESService.getIndexTotal(endDate, area, level, idx,"2");
|
|
|
|
result.put("index_" + idx, total);
|
|
|
|
}
|
|
|
|
|
|
|
|
return write(200, "查询成功", "data", result);
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 咨询统计
|
|
|
|
* 咨询分析页面具体交互与业务分析内一致,即按市、区、社区、机构有不同展示,可一级级进入查看
|
|
|
|
* ①回复及时率------医生首次回复24小时内比例
|
|
|
|
* ②未回复数(数、率)----------当前未回复咨询数、以及相应比例
|
|
|
|
* ③处理咨询回复时间分布---------全部咨询的首次回复咨询时间分布
|
|
|
|
*
|
|
|
|
* @param level 查询的等级,按市、区、机构
|
|
|
|
* @param area 查询的等级对应Code
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/Consulting_Stat")
|
|
|
|
@ResponseBody
|
|
|
|
public String getConsultingStatistics(@RequestParam(required = true) Integer level,
|
|
|
|
@RequestParam(required = true) String area) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getConsultingStatistics(level, area));
|
|
|
|
} catch (Exception e) {
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 咨询统计
|
|
|
|
* 咨询分析页面具体交互与业务分析内一致,即按市、区、社区、机构有不同展示,可一级级进入查看
|
|
|
|
* ①回复及时率------医生首次回复24小时内比例
|
|
|
|
* ②未回复数(数、率)----------当前未回复咨询数、以及相应比例
|
|
|
|
* ③处理咨询回复时间分布---------全部咨询的首次回复咨询时间分布
|
|
|
|
*
|
|
|
|
* @param level 查询的等级,按市、区、机构
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/Consulting_StatList")
|
|
|
|
@ResponseBody
|
|
|
|
public String getConsultingStatisticsList(@RequestParam(required = true) Integer level,
|
|
|
|
@RequestParam(required = true) String area,
|
|
|
|
@RequestParam(required = false) String lowlevel,
|
|
|
|
@RequestParam(required = false) String year) {
|
|
|
|
try {
|
|
|
|
|
|
|
|
JSONObject data = null;
|
|
|
|
if (Constant.getNowYear().equals(year)) {
|
|
|
|
data = statisticsESService.getConsultingStatisticsList(level, area, lowlevel,null);
|
|
|
|
} else if (org.springframework.util.StringUtils.isEmpty(year)) {
|
|
|
|
data = statisticsESService.getConsultingStatisticsList(level, area, lowlevel,null);
|
|
|
|
// data = statisticsService.getConsultingStatisticsListAll(level, area, lowlevel, year);
|
|
|
|
} else {
|
|
|
|
|
|
|
|
data = statisticsESService.getConsultingStatisticsList(level, area, lowlevel, year);
|
|
|
|
}
|
|
|
|
if (data != null) {
|
|
|
|
return write(200, "查询成功", "data", data);
|
|
|
|
} else {
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 咨询统计
|
|
|
|
* 咨询分析页面具体交互与业务分析内一致,即按市、区、社区、机构有不同展示,可一级级进入查看
|
|
|
|
* ①回复及时率------医生首次回复24小时内比例
|
|
|
|
* ②未回复数(数、率)----------当前未回复咨询数、以及相应比例
|
|
|
|
* ③处理咨询回复时间分布---------全部咨询的首次回复咨询时间分布
|
|
|
|
*
|
|
|
|
* @param level 查询的等级,按市、区、机构
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/Consulting_Title")
|
|
|
|
@ResponseBody
|
|
|
|
public String getConsultingTitle(@RequestParam(required = true) Integer level,
|
|
|
|
@RequestParam(required = true) String area,
|
|
|
|
@RequestParam(required = false) String year) {
|
|
|
|
try {
|
|
|
|
JSONObject data = null;
|
|
|
|
// if (Constant.getNowYear().equals(year)) {
|
|
|
|
// //查今年的查找redis即可
|
|
|
|
// data = statisticsService.getConsultingTitle(level, area);
|
|
|
|
// } else if (org.springframework.util.StringUtils.isEmpty(year)) {
|
|
|
|
// //为空默认查询全部
|
|
|
|
// //查找redis的然后再添加去年年度的
|
|
|
|
// data = statisticsService.getConsultingTitleAll(level, area, year);
|
|
|
|
// } else {
|
|
|
|
// //去数据库查找年份
|
|
|
|
// data = statisticsService.getConsultingTitleWithYear(level, area, year);
|
|
|
|
// }
|
|
|
|
data = statisticsESService.getConsultingTitle(level, area,year);
|
|
|
|
if (data != null) {
|
|
|
|
return write(200, "查询成功", "data", data);
|
|
|
|
} else {
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取回复数时间分布数
|
|
|
|
*
|
|
|
|
* @param level
|
|
|
|
* @param area
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getCoutListByTime")
|
|
|
|
@ResponseBody
|
|
|
|
public String getCoutListByTime(
|
|
|
|
@RequestParam(required = true) String level,
|
|
|
|
@RequestParam(required = true) String area,
|
|
|
|
@RequestParam(required = false) String year) {
|
|
|
|
try {
|
|
|
|
// if (Constant.getNowYear().equals(year)) {
|
|
|
|
// return write(200, "查询成功", "data", statisticsService.getCoutListByTime(level, area));
|
|
|
|
// } else if (org.springframework.util.StringUtils.isEmpty(year)) {
|
|
|
|
// return write(200, "查询成功", "data", statisticsService.getCoutListByTimeAll(level, area));
|
|
|
|
// } else {
|
|
|
|
// return write(200, "查询成功", "data", statisticsService.getCoutListByTimeYear(level, area, year));
|
|
|
|
// }
|
|
|
|
return write(200, "查询成功", "data", statisticsESService.getCoutListByTime(level,area,year));
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取绑定率
|
|
|
|
* 1、选定绑定微信指标,下面排行内,在绑定微信数后新增:"绑定率:xx.22%"
|
|
|
|
* 2、绑定率=绑定数/已签约数
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/bindingRate_stat")
|
|
|
|
@ResponseBody
|
|
|
|
public String getBindingRate() {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getBindingRate());
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取得分平均数
|
|
|
|
*
|
|
|
|
* @param level
|
|
|
|
* @param area
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getAVGSocre")
|
|
|
|
@ResponseBody
|
|
|
|
public String getAVGSocre(@RequestParam(required = true) String level, @RequestParam(required = true) String area) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getAVGSocre(level, area));
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取得分平均数按月份
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getAVGSocreByMonth")
|
|
|
|
@ResponseBody
|
|
|
|
public String getAVGSocreByMonth(@RequestParam(required = true) String level,
|
|
|
|
@RequestParam(required = true) String area,
|
|
|
|
@RequestParam(required = true) String statDate,
|
|
|
|
@RequestParam(required = true) String endDate) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getAVGSocreByMonth(level, area, statDate, endDate));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 统计当前团队,签约人数,服务次数,平均满意度
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getStatTitleInfo")
|
|
|
|
@ResponseBody
|
|
|
|
public String getStatTitleInfo(@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate) {
|
|
|
|
try {
|
|
|
|
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getStatTitleInfo(getUID(), startDate, endDate));
|
|
|
|
//return write(200, "查询成功", "data", statisticsService.getStatTitleInfo("zbqD201703150228",startDate,endDate));
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取签约折线图
|
|
|
|
*
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @param signType 0 签约,1 续签
|
|
|
|
* @param type 0 按周,1 按月
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getSignCountLineByType")
|
|
|
|
@ResponseBody
|
|
|
|
public String getSignCountLineByType(@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String signType,
|
|
|
|
@RequestParam(required = true) String type) {
|
|
|
|
try {
|
|
|
|
//判断是签约还是续签
|
|
|
|
if ("0".equals(signType)) {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getSignCountLineByType(getUID(), type, startDate, endDate));
|
|
|
|
//return write(200, "查询成功", "data", statisticsService.getSignCountLineByType("xh1D201703150222",type,startDate,endDate));
|
|
|
|
} else {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getRenewCountLineByType(getUID(), type, startDate, endDate));
|
|
|
|
//return write(200, "查询成功", "data", statisticsService.getRenewCountLineByType("xh1D201703150222",type,startDate,endDate));
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取咨询数和未回复数
|
|
|
|
*
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @param isNow 1 为当前;2为非当前
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getReyStatbyTeam")
|
|
|
|
@ResponseBody
|
|
|
|
public String getReyStatbyTeam(@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String isNow) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getReyStatbyTeamNow(getUID(), startDate, endDate, isNow));
|
|
|
|
//return write(200, "查询成功", "data", statisticsService.getReyStatbyTeamNow("zbqD201703150228",startDate,endDate,isNow));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取机构内服务排行
|
|
|
|
*
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getServiceRankingList")
|
|
|
|
@ResponseBody
|
|
|
|
public String getServiceRankingList(@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getServiceRankingList(getUID(), startDate, endDate));
|
|
|
|
//return write(200, "查询成功", "data", statisticsService.getServiceRankingList("xh1D201703150222",startDate,endDate));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取平均值统计折线图
|
|
|
|
*
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @param type 0周,1月
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getAvgLine")
|
|
|
|
@ResponseBody
|
|
|
|
public String getAvgLine(@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String type) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getAvgLine(getUID(), startDate, endDate, type));
|
|
|
|
// return write(200, "查询成功", "data", statisticsService.getAvgLine("xh1D201703150222",startDate,endDate,type));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 判断团队是否是团队长
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/checkDoctorIsTeamLeder")
|
|
|
|
@ResponseBody
|
|
|
|
public String checkDoctorIsTeamLeder() {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.checkDoctorIsTeamleader(getUID()));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取团队月或周咨询未回复和总数折线图
|
|
|
|
*
|
|
|
|
* @param teamCode 团队id
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @param type 0周,1月
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getTeamConsultCount")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamConsultCount(@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String type) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamConsultCount(teamCode, startDate, endDate, type));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 计算团队医生月或周咨询未回复和总数折线图
|
|
|
|
*
|
|
|
|
* @param teamCode
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @param type 0周,1月
|
|
|
|
* @param doctor
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getTeamDoctorConsultCount")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamDoctorConsultCount(@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String type,
|
|
|
|
@RequestParam(required = true) String doctor) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamDoctorConsultCount(teamCode, startDate, endDate, type, doctor));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取团队内这成员,未回复数,总数,结束咨询数
|
|
|
|
*
|
|
|
|
* @param teamCode
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @param sort 0降序,1升序
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getMemberConsultList")
|
|
|
|
@ResponseBody
|
|
|
|
public String getMemberConsultList(@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String sort,
|
|
|
|
@RequestParam(required = true) String sortType) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getMemberConsultList(teamCode, startDate, endDate, sort, sortType));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取Doctor咨询结果
|
|
|
|
*
|
|
|
|
* @param doctor
|
|
|
|
* @param teamCode
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getDoctorConsultTitle")
|
|
|
|
@ResponseBody
|
|
|
|
public String getDoctorConsultTitle(@RequestParam(required = true) String doctor,
|
|
|
|
@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getDoctorConsultTitle(doctor, teamCode, startDate, endDate));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取团队随访量折线统计图
|
|
|
|
*
|
|
|
|
* @param type
|
|
|
|
* @param teamCode
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getTeamFollowupLine")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamFollowupLine(@RequestParam(required = true) String type,
|
|
|
|
@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamFollowupLine(teamCode, startDate, endDate, type));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@RequestMapping("/getTeamDoctorFollowupLine")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamDoctorFollowupLine(@RequestParam(required = true) String type,
|
|
|
|
@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String doctor) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamDoctorFollowupLine(teamCode, startDate, endDate, type, doctor));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 根据团队获取团队底下用户列表
|
|
|
|
*
|
|
|
|
* @param sort 0为降序,1为升序
|
|
|
|
* @param teamCode
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @param sortType 0为总数排序,1为增量排序,2为计划中排序
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getDoctorTeamFolList")
|
|
|
|
@ResponseBody
|
|
|
|
public String getDoctorTeamFolList(@RequestParam(required = true) String sort,
|
|
|
|
@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String sortType) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getDoctorTeamFolList(startDate, endDate, teamCode, sort, sortType));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取医生随访头信息
|
|
|
|
*
|
|
|
|
* @param teamCode
|
|
|
|
* @param doctor
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getTeamDoctorFolTitle")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamDoctorFolTitle(@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String doctor,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamDoctorFolTitle(teamCode, doctor, startDate, endDate));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取待预约量团队统计则线图
|
|
|
|
*
|
|
|
|
* @param teamCode
|
|
|
|
* @param type
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getTeamResLine")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamResLine(@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String type,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamResLine(teamCode, startDate, endDate, type));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取团队医生预约量团队统计则线图
|
|
|
|
*
|
|
|
|
* @param teamCode
|
|
|
|
* @param type
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @param doctor
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getTeamDoctorResLine")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamDoctorResLine(@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String type,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String doctor) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamDoctorResLine(teamCode, startDate, endDate, type, doctor));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取团队待预约量医生列表信息
|
|
|
|
*
|
|
|
|
* @param teamCode
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @param sort 0为降序,1为升序
|
|
|
|
* @param sortType 0为按总数,1为按增数
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getTeamDoctorResList")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamDoctorResList(@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String sort,
|
|
|
|
@RequestParam(required = true) String sortType) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamDoctorResList(teamCode, startDate, endDate, sort, sortType));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取团队医生待预信息
|
|
|
|
*
|
|
|
|
* @param teamCode
|
|
|
|
* @param doctor
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getTeamDoctorResTitle")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamDoctorResTitle(@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String doctor,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamDoctorResTitle(teamCode, doctor, startDate, endDate));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取团队健康指导折线图
|
|
|
|
*
|
|
|
|
* @param teamCode
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @param type 0周,1月
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getTeamGuidLine")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamGuidLine(@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String type) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamGuidLine(teamCode, startDate, endDate, type));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取团队医生则线图
|
|
|
|
*
|
|
|
|
* @param teamCode
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @param type
|
|
|
|
* @param doctor
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getTeamDoctorGuidLine")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamDoctorGuidLine(@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String type,
|
|
|
|
@RequestParam(required = true) String doctor) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamDoctorGuidLine(teamCode, startDate, endDate, type, doctor));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取团队指导总数List
|
|
|
|
*
|
|
|
|
* @param teamCode
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @param sort
|
|
|
|
* @param sortType
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getTeamGuidList")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamGuidList(@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String sort,
|
|
|
|
@RequestParam(required = true) String sortType) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamGuidList(teamCode, startDate, endDate, sort, sortType));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取医生健康指导头部信息
|
|
|
|
*
|
|
|
|
* @param teamCode
|
|
|
|
* @param doctor
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getTeamDoctorGuiTitle")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamDoctorGuiTitle(@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String doctor,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamDoctorGuiTitle(teamCode, doctor, startDate, endDate));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取团队健康教育折线统计
|
|
|
|
*
|
|
|
|
* @param teamCode
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @param type 0按周 1按月
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getTeamEduLine")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamEduLine(@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String type) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamEduLine(teamCode, startDate, endDate, type));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取团队健康
|
|
|
|
*
|
|
|
|
* @param teamCode
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @param type
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getTeamDoctorEduLine")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamDoctorEduLine(@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String type,
|
|
|
|
@RequestParam(required = true) String doctor) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamDoctorEduLine(teamCode, startDate, endDate, type, doctor));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取团队成员健康教育列表
|
|
|
|
*
|
|
|
|
* @param teamCode
|
|
|
|
* @param startDate
|
|
|
|
* @param endDate
|
|
|
|
* @param sort
|
|
|
|
* @param sortType
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping("/getTeamEduList")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamEduList(@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String sort,
|
|
|
|
@RequestParam(required = true) String sortType) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamEduList(teamCode, startDate, endDate, sort, sortType));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@RequestMapping("/getTeamDoctorEduTitle")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamDoctorEduTitle(@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String doctor) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamDoctorEduTitle(teamCode, startDate, endDate, doctor));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@RequestMapping("/getDotorInfo")
|
|
|
|
@ResponseBody
|
|
|
|
public String getDotorInfo(String code) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getDoctorInfo(code));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@RequestMapping("/getTeamRenewChangeLine")
|
|
|
|
@ResponseBody
|
|
|
|
public String getTeamRenewChangeLine(@RequestParam(required = true) String teamCode,
|
|
|
|
@RequestParam(required = true) String startDate,
|
|
|
|
@RequestParam(required = true) String endDate,
|
|
|
|
@RequestParam(required = true) String type) {
|
|
|
|
try {
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getTeamRenewChangeLine(teamCode, startDate, endDate, type));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@RequestMapping("/cleanDoctorScore")
|
|
|
|
@ResponseBody
|
|
|
|
public String cleanDoctorScore(){
|
|
|
|
try{
|
|
|
|
return write(200, "清洗完成", "data", statisticsAllService.cleanDoctorScore());
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取转签率和续签率
|
|
|
|
* 前端:续签进展
|
|
|
|
*
|
|
|
|
* @param index 42,43,44 (52,53,54 服务类型维度)
|
|
|
|
* @param level 等级 4 市 3区 2社区 1团队
|
|
|
|
* @param code 市 默认是厦门市 350200 区 就是区的code 社区就是社区的code 团队就是团队的code
|
|
|
|
* @param year 年份 非比传
|
|
|
|
* @param lowCode 服务类型维度code(老年人3,高血压4,糖尿病5)
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping(value = "/getRenewPercentAndChangePercent", method = RequestMethod.GET)
|
|
|
|
@ResponseBody
|
|
|
|
public String getRenewPercentAndChangePercent(
|
|
|
|
@RequestParam(required = true) String index,//续签index
|
|
|
|
@RequestParam(required = true) String level,
|
|
|
|
@RequestParam(required = true) String code,
|
|
|
|
@RequestParam(required = false) String year,
|
|
|
|
@RequestParam(required = false) String lowCode) {
|
|
|
|
try {
|
|
|
|
|
|
|
|
return write(200, "查询成功", "data", statisticsService.getRenewPercentAndChangePercent(index,level, code, year,lowCode));
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|