Browse Source

Merge branch 'luofenqiang' of luofenqiang/wlyy2.0 into medicare

wangzhinan 3 years ago
parent
commit
c668f196bc

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/a4endpoint/MedicineDrugsEndpoint.java

@ -131,7 +131,7 @@ public class MedicineDrugsEndpoint extends EnvelopRestEndpoint {
        if (jsonObject.getString("response").equalsIgnoreCase(ConstantUtils.FAIL)) {
            return failed(jsonObject.getString("msg"));
        }
        return success(jsonObject.getJSONArray("msg"));
        return success(jsonObject.getJSONArray("msg"),jsonObject.getInteger("count"),page,size);
    }
    @GetMapping(value = BaseRequestMapping.BaseDrug.getDrugDetailListById)

+ 8 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/a3service/MedicineDrugsService.java

@ -418,6 +418,14 @@ public class MedicineDrugsService extends BaseJpaService<Mediicinedrugs, Mediici
            conditionSql += " AND CONCAT(IFNULL(t.drug_name,''),IFNULL(t.drug_code,''),IFNULL(t.drug_name_alies,''),IFNULL(lower(t.spell_code),'')) LIKE '%" + content.toLowerCase() + "%'";
        }
//      List<Mediicinedrugs> mediicinedrugs = drugsDao.findMediicinedrugsByOrgCode(mediicinedevice.getBelongCommunity());
        String countSql = " select " +
                "     COUNT(DISTINCT (t.id)) as count " +
                "   from " +
                "     t_mediicine_drugs t "+
                conditionSql;
        Logger.getAnonymousLogger().info("finalCountSql="+countSql);
        int count = jdbcTemplate.queryForObject(countSql,Integer.class);
        result.put("count", count);
        result.put("msg", hibenateUtils.createSQLQuery((sql+conditionSql),page,size));
        result.put("response", ConstantUtils.SUCCESS);
        return result;