Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

zd_123 7 years ago
parent
commit
4690e96177

+ 110 - 110
common/common-entity/src/main/java/com/yihu/wlyy/entity/job/QuartzJobConfig.java

@ -14,114 +14,114 @@ import org.hibernate.annotations.GenericGenerator;
@Table(name = "wlyy_job_config")
public class QuartzJobConfig implements java.io.Serializable {
	private String id;
	private String quotaId;//指标id
	private String jobName;//任务名称
	private String jobInfo;//任务描述
	private String jobType;//任务类型(0--单次执行  1--周期执行 2--监听任务)
	private String jobClass;//任务执行的class
	private String quartzCron;//quartz表达式
	private String status;//1 启动 0停止
	private String del;//是否删除 1正常 0删除
	/** minimal constructor */
	public QuartzJobConfig() {
	}
	/** full constructor */
	public QuartzJobConfig(String jobName, String jobInfo, String jobType,
						   String jobClass, String quartzCron, String status) {
		this.jobName = jobName;
		this.jobInfo = jobInfo;
		this.jobType = jobType;
		this.jobClass = jobClass;
		this.quartzCron = quartzCron;
		this.status = status;
	}
	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false, length = 50)
	public String getId() {
		return this.id;
	}
	public void setId(String id) {
		this.id = id;
	}
	@Column(name = "job_name", length = 50)
	public String getJobName() {
		return this.jobName;
	}
	public void setJobName(String jobName) {
		this.jobName = jobName;
	}
	@Column(name = "job_info", length = 200)
	public String getJobInfo() {
		return this.jobInfo;
	}
	public void setJobInfo(String jobInfo) {
		this.jobInfo = jobInfo;
	}
	@Column(name = "job_type", length = 10)
	public String getJobType() {
		return this.jobType;
	}
	public void setJobType(String jobType) {
		this.jobType = jobType;
	}
	@Column(name = "job_class", length = 200)
	public String getJobClass() {
		return jobClass;
	}
	public void setJobClass(String jobClass) {
		this.jobClass = jobClass;
	}
	@Column(name = "quartz_cron", length = 200)
	public String getQuartzCron() {
		return this.quartzCron;
	}
	public void setQuartzCron(String quartzCron) {
		this.quartzCron = quartzCron;
	}
	@Column(name = "status", length = 1)
	public String getStatus() {
		return this.status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	@Column(name = "quota_id", length = 50)
	public String getQuotaId() {
		return quotaId;
	}
	public void setQuotaId(String quotaId) {
		this.quotaId = quotaId;
	}
	@Column(name = "del", length = 1)
	public String getDel() {
		return del;
	}
	public void setDel(String del) {
		this.del = del;
	}
    private String id;
    private String quotaId;//指标id
    private String jobName;//任务名称
    private String jobInfo;//任务描述
    private String jobType;//任务类型(0--单次执行  1--周期执行 2--监听任务)
    private String jobClass;//任务执行的class
    private String quartzCron;//quartz表达式
    private String status;//1 启动 0停止
    private String del;//是否删除 1正常 0删除
    /** minimal constructor */
    public QuartzJobConfig() {
    }
    /** full constructor */
    public QuartzJobConfig(String jobName, String jobInfo, String jobType,
                           String jobClass, String quartzCron, String status) {
        this.jobName = jobName;
        this.jobInfo = jobInfo;
        this.jobType = jobType;
        this.jobClass = jobClass;
        this.quartzCron = quartzCron;
        this.status = status;
    }
    // Property accessors
    @GenericGenerator(name = "generator", strategy = "uuid")
    @Id
    @GeneratedValue(generator = "generator")
    @Column(name = "id", unique = true, nullable = false, length = 50)
    public String getId() {
        return this.id;
    }
    public void setId(String id) {
        this.id = id;
    }
    @Column(name = "job_name", length = 50)
    public String getJobName() {
        return this.jobName;
    }
    public void setJobName(String jobName) {
        this.jobName = jobName;
    }
    @Column(name = "job_info", length = 200)
    public String getJobInfo() {
        return this.jobInfo;
    }
    public void setJobInfo(String jobInfo) {
        this.jobInfo = jobInfo;
    }
    @Column(name = "job_type", length = 10)
    public String getJobType() {
        return this.jobType;
    }
    public void setJobType(String jobType) {
        this.jobType = jobType;
    }
    @Column(name = "job_class", length = 200)
    public String getJobClass() {
        return jobClass;
    }
    public void setJobClass(String jobClass) {
        this.jobClass = jobClass;
    }
    @Column(name = "quartz_cron", length = 200)
    public String getQuartzCron() {
        return this.quartzCron;
    }
    public void setQuartzCron(String quartzCron) {
        this.quartzCron = quartzCron;
    }
    @Column(name = "status", length = 1)
    public String getStatus() {
        return this.status;
    }
    public void setStatus(String status) {
        this.status = status;
    }
    @Column(name = "quota_id", length = 50)
    public String getQuotaId() {
        return quotaId;
    }
    public void setQuotaId(String quotaId) {
        this.quotaId = quotaId;
    }
    @Column(name = "del", length = 1)
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
}

+ 13 - 10
patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/etl/compute/ComputeHelper.java

@ -122,8 +122,9 @@ public class ComputeHelper {
    }
    public static void main(String[] args) {
        System.out.println("3502060200".substring(0,8));
        System.out.println("3502060200".substring(0, 8));
    }
    /**
     * 初始化map
     */
