Commit 4e73d85c4ee1613ae2b3bccdc06d755d9c5aeccc
1 parent
d6a63fc780
Exists in
master
and in
6 other branches
自动诊断
Showing 1 changed file with 25 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
4e73d85
... | ... | @@ -5865,7 +5865,31 @@ |
5865 | 5865 | map.put("type", pat.getType()); |
5866 | 5866 | map.put("cardNoType", pat.getPcerteTypeId()); |
5867 | 5867 | |
5868 | - map.put("fid", model.getFid() == null ? "" : model.getFid()); | |
5868 | + if (StringUtils.isEmpty(model.getFid())) | |
5869 | + { | |
5870 | + String fid = ""; | |
5871 | + AntExQuery antExQuery = new AntExQuery(); | |
5872 | + antExQuery.setParentId(pat.getPid()); | |
5873 | + antExQuery.setYn(YnEnums.YES.getId()); | |
5874 | + List<AntenatalExaminationModel> antEx = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "checkDate")); | |
5875 | + if (CollectionUtils.isNotEmpty(antEx)) { | |
5876 | + fid = antEx.get(0).getId(); | |
5877 | + } else { | |
5878 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
5879 | + antExChuQuery.setParentId(pat.getPid()); | |
5880 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
5881 | + List<AntExChuModel> antExChu = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
5882 | + if (CollectionUtils.isNotEmpty(antExChu)) { | |
5883 | + fid = antExChu.get(0).getId(); | |
5884 | + } | |
5885 | + } | |
5886 | + map.put("fid",fid); | |
5887 | + } | |
5888 | + else | |
5889 | + { | |
5890 | + map.put("fid",model.getFid()); | |
5891 | + } | |
5892 | + | |
5869 | 5893 | |
5870 | 5894 | map.put("autoTime", DateUtil.getyyyy_MM_dd(model.getCreated())); |
5871 | 5895 | map.put("week", DateUtil.getWeekDesc(pat.getLastMenses(), model.getCreated())); |