Commit 382c32ef15362be554a66740eab6669845ca6fb8

Authored by shiyang
1 parent 42d625e857

update

Showing 2 changed files with 16 additions and 2 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntenatalExaminationService.java View file @ 382c32e
... ... @@ -364,7 +364,7 @@
364 364 public List<AntExChuModel> queryAntExChuPage(AntExChuQuery antExChuQuery,Sort.Direction direction,String sortField) {
365 365 MongoQuery query = antExChuQuery.convertToQuery();
366 366 if (StringUtils.isNotEmpty(antExChuQuery.getNeed())) {
367   - antExChuQuery.mysqlBuild(antExDao.count(query));
  367 + antExChuQuery.mysqlBuild(iAntExChuDao.count(query));
368 368 query.start(antExChuQuery.getOffset()).end(antExChuQuery.getLimit());
369 369 }
370 370 return iAntExChuDao.query(query.addOrder(direction, sortField));
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ 382c32e
... ... @@ -8873,7 +8873,21 @@
8873 8873 antExChuQuery.setPage(null!=page&&0!=page?page:1);
8874 8874 antExChuQuery.setLimit(null!=limit&&0!=limit?limit:20);
8875 8875 List<AntExChuModel> antExChuModels = antExService.queryAntExChuPage(antExChuQuery,Sort.Direction.DESC, "checkTime");
8876   - baseObjectResponse.setData(antExChuModels).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setPageInfo(antExChuQuery.getPageInfo());
  8876 + List<Map<String,Object>> mapList=new ArrayList<>();
  8877 + if(CollectionUtils.isNotEmpty(antExChuModels)){
  8878 + for (AntExChuModel exChuModel : antExChuModels) {
  8879 + Map<String,Object> map=new HashedMap();
  8880 + Patients patient = mongoTemplate.findById(exChuModel.getParentId(), Patients.class);
  8881 + map.put("name",patient.getUsername());
  8882 + map.put("age",patient.getAge());
  8883 + map.put("birth",DateUtil.getyyyy_MM_dd(patient.getBirth()));
  8884 + map.put("name",patient.getUsername());
  8885 + map.put("checkTime",DateUtil.getyyyy_MM_dd(exChuModel.getCheckTime()));
  8886 + map.put("xhdb",exChuModel.getXhdb());
  8887 + mapList.add(map);
  8888 + }
  8889 + }
  8890 + baseObjectResponse.setData(mapList).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setPageInfo(antExChuQuery.getPageInfo());
8877 8891 return baseObjectResponse;
8878 8892 }
8879 8893 }