diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java index a848307..f7fe350 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java @@ -632,8 +632,11 @@ public class ReportServiceImpl extends BaseServiceImpl implements IReportService String parentId = null; List patients = mongoTemplate.find(Query.query(Criteria.where("pid").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), Patients.class); for (Patients patient : patients) { - if(patient.getCreated().getTime() > createDate.getTime()) { + if(patient.getCreated().getTime() < createDate.getTime()) { parentId = patient.getId(); + if(type != 1 && type != 3) { + break; + } if(type == 1 || type == 3) { return DateUtil.getyyyy_MM_dd(patient.getBookbuildingDate()); }