12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460 |
- package com.yihu.wlyy.web.statistic;
- import com.yihu.wlyy.entity.statistics.PopulationBase;
- import com.yihu.wlyy.entity.statistics.WlyyQuotaResult;
- import com.yihu.wlyy.job.Constant;
- import com.yihu.wlyy.service.app.statistics.StatisticsAllService;
- import com.yihu.wlyy.service.app.statistics.StatisticsService;
- import com.yihu.wlyy.util.ValueComparator;
- import com.yihu.wlyy.web.BaseController;
- import io.swagger.annotations.Api;
- import org.apache.commons.lang3.StringUtils;
- import org.json.JSONArray;
- import org.json.JSONObject;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.http.MediaType;
- import org.springframework.stereotype.Controller;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestMethod;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.ResponseBody;
- import java.util.*;
- /**
- * Created by lyr on 2016/08/16.
- */
- @Controller
- @RequestMapping(value = "/statistics", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
- @Api(description = "统计")
- public class StatisticsController extends BaseController {
- @Autowired
- StatisticsService statisticsService;
- @Autowired
- StatisticsAllService statisticsAllService;
- /**
- * 获取统计时间
- *
- * @return
- */
- @RequestMapping(value = "/time")
- @ResponseBody
- public String getStatisticsTime() {
- try {
- return write(200, "查询成功", "data", statisticsService.getStatisticsTime());
- } catch (Exception e) {
- return error(-1, "查询失败");
- }
- }
- /**
- * 指标按间隔统计 增量
- * 按年度统计是根据前端传的 startDate
- *
- * @param startDate 起始日期
- * @param endDate 结束时间
- * @param interval 时间间隔
- * @param area 区域或机构
- * @param level 级别
- * @param index 指标 3 4 5 27
- * @return
- */
- @RequestMapping(value = "/interval")
- @ResponseBody
- public String indexInterval(@RequestParam(required = true) String startDate,
- @RequestParam(required = true) String endDate,
- @RequestParam(required = true) int interval,
- @RequestParam(required = true) String area,
- @RequestParam(required = true) int level,
- @RequestParam(required = true) String index,
- @RequestParam(required = false) String level2_type) {
- String tag = "";
- try {
- String[] indexes = index.split(",");
- JSONObject result = new JSONObject();
- if (index != null) {
- for (String idx : indexes) {
- result.put("index_" + idx, statisticsService.getDateIncrementDetail(startDate, endDate, interval, area, level, idx, level2_type));
- }
- }
- return write(200, "查询成功!", "data", result);
- } catch (Exception e) {
- return error(-1, tag + "查询失败!");
- }
- }
- /**
- * 指标期间 增长量
- *
- * @param startDate
- * @param endDate
- * @param area
- * @param level
- * @param index
- * @return
- */
- @RequestMapping("/increment")
- @ResponseBody
- public String getIndexIncrement(@RequestParam(required = true) String startDate,
- @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) {
- result.put("index_" + idx, statisticsService.getIntervalIncrement(startDate, endDate, area, level, idx));
- }
- return write(200, "查询成功", "data", result);
- } catch (Exception e) {
- e.printStackTrace();
- return error(-1, "查询失败");
- }
- }
- /**
- * 指标截止日期累积量 增量的累加接口
- *
- * @param startDate 开始时间
- * @param endDate 结束时间
- * @param area 父code
- * @param level 等级 1 团队,2 机构,3 区,4 市
- * @param index 指标代码 3 4 5 27
- * @param level2_type 指标代码 例如性别 1 男 2 女 不传就返回男和女的总和
- * @return
- */
- @RequestMapping("/total")
- @ResponseBody
- public String getIndexTotal(
- @RequestParam(required = true) String startDate,
- @RequestParam(required = true) String endDate,
- @RequestParam(required = true) String area,
- @RequestParam(required = true) int level,
- @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(startDate, endDate, area, level, idx, level2_type));
- }
- return write(200, "查询成功", "data", result);
- } catch (Exception e) {
- return error(-1, "查询失败");
- }
- }
- /**
- * 指标期间增长量 此接口前端没用
- *
- * @param startDate
- * @param endDate
- * @param area
- * @param level
- * @param index
- * @return
- */
- @RequestMapping("/lowlevel_increment")
- @ResponseBody
- @Deprecated
- public String getIndexLowLevelIncrement(@RequestParam(required = true) String startDate,
- @RequestParam(required = true) String endDate,
- @RequestParam(required = true) String area,
- @RequestParam(required = true) int level,
- @RequestParam(required = true) String index,
- @RequestParam(required = true) int sort,
- @RequestParam(required = false) String lowLevel,
- @RequestParam(required = false) String year) {
- try {
- String[] indexes = index.split(",");
- JSONObject result = new JSONObject();
- for (String idx : indexes) {
- result.put("index_" + idx, statisticsService.getLowLevelIncrementDetail(startDate, endDate, area, level, idx, sort, lowLevel));
- }
- return write(200, "查询成功", "data", result);
- } catch (Exception e) {
- e.printStackTrace();
- return error(-1, "查询失败");
- }
- }
- /**
- * 指标截止日期 增量
- * (如:待预约量)
- *
- * @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")
- @ResponseBody
- public String getIndexLowLevelTotal(@RequestParam(required = true) String endDate,
- @RequestParam(required = true) String area,
- @RequestParam(required = true) int level,
- @RequestParam(required = true) String index,
- @RequestParam(required = true) int sort,
- @RequestParam(required = false) String lowLevel,
- @RequestParam(required = false) String level2_type,
- @RequestParam(required = false) String year) {
- 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, level2_type, year));
- }
- return write(200, "查询成功", "data", result);
- } catch (Exception e) {
- return error(-1, "查询失败");
- }
- }
- /**
- * 指标截止日期累积量 增量
- * 根据2个ID合并指标
- *
- * @param endDate
- * @param area
- * @param level
- * @param index 3,22
- * @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,
- @RequestParam(required = false) String year) {
- try {
- String[] indexes = index.split(",");
- JSONObject result = new JSONObject();
- JSONArray returnJa = new JSONArray();
- List<JSONArray> jsonArrays = new ArrayList<>();
- JSONArray jsonArray1 = statisticsService.getLowLevelTotalDetail(endDate, area, level, indexes[0], sort, lowLevel, null, year);
- jsonArrays.add(jsonArray1);
- JSONArray jsonArray2 = statisticsService.getLowLevelIncrementDetail(endDate, endDate, area, level, indexes[1], sort, lowLevel);
- jsonArrays.add(jsonArray2);
- //遍历合并2个指标中key值一样的
- if (jsonArrays.get(1).length() == 0) {
- //如果只有一个指标的时候 另外一个指标默认是0
- for (int i = 0; i < jsonArrays.get(0).length(); i++) {
- //未回复咨询不存在的时候默认是0
- JSONObject map1 = jsonArrays.get(0).getJSONObject(i);
- String amount = map1.get("amount").toString() + ",0";
- map1.put("amount", amount);
- returnJa.put(map1);
- }
- } else {
- //如果是2个指标的时候,分别放入map中,以减少查询次数
- Map<String, JSONObject> in = new TreeMap<>();
- ValueComparator vc = new ValueComparator(in);
- Map<String, JSONObject> index2 = new TreeMap<>();
- for (int i = 0; i < jsonArrays.get(0).length(); i++) {
- JSONObject map1 = jsonArrays.get(0).getJSONObject(i);
- in.put(map1.get("code").toString(), map1);
- }
- Map<String, JSONObject> index1 = new TreeMap<>(vc);
- index1.putAll(in);
- for (int i = 0; i < jsonArrays.get(1).length(); i++) {
- JSONObject map1 = jsonArrays.get(1).getJSONObject(i);
- index2.put(map1.get("code").toString(), map1);
- }
- for (Map.Entry<String, JSONObject> one : index1.entrySet()) {
- JSONObject map1 = one.getValue();
- JSONObject map2 = index2.get(one.getKey());
- String amount = map1.get("amount").toString() + "," + map2.get("amount").toString();
- map1.put("amount", amount);
- returnJa.put(map1);
- }
- }
- if (level == 2) {
- statisticsAllService.translateTeamLeaderNameByCode(returnJa);
- }
- result.put("index_" + indexes[0], returnJa);
- return write(200, "查询成功", "data", result);
- } catch (
- Exception e
- )
- {
- e.printStackTrace();
- return error(-1, "查询失败");
- }
- }
- /**
- * 指标期间 增长量
- *
- * @param startDate
- * @param endDate
- * @param area
- * @param level
- * @param index
- * @return
- */
- @RequestMapping("/leveltwo_increment")
- @ResponseBody
- public String getIndexLevelTwoIncrement(@RequestParam(required = false) String startDate,
- @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) {
- result.put("index_" + idx, statisticsAllService.getIndexLevelTwototal(endDate, area, level, idx));
- }
- return write(200, "查询成功", "data", result);
- } catch (Exception e) {
- e.printStackTrace();
- return error(-1, "查询失败");
- }
- }
- /**
- * 获取签约率、签约完成率
- *
- * @param endDate 截止日期
- * @param area 区域
- * @param level 区域级别 4:城市 3:区 2:社区 1:团队
- * @return
- */
- @RequestMapping(value = "/sign_info")
- @ResponseBody
- public String getAreaSignInfo(@RequestParam(required = true) String endDate,
- @RequestParam(required = true) String area,
- @RequestParam(required = true) int level,
- @RequestParam(required = false) String lowCode,
- @RequestParam(required = false) String year
- ) {
- try {
- JSONObject result = new JSONObject();
- if (StringUtils.isEmpty(lowCode)) {
- long sign = statisticsAllService.getIndexTotal(endDate, area, level, "13");
- long weiJf = statisticsAllService.getWeiJiaoFei(endDate, area, level);
- JSONObject signRate = statisticsAllService.getSignRate(endDate, area, level);
- JSONObject signTaskRate = statisticsAllService.getSignTaskRate(endDate, area, level);
- result.put("sign", sign);
- result.put("expenses", weiJf);
- result.put("signRate", signRate);
- result.put("signTaskRate", signTaskRate);
- } else {
- result = statisticsAllService.getGroupInfo(endDate, lowCode, area, level);
- }
- return write(200, "查询成功", "data", result);
- } catch (Exception e) {
- return error(-1, "查询失败");
- }
- }
- /**
- * 获取三级指标增量 到达量
- *
- * @param startDate
- * @param endDate
- * @param area
- * @param level
- * @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 = statisticsAllService.getSixFiveStatistics(endDate, area, level);
- return write(200, "查询成功", "data", result);
- } catch (Exception e) {
- e.printStackTrace();
- return error(-1, "查询失败");
- }
- }
- /**
- * 指标按间隔统计 到达量
- *
- * @param startDate 起始日期
- * @param endDate 结束时间
- * @param interval 时间间隔
- * @param area 区域或机构
- * @param level 级别
- * @param index 指标 除了增量的指标都会调用
- * @param lowCode 子维度
- * @param year 查询年份
- * @return
- */
- @RequestMapping(value = "/interval_total")
- @ResponseBody
- public String indexIntervalTotal(@RequestParam(required = true) String startDate,
- @RequestParam(required = true) String endDate,
- @RequestParam(required = true) int interval,
- @RequestParam(required = true) String area,
- @RequestParam(required = true) int level,
- @RequestParam(required = true) String index,
- @RequestParam(required = false) String lowCode,
- @RequestParam(required = false) String year) {
- try {
- String[] indexes = index.split(",");
- JSONObject result = new JSONObject();
- if (index != null) {
- for (String idx : indexes) {
- JSONObject json = statisticsAllService.getDateTotal(startDate, endDate, interval, area, level, idx, lowCode);
- //如果year不为空 那么因为是到达量 所以要累加上一年的数据
- if (!org.springframework.util.StringUtils.isEmpty(year) && !"2016".equals(year)) {
- //得到上一个年份的的最后一天的统计数据
- String date = year + "-06-30";//固定是 6月三十号 为一个年份的最后一天,如果是2017年份 那么就是2017-7-1 到 2018-6-30
- WlyyQuotaResult wlyyQuotaResult = statisticsService.findOneQuotaResult(date, level, idx, area);
- if (wlyyQuotaResult != null) {
- JSONArray ja = json.getJSONArray("data");
- for (int i = 0; i < ja.length(); i++) {
- Integer value = Integer.valueOf(ja.getJSONObject(i).getString("amount"));
- super.infoMessage("原来的总数:" + value);
- ja.getJSONObject(i).put("amount", value + Integer.valueOf(wlyyQuotaResult.getResult()));
- super.infoMessage("需要想加的总数:" + wlyyQuotaResult.getResult());
- }
- }
- }
- result.put("index_" + idx, json);
- }
- }
- return write(200, "查询成功!", "data", result);
- } catch (Exception e) {
- return error(-1, "查询失败!");
- }
- }
- /**
- * 指标截止日期累积量 到达量
- *
- * @param date
- * @param area
- * @param level level1_type等级 1:团队 2社区机构 3区级 4市级
- * @param index quotoCode 18/19两率 28 13 17
- * @param sort 0:升序 1:降序
- * @param lowCode
- * @return
- */
- @RequestMapping("/lowlevel_all")
- @ResponseBody
- public String getIndexLowLevelTotalSign(@RequestParam(required = true) String date,
- @RequestParam(required = true) String area,
- @RequestParam(required = true) int level,
- @RequestParam(required = true) String index,
- @RequestParam(required = true) int sort,
- @RequestParam(required = false) String lowLevel,
- @RequestParam(required = false) String lowCode,
- @RequestParam(required = false) String year) {
- try {
- String[] indexes = index.split(",");
- JSONObject result = new JSONObject();
- if (StringUtils.isNotEmpty(lowCode)) {
- // 指定level下特定查询级别
- if (index.equals("17")) {
- result.put("index_" + index, statisticsAllService.getLevelTwoLowLevelTotalTeamLeader(date, area, level, index, sort, lowLevel, lowCode));
- } else {
- result.put("index_" + index, statisticsAllService.getLevelTwoLowLevelTotal(date, area, level, index, sort, lowLevel, lowCode));
- }
- } else {
- // 未指定level下特定查询级别
- for (String idx : indexes) {
- if (idx.equals("18") || index.equals("19")) {
- result.put("index_" + idx, statisticsAllService.getLowLevelTotalSpecial(date, area, level, idx, sort, lowLevel));
- } else if (idx.equals("1") || index.equals("21")) {
- result.put("index_" + idx, statisticsAllService.getLowLevelTotal2(date, area, level, idx, sort, lowLevel));
- } else if (idx.equals("28")) {
- result.put("index_" + idx, statisticsService.getAvgAllInfo(level, area, lowLevel));
- } else if (idx.equals("13")) {
- result.put("index_" + idx, statisticsAllService.getLowLevelTotalTeamLeader(date, area, level, idx, sort, lowLevel));
- } else {
- result.put("index_" + idx, statisticsAllService.getLowLevelTotal(date, area, level, idx, sort, lowLevel));
- }
- }
- }
- return write(200, "查询成功", "data", result);
- } catch (Exception e) {
- e.printStackTrace();
- 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 = statisticsAllService.getSszqAndGwrq(endDate, area, level, "18");
- JSONObject gwrq = statisticsAllService.getSszqAndGwrq(endDate, area, level, "19");
- result.put("sszq", sszq);
- result.put("gwrq", gwrq);
- return write(200, "查询成功", "data", result);
- } catch (Exception e) {
- return error(-1, "查询失败");
- }
- }
- /**
- * 二级指标 到达量 废弃接口 前端没有调用
- *
- * @param date
- * @param area
- * @param level
- * @param index
- * @return
- */
- @RequestMapping(value = "/leveltwo_all")
- @ResponseBody
- @Deprecated
- public String getIndexLevelTwoTotal(@RequestParam(required = true) String date,
- @RequestParam(required = true) String area,
- @RequestParam(required = true) int level,
- @RequestParam(required = true) String index) {
- try {
- String[] indexes = index.split(",");
- JSONObject result = new JSONObject();
- for (String idx : indexes) {
- result.put("index_" + idx, statisticsAllService.getIndexLevelTwototal(date, area, level, idx));
- }
- 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 = statisticsAllService.getIndexTotal(endDate, area, level, idx);
- super.infoMessage("原来的总数:" + total);
- //如果year不为空 那么因为是到达量 所以要加上一年的数据
- if (!org.springframework.util.StringUtils.isEmpty(year) && !"2016".equals(year)) {
- //得到上一个年份的的最后一天的统计数据
- String date = year + "-06-30";//固定是 6月三十号 为一个年份的最后一天,如果是2017年份 那么就是2017-7-1 到 2018-6-30
- WlyyQuotaResult wlyyQuotaResult = statisticsService.findOneQuotaResult(date, level, idx, area);
- if (wlyyQuotaResult != null) {
- super.infoMessage("需要添加的数目:" + wlyyQuotaResult.getResult());
- total = total + Long.valueOf(wlyyQuotaResult.getResult());
- }
- }
- result.put("index_" + idx, total);
- }
- return write(200, "查询成功", "data", result);
- } catch (Exception e) {
- 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.getStartYear().equals(year)) {
- data = statisticsService.getConsultingStatisticsList(level, area, lowlevel);
- } else if (org.springframework.util.StringUtils.isEmpty(year)) {
- data = statisticsService.getConsultingStatisticsListAll(level, area, lowlevel,year);
- } else {
- data = statisticsService.getConsultingStatisticsListYear(level, area, lowlevel,year);
- }
- if (data != null) {
- return write(200, "查询成功", "data", data);
- } else {
- return error(-1, "查询失败");
- }
- } catch (Exception e) {
- 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.getStartYear().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);
- }
- if (data != null) {
- return write(200, "查询成功", "data", data);
- } else {
- return error(-1, "查询失败");
- }
- } catch (Exception e) {
- 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.getStartYear().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));
- }
- } catch (Exception e) {
- 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) {
- 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) {
- 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("xh1D201703150222",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.getReyStatbyTeam(getUID(), startDate, endDate, isNow));
- //return write(200, "查询成功", "data", statisticsService.getReyStatbyTeam("xh1D201703150222",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, "查询失败");
- }
- }
- /**
- * 获取转签率和续签率
- * 前端:续签进展
- *
- * @param level 等级 4 市 3区 2社区 1团队
- * @param code 市 默认是厦门市 350200 区 就是区的code 社区就是社区的code 团队就是团队的code
- * @param year 年份 非比传
- * @return
- */
- @RequestMapping(value = "/getRenewPercentAndChangePercent", method = RequestMethod.GET)
- @ResponseBody
- public String getRenewPercentAndChangePercent(
- @RequestParam(required = true) String level,
- @RequestParam(required = true) String code,
- @RequestParam(required = false) String year) {
- try {
- return write(200, "查询成功", "data", statisticsService.getRenewPercentAndChangePercent(level, code, year));
- } catch (Exception e) {
- error(e);
- return error(-1, "查询失败");
- }
- }
- /**
- * 获取转签人数,转签原因分析,转签分布
- * 前端:签约数据分析,团队转签详情
- *
- * @param level 等级 4 市 3区 2社区 1团队
- * @param code 市 默认是厦门市 350200 区 就是区的code 社区就是社区的code 团队就是团队的code
- * @param year 年份 非比传
- * @return
- */
- @RequestMapping(value = "/getRenewAnalysis", method = RequestMethod.GET)
- @ResponseBody
- public String getRenewAnalysis(
- @RequestParam(required = true) String level,
- @RequestParam(required = true) String code,
- @RequestParam(required = false) String year) {
- try {
- return write(200, "查询成功", "data", statisticsService.getRenewAnalysis(level, code, year));
- } 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, "查询失败");
- }
- }
- }
|