Commit c3dcdf50822fc150b19d53521f90bdb33927403a
1 parent
58f434f865
Exists in
dev
#fix:优化产后模版查询逻辑
Showing 2 changed files with 22 additions and 5 deletions
platform-dal/src/main/java/com/lyms/platform/query/PostpartumReportQuery.java
View file @
c3dcdf5
| ... | ... | @@ -120,9 +120,7 @@ |
| 120 | 120 | } else if (null != rFactorList && !rFactorList.isEmpty()) { |
| 121 | 121 | condition = condition.and("riskFactorId", rFactorList, MongoOper.IN); |
| 122 | 122 | } |
| 123 | - if (CollectionUtils.isEmpty(rFactorList)){ | |
| 124 | - condition = condition.and("risks", false, MongoOper.EXISTS); | |
| 125 | - } | |
| 123 | + | |
| 126 | 124 | if (deliveryModel!=null){ |
| 127 | 125 | condition=condition.and("deliveryModel", deliveryModel, MongoOper.IS); |
| 128 | 126 | } |
| ... | ... | @@ -139,7 +137,13 @@ |
| 139 | 137 | condition = condition.and("yn", yn, MongoOper.IS); |
| 140 | 138 | } |
| 141 | 139 | if (type!=null){ |
| 142 | - condition = condition.and("type", type, MongoOper.IS); | |
| 140 | + if (type!=-1){ | |
| 141 | + condition = condition.and("type", type, MongoOper.IS); | |
| 142 | + } | |
| 143 | + }else { | |
| 144 | + if (CollectionUtils.isEmpty(rFactorList)){ | |
| 145 | + condition = condition.and("risks", false, MongoOper.EXISTS); | |
| 146 | + } | |
| 143 | 147 | } |
| 144 | 148 | return condition.toMongoQuery(); |
| 145 | 149 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RemoteController.java
View file @
c3dcdf5
| ... | ... | @@ -552,6 +552,19 @@ |
| 552 | 552 | final String cDueWeek = request.getcDueWeek(); |
| 553 | 553 | final String lastMenses = archiveHistory.getLastMenses(); |
| 554 | 554 | final String hospitalId=request.getHospitalId(); |
| 555 | + if ("2100002419".equals(hospitalId)){ | |
| 556 | + List<Map<String,String>> list = new ArrayList<>(); | |
| 557 | + Map<String,String> m1 = new HashMap<>(); | |
| 558 | + m1.put("serType","3"); | |
| 559 | + m1.put("serviceWeek","42"); | |
| 560 | + Map<String,String> m2 = new HashMap<>(); | |
| 561 | + m2.put("serType","4"); | |
| 562 | + m2.put("serviceWeek","42"); | |
| 563 | + list.add(m1); | |
| 564 | + list.add(m2); | |
| 565 | + request.setSerInfos(list); | |
| 566 | + } | |
| 567 | + | |
| 555 | 568 | BaseObjectResponse baseObjectResponse = bookbuildingFacade.addPregnantBookbuilding(request,StringUtils.isNotEmpty(archiveUsers.getAssistUserId())?Integer.valueOf(archiveUsers.getAssistUserId()):null , false); |
| 556 | 569 | //System.out.println("confirmArchive return :"+JsonUtil.obj2JsonString(baseObjectResponse)); |
| 557 | 570 | if(baseObjectResponse.getErrorcode()==ErrorCodeConstants.SUCCESS){ |
| ... | ... | @@ -748,7 +761,7 @@ |
| 748 | 761 | |
| 749 | 762 | private static String getArchiveId(){ |
| 750 | 763 | Random random = new Random(); |
| 751 | - int randomNumber = random.nextInt(8); // 生成0到8之间的随机整数 | |
| 764 | + int randomNumber = random.nextInt(8); // 生成0到7之间的随机整数 | |
| 752 | 765 | List<String> list=new ArrayList<>(); |
| 753 | 766 | list.add("2100006789"); |
| 754 | 767 | list.add("2100006791"); |