Explorar el Código

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/PatientRehabilitationPlanDO.java
wangzhinan hace 5 años
padre
commit
cb2b9d37c1

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

@ -70,10 +70,12 @@ public class BaseEvaluateScoreService extends BaseJpaService<BaseEvaluateScoreDO
     * @return
     */
    private Double getAvgScore(String startTime,String endTime,String area,int level){
        String sql = "select count(*) as total, sum(score) as score from base.base_evaluate_score o where";
        String sql = "select count(*) as total, sum(score) as score from base.base_evaluate_score o where ";
        if (level == 4){
            sql += " o.doctor IN (SELECT doctor_code FROM `base_doctor_hospital` dh where dh.org_code ='"+area+"' and dh.del=1)";
        }if (level==2){
            sql += " 1=1 ";
        }else if (level == 5){
            sql += " o.doctor IN (SELECT doctor_code FROM `base_doctor_hospital` dh where dh.dept_code ='"+area+"' and dh.del=1)";
        }else if (level == 6){

+ 16 - 1
business/es-service/src/main/java/com/yihu/jw/es/service/StatisticsEsService.java

@ -122,6 +122,8 @@ public class StatisticsEsService {
        String sql = "select count(*) as total from base.wlyy_consult_oupatient_info o where  o.create_time >='"+startTime+"' and o.create_time <='"+endTime+"'";
        if (level==4){
            sql += " and o.doctor IN (SELECT doctor_code FROM `base_doctor_hospital` dh where dh.org_code ='"+area+"' and dh.del=1)";
        }if (level==2){
            sql += " 1=1 ";
        }else if (level==5){
            sql += " and o.doctor IN (SELECT doctor_code FROM `base_doctor_hospital` dh where dh.dept_code ='"+area+"' and dh.del=1)";
        }else if (level==6){
@ -2659,11 +2661,24 @@ public class StatisticsEsService {
            resultMaps.add(rs);
        }
        //根据为回复数排序
        Collections.sort(resultMaps, new Comparator<Map<String, Object>>() {
       /* Collections.sort(resultMaps, new Comparator<Map<String, Object>>() {
            public int compare(Map<String, Object> o1, Map<String, Object> o2) {
                return (Double) o1.get("total") < (Double) o2.get("total") ? 1 : ((Double) o1.get("total") == (Double) o2.get("total") ? 0 : -1);
            }
        });*/
        Collections.sort(resultMaps, new Comparator<Map<String,Object>>() {
            @Override
            public int compare(Map<String,Object> o1, Map<String,Object> o2) {
                Double total1 = (Double) o1.get("total");
                Double total2 = (Double) o2.get("total");
                if (total1 - total2 > 0) {
                    return -1;
                } else if (total1 - total2 < 0) {
                    return 1;
                }
                return 0;
            }
        });
        result1.put("resultList", resultMaps);
        return result1;