From 49507598f9fe74b2c0cf90405005a46572fae369 Mon Sep 17 00:00:00 2001 From: hujiaqi Date: Mon, 19 Dec 2016 16:05:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=8F=B7=E5=92=8C=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/lyms/platform/query/MatDeliverQuery.java | 13 +++++++ .../com/lyms/platform/query/PatientsQuery.java | 19 ++++++++++ .../operate/web/facade/MatDeliverFacade.java | 7 ++-- .../web/request/ChildbirthManagerRequest.java | 44 ++++------------------ 4 files changed, 42 insertions(+), 41 deletions(-) diff --git a/platform-dal/src/main/java/com/lyms/platform/query/MatDeliverQuery.java b/platform-dal/src/main/java/com/lyms/platform/query/MatDeliverQuery.java index c6cf5a5..6aac5c7 100644 --- a/platform-dal/src/main/java/com/lyms/platform/query/MatDeliverQuery.java +++ b/platform-dal/src/main/java/com/lyms/platform/query/MatDeliverQuery.java @@ -31,6 +31,8 @@ public class MatDeliverQuery extends BaseQuery implements IConvertToNativeQuery private boolean neEnd; + private String deliveryModeQueryJson; + public boolean isNeEnd() { return neEnd; } @@ -127,6 +129,9 @@ public class MatDeliverQuery extends BaseQuery implements IConvertToNativeQuery if (null != hospitalId) { condition = condition.and("hospitalId", hospitalId, MongoOper.IS); } + if (null != deliveryModeQueryJson) { + condition = condition.and("deliveryMode", deliveryModeQueryJson, MongoOper.LIKE); + } Criteria c = null; Boolean isAddStart = Boolean.FALSE; @@ -216,4 +221,12 @@ public class MatDeliverQuery extends BaseQuery implements IConvertToNativeQuery public void setDeliveryMode(String deliveryMode) { this.deliveryMode = deliveryMode; } + + public String getDeliveryModeQueryJson() { + return deliveryModeQueryJson; + } + + public void setDeliveryModeQueryJson(String deliveryModeQueryJson) { + this.deliveryModeQueryJson = deliveryModeQueryJson; + } } diff --git a/platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java b/platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java index a56bc94..2eb5d07 100644 --- a/platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java +++ b/platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java @@ -182,6 +182,9 @@ public class PatientsQuery extends BaseQuery implements IConvertToNativeQuery { //查询号 private String queryNo; + //另一个查询号 + private String queryNo1; + public String getQueryNo() { return queryNo; } @@ -190,6 +193,14 @@ public class PatientsQuery extends BaseQuery implements IConvertToNativeQuery { this.queryNo = queryNo; } + public String getQueryNo1() { + return queryNo1; + } + + public void setQueryNo1(String queryNo1) { + this.queryNo1 = queryNo1; + } + public Integer getPostViewTimes() { return postViewTimes; } @@ -883,6 +894,14 @@ public class PatientsQuery extends BaseQuery implements IConvertToNativeQuery { c1= c.orCondition(new MongoCondition[]{con1, con2, con3,con4}).getCriteria(); } + if (org.apache.commons.lang.StringUtils.isNotEmpty(queryNo1)) { + MongoCondition c = MongoCondition.newInstance(); + MongoCondition con1 = MongoCondition.newInstance("phone", queryNo, MongoOper.IS); + MongoCondition con2 = MongoCondition.newInstance("username", queryNo, MongoOper.IS); + MongoCondition con3 = MongoCondition.newInstance("cardNo", queryNo, MongoOper.IS); + c1= c.orCondition(new MongoCondition[]{con1, con2, con3}).getCriteria(); + } + if (lastCheckEmployeeId != null) { condition = condition.and("lastCheckEmployeeId", lastCheckEmployeeId, MongoOper.IS); } diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java index 0f2fba7..5961672 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java @@ -912,13 +912,11 @@ public class MatDeliverFacade { } } - patientsQuery.setName(StringUtils.isEmpty(childbirthManagerRequest.getUserName()) ? null : childbirthManagerRequest.getUserName()); patientsQuery.setYn(YnEnums.YES.getId()); patientsQuery.setType(3); patientsQuery.setHospitalId(autoMatchFacade.getHospitalId(childbirthManagerRequest.getOperatorId())); - patientsQuery.setCardNo(StringUtils.isEmpty(childbirthManagerRequest.getCardNo()) ? null : childbirthManagerRequest.getCardNo()); - patientsQuery.setPhone(StringUtils.isEmpty(childbirthManagerRequest.getPhone()) ? null : childbirthManagerRequest.getPhone()); patientsQuery.setHusbandPhone(StringUtils.isEmpty(childbirthManagerRequest.getHusbandPhone()) ? null : childbirthManagerRequest.getHusbandPhone()); + patientsQuery.setQueryNo1(childbirthManagerRequest.getQueryNo()); // 分娩方式去另外一张表查 List patientsList = patientsService.queryPatient(patientsQuery); List parentIdList = new ArrayList<>(); @@ -933,7 +931,8 @@ public class MatDeliverFacade { } MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); - matDeliverQuery.setDeliveryMode(StringUtils.isEmpty(childbirthManagerRequest.getDeliveryMode()) ? null : childbirthManagerRequest.getDeliveryMode()); + String deliveryModeQueryJson = "fmfs\\\":\\\"" + childbirthManagerRequest.getDeliveryMode(); + matDeliverQuery.setDeliveryModeQueryJson(StringUtils.isEmpty(childbirthManagerRequest.getDeliveryMode()) ? null : deliveryModeQueryJson); matDeliverQuery.setParentIdList(parentIdList); matDeliverQuery.setPage(childbirthManagerRequest.getPage()); matDeliverQuery.setLimit(childbirthManagerRequest.getLimit()); diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ChildbirthManagerRequest.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ChildbirthManagerRequest.java index f090ea0..168bd7c 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ChildbirthManagerRequest.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ChildbirthManagerRequest.java @@ -9,24 +9,10 @@ public class ChildbirthManagerRequest extends BasePageQueryRequest { /** * @auther HuJiaqi - * @createTime 2016年12月07日 14时13分 - * @discription 产妇姓名 + * @createTime 2016年12月19日 16时02分 + * @discription 查询号 */ - private String userName; - - /** - * @auther HuJiaqi - * @createTime 2016年12月07日 14时13分 - * @discription 证件号 - */ - private String cardNo; - - /** - * @auther HuJiaqi - * @createTime 2016年12月07日 14时13分 - * @discription 联系方式 - */ - private String phone; + private String queryNo; /** * @auther HuJiaqi @@ -53,28 +39,12 @@ public class ChildbirthManagerRequest extends BasePageQueryRequest { private Integer operatorId; - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public String getCardNo() { - return cardNo; - } - - public void setCardNo(String cardNo) { - this.cardNo = cardNo; - } - - public String getPhone() { - return phone; + public String getQueryNo() { + return queryNo; } - public void setPhone(String phone) { - this.phone = phone; + public void setQueryNo(String queryNo) { + this.queryNo = queryNo; } public String getBirthDate() { -- 1.8.3.1