Browse Source

代码修改

liubing 3 years ago
parent
commit
08d506dbe0

+ 3 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/org/BaseOrgEndpoint.java

@ -145,11 +145,13 @@ public class BaseOrgEndpoint extends EnvelopRestEndpoint {
            @RequestParam(value = "codeOrName", required = false) String codeOrName,
            @ApiParam(name = "orgStatus", value = "机构状态")
            @RequestParam(value = "orgStatus", required = false) String orgStatus,
            @ApiParam(name = "orgType", value = "机构类型: 1.等级医院 2.社区医院3.养老机构 4.教育机构")
            @RequestParam(value = "orgType", required = false) String orgType,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        JSONObject result = baseOrgService.queryOrgBaseInfoList(codeOrName, orgStatus,page,size,wechatId);
        JSONObject result = baseOrgService.queryOrgBaseInfoList(codeOrName, orgStatus,orgType,page,size,wechatId);
        return success(result.getJSONArray("msg"),result.getInteger("count"),page,size);
    }

+ 4 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/service/org/BaseOrgService.java

@ -86,7 +86,7 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
     * @param orgStatus
     * @return
     */
    public JSONObject queryOrgBaseInfoList(String codeOrName,String orgStatus,int page,int size,String wechatId) throws Exception {
    public JSONObject queryOrgBaseInfoList(String codeOrName,String orgStatus,String orgType,int page,int size,String wechatId) throws Exception {
        JSONObject result = new JSONObject();
        int start = 0 == page ? page++ : (page - 1) * size;
        int end = 0 == size ? 15 : page * size;
@ -151,6 +151,9 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
                if (!StringUtil.isBlank(orgStatus)){
                    sql+=" and del = '"+orgStatus+"'";
                }
                if (!StringUtil.isBlank(orgType)){
                    sql+=" and type = '"+orgType+"'";
                }
                sql+="  ORDER BY\n" +
                        "\tcreate_time DESC";
                String finalSql = sql;