Bladeren bron

Merge branch 'dev' of zd_123/patient-co-management into dev

chenweida 7 jaren geleden
bovenliggende
commit
f9edbcdfd1

+ 0 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java

@ -5163,7 +5163,6 @@ public class StatisticsService extends BaseService {
    }
    /**
     *
     * @param level
     * @param lowlevel
     * @param area

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

@ -2949,18 +2949,18 @@ public class StatisticsESService {
        List<SaveModel> resultList = new ArrayList<>();
        if (StringUtils.isNotBlank(disease)){
            //类型0.总量,1.进行中,2.已完成,3.居民取消,4.审核不通过,5.其他原因取消
            if("1".equals(type)){
            if("0".equals(type)){
                //总数
                resultList =  elasticsearchUtil.findLineChartDateQuotaLevel1(null,null,area,level,index,"2","3",disease);
                resultList =  elasticsearchUtil.findLineChartDateQuotaLevel1(startTime,endTime,area,level,index,"2","3",disease);
            }else{
                resultList =  elasticsearchUtil.findLineChartDateQuotaLevel2(null,null,area,level,index,"2","3",disease,type);
                resultList =  elasticsearchUtil.findLineChartDateQuotaLevel2(startTime,endTime,area,level,index,"2","3",disease,type);
            }
        }else{
            if("1".equals(type)){
            if("0".equals(type)){
                //总数
                resultList =  elasticsearchUtil.findLineChartDateQuotaLevel0(null,null,area,level,index,"2","3");
                resultList =  elasticsearchUtil.findLineChartDateQuotaLevel0(startTime,endTime,area,level,index,"2","3");
            }else{
                resultList =  elasticsearchUtil.findLineChartDateQuotaLevel1(null,null,area,level,index,"2","3",type);
                resultList =  elasticsearchUtil.findLineChartDateQuotaLevel1(startTime,endTime,area,level,index,"2","3",type);
            }
        }
@ -2969,9 +2969,14 @@ public class StatisticsESService {
            while (iterator.hasNext()){
                SaveModel saveModel = (SaveModel)iterator.next();
                String monthKey = (String)m.get("month");
                String monthKeyEs = DateUtil.changeQuotaDate(saveModel.getQuotaDate());
                if(monthKey.equals(monthKeyEs)){
                String monthKeyEs="";
                if(saveModel.getQuotaDate()!=null){
                   monthKeyEs = DateUtil.changeQuotaDate(saveModel.getQuotaDate());
                }
                if(StringUtils.isNotBlank(monthKeyEs) && monthKey.equals(monthKeyEs)){
                    m.put("count",saveModel.getResult2());
                }else{
                    m.put("count",0);
                }
            }
        }
@ -2995,14 +3000,14 @@ public class StatisticsESService {
        //一级维度
        if (StringUtils.isEmpty(disease)){
            //类型 0.总量,1.已完成,2.居民取消,3.审核不通过,4.进行中,5.其他原因取消
            if("1".equals(type)){
            if("0".equals(type)){
                saveModels = elasticsearchUtil.findListDateQuotaLevel0(quotaDate,area,level,index,"2",lowlevel);
            }else {
                saveModels = elasticsearchUtil.findListDateQuotaLevel1(quotaDate,area,level,index,"2",lowlevel,type);
            }
        }else{
            //类型0.总量,1.进行中,2.已完成,3.居民取消,4.审核不通过,5.其他原因取消
            if("1".equals(type)){
            if("0".equals(type)){
                saveModels = elasticsearchUtil.findListDateQuotaLevel1(quotaDate,area,level,index,"2",lowlevel,disease);
            }else {
                saveModels = elasticsearchUtil.findListDateQuotaLevel2(quotaDate,area,level,index,"2",lowlevel,disease,type);
@ -3203,9 +3208,9 @@ public class StatisticsESService {
        List<SaveModel> resultList = new ArrayList<>();
        if (StringUtils.isNotBlank(disease)){
            resultList =  elasticsearchUtil.findLineChartDateQuotaLevel2(null,null,area,level,"62","2","3",type,disease);
            resultList =  elasticsearchUtil.findLineChartDateQuotaLevel2(startTime,endTime,area,level,"62","2","3",type,disease);
        }else{
            resultList =  elasticsearchUtil.findLineChartDateQuotaLevel1(null,null,area,level,"62","2","3",type);
            resultList =  elasticsearchUtil.findLineChartDateQuotaLevel1(startTime,endTime,area,level,"62","2","3",type);
        }
        for(Map<String,Object> m:rs){

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

@ -1711,12 +1711,12 @@ public class EsStatisticsController extends BaseController {
    @ResponseBody
    @ApiOperation("订单统计-下部列表接口")
    public String getPrescriptionTotalLowLevel(@ApiParam(name="level", value="级别") @RequestParam(required = true)Integer level,
                                               @ApiParam(name="lowlevel", value="第二级别") @RequestParam(required = true)String lowlevel,
                                               @ApiParam(name="lowlevel", value="第二级别") @RequestParam(required = true)int lowlevel,
                                               @ApiParam(name="area", value="界别编码") @RequestParam(required = true)String area,
                                               @ApiParam(name="disease", value="疾病") @RequestParam(required = false)String disease,
                                               @ApiParam(name="type", value="类型0.总量,1.进行中,2.已完成,3.居民取消,4.审核不通过,5.其他原因取消") @RequestParam(required = true)String type){
        try{
            return write(200, "查询成功", "data", statisticsESService.getPrescriptionTotalLowLevel(elasticsearchUtil.changeLevel(level),lowlevel,area,disease,type));
            return write(200, "查询成功", "data", statisticsESService.getPrescriptionTotalLowLevel(elasticsearchUtil.changeLevel(level),String.valueOf(elasticsearchUtil.changeLevel(lowlevel)),area,disease,type));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
@ -1807,17 +1807,17 @@ public class EsStatisticsController extends BaseController {
    @ResponseBody
    @ApiOperation("配送统计-下部条形图")
    public String getPrescriptionDispatchingLowLevel(@ApiParam(name="level", value="级别") @RequestParam(required = true)String level,
                                                     @ApiParam(name="lowlevel", value="第二级别") @RequestParam(required = true)String lowlevel,
                                                     @ApiParam(name="lowlevel", value="第二级别") @RequestParam(required = true)int lowlevel,
                                                     @ApiParam(name="area", value="级别编码") @RequestParam(required = true)String area,
                                                     @ApiParam(name="disease", value="疾病") @RequestParam(required = false)String disease,
                                                     @ApiParam(name="type", value="1.自取,2.快递配送,3.健管师配送") @RequestParam(required = true)String type){
        try{
            return write(200, "查询成功", "data", statisticsESService.getPrescriptionDispatchingLowLevel(elasticsearchUtil.changeLevel(Integer.valueOf(level)),lowlevel,area,disease,type));
            return write(200, "查询成功", "data", statisticsESService.getPrescriptionDispatchingLowLevel(elasticsearchUtil.changeLevel(Integer.valueOf(level)),String.valueOf(elasticsearchUtil.changeLevel(lowlevel)),area,disease,type));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
        }
    }
    /*=================================长处方分析end================================================*/
    /*=================================长处方分析end==============================================*/
}