@ -142,9 +143,9 @@ public class ComputeHelper {
                saveModel.setTown(one.getTownCode());
                saveModel.setTownName(one.getTownName());
                //把末尾不是00的机构转换成00
                String orgCode=one.getOrgCode();
                if(!"00".equals(orgCode.substring(8))){
                    orgCode=orgCode.substring(0,8)+"00";
                String orgCode = one.getOrgCode();
                if (!"00".equals(orgCode.substring(8))) {
                    orgCode = orgCode.substring(0, 8) + "00";
                }
                saveModel.setHospital(orgCode);
                saveModel.setHospitalName(one.getOrgName());
@ -178,8 +179,8 @@ public class ComputeHelper {
                }
            }
            //如果字典长度是0 抛出异常
            if(dictModels.size()==0){
                throw new Exception("dict size:0,sql:"+dimensionQuota.getDictSql());
            if (dictModels.size() == 0) {
                throw new Exception("dict size:0,sql:" + dimensionQuota.getDictSql());
            }
            lastMaps = mapTemp;
        }
@ -195,12 +196,14 @@ public class ComputeHelper {
                    result1 += dataModel.getNum();
                    result2++;
                }
                one.getValue().setResult1(result1);
                one.getValue().setResult2(result2);
                SaveModel saveModel = one.getValue();
                saveModel.setResult1(result1);
                saveModel.setResult2(result2);
                returnList.add(saveModel);
            } else {
                returnList.add(one.getValue());
            }
            returnList.add(one.getValue());
        }
        return returnList;
    }
}

+ 23 - 16
patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/job/business/CurrentMysqlToEsQuotaJob.java

