Parcourir la source

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

zd_123 il y a 7 ans
Parent
commit
5e8082ea81

+ 59 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/physicalExamination/PhysicalExamTeamRemindService.java

@ -0,0 +1,59 @@
package com.yihu.wlyy.service.app.physicalExamination;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.patient.PatientTeamRemindRecord;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.patient.PatientTeamRemindRecordDao;
import com.yihu.wlyy.service.BaseService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
 * Created by yeshijie on 2017/10/20.
 */
@Service
public class PhysicalExamTeamRemindService extends BaseService{
    private Logger logger = LoggerFactory.getLogger(PhysicalExamTeamRemindService.class);
    @Autowired
    private PhysicalExaminationRemindService remindService;
    @Autowired
    private DoctorDao doctorDao;
    @Autowired
    private PatientTeamRemindRecordDao patientTeamRemindRecordDao;
    /**
     * 发送批量提醒
     *
     * @param teamCode
     * @param doctor
     */
    public Integer remindPhyExams(Long teamCode, String doctor) {
        List<PatientTeamRemindRecord> records = patientTeamRemindRecordDao.findByAdminTeamCodeAndType(teamCode, 1);
        if (records != null && records.size() > 0) {
            return -1;
        }
        PatientTeamRemindRecord record = new PatientTeamRemindRecord();
        record.setType(1);
        record.setCreateTime(new Date());
        record.setStatus(0);
        record.setAdminTeamCode(teamCode);
        patientTeamRemindRecordDao.save(record);
        Doctor d = doctorDao.findByCode(doctor);
        try {
            remindService.sendBatchNotice(teamCode, d.getName(), record.getId());
        } catch (Exception e) {
            e.printStackTrace();
            logger.error("批量体检提醒失败" + e.getMessage());
        }
        return 0;
    }
}

+ 75 - 118
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/physicalExamination/PhysicalExaminationRemindService.java

