Kaynağa Gözat

开方量统计图

mengkang 5 yıl önce
ebeveyn
işleme
832ef3a01a

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/evaluate/score/service/BaseEvaluateScoreService.java

@ -142,7 +142,7 @@ public class BaseEvaluateScoreService extends BaseJpaService<BaseEvaluateScoreDO
     * @param num2
     * @return
     */
    private String getPercentage(float num1,float num2){
    public String getPercentage(float num1,float num2){
        //创建一个数值格式化对象
        NumberFormat format = NumberFormat.getInstance();
        //设置精确到小数点后两位

+ 25 - 0
business/es-service/src/main/java/com/yihu/jw/es/service/StatisticsEsService.java

@ -78,6 +78,8 @@ public class StatisticsEsService {
        JSONObject object = new JSONObject();
        object.put("outPatientCount",saveModel.getResult2().longValue());//问诊量
        object.put("prescriptionCount",saveModel1.getResult2().longValue());//开方量
        String prescriptionRate = baseEvaluateScoreService.getPercentage(saveModel1.getResult2().floatValue(), saveModel.getResult2().floatValue());
        object.put("prescriptionRate",prescriptionRate);//开方率
        String startTime = DateUtil.getStringDateShort()+" 00:00:00";
        String endTime = DateUtil.getStringDateShort() +" 23:59:59";
        String sql = "select count(*) as total from base.wlyy_outpatient o where o.status=2 and o.create_time >='"+startTime+"' and o.create_time <='"+endTime+"'";
@ -218,6 +220,29 @@ public class StatisticsEsService {
        return object;
    }
    /**
     * 开方量按日期柱状图
     *
     *
     * @param startDate
     * @param endDate
     * @param area
     * @param level
     * @param index
     * @param level2_type
     * @return
     * @throws Exception
     */
    public JSONObject getPrescriptionLine(String startDate, String endDate, String area, int level, String index,int interval, String level2_type) throws Exception {
        JSONObject object = new JSONObject();
        //开方量增量曲线
        JSONArray array = dateTotalStatistics2(startDate,endDate,area,level,index,null,SaveModel.timeLevel_ZL,null);
        object.put("prescriptionLine",array);
        return object;
    }
    /**
     *
     * 门诊圆形图

+ 1 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -633,6 +633,7 @@ public class BaseHospitalRequestMapping {
        public static final String total = "/total";
        public static final String outPatientLine="/outPatientLine";
        public static final String prescriptionLine="/prescriptionLine";
        public static final String outPatientCircular="/outPatientCircular";
        public static final String outPatientGrade = "/outPatientGrade";
        public static final String outPatientTypeLine= "/outPatientTypeLine";

+ 34 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/statistics/EsStatisticsEndpoint.java

@ -66,6 +66,40 @@ public class EsStatisticsEndpoint extends EnvelopRestEndpoint {
        return success(result);
    }
    /**
     *
     * @param startDate
     * @param endDate
     * @param area
     * @param level 5 市  4区  3医院 2科室 1医生
     * @param index
     * @param level2_type 2 市  3区  4医院 5、科室 6医生
     * @return
     */
    @GetMapping(value = BaseHospitalRequestMapping.Statistics.prescriptionLine)
    @ApiOperation(value = "开方量周统计-曲线")
    public ObjEnvelop getPrescriptionLine(
            @RequestParam(required = true) String startDate,
            @RequestParam(required = true) String endDate,
            @RequestParam(required = true) String area,
            @RequestParam(required = true) int level,
            @RequestParam(required = true) String index,
            @RequestParam(required = false)int interval,
            @RequestParam(required = false) String level2_type) {
        //新版与旧版统计适配
        level = elasticsearchUtil.changeLevel(level);
        JSONObject result = new JSONObject();
        try {
            result= statisticsEsService.getPrescriptionLine(startDate, endDate, area, level, index, interval,level2_type);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return success(result);
    }
    @GetMapping(value = BaseHospitalRequestMapping.Statistics.total)
    @ApiOperation(value = " 查询总数")
    public ObjEnvelop getIndexTotal(