Commit bc85c3cf8a0a7326d662cf6bd40fe46395037f80

Authored by liquanyu
1 parent 4a95b23d41

肌萎缩

Showing 1 changed file with 9 additions and 1 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmnFacade.java View file @ bc85c3c
... ... @@ -193,7 +193,15 @@
193 193 end = DateUtil.getDayLastSecond(end);
194 194 query.addCriteria(Criteria.where("checkDate").gte(start).lte(end));
195 195 }
196   - query.with(new Sort(Sort.Direction.DESC, "created"));
  196 + if (StringUtils.isNotEmpty(param.getPatientId()))
  197 + {
  198 + query.with(new Sort(Sort.Direction.DESC, "sendDate"));
  199 + }
  200 + else
  201 + {
  202 + query.with(new Sort(Sort.Direction.DESC, "created"));
  203 + }
  204 +
197 205 long count = mongoTemplate.count(query, SmnModel.class);
198 206 param.mysqlBuild((int) count);
199 207 query.skip(param.getOffset()).limit(param.getLimit());