|
@ -222,7 +222,14 @@ public class MedicineUserService extends BaseJpaService<Mediicineuser, Mediicine
|
|
|
List<Map<String,Object>> list=null;
|
|
|
list = hibenateUtils.createSQLQuery(sql,page,size);
|
|
|
for (Map<String, Object> stringObjectMap : list) {
|
|
|
|
|
|
String countSql = " select " +
|
|
|
" COUNT(DISTINCT (t.id)) as count " +
|
|
|
" from " +
|
|
|
" t_mediicine_device_user t " +
|
|
|
" where " +
|
|
|
" 1=1 and t.del = 1 and t.user_id = '" + stringObjectMap.get("id").toString() + "'";
|
|
|
stringObjectMap.put("allocatedDevice", jdbcTemplate.queryForObject(countSql, Integer.class));
|
|
|
stringObjectMap.put("DeviceQty", deviceDao.countAll());
|
|
|
}
|
|
|
String countSql = " select " +
|
|
|
" COUNT(DISTINCT (t.id)) as count " +
|