diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java index 48303a5..58d0112 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java @@ -18,6 +18,7 @@ import com.lyms.platform.pojo.Patients; import com.lyms.platform.pojo.PostReviewModel; import com.lyms.platform.query.AntExQuery; import com.lyms.platform.query.MatDeliverQuery; +import com.lyms.platform.query.PatientsQuery; import com.lyms.platform.query.PostReviewQuery; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang.StringUtils; @@ -121,6 +122,15 @@ public class QuanChanPatientWorker implements Callable> { //增加查询本次产程条数 postReviewQuery.setStart(patients.getFmDate()); + PatientsQuery patientsQuery=new PatientsQuery(); + patientsQuery.setYn(YnEnums.YES.getId()); + patientsQuery.setPid(patients.getPid()); + patientsQuery.setLastMensesStart(patients.getFmDate()); + List patientses =patientsService.queryPatient(patientsQuery); + if(CollectionUtils.isNotEmpty(patientses)){ + postReviewQuery.setEnd(patientses.get(0).getLastMenses()); + } + stopWatch.start("query postreview list"); List withList = postReviewService.findWithList(postReviewQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); if (CollectionUtils.isNotEmpty(withList)) {