@ -112,7 +112,7 @@ public class CurrentMysqlToEsQuotaJob implements Job {
        //初始化统计年份
        this.year = getNowYearByDate();
        timeLevel="2";
        //初始化开始时间
        if ("2".equals(timeLevel)) {
            //按年度到达量
@ -154,7 +154,7 @@ public class CurrentMysqlToEsQuotaJob implements Job {
                //3.统计数据
                List<SaveModel> sms = compute(filterModel.getData(), dimensionQuotas, timeLevel, one);
                //4.更新数据
                Boolean success = updateData(sms, quotaDate, one.getId(), timeLevel);
                Boolean success = updateData(sms, quotaDate, one.getId(), timeLevel,dimensionQuotas.size());
                tjQuotaLog.setJobType(success ? "1" : "0");
                tjQuotaLog.setJobEndTime(new Date());
@ -172,12 +172,12 @@ public class CurrentMysqlToEsQuotaJob implements Job {
    /**
     * 删除 某个指标某一天的某个timelevel的数据
     *
     * @param quotaDate
     *  @param quotaDate
     * @param quotaCode
     * @param timeLevel
     * @param size
     */
    private boolean updateData(List<SaveModel> sms, Date quotaDate, String quotaCode, String timeLevel) {
    private boolean updateData(List<SaveModel> sms, Date quotaDate, String quotaCode, String timeLevel, int size) {
        try {
            JestClient jestClient = elasticFactory.getJestClient();
            //先根据条件查找出来
@ -196,19 +196,26 @@ public class CurrentMysqlToEsQuotaJob implements Job {
            List<SaveModel> quarySaveModels = result.getSourceAsObjectList(SaveModel.class);
            //如果之前有值就用查询出来的然后修改数目即可
            if (quarySaveModels != null && quarySaveModels.size() > 0) {
                List<SaveModel> saveModels=new ArrayList<>();
                //把新的值赋值给ES查询出来的值
                Map<String,SaveModel> newSaveModelMaps=new HashMap<>();
                //list转map
                Map<String, SaveModel> smsMap = new HashMap<>();
                sms.stream().forEach(one -> {
                    smsMap.put(one.getTeam(), one);
                });
                for (SaveModel obj : quarySaveModels) {
                    SaveModel newResult = smsMap.get(obj.getTeam());
                    obj.setResult1(newResult.getResult1());
                    obj.setResult2(newResult.getResult2());
                    obj.setCreateTime(new Date());
                for(SaveModel newSaveModel:sms){
                    StringBuffer key=new StringBuffer(newSaveModel.getTeam()+"-"+newSaveModel.getSlaveKey1()+"-"+newSaveModel.getSlaveKey2()+"-"+newSaveModel.getSlaveKey3()+"-"+newSaveModel.getSlaveKey4());
                    newSaveModelMaps.put(key.toString(),newSaveModel);
                }
                for (SaveModel esSavemodel : quarySaveModels) {
                    StringBuffer key=new StringBuffer(esSavemodel.getTeam()+"-"+esSavemodel.getSlaveKey1()+"-"+esSavemodel.getSlaveKey2()+"-"+esSavemodel.getSlaveKey3()+"-"+esSavemodel.getSlaveKey4());
                    SaveModel newSaveMode=newSaveModelMaps.get(key.toString());
                    if(newSaveMode!=null){
                        esSavemodel.setResult1(newSaveMode.getResult1());
                        esSavemodel.setResult2(newSaveMode.getResult2());
                        esSavemodel.setCreateTime(new Date());
                    }
                    saveModels.add(esSavemodel);
                }
                sms = quarySaveModels;
                return updateDate(sms);
                return updateDate(saveModels);
            } else {
                return saveDate(sms);
            }

+ 30 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/followup/FollowUpDao.java

@ -6,6 +6,7 @@
package com.yihu.wlyy.repository.followup;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
@ -27,7 +28,35 @@ public interface FollowUpDao extends PagingAndSortingRepository<Followup, Long>,
    @Query(value = "select a.* from wlyy_followup a where a.doctor_code in ?1 and a.patient_code = ?2 and a.followup_class=?3 and a.status ='1' order by a.followup_date DESC limit 1",nativeQuery = true)
    Followup findLastFollowup(String[] doctors,String patientCode,String followClass) throws Exception;
    
    /**
     * 查找所有的随访数据
     * @param patient
     * @param teamCode
     * @param pageable
     * @return
     */
    @Query("select d.code,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus,c.code,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo from Followup a, Doctor d, Doctor c where a.doctorCode = d.code and a.creater = c.code and a.patientCode = ?1 and a.adminTeamCode = ?2 and a.status > 0")
    Page<Object> findByPatientAndTeam(String patient, Long teamCode, Pageable pageable);
    
    /**
     * 查找所有的随访计划(未开始的归类为计划)
     * @param patient
     * @param teamCode
     * @param pageable
     * @return
     */
    @Query("select d.code,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus,c.code,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo from Followup a, Doctor d, Doctor c where a.doctorCode = d.code and a.creater = c.code and a.patientCode = ?1 and a.adminTeamCode = ?2 and a.status = '2'")
    Page<Object> findPlanByPatientAndTeam(String patient, Long teamCode, Pageable pageable);
    /**
     * 查找所有的随访记录(进行中的,已完整的的归类为计划)
     * @param patient
     * @param teamCode
     * @param pageable
     * @return
     */
    @Query("select d.code,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus,c.code,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo from Followup a, Doctor d, Doctor c where a.doctorCode = d.code and a.creater = c.code and a.patientCode = ?1 and a.adminTeamCode = ?2 and (a.status = '1' or a.status = '3')")
    Page<Object> findRecordByPatientAndTeam(String patient, Long teamCode, Pageable pageable);
}

+ 15 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/followup/FollowUpService.java

@ -184,12 +184,25 @@ public class FollowUpService extends BaseService {
     * @param teamCode
     * @param page
     * @param pageSize
     * @param type 类型:0全部,1计划,2记录
     * @return
     */
    public JSONArray getListByPatientAndTeam(String patient, Long teamCode, int page, int pageSize) {
    public JSONArray getListByPatientAndTeam(String patient, Long teamCode, int page, int pageSize, int type) {
        Sort sort = new Sort(Sort.Direction.DESC,"createTime");
        PageRequest pageRequest = new PageRequest(page, pageSize,sort);
        Page<Object> result = followupDao.findByPatientAndTeam(patient, teamCode, pageRequest);
        Page<Object> result = null;
        
        if(type == 0){
            result = followupDao.findByPatientAndTeam(patient, teamCode, pageRequest);
        }else if(type == 1){
            //已经开始的就是记录
            result = followupDao.findPlanByPatientAndTeam(patient, teamCode, pageRequest);
        }else if(type == 2){
            //未开始的就是计划
            result = followupDao.findRecordByPatientAndTeam(patient, teamCode, pageRequest);
        }else{}
                
        
        JSONArray array = new JSONArray();
        if (result != null && result.getContent().size() > 0) {

+ 338 - 7
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statisticsES/StatisticsESService.java

@ -188,7 +188,7 @@ public class StatisticsESService {
    public long getIntervalIncrement(String startDate, String endDate, String area, int level, String index) throws Exception {
        // 截止日期包含当天,则获取最新的更新时间
        if (endDate.compareTo(new SimpleDateFormat("yyyy-MM-dd").format(new Date())) >= 0) {
        if (endDate.compareTo(dateFormat.format(new Date())) >= 0) {
            endDate = elasticsearchUtil.getQuotaTime();
        }
        SaveModel saveModel = elasticsearchUtil.findOneDateQuotaLevel0(startDate,endDate,area,level,index,"1");
@ -635,7 +635,8 @@ public class StatisticsESService {
     * @return
     */
    public JSONArray getSixFiveStatistics(String endDate, String area, int level) throws Exception{
        List<SaveModel> list = elasticsearchUtil.findDateQuotaLevel2(endDate,endDate,area,level,"12","2","6",null,null,null);
        List<SaveModel> list = elasticsearchUtil.findOneDateQuotaLevel2(endDate,area,level,"12","2","6");
        List<Map<String, Object>> resultList = new ArrayList<>();
        for (int i = 0; i < list.size(); i++) {
            Map<String, Object> data = new HashMap<>();
@ -676,12 +677,12 @@ public class StatisticsESService {
     * @return
     */
    public long getSixFiveTotal(String endDate, String area, int level) throws Exception{
        List<SaveModel> list = elasticsearchUtil.findDateQuotaLevel1(endDate,endDate,area,level,"8","2","6",null,null);
        if(list.size()>0){
            return list.get(0).getResult2();
        // 截止日期包含当天,则获取最新的更新时间
        if (endDate.compareTo(dateFormat.format(new Date())) >= 0) {
            endDate = elasticsearchUtil.getQuotaTime();
        }
        return 0;
        SaveModel saveModel = elasticsearchUtil.findOneDateQuotaLevel1(endDate,area,level,"8","2","6");
        return saveModel.getResult2();
    }
    /**
@ -1584,4 +1585,334 @@ public class StatisticsESService {
            return new JSONArray();
        }
    }
    /**
     * 获取三师转签或高危人群签约
     *
     * @param endDate
     * @param area
     * @param level
     * @param index
     * @return
     */
    public JSONObject getSszqAndGwrq(String endDate, String area, int level, String index) {
        JSONObject json = new JSONObject();
        // 查询语句
        String sql = " select " +
                "     ifnull(result,'0') amount" +
                " from  " +
                "     wlyy_quota_result " +
                " where " +
                "     quato_code = ? " +
                "   and level1_type = ? and del = '1'";
        if (level == 4) {
            // 市级别
            sql += " and city = ? ";
        } else if (level == 3) {
            // 区、城镇级别
            sql += " and town = ? ";
        } else if (level == 2) {
            // 机构级别
            sql += " and org_code = ? ";
        } else if (level == 1) {
            sql += " and qkdoctor_code = ?";
        }
        sql += "   order by quota_date DESC " +
                "   limit 0,1";
        List<Map<String, Object>> result = jdbcTemplate.queryForList(sql, index, level, area);
        if (result != null && result.size() > 0) {
            String total = (result.get(0).get("amount") != null ? result.get(0).get("amount").toString() : "0");
            if (total.equals("0")) {
                json.put("amount", 0L);
                json.put("num", 0L);
                json.put("rate", 0.0000D);
            } else {
                DecimalFormat df = new DecimalFormat("0.0000");
                String[] args = total.split("/");
                json.put("amount", Long.valueOf(args[0]));
                json.put("num", Long.valueOf(args[1]));
                json.put("rate", df.format(Long.valueOf(args[0]) * 1.0000 / Long.valueOf(args[1]) * 100));
            }
        } else {
            json.put("amount", 0L);
            json.put("num", 0L);
            json.put("rate", 0.0000D);
        }
        return json;
    }
    /**
     * 统计回复和未回复
     *
     * @param level
     * @return
     * @throws Exception
     */
    public JSONObject getConsultingStatisticsList(int level, String area, String lowLevel,String year) throws Exception {
        JSONObject result = new JSONObject();
        //最新更新时间
        String timeKey = elasticsearchUtil.getQuotaTime();
        if(StringUtils.isNotEmpty(year)){
            Integer coutYear = Integer.parseInt(year) + 1;
            timeKey = coutYear+"-06-30";
        }
        //及时回复数
        List<SaveModel> relyVal = elasticsearchUtil.findListDateQuotaLevel0(timeKey,area,level,"23","2",lowLevel);
        //咨询总数
        List<SaveModel> relyTotal = elasticsearchUtil.findListDateQuotaLevel0(timeKey,area,level,"25","2",lowLevel);
        //未回复数
        List<SaveModel> noRelyTotal = elasticsearchUtil.findListDateQuotaLevel0(timeKey,area,level,"22","2",lowLevel);
        JSONArray rely = new JSONArray(relyVal);
        JSONArray total = new JSONArray(relyTotal);
        JSONArray noRely = new JSONArray(noRelyTotal);
        result.put("resultList", getCoutList(level,rely, total, noRely));
        return result;
    }
    /**
     * 统计
     * 根据总数,未回复数,回复数统计,合并结果集及排序
     *
     * @param rely
     * @param total
     * @param onRely
     * @return
     */
    public List<Map<String, Object>> getCoutList(Integer level,JSONArray rely, JSONArray total, JSONArray onRely) {
        Map<String, Object> relyMap = new HashMap<>();
        Map<String, Object> totalMap = new HashMap<>();
        Map<String, Object> onRelyMap = new HashMap<>();
        JSONObject result = new JSONObject();
        //将List转换为Map,Key为要比较的CODE,降低循环层数
        String area = "";
        if(level==4){
            area = "city";
        }else if(level==3){
            area = "town";
        }else if(level==2){
            area = "hospital";
        }
        //转换回复数
        Iterator iterator = rely.iterator();
        while (iterator.hasNext()) {
            JSONObject jsonObject = (JSONObject) iterator.next();
            relyMap.put(jsonObject.get(area).toString(), jsonObject);
        }
        //转换总咨询数
        Iterator iterator2 = total.iterator();
        while (iterator2.hasNext()) {
            JSONObject jsonObject = (JSONObject) iterator2.next();
            totalMap.put(jsonObject.get(area).toString(), jsonObject);
        }
        //转换总咨询数
        Iterator iterator3 = onRely.iterator();
        while (iterator3.hasNext()) {
            JSONObject jsonObject = (JSONObject) iterator3.next();
            onRelyMap.put(jsonObject.get(area).toString(), jsonObject);
        }
        List<Map<String, Object>> resultMaps = new ArrayList<>();
        for (String key : totalMap.keySet()) {
            Map<String, Object> rs = new HashMap<>();
            JSONObject relyRs = (JSONObject) relyMap.get(key);
            JSONObject totalRs = (JSONObject) totalMap.get(key);
            JSONObject onRelyRs = (JSONObject) onRelyMap.get(key);
            if(relyRs==null||totalRs==null||onRelyRs==null){
                continue;
            }
            //合并结果集
            Integer totalNm = totalRs.getInt("result2");
            Integer relyNm = relyRs.getInt("result2");
            Integer noRelyNm = onRelyRs.getInt("result2");
            rs.put("name", relyRs.get(area+"Name"));
            rs.put("noRelyCount", noRelyNm);
            rs.put("relyCount", relyNm);
            rs.put("total", totalNm);
            rs.put("code", key);
            if (totalNm != null && totalNm != 0) {
                if (relyNm != null && relyNm != 0) {
                    double rr = (double) relyNm / totalNm * 100;
                    DecimalFormat df = new DecimalFormat("0.00");
                    rs.put("relyRate", df.format(rr) + "%");
                    rs.put("relyDoubleRate", rr);
                } else {
                    rs.put("relyRate", "0.00%");
                    rs.put("relyDoubleRate", 0.0);
                }
                if (noRelyNm != null && noRelyNm != 0) {
                    double rr = (double) noRelyNm / totalNm * 100;
                    DecimalFormat df = new DecimalFormat("0.00");
                    rs.put("noRelyRate", df.format(rr) + "%");
                    rs.put("noRelyDoubleRate", rr);
                } else {
                    rs.put("noRelyRate", "0.00%");
                    rs.put("noRelyDoubleRate", 0.0);
                }
            } else {
                rs.put("relyRate", "0.00%");
                rs.put("relyDoubleRate", 0.0);
                rs.put("noRelyRate", "0.00%");
                rs.put("noRelyDoubleRate", 0.0);
            }
            resultMaps.add(rs);
        }
        if(level==2){
            Map<Integer, Map<String, Object>> leaders = getAllTeamLeaders();
            if (resultMaps != null && resultMaps.size() > 0) {
                for (Map<String, Object> r : resultMaps) {
                    String id = (String) r.get("code");
                    String name = getTeamLeaderNameByTeamCode(leaders, Integer.parseInt(id));
                    if (org.apache.commons.lang3.StringUtils.isNotBlank(name)) {
                        r.put("name", name);
                    }
                }
            }
        }
        //根据为回复数排序
        Collections.sort(resultMaps, new Comparator<Map<String, Object>>() {
            public int compare(Map<String, Object> o1, Map<String, Object> o2) {
                return (double) o1.get("noRelyDoubleRate") < (double) o2.get("noRelyDoubleRate") ? 1 : ((double) o1.get("noRelyDoubleRate") == (double) o2.get("noRelyDoubleRate") ? 0 : -1);
            }
        });
        return resultMaps;
    }
    /**
     * 获取及时回复的时间分布
     *
     * @param level
     * @param area
     * @return
     */
    public JSONObject getCoutListByTime(String level, String area,String year) throws Exception {
        JSONObject result = new JSONObject();
        String quotaTime = elasticsearchUtil.getQuotaTime();
        if(StringUtils.isNotEmpty(year)){
            quotaTime = year+"-6-30";
        }
        List<SaveModel> list = elasticsearchUtil.findOneDateQuotaLevel1(quotaTime,area,Integer.parseInt(level),"24","2");
        JSONArray array = new JSONArray(list);
        result.put("resultList", array);
        return result;
    }
    /**
     * 统计当前级别下数据
     *
     * @param level
     * @param area
     * @return
     */
    public JSONObject getConsultingTitle(int level, String area,String year) throws Exception{
        JSONObject result = new JSONObject();
        String quotaDate = elasticsearchUtil.getQuotaTime();
        if(StringUtils.isNotEmpty(year)){
            quotaDate = year+"-06-30";
        }
        List<SaveModel> relyVal = elasticsearchUtil.findOneDateQuotaLevel1(quotaDate,area,level,"23","2");
        List<SaveModel> relyTotal = elasticsearchUtil.findOneDateQuotaLevel1(quotaDate,area,level,"25","2");
        List<SaveModel> onRelyTotal = elasticsearchUtil.findOneDateQuotaLevel1(quotaDate,area,level,"22","2");
        JSONObject relyObject = new JSONObject(relyVal);
        JSONObject totalObject = new JSONObject(relyTotal);
        JSONObject onRelyObject = new JSONObject(onRelyTotal);
        JSONArray rely = new JSONArray();
        rely.put(relyObject);
        JSONArray total = new JSONArray();
        total.put(totalObject);
        JSONArray onRely = new JSONArray();
        onRely.put(onRelyObject);
        result.put("result", getCoutListTitle(level,rely, total, onRely));
        return result;
    }
    public List<Map<String, Object>> getCoutListTitle(Integer level,JSONArray rely, JSONArray total, JSONArray onRely) {
        Map<String, Object> relyMap = new HashMap<>();
        Map<String, Object> totalMap = new HashMap<>();
        Map<String, Object> onRelyMap = new HashMap<>();
        JSONObject result = new JSONObject();
        //将List转换为Map,Key为要比较的CODE,降低循环层数
        String area = "";
        if (level == 4) {
            area = "city";
        } else if (level == 3) {
            area = "town";
        } else if (level == 2) {
            area = "hospital";
        }
        //转换回复数
        Iterator iterator = rely.iterator();
        while (iterator.hasNext()) {
            JSONObject jsonObject = (JSONObject) iterator.next();
            relyMap.put(jsonObject.get(area).toString(), jsonObject);
        }
        //转换总咨询数
        Iterator iterator2 = total.iterator();
        while (iterator2.hasNext()) {
            JSONObject jsonObject = (JSONObject) iterator2.next();
            totalMap.put(jsonObject.get(area).toString(), jsonObject);
        }
        //转换总咨询数
        Iterator iterator3 = onRely.iterator();
        while (iterator3.hasNext()) {
            JSONObject jsonObject = (JSONObject) iterator3.next();
            onRelyMap.put(jsonObject.get(area).toString(), jsonObject);
        }
        List<Map<String, Object>> resultMaps = new ArrayList<>();
        for (String key : totalMap.keySet()) {
            Map<String, Object> rs = new HashMap<>();
            JSONObject relyRs = (JSONObject) relyMap.get(key);
            JSONObject totalRs = (JSONObject) totalMap.get(key);
            JSONObject onRelyRs = (JSONObject) onRelyMap.get(key);
            if (relyRs == null || totalRs == null || onRelyRs == null) {
                continue;
            }
            //合并结果集
            Integer totalNm = totalRs.getInt("result2");
            Integer relyNm = relyRs.getInt("result2");
            Integer noRelyNm = onRelyRs.getInt("result2");
            rs.put("name", relyRs.get(area + "Name"));
            rs.put("noRelyCount", noRelyNm);
            rs.put("relyCount", relyNm);
            rs.put("total", totalNm);
            rs.put("code", key);
            if (totalNm != null && totalNm != 0) {
                if (relyNm != null && relyNm != 0) {
                    double rr = (double) relyNm / totalNm * 100;
                    DecimalFormat df = new DecimalFormat("0.00");
                    rs.put("relyRate", df.format(rr) + "%");
                    rs.put("relyDoubleRate", rr);
                } else {
                    rs.put("relyRate", "0.00%");
                    rs.put("relyDoubleRate", 0.0);
                }
                if (noRelyNm != null && noRelyNm != 0) {
                    double rr = (double) noRelyNm / totalNm * 100;
                    DecimalFormat df = new DecimalFormat("0.00");
                    rs.put("noRelyRate", df.format(rr) + "%");
                    rs.put("noRelyDoubleRate", rr);
                } else {
                    rs.put("noRelyRate", "0.00%");
                    rs.put("noRelyDoubleRate", 0.0);
                }
            } else {
                rs.put("relyRate", "0.00%");
                rs.put("relyDoubleRate", 0.0);
                rs.put("noRelyRate", "0.00%");
                rs.put("noRelyDoubleRate", 0.0);
            }
            resultMaps.add(rs);
        }
        return resultMaps;
    }
    public JSONObject getRenewPercentAndChangePercent(String renewIndex, String level, String code, String year, String lowCode) {
        return null;
    }
}

+ 6 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/ElasticsearchUtil.java

@ -244,9 +244,9 @@ public class ElasticsearchUtil {
        }
        if (StringUtils.isNotEmpty(endDate)) {
            if(startDate.length()>10){
                startDate = changeTime(startDate);
                startDate = changeTime(endDate);
            }else{
                startDate = changeDate(startDate);
                startDate = changeDate(endDate);
            }
        }
        StringBuffer sql = new StringBuffer();
@ -335,9 +335,9 @@ public class ElasticsearchUtil {
        }
        if (StringUtils.isNotEmpty(endDate)) {
            if(startDate.length()>10){
                startDate = changeTime(startDate);
                startDate = changeTime(endDate);
            }else{
                startDate = changeDate(startDate);
                startDate = changeDate(endDate);
            }
        }
        StringBuffer sql = new StringBuffer();
@ -426,9 +426,9 @@ public class ElasticsearchUtil {
        }
        if (StringUtils.isNotEmpty(endDate)) {
            if(startDate.length()>10){
                startDate = changeTime(startDate);
                startDate = changeTime(endDate);
            }else{
                startDate = changeDate(startDate);
                startDate = changeDate(endDate);
            }
        }
        StringBuffer sql = new StringBuffer();

+ 4 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/followup/DoctorFollowUpController.java

@ -61,13 +61,14 @@ public class DoctorFollowUpController extends BaseController {
     * @param pagesize
     * @return
     */
    @RequestMapping(value = "/list_by_team", method = {RequestMethod.GET,RequestMethod.POST})
    @RequestMapping(value = "/list_by_team", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "查询居民随访列表")
    public String getListByPatientAndTeam(@RequestParam @ApiParam(value = "居民Code") String patient,
                                          @RequestParam @ApiParam(value = "团队code") Long teamCode,
                                          @RequestParam @ApiParam(value = "第几页") int page,
                                          @RequestParam @ApiParam(value = "页大小") int pagesize) {
                                          @RequestParam @ApiParam(value = "页大小") int pagesize,
                                          @RequestParam(value = "type",required = false) @ApiParam(value = "类型:0全部,1计划,2记录",defaultValue = "0") int type) {
        try {
            if (StringUtils.isEmpty(patient)) {
                return error(-1, "请输入需查询的居民");
@ -77,7 +78,7 @@ public class DoctorFollowUpController extends BaseController {
            }
            page = page > 0 ? page - 1 : 0;
            JSONArray result = followUpService.getListByPatientAndTeam(patient, teamCode, page, pagesize);
            JSONArray result = followUpService.getListByPatientAndTeam(patient, teamCode, page, pagesize,type);
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {
            e.printStackTrace();

+ 869 - 10
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/statistic/EsStatisticsController.java

@ -401,7 +401,22 @@ public class EsStatisticsController extends BaseController {
     * @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 = statisticsESService.getSixFiveStatistics(endDate, area, level);
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, "查询失败");
        }
    }
    /**
@ -509,23 +524,26 @@ public class EsStatisticsController extends BaseController {
    }
    /**
     * 获取三级指标增量  到达量
     *  2016 年才有用  2017年改成服务类型
     * @param startDate
     * 获取三师转签或高危人群
     *
     * @param endDate
     * @param area
     * @param level
     * @return
     */
    @RequestMapping(value = "/sixfive_statistics")
    @RequestMapping(value = "/sszq_qwrq_info")
    @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) {
    public String getSszqAndGwrq(@RequestParam(required = true) String endDate,
                                 @RequestParam(required = true) String area,
                                 @RequestParam(required = true) int level) {
        try {
            JSONArray result = statisticsESService.getSixFiveStatistics(endDate, area, level);
            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) {
@ -533,4 +551,845 @@ public class EsStatisticsController extends BaseController {
            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, "查询失败");
        }
    }
}

+ 39 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/statistic/StatisticsController.java

@ -450,6 +450,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping(value = "/sixfive_statistics")
    @ResponseBody
    @Deprecated
    public String getSixFiveStatistics(@RequestParam(required = false) String startDate,
                                       @RequestParam(required = true) String endDate,
                                       @RequestParam(required = true) String area,
@ -595,6 +596,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping(value = "/sszq_qwrq_info")
    @ResponseBody
    @Deprecated
    public String getSszqAndGwrq(@RequestParam(required = true) String endDate,
                                 @RequestParam(required = true) String area,
                                 @RequestParam(required = true) int level) {
@ -625,6 +627,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/index_all")
    @ResponseBody
    @Deprecated
    public String getIndexAll(@RequestParam(required = true) String endDate,
                              @RequestParam(required = true) String area,
                              @RequestParam(required = true) int level,
@ -674,6 +677,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/Consulting_Stat")
    @ResponseBody
    @Deprecated
    public String getConsultingStatistics(@RequestParam(required = true) Integer level,
                                          @RequestParam(required = true) String area) {
        try {
@ -695,6 +699,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/Consulting_StatList")
    @ResponseBody
    @Deprecated
    public String getConsultingStatisticsList(@RequestParam(required = true) Integer level,
                                              @RequestParam(required = true) String area,
                                              @RequestParam(required = false) String lowlevel,
@ -733,6 +738,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/Consulting_Title")
    @ResponseBody
    @Deprecated
    public String getConsultingTitle(@RequestParam(required = true) Integer level,
                                     @RequestParam(required = true) String area,
                                     @RequestParam(required = false) String year) {
@ -769,6 +775,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getCoutListByTime")
    @ResponseBody
    @Deprecated
    public String getCoutListByTime(
            @RequestParam(required = true) String level,
            @RequestParam(required = true) String area,
@ -796,6 +803,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/bindingRate_stat")
    @ResponseBody
    @Deprecated
    public String getBindingRate() {
        try {
            return write(200, "查询成功", "data", statisticsService.getBindingRate());
@ -814,6 +822,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getAVGSocre")
    @ResponseBody
    @Deprecated
    public String getAVGSocre(@RequestParam(required = true) String level, @RequestParam(required = true) String area) {
        try {
            return write(200, "查询成功", "data", statisticsService.getAVGSocre(level, area));
@ -831,6 +840,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getAVGSocreByMonth")
    @ResponseBody
    @Deprecated
    public String getAVGSocreByMonth(@RequestParam(required = true) String level,
                                     @RequestParam(required = true) String area,
                                     @RequestParam(required = true) String statDate,
@ -850,6 +860,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getStatTitleInfo")
    @ResponseBody
    @Deprecated
    public String getStatTitleInfo(@RequestParam(required = true) String startDate,
                                   @RequestParam(required = true) String endDate) {
        try {
@ -874,6 +885,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getSignCountLineByType")
    @ResponseBody
    @Deprecated
    public String getSignCountLineByType(@RequestParam(required = true) String startDate,
                                         @RequestParam(required = true) String endDate,
                                         @RequestParam(required = true) String signType,
@ -903,6 +915,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getReyStatbyTeam")
    @ResponseBody
    @Deprecated
    public String getReyStatbyTeam(@RequestParam(required = true) String startDate,
                                   @RequestParam(required = true) String endDate,
                                   @RequestParam(required = true) String isNow) {
@ -924,6 +937,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getServiceRankingList")
    @ResponseBody
    @Deprecated
    public String getServiceRankingList(@RequestParam(required = true) String startDate,
                                        @RequestParam(required = true) String endDate) {
        try {
@ -945,6 +959,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getAvgLine")
    @ResponseBody
    @Deprecated
    public String getAvgLine(@RequestParam(required = true) String startDate,
                             @RequestParam(required = true) String endDate,
                             @RequestParam(required = true) String type) {
@ -964,6 +979,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/checkDoctorIsTeamLeder")
    @ResponseBody
    @Deprecated
    public String checkDoctorIsTeamLeder() {
        try {
            return write(200, "查询成功", "data", statisticsService.checkDoctorIsTeamleader(getUID()));
@ -984,6 +1000,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getTeamConsultCount")
    @ResponseBody
    @Deprecated
    public String getTeamConsultCount(@RequestParam(required = true) String teamCode,
                                      @RequestParam(required = true) String startDate,
                                      @RequestParam(required = true) String endDate,
@ -1008,6 +1025,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getTeamDoctorConsultCount")
    @ResponseBody
    @Deprecated
    public String getTeamDoctorConsultCount(@RequestParam(required = true) String teamCode,
                                            @RequestParam(required = true) String startDate,
                                            @RequestParam(required = true) String endDate,
@ -1032,6 +1050,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getMemberConsultList")
    @ResponseBody
    @Deprecated
    public String getMemberConsultList(@RequestParam(required = true) String teamCode,
                                       @RequestParam(required = true) String startDate,
                                       @RequestParam(required = true) String endDate,
@ -1056,6 +1075,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getDoctorConsultTitle")
    @ResponseBody
    @Deprecated
    public String getDoctorConsultTitle(@RequestParam(required = true) String doctor,
                                        @RequestParam(required = true) String teamCode,
                                        @RequestParam(required = true) String startDate,
@ -1079,6 +1099,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getTeamFollowupLine")
    @ResponseBody
    @Deprecated
    public String getTeamFollowupLine(@RequestParam(required = true) String type,
                                      @RequestParam(required = true) String teamCode,
                                      @RequestParam(required = true) String startDate,
@ -1093,6 +1114,7 @@ public class StatisticsController extends BaseController {
    @RequestMapping("/getTeamDoctorFollowupLine")
    @ResponseBody
    @Deprecated
    public String getTeamDoctorFollowupLine(@RequestParam(required = true) String type,
                                            @RequestParam(required = true) String teamCode,
                                            @RequestParam(required = true) String startDate,
@ -1118,6 +1140,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getDoctorTeamFolList")
    @ResponseBody
    @Deprecated
    public String getDoctorTeamFolList(@RequestParam(required = true) String sort,
                                       @RequestParam(required = true) String teamCode,
                                       @RequestParam(required = true) String startDate,
@ -1142,6 +1165,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getTeamDoctorFolTitle")
    @ResponseBody
    @Deprecated
    public String getTeamDoctorFolTitle(@RequestParam(required = true) String teamCode,
                                        @RequestParam(required = true) String doctor,
                                        @RequestParam(required = true) String startDate,
@ -1165,6 +1189,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getTeamResLine")
    @ResponseBody
    @Deprecated
    public String getTeamResLine(@RequestParam(required = true) String teamCode,
                                 @RequestParam(required = true) String type,
                                 @RequestParam(required = true) String startDate,
@ -1189,6 +1214,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getTeamDoctorResLine")
    @ResponseBody
    @Deprecated
    public String getTeamDoctorResLine(@RequestParam(required = true) String teamCode,
                                       @RequestParam(required = true) String type,
                                       @RequestParam(required = true) String startDate,
@ -1214,6 +1240,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getTeamDoctorResList")
    @ResponseBody
    @Deprecated
    public String getTeamDoctorResList(@RequestParam(required = true) String teamCode,
                                       @RequestParam(required = true) String startDate,
                                       @RequestParam(required = true) String endDate,
@ -1238,6 +1265,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getTeamDoctorResTitle")
    @ResponseBody
    @Deprecated
    public String getTeamDoctorResTitle(@RequestParam(required = true) String teamCode,
                                        @RequestParam(required = true) String doctor,
                                        @RequestParam(required = true) String startDate,
@ -1261,6 +1289,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getTeamGuidLine")
    @ResponseBody
    @Deprecated
    public String getTeamGuidLine(@RequestParam(required = true) String teamCode,
                                  @RequestParam(required = true) String startDate,
                                  @RequestParam(required = true) String endDate,
@ -1285,6 +1314,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getTeamDoctorGuidLine")
    @ResponseBody
    @Deprecated
    public String getTeamDoctorGuidLine(@RequestParam(required = true) String teamCode,
                                        @RequestParam(required = true) String startDate,
                                        @RequestParam(required = true) String endDate,
@ -1310,6 +1340,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getTeamGuidList")
    @ResponseBody
    @Deprecated
    public String getTeamGuidList(@RequestParam(required = true) String teamCode,
                                  @RequestParam(required = true) String startDate,
                                  @RequestParam(required = true) String endDate,
@ -1334,6 +1365,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getTeamDoctorGuiTitle")
    @ResponseBody
    @Deprecated
    public String getTeamDoctorGuiTitle(@RequestParam(required = true) String teamCode,
                                        @RequestParam(required = true) String doctor,
                                        @RequestParam(required = true) String startDate,
@ -1357,6 +1389,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getTeamEduLine")
    @ResponseBody
    @Deprecated
    public String getTeamEduLine(@RequestParam(required = true) String teamCode,
                                 @RequestParam(required = true) String startDate,
                                 @RequestParam(required = true) String endDate,
@ -1380,6 +1413,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getTeamDoctorEduLine")
    @ResponseBody
    @Deprecated
    public String getTeamDoctorEduLine(@RequestParam(required = true) String teamCode,
                                       @RequestParam(required = true) String startDate,
                                       @RequestParam(required = true) String endDate,
@ -1405,6 +1439,7 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/getTeamEduList")
    @ResponseBody
    @Deprecated
    public String getTeamEduList(@RequestParam(required = true) String teamCode,
                                 @RequestParam(required = true) String startDate,
                                 @RequestParam(required = true) String endDate,
@ -1420,6 +1455,7 @@ public class StatisticsController extends BaseController {
    @RequestMapping("/getTeamDoctorEduTitle")
    @ResponseBody
    @Deprecated
    public String getTeamDoctorEduTitle(@RequestParam(required = true) String teamCode,
                                        @RequestParam(required = true) String startDate,
                                        @RequestParam(required = true) String endDate,
@ -1434,6 +1470,7 @@ public class StatisticsController extends BaseController {
    @RequestMapping("/getDotorInfo")
    @ResponseBody
    @Deprecated
    public String getDotorInfo(String code) {
        try {
            return write(200, "查询成功", "data", statisticsService.getDoctorInfo(code));
@ -1527,6 +1564,7 @@ public class StatisticsController extends BaseController {
    @RequestMapping("/getTeamRenewChangeLine")
    @ResponseBody
    @Deprecated
    public String getTeamRenewChangeLine(@RequestParam(required = true) String teamCode,
                                         @RequestParam(required = true) String startDate,
                                         @RequestParam(required = true) String endDate,
@ -1586,6 +1624,7 @@ public class StatisticsController extends BaseController {
    @RequestMapping("/cleanDoctorScore")
    @ResponseBody
    @Deprecated
    public String cleanDoctorScore(){
        try{
            return write(200, "清洗完成", "data", statisticsAllService.cleanDoctorScore());