Commit 44a8efebc74438ff5ea9e5992414febefdf17eca
1 parent
5f9af2b240
Exists in
master
修改产检删除1
Showing 4 changed files with 19 additions and 1 deletions
- platform-common/src/main/java/com/lyms/platform/common/dao/operator/MongoCondition.java
- platform-common/src/main/java/com/lyms/platform/common/dao/operator/MongoOper.java
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
platform-common/src/main/java/com/lyms/platform/common/dao/operator/MongoCondition.java
View file @
44a8efe
| ... | ... | @@ -173,7 +173,11 @@ |
| 173 | 173 | private void set(MongoOper oper, Object obj, Criteria criteria) { |
| 174 | 174 | if (MongoOper.GT == oper) { |
| 175 | 175 | criteria.gt(obj); |
| 176 | - } else if (MongoOper.GTE == oper) { | |
| 176 | + }else | |
| 177 | + if (MongoOper.EXISTS == oper) { | |
| 178 | + criteria.exists(Boolean.valueOf(obj.toString())); | |
| 179 | + } | |
| 180 | + else if (MongoOper.GTE == oper) { | |
| 177 | 181 | criteria.gte(obj); |
| 178 | 182 | } else if (MongoOper.IS == oper) { |
| 179 | 183 | criteria.is(obj); |
platform-common/src/main/java/com/lyms/platform/common/dao/operator/MongoOper.java
View file @
44a8efe
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
44a8efe
| ... | ... | @@ -110,6 +110,8 @@ |
| 110 | 110 | |
| 111 | 111 | //0 隐藏 1 显示 |
| 112 | 112 | private String enable="1"; |
| 113 | + | |
| 114 | + private Boolean extEnable; | |
| 113 | 115 | //区域来源 |
| 114 | 116 | private String source; |
| 115 | 117 | |
| 116 | 118 | |
| ... | ... | @@ -129,7 +131,13 @@ |
| 129 | 131 | this.enable = enable; |
| 130 | 132 | } |
| 131 | 133 | |
| 134 | + public boolean isExtEnable() { | |
| 135 | + return extEnable; | |
| 136 | + } | |
| 132 | 137 | |
| 138 | + public void setExtEnable(boolean extEnable) { | |
| 139 | + this.extEnable = extEnable; | |
| 140 | + } | |
| 133 | 141 | |
| 134 | 142 | public String getProvinceRegisterId() { |
| 135 | 143 | return provinceRegisterId; |
| ... | ... | @@ -855,6 +863,9 @@ |
| 855 | 863 | MongoCondition condition1 = mongoCondition.and("enable", enable, MongoOper.IS); |
| 856 | 864 | MongoCondition condition2 = MongoCondition.newInstance("buildType", buildTypeList, MongoOper.IN); |
| 857 | 865 | condition = condition.orCondition(new MongoCondition[]{condition1, condition2}); |
| 866 | + } | |
| 867 | + if(extEnable){ | |
| 868 | + condition.and("enable",extEnable,MongoOper.EXISTS); | |
| 858 | 869 | } |
| 859 | 870 | |
| 860 | 871 | if (buildTypeEq != null) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
44a8efe
| ... | ... | @@ -493,6 +493,7 @@ |
| 493 | 493 | patientsQuery.setBuildType(1); |
| 494 | 494 | //查询主档案 |
| 495 | 495 | patientsQuery.setExtEnable(false); |
| 496 | + | |
| 496 | 497 | //如果身份证号码不为空就以身份证号码查询 |
| 497 | 498 | if (!StringUtils.isEmpty(bookbuildingQueryRequest.getCardNo())) { |
| 498 | 499 | patientsQuery.setCardNo(bookbuildingQueryRequest.getCardNo()); |