Browse Source

Merge branch 'dev' of zengmengkang/wlyy2.0 into dev

wangzhinan 5 years ago
parent
commit
7c3de97079

+ 9 - 1
business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorService.java

@ -42,7 +42,7 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
     * @param page
     * @param pageSize
     */
    public Envelop queryList(String city, String hospital, String status, String name, int page, int pageSize){
    public Envelop queryList(String city, String hospital, String status, String name, String type, int page, int pageSize){
        Map<String,Object> params = new HashedMap();
        String sqlTotal ="SELECT " +
                " COUNT(1) AS \"total\" " +
@ -70,6 +70,11 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
            sqlTotal += " AND (a.name like:name or b.dept_name like:name)";
            params.put("name",name);
        }
        if (StringUtils.isNotBlank(type)){
            type = "%"+type+"%";
            sqlTotal += " AND a.outpatient_type like:type";
            params.put("type",type);
        }
        sqlTotal += " AND e.dept_type_code =:typeCode";
        params.put("typeCode",6);
        Long count = 0L;
@ -105,6 +110,9 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
        if (StringUtils.isNotBlank(name)){
            sql += " AND (a.name like:name or b.dept_name like:name)";
        }
        if (StringUtils.isNotBlank(type)){
            sql += " AND a.outpatient_type like:type";
        }
        sql += " AND e.dept_type_code =:typeCode";
        List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql,params,page,pageSize);

+ 4 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/config/DoctorServiceEndPoint.java

@ -39,14 +39,16 @@ public class DoctorServiceEndPoint extends EnvelopRestEndpoint {
            @RequestParam(value = "hospital", required = false) String hospital,
            @ApiParam(name = "status", value = "状态")
            @RequestParam(value = "status", required = false) String status,
            @ApiParam(name = "name", value = "科室或病种名称")
            @ApiParam(name = "name", value = "科室或医生名称")
            @RequestParam(value = "name", required = false) String name,
            @ApiParam(name = "type", value = "咨询类型")
            @RequestParam(value = "type", required = false) String type,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "pageSize", value = "页码", required = true, defaultValue = "10")
            @RequestParam(value = "pageSize") int pageSize) throws Exception {
        return baseDoctorService.queryList(city,hospital,status,name,page,pageSize);
        return baseDoctorService.queryList(city,hospital,status,name,type,page,pageSize);
    }