|
@ -88,6 +88,8 @@ import com.yihu.jw.wechat.enterprise.EnterpriseService;
|
|
|
import com.yihu.jw.wechat.service.BaseSensitiveFilterWordsService;
|
|
|
import com.yihu.jw.wechat.service.WxAccessTokenService;
|
|
|
import com.yihu.mysql.query.BaseJpaService;
|
|
|
import com.yihu.utils.network.HttpResponse;
|
|
|
import com.yihu.utils.network.HttpUtils;
|
|
|
import com.yihu.utils.security.MD5;
|
|
|
import com.ylzinfo.ehc.EhcHandler;
|
|
|
import com.ylzinfo.ehc.common.utils.DateUtils;
|
|
@ -4721,6 +4723,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
" d.job_title_name AS \"jobTitleName\"," +
|
|
|
" d.charge_type AS \"chargeType\"," +
|
|
|
" h.dept_name AS \"deptName\"," +
|
|
|
" dw.workTotal AS \"workTotal\","+
|
|
|
" d.consult_status AS \"consultStatus\"," +
|
|
|
" d.outpatient_type AS \"outpatientType\"," +
|
|
|
" a.total AS \"consultTotal\"," +
|
|
@ -4847,9 +4850,18 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
|
|
|
}
|
|
|
|
|
|
sql += " and d.del='1' order by dw.workTotal desc,d.consult_status DESC,a.total " + consutlSort;
|
|
|
sql += " and d.del='1' order by dw.workTotal desc nulls last,d.consult_status DESC nulls last,a.total " + consutlSort;
|
|
|
String sqlCount = "select count(1) as \"total\" from ( "+sql+" ) t";
|
|
|
List<Map<String, Object>> list = hibenateUtils.createSQLQuery(sql, params, page, pagesize);
|
|
|
/*list.stream().forEach(e->{
|
|
|
if (null==e.get("consultStatus")){
|
|
|
e.put("consultStatus",0);
|
|
|
}
|
|
|
if (null==e.get("workTotal")){
|
|
|
e.put("workTotal",0);
|
|
|
}
|
|
|
});
|
|
|
list.stream().sorted(Comparator.comparing((Map<String, Object> h) -> ((String) h.get("workTotal"))).reversed().thenComparing(Comparator.comparing((Map<String, Object> h) -> ((String) h.get("consultStatus")))).reversed());*/
|
|
|
for (Map<String,Object> map:list){
|
|
|
String doctor = map.get("id").toString();
|
|
|
//查询医生各项评价平均分
|