瀏覽代碼

代码修改

LAPTOP-KB9HII50\70708 1 年之前
父節點
當前提交
8258c719b8

+ 6 - 12
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -7200,13 +7200,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                                                            String diseaseKey, String doctorNameKey,
                                                            String diseaseKey, String doctorNameKey,
                                                            String jobTitleNameKey, String outpatientType,
                                                            String jobTitleNameKey, String outpatientType,
                                                            String keyName, String workingTime, String consultStatus, String chargType, String consutlSort, String isAttention, Integer page, Integer pagesize) {
                                                            String keyName, String workingTime, String consultStatus, String chargType, String consutlSort, String isAttention, Integer page, Integer pagesize) {
      /*  if(page >=1){
            page --;
        if (pagesize <= 0) {
            pagesize = 10;
        }*/
        long statr = new Date().getTime();
        long statr = new Date().getTime();
        String sql = "SELECT " +
        String sql = "SELECT " +
                " d.id AS \"id\", " +
                " d.id AS \"id\", " +
@ -7218,16 +7211,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " d.job_title_name AS \"jobTitleName\"," +
                " d.job_title_name AS \"jobTitleName\"," +
                " d.charge_type AS \"chargeType\"," +
                " d.charge_type AS \"chargeType\"," +
                " h.dept_name AS \"deptName\"," +
                " h.dept_name AS \"deptName\"," +
                " dw.workTotal AS \"workTotal\","+
                " d.consult_status AS \"consultStatus\"," +
                " IFNULL(dw.workTotal,0) AS \"workTotal\","+
                " IFNULL(d.consult_status,0) AS \"consultStatus\"," +
                " d.outpatient_type AS \"outpatientType\"," +
                " d.outpatient_type AS \"outpatientType\"," +
                " a.total AS \"consultTotal\"," +
                " IFNULL(a.total,0) AS \"consultTotal\","+
                " h.org_name AS \"orgName\"," +
                " h.org_name AS \"orgName\"," +
                " h.org_code AS \"orgCode\" " ;
                " h.org_code AS \"orgCode\" " ;
        if(StringUtils.isNoneBlank(patientid)){
        if(StringUtils.isNoneBlank(patientid)){
            sql+=" , follow.id AS \"followid\" " ;
            sql+=" , follow.id AS \"followid\" " ;
        }
        }
        sql += ",evaluate.score as \"score\",a.total as \"total\"";
        sql += ",IFNULL(evaluate.score,0) as \"score\",IFNULL(a.total,0) as \"total\"";
        sql+=" FROM " +
        sql+=" FROM " +
                " base_doctor d " +
                " base_doctor d " +
                " JOIN base_doctor_hospital h ON h.doctor_code = d.id " +
                " JOIN base_doctor_hospital h ON h.doctor_code = d.id " +
@ -7384,7 +7377,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                            "\tD.id DESC,dw.workTotal DESC NULLS LAST";
                            "\tD.id DESC,dw.workTotal DESC NULLS LAST";
                }
                }
            }else {
            }else {
                sql += " and d.del='1' "+groupBy+" order by d.consult_status DESC ,evaluate.score desc,a.total " + consutlSort+"";
                sql += " and d.del='1' "+groupBy+" order by workTotal DESC,consultStatus DESC ,score desc," +
                        "total " + consutlSort+",dhd.saas_id, d.job_title_code desc";
            }
            }
        }
        }