@ -22,14 +22,12 @@ import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.*;
/**
@ -65,49 +63,22 @@ public class PhysicalExaminationRemindService extends BaseService {
    /**
     * 单个提醒居民按钮
     *
     * @param patient
     * @param doctor
     */
    public Integer singleRemindPhyExam(String patient,String doctor){
        List<PatientRemindRecords> records = patientRemindRecordsDao.findByPatientAndType(patient,1);
        if(records!=null&&records.size()>0){
    public Integer singleRemindPhyExam(String patient, String doctor) {
        List<PatientRemindRecords> records = patientRemindRecordsDao.findByPatientAndType(patient, 1);
        if (records != null && records.size() > 0) {
            return -1;
        }
        Doctor d = doctorDao.findByCode(doctor);
        try{
            sendSingleNotice(patient,d.getName());
        }catch (Exception e){
        try {
            sendSingleNotice(patient, d.getName());
        } catch (Exception e) {
            e.printStackTrace();
            logger.error("体检提醒失败"+e.getMessage());
        }
        return 0;
    }
    /**
     * 单个提醒居民按钮
     * @param teamCode
     * @param doctor
     */
    public Integer remindPhyExams(Long teamCode,String doctor){
        List<PatientTeamRemindRecord> records = patientTeamRemindRecordDao.findByAdminTeamCodeAndType(teamCode,1);
        if(records!=null&&records.size()>0){
            return -1;
        }
        PatientTeamRemindRecord record = new PatientTeamRemindRecord();
        record.setType(1);
        record.setCreateTime(new Date());
        record.setStatus(0);
        record.setAdminTeamCode(teamCode);
        patientTeamRemindRecordDao.save(record);
        Doctor d = doctorDao.findByCode(doctor);
        try{
            sendBatchNotice(teamCode,d.getName(),record.getId());
        }catch (Exception e){
            e.printStackTrace();
            logger.error("批量体检提醒失败"+e.getMessage());
            logger.error("体检提醒失败" + e.getMessage());
        }
        return 0;
@ -115,10 +86,11 @@ public class PhysicalExaminationRemindService extends BaseService {
    /**
     * 健康体检 是否显示批量提醒按钮
     *
     * @param teamCode
     * @return
     */
    public Integer isShowRemindBtns(long teamCode){
    public Integer isShowRemindBtns(long teamCode) {
        Integer re = 0;
        List<Map<String, Object>> signList = new ArrayList<>();
        String sql = "";
@ -137,10 +109,10 @@ public class PhysicalExaminationRemindService extends BaseService {
                "           from wlyy_sign_family s," +
                "                wlyy_old_people_physical_examination o" +
                "           WHERE s.admin_team_code=? and s.`status`>0 and s.idcard = o.id_card " +
                "                 and o.medical_time>?)"+
                "                 and o.medical_time>?)" +
                " order by t1.openid desc,convert(t1.name using gbk) ";
        args = new Object[]{teamCode,teamCode,DateUtil.getLastYear()};
        args = new Object[]{teamCode, teamCode, DateUtil.getLastYear()};
        signList = jdbcTemplate.queryForList(sql, args);
        if (signList != null && signList.size() > 0) {
            for (Map<String, Object> sign : signList) {
@ -148,13 +120,13 @@ public class PhysicalExaminationRemindService extends BaseService {
                if (StringUtils.isEmpty(patient)) {
                    continue;
                }
                List<PatientRemindRecords> records = patientRemindRecordsDao.findByPatientAndType(patient,1);
                if(records==null||records.size()==0){
                List<PatientRemindRecords> records = patientRemindRecordsDao.findByPatientAndType(patient, 1);
                if (records == null || records.size() == 0) {
                    re = 1;
                    break;
                }
            }
        }else{
        } else {
            re = 1;
        }
        return re;
@ -162,6 +134,7 @@ public class PhysicalExaminationRemindService extends BaseService {
    /**
     * 获取65岁以上老年人1年内无体检记录列表
     *
     * @param teamCode
     * @param page
     * @param pagesize
@ -172,7 +145,7 @@ public class PhysicalExaminationRemindService extends BaseService {
        Map<String, JSONObject> result = new TreeMap<>();
        List<Map<String, Object>> signList = new ArrayList<>();
        Map<String,Object> patientDeviceTypeMap = new HashMap<>();//用于存储患者设备绑定情况
        Map<String, Object> patientDeviceTypeMap = new HashMap<>();//用于存储患者设备绑定情况
        int start = page * pagesize;
        String sql = "";
        Object[] args = null;
@ -191,23 +164,23 @@ public class PhysicalExaminationRemindService extends BaseService {
                "           from wlyy_sign_family s," +
                "                wlyy_old_people_physical_examination o" +
                "           WHERE s.admin_team_code=? and s.`status`>0 and s.idcard = o.id_card " +
                "                 and o.medical_time>?)"+
                "                 and o.medical_time>?)" +
                " order by t1.openid desc,convert(t1.name using gbk) ";
        args = new Object[]{teamCode,teamCode,DateUtil.getLastYear()};
        args = new Object[]{teamCode, teamCode, DateUtil.getLastYear()};
        sql = sql + " limit " + start + "," + pagesize;
        signList = jdbcTemplate.queryForList(sql, args);
        //查询患者设备绑定情况
        String _pdsql = "select user,sum(category_code) deviceType FROM wlyy_patient_device GROUP BY user";
        List<Map<String,Object>> patientCodeDeviceTypes =  jdbcTemplate.queryForList(_pdsql);
        List<Map<String, Object>> patientCodeDeviceTypes = jdbcTemplate.queryForList(_pdsql);
        if(!patientCodeDeviceTypes.isEmpty()){
            for (Map<String,Object> patientCodeDeviceType : patientCodeDeviceTypes) {
        if (!patientCodeDeviceTypes.isEmpty()) {
            for (Map<String, Object> patientCodeDeviceType : patientCodeDeviceTypes) {
                String user = String.valueOf(patientCodeDeviceType.get("user"));
                String sum = String.valueOf(patientCodeDeviceType.get("deviceType"));
                patientDeviceTypeMap.put(user,sum);
                patientDeviceTypeMap.put(user, sum);
            }
        }
@ -273,17 +246,17 @@ public class PhysicalExaminationRemindService extends BaseService {
                }
                //病情类型:0健康,1高血压,2糖尿病,3高血压+糖尿病
                json.put("disease",p.getDisease());
                json.put("disease", p.getDisease());
                // 病情:0绿标,1黄标,2红标,
                json.put("diseaseCondition",p.getDiseaseCondition());
                json.put("diseaseCondition", p.getDiseaseCondition());
                //预警状态
                json.put("standardStatus",p.getStandardStatus());
                json.put("standardStatus", p.getStandardStatus());
                //设备状态:0未绑定,1血糖仪,2血压仪,3血糖仪+血压仪
                String deviceType = "";
                if(!patientDeviceTypeMap.isEmpty() && patientDeviceTypeMap.keySet().contains(p.getCode())){
                if (!patientDeviceTypeMap.isEmpty() && patientDeviceTypeMap.keySet().contains(p.getCode())) {
                    deviceType = (String) patientDeviceTypeMap.get(p.getCode());
                }
                json.put("deviceType",deviceType);
                json.put("deviceType", deviceType);
                boolean epTime = false;
@ -298,10 +271,10 @@ public class PhysicalExaminationRemindService extends BaseService {
                    json.put("wechatFocusRemind", 1);
                }
                // 7天提醒标志
                List<PatientRemindRecords> records = patientRemindRecordsDao.findByPatientAndType(p.getCode(),1);
                if(records!=null&&records.size()>0){
                List<PatientRemindRecords> records = patientRemindRecordsDao.findByPatientAndType(p.getCode(), 1);
                if (records != null && records.size() > 0) {
                    json.put("physicalExamRemind", 1);//7天内已提醒
                }else {
                } else {
                    json.put("physicalExamRemind", 0);
                }
@ -380,8 +353,8 @@ public class PhysicalExaminationRemindService extends BaseService {
            }
        }
//        微信发送失败发送短信
        if (flag&&StringUtils.isNotEmpty(mobile)){
            smsService.sendMsg(mobile,"您的家庭医生" + doctName + "提醒,您可以到签约社区进行免费的健康体检啦~");
        if (flag && StringUtils.isNotEmpty(mobile)) {
            smsService.sendMsg(mobile, "您的家庭医生" + doctName + "提醒,您可以到签约社区进行免费的健康体检啦~");
        }
        //保存发送提醒
@ -397,14 +370,15 @@ public class PhysicalExaminationRemindService extends BaseService {
    /**
     * 发送批量提醒
     *
     * @param teamId 团队ID
     * @param teamId   团队ID
     * @param doctName 医生姓名
     * @return
     */
    @Async
    public void sendBatchNotice(long teamId, String doctName,Long remindId) throws Exception {
    public void sendBatchNotice(long teamId, String doctName, Long remindId) throws Exception {
        SimpleDateFormat format = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
        String accessToken = accessTokenUtils.getAccessToken();
        Boolean flag = true;
        // 推送消息给微信端
        JSONObject json = new org.json.JSONObject();
        json.put("first", "您的家庭医生" + doctName + "提醒,您可以到签约社区进行免费的健康体检啦~");
@ -413,63 +387,46 @@ public class PhysicalExaminationRemindService extends BaseService {
        json.put("url", "");
        json.put("remark", "为了您和您的家庭医生了解您近期的健康状况,请及时到您签约的社区体检哟~");
        String sql = "SELECT DISTINCT " +
                " t1.* " +
                " FROM" +
                " wlyy_sign_family t1 " +
                " WHERE " +
                " t1. STATUS > 0 " +
                " AND t1.admin_team_code = 485 " +
                " AND ( " +
                " YEAR (curdate()) - " +
                " IF ( " +
                " length(idcard) = 18, " +
                " substring(idcard, 7, 4), " +
                " IF ( " +
                " length(idcard) = 15, " +
                " concat('19', substring(idcard, 7, 2)), " +
                " NULL " +
                " ) " +
                " ) " +
                " ) > 65 " +
                " AND t1.idcard NOT IN ( " +
                " SELECT DISTINCT " +
                " s.idcard " +
                " FROM " +
                " wlyy_sign_family s, " +
                " wlyy_old_people_physical_examination o " +
                " WHERE " +
                " s.admin_team_code =485 " +
                " AND s.`status` > 0 " +
                " AND s.idcard = o.id_card " +
                " AND o.medical_time >'2016-10-19 15:12:11' " +
                " )" +
                " ORDER BY " +
                " t1.openid DESC, " +
                " CONVERT (t1. NAME USING gbk)";
        List<Patient>patients = patientDao.findExaminationRemind(485,new Date());
        Patient patient = patientDao.findByCode("");
        if (StringUtils.isNotBlank(patient.getOpenid())) {
            pushMsgTask.putWxMsg(accessToken, 11, patient.getOpenid(), patient.getName(), json);
        }
        //发送代理人
        JSONArray jsonArray = openIdUtils.getAgentOpenId(patient.getCode(), patient.getOpenid());
        if (jsonArray != null && jsonArray.length() > 0) {
            for (int i = 0; i < jsonArray.length(); i++) {
                org.json.JSONObject j = jsonArray.getJSONObject(i);
                Patient member = (Patient) j.get("member");
                json.remove("toUser");
                json.put("toUser", member.getCode());
                json.remove("first");
                try {
                    json.put("first", openIdUtils.getTitleMes(patient, j.isNull("relation") ? 1 : j.getInt("relation"), patient.getName()));
                } catch (Exception e) {
                    e.printStackTrace();
                }
                if (StringUtils.isNotBlank(member.getOpenid())) {
                    pushMsgTask.putWxMsg(accessToken, 11, member.getOpenid(), patient.getName(), json);
        List<Patient> patients = patientDao.findExaminationRemind(teamId, new Date());
        for (Patient patient : patients) {
            String mobile = patient.getMobile();
            if (StringUtils.isNotBlank(patient.getOpenid())) {
                pushMsgTask.putWxMsg(accessToken, 11, patient.getOpenid(), patient.getName(), json);
                flag = false;
            }
            //发送代理人
            JSONArray jsonArray = openIdUtils.getAgentOpenId(patient.getCode(), patient.getOpenid());
            if (jsonArray != null && jsonArray.length() > 0) {
                for (int i = 0; i < jsonArray.length(); i++) {
                    org.json.JSONObject j = jsonArray.getJSONObject(i);
                    Patient member = (Patient) j.get("member");
                    json.remove("toUser");
                    json.put("toUser", member.getCode());
                    json.remove("first");
                    try {
                        json.put("first", openIdUtils.getTitleMes(patient, j.isNull("relation") ? 1 : j.getInt("relation"), patient.getName()));
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                    if (StringUtils.isNotBlank(member.getOpenid())) {
                        pushMsgTask.putWxMsg(accessToken, 11, member.getOpenid(), patient.getName(), json);
                        flag = false;
                    }
                }
            }
            //        微信发送失败发送短信
            if (flag && StringUtils.isNotEmpty(mobile)) {
                smsService.sendMsg(mobile, "您的家庭医生" + doctName + "提醒,您可以到签约社区进行免费的健康体检啦~");
            }
            flag = true;
            //保存发送提醒
            PatientRemindRecords patientRemindRecord = new PatientRemindRecords();
            patientRemindRecord.setCode(getCode());
            patientRemindRecord.setCreateTime(new Date());
            patientRemindRecord.setPatientCode(patient.getCode());
            patientRemindRecord.setRemindTime(new Date());
            patientRemindRecord.setType(1);
            patientRemindRecordsDao.save(patientRemindRecord);
        }
        //更新提醒状态

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

@ -321,15 +321,15 @@ public class StatisticsESService {
                map.put("code",saveModel.getTeam());
                map.put("name",saveModel.getCityName());
            }
            map.put("amount",saveModel.getResult2());
            map.put("amount",Long.parseLong(saveModel.getResult2()+""));
            map.put("rate",df.format((saveModel.getResult2() * 1.0000) / populationBase.getNum() * 100));
            map.put("rateString",saveModel.getResult2()+"/"+populationBase.getNum());
            resultList.add(map);
        }
        Collections.sort(resultList, new Comparator<Map<String, Object>>() {
            public int compare(Map<String, Object> o1, Map<String, Object> o2) {
                int map1value = (int) o1.get("amount");
                int map2value = (int) o2.get("amount");
                long map1value = (long) o1.get("amount");
                long map2value = (long) o2.get("amount");
                if (map1value - map2value > 0) {
                    return sort == 1 ? -1 : 1;
@ -359,7 +359,7 @@ public class StatisticsESService {
            Map<String, Object> map = new HashMap<>();
            map.put("code",saveModel.getSlaveKey1());
            map.put("name",saveModel.getSlaveKey1Name());
            map.put("amount", saveModel.getResult2());
            map.put("amount",Long.parseLong(saveModel.getResult2()+""));
            if (index.equals("7")) {
                // 分组指标总数算法
                String code = saveModel.getSlaveKey2();
@ -382,8 +382,8 @@ public class StatisticsESService {
                //获取最新的统计时间
                String updateTime = elasticsearchUtil.getQuotaTime();
                //如果是查询36的指标 那么除数是签约总数
                SaveModel saveModel = elasticsearchUtil.findOneDateQuotaLevel0(updateTime,area,level,index,"2");
                Integer num = saveModel.getResult2();
                SaveModel saveModel = elasticsearchUtil.findOneDateQuotaLevel0(updateTime,area,level,"1","2");
                Long num = Long.parseLong(saveModel.getResult2()+"");
                for (Map<String, Object> map:resultList) {
                    double rateG = (total > 0 ? ((long) map.get("amount")) * 1.0000 / num * 100 : 0);
                    map.put("rate", df.format(rateG));
@ -391,9 +391,9 @@ public class StatisticsESService {
                }
            }else{
                for (Map<String, Object> map:resultList) {
                    double rateG = (total > 0 ? ((int) map.get("amount")) * 1.0000 / total * 100 : 0);
                    double rateG = (total > 0 ? ((long) map.get("amount")) * 1.0000 / total * 100 : 0);
                    map.put("rate", df.format(rateG));
                    map.put("rateString", ((int) map.get("amount")) + "/" + total);
                    map.put("rateString", ((long) map.get("amount")) + "/" + total);
                }
            }
        }
@ -1487,7 +1487,7 @@ public class StatisticsESService {
        if (esModelList != null && esModelList.size() > 0) {
            for (SaveModel one : esModelList) {
                Map<String, Object> maps = new HashMap<String, Object>();
                maps.put("amount", one.getResult1());
                maps.put("amount", Long.parseLong(one.getResult2()+""));
                if (low_level.equals("3")) {
                    maps.put("code", one.getTown());
                    maps.put("name", one.getTownName());
@ -1512,7 +1512,7 @@ public class StatisticsESService {
                        Map<String, Object> obj = new HashMap<>();
                        obj.put("code", town.getCode());
                        obj.put("name", town.getName());
                        obj.put("amount", "0");
                        obj.put("amount", 0L);
                        obj.put("rate", Double.valueOf("0.0000"));
                        resultList.add(obj);
                    }
@ -1534,7 +1534,7 @@ public class StatisticsESService {
                            Map<String, Object> obj = new HashMap<>();
                            obj.put("code", hos.getCode());
                            obj.put("name", hos.getName());
                            obj.put("amount", "0");
                            obj.put("amount", 0L);
                            resultList.add(obj);
                        }
                    }
@ -1560,7 +1560,7 @@ public class StatisticsESService {
                            Map<String, Object> obj = new HashMap<>();
                            obj.put("code", String.valueOf(team.getId()));
                            obj.put("name", team.getName());
                            obj.put("amount", "0");
                            obj.put("amount", 0L);
                            resultList.add(obj);
                        }
                    }
@ -1572,8 +1572,8 @@ public class StatisticsESService {
            Collections.sort(resultList, new Comparator<Map<String, Object>>() {
                public int compare(Map<String, Object> o1, Map<String, Object> o2) {
                    long map1value = (long) o1.get("amount");
                    long map2value = (long) o2.get("amount");
                    Long map1value = (Long) o1.get("amount");
                    Long map2value = (Long) o2.get("amount");
                    if (map1value - map2value > 0) {
                        return sort == 1 ? -1 : 1;

+ 16 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/PyhsicExamRemindController.java

@ -1,5 +1,6 @@
package com.yihu.wlyy.web.doctor.patient;
import com.yihu.wlyy.service.app.physicalExamination.PhysicalExamTeamRemindService;
import com.yihu.wlyy.service.app.physicalExamination.PhysicalExaminationRemindService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
@ -16,12 +17,14 @@ import org.springframework.web.bind.annotation.RestController;
 * Created by yeshijie on 2017/10/20.
 */
@RestController
@RequestMapping(value = "/doctor/patient_label_info", method = {RequestMethod.GET, RequestMethod.POST})
@Api(description = "居民标签管理")
@RequestMapping(value = "/doctor/patient_label_info")
@Api(description = "老年人健康体检提醒")
public class PyhsicExamRemindController extends BaseController{
    @Autowired
    private PhysicalExaminationRemindService physicalExaminationRemindService;
    @Autowired
    private PhysicalExamTeamRemindService physicalExamTeamRemindService;
    @RequestMapping(value = "getOldPatientByTeamCode", method = RequestMethod.GET)
@ -45,7 +48,7 @@ public class PyhsicExamRemindController extends BaseController{
    @RequestMapping(value = "isShowRemindBtns", method = RequestMethod.GET)
    @ApiOperation("是否显示批量提醒按钮")
    public String isShowRemindBtns(@ApiParam(name = "adminTeamCode", value = "行政团队编码", defaultValue = "644")
    public String isShowRemindBtns(@ApiParam(name = "adminTeamCode", value = "行政团队编码", defaultValue = "485")
                                   @RequestParam(value = "adminTeamCode", required = true) Long adminTeamCode){
        try {
            Integer re = physicalExaminationRemindService.isShowRemindBtns(adminTeamCode);
@ -61,7 +64,11 @@ public class PyhsicExamRemindController extends BaseController{
    public String singleRemindPhyExam(@ApiParam(name = "patient", value = "居民code", defaultValue = "644")
                                      @RequestParam(value = "patient", required = true) String patient){
        try {
            physicalExaminationRemindService.singleRemindPhyExam(patient,getUID());
            Integer re = physicalExaminationRemindService.singleRemindPhyExam(patient,getUID());
//            Integer re = physicalExaminationRemindService.singleRemindPhyExam(patient,"3782f16386f211e6b394fa163e424525");
            if(re==-1){
                return error(-1, "7天内已提醒过该居民,请不要重复提醒");
            }
            return success("提醒成功");
        } catch (Exception e) {
            e.printStackTrace();
@ -74,7 +81,11 @@ public class PyhsicExamRemindController extends BaseController{
    public String remindPhyExams(@ApiParam(name = "adminTeamCode", value = "行政团队编码", defaultValue = "644")
                                 @RequestParam(value = "adminTeamCode", required = true) Long adminTeamCode){
        try {
            physicalExaminationRemindService.remindPhyExams(adminTeamCode,getUID());
          Integer re =  physicalExamTeamRemindService.remindPhyExams(adminTeamCode,getUID());
//            Integer re = physicalExamTeamRemindService.remindPhyExams(adminTeamCode,"3782f16386f211e6b394fa163e424525");
            if(re==-1){
                return error(-1, "正在发送提醒,请不要重复操作");
            }
            return success("提醒成功");
        } catch (Exception e) {
            e.printStackTrace();

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/statistic/EsStatisticsController.java

@ -197,6 +197,7 @@ public class EsStatisticsController extends BaseController {
                                        @RequestParam(required = false) String level2_type,
                                        @RequestParam(required = false) String year) {
        try {
            lowLevel = String.valueOf(StringUtils.isEmpty(lowLevel) ? (level - 1) : lowLevel);
            //新版与旧版统计适配
            level = elasticsearchUtil.changeLevel(level);
            if(StringUtils.isNotEmpty(lowLevel)){
@ -237,6 +238,7 @@ public class EsStatisticsController extends BaseController {
                                            @RequestParam(required = false) String lowLevel,
                                            @RequestParam(required = false) String year) {
        try {
            lowLevel = String.valueOf(StringUtils.isEmpty(lowLevel) ? (level - 1) : lowLevel);
            //新版与旧版统计适配
            level = elasticsearchUtil.changeLevel(level);
            if(StringUtils.isNotEmpty(lowLevel)){