Commit 209aa0a97dc6c3562a989e63646cae71dcd06f6b
1 parent
f1b8ddb0be
Exists in
master
and in
6 other branches
儿童是否开通疾病查询
Showing 8 changed files with 75 additions and 3 deletions
- platform-common/src/main/java/com/lyms/platform/common/Test.java
- platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyManageRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyManageListResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/BabyListTask.java
platform-common/src/main/java/com/lyms/platform/common/Test.java
View file @
209aa0a
| ... | ... | @@ -7,8 +7,45 @@ |
| 7 | 7 | import java.util.Date; |
| 8 | 8 | |
| 9 | 9 | public class Test { |
| 10 | + public String convertStringToHex(String str){ | |
| 11 | + | |
| 12 | + char[] chars = str.toCharArray(); | |
| 13 | + | |
| 14 | + StringBuffer hex = new StringBuffer(); | |
| 15 | + for(int i = 0; i < chars.length; i++){ | |
| 16 | + hex.append(Integer.toHexString((int)chars[i])); | |
| 17 | + } | |
| 18 | + | |
| 19 | + return hex.toString(); | |
| 20 | + } | |
| 21 | + | |
| 22 | + public String convertHexToString(String hex){ | |
| 23 | + | |
| 24 | + StringBuilder sb = new StringBuilder(); | |
| 25 | + StringBuilder temp = new StringBuilder(); | |
| 26 | + | |
| 27 | + //49204c6f7665204a617661 split into two characters 49, 20, 4c... | |
| 28 | + for( int i=0; i<hex.length()-1; i+=2 ){ | |
| 29 | + | |
| 30 | + //grab the hex in pairs | |
| 31 | + String output = hex.substring(i, (i + 2)); | |
| 32 | + //convert hex to decimal | |
| 33 | + int decimal = Integer.parseInt(output, 16); | |
| 34 | + //convert the decimal to character | |
| 35 | + sb.append((char)decimal); | |
| 36 | + | |
| 37 | + temp.append(decimal); | |
| 38 | + } | |
| 39 | + | |
| 40 | + return sb.toString(); | |
| 41 | + } | |
| 42 | + | |
| 43 | + //504F533838383834 POS88884 | |
| 10 | 44 | public static void main(String[] args) { |
| 11 | 45 | |
| 46 | + Test strToHex = new Test(); | |
| 47 | + | |
| 48 | + System.out.println("ASCII : " + strToHex.convertHexToString("31")); | |
| 12 | 49 | } |
| 13 | 50 | |
| 14 | 51 | } |
platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
View file @
209aa0a
| ... | ... | @@ -1162,7 +1162,17 @@ |
| 1162 | 1162 | condition = condition.and("dueWeek", dueWeek, MongoOper.LTE); |
| 1163 | 1163 | } |
| 1164 | 1164 | if (null != openDisease) { |
| 1165 | - condition = condition.and("openDisease", openDisease, MongoOper.IS); | |
| 1165 | + if ("2".equals(openDisease)) | |
| 1166 | + { | |
| 1167 | + condition = condition.and("openDisease", openDisease, MongoOper.IS); | |
| 1168 | + } | |
| 1169 | + else | |
| 1170 | + { | |
| 1171 | + MongoCondition con1 = MongoCondition.newInstance("openDisease", "1", MongoOper.IS); | |
| 1172 | + MongoCondition con = MongoCondition.newInstance("openDisease", false, MongoOper.EXISTS); | |
| 1173 | + condition = condition.orCondition(new MongoCondition[]{con1, con}); | |
| 1174 | + } | |
| 1175 | + | |
| 1166 | 1176 | } |
| 1167 | 1177 | |
| 1168 | 1178 | if (null != endCase) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java
View file @
209aa0a
| ... | ... | @@ -261,6 +261,7 @@ |
| 261 | 261 | @RequestParam(value = "liveType", required = false) String liveType, |
| 262 | 262 | @RequestParam(value = "isArea", required = false) String isArea, |
| 263 | 263 | @RequestParam(value = "fmHospitalId", required = false) String fmHospitalId, |
| 264 | + @RequestParam(value = "openDisease", required = false) String openDisease, | |
| 264 | 265 | @RequestParam(value = "endCase", required = false) Integer endCase |
| 265 | 266 | ) { |
| 266 | 267 | |
| ... | ... | @@ -317,6 +318,7 @@ |
| 317 | 318 | request.setWeakSonInfo(weakSonInfo); |
| 318 | 319 | request.setLiveType(liveType); |
| 319 | 320 | request.setEndCase(endCase); |
| 321 | + request.setOpenDisease(openDisease); | |
| 320 | 322 | |
| 321 | 323 | return babyBookbuildingFacade.queryBabyList(request, loginState.getId()); |
| 322 | 324 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
209aa0a
| ... | ... | @@ -2526,7 +2526,7 @@ |
| 2526 | 2526 | babyQuery.setHospitalIdList(hospitalIdList); |
| 2527 | 2527 | List <BabyModel> models = getBabayListByCondition(request, true, babyQuery); |
| 2528 | 2528 | if (CollectionUtils.isNotEmpty(models)) { |
| 2529 | - int batchSize = 50; | |
| 2529 | + int batchSize = 5; | |
| 2530 | 2530 | int end = 0; |
| 2531 | 2531 | List <Future> futures = new ArrayList <>(); |
| 2532 | 2532 | for (int i = 0; i < models.size(); i += batchSize) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyManageRequest.java
View file @
209aa0a
| ... | ... | @@ -97,6 +97,17 @@ |
| 97 | 97 | //分娩医院 |
| 98 | 98 | private String fmHospitalId; |
| 99 | 99 | |
| 100 | + //是否开通疾病发生推送 1或者空没有开通 2开通 | |
| 101 | + private String openDisease; | |
| 102 | + | |
| 103 | + public String getOpenDisease() { | |
| 104 | + return openDisease; | |
| 105 | + } | |
| 106 | + | |
| 107 | + public void setOpenDisease(String openDisease) { | |
| 108 | + this.openDisease = openDisease; | |
| 109 | + } | |
| 110 | + | |
| 100 | 111 | public String getBirthStart() { |
| 101 | 112 | return birthStart; |
| 102 | 113 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyManageListResult.java
View file @
209aa0a
| ... | ... | @@ -78,6 +78,16 @@ |
| 78 | 78 | private String mcertNo; |
| 79 | 79 | |
| 80 | 80 | private String mcertTypeId; |
| 81 | + //是否开通疾病发生推送 1或者空没有开通 2开通 | |
| 82 | + private String openDisease; | |
| 83 | + | |
| 84 | + public String getOpenDisease() { | |
| 85 | + return openDisease; | |
| 86 | + } | |
| 87 | + | |
| 88 | + public void setOpenDisease(String openDisease) { | |
| 89 | + this.openDisease = openDisease; | |
| 90 | + } | |
| 81 | 91 | |
| 82 | 92 | public String getMcertNo() { |
| 83 | 93 | return mcertNo; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
View file @
209aa0a
| ... | ... | @@ -251,7 +251,7 @@ |
| 251 | 251 | tabList.add(temp); |
| 252 | 252 | } |
| 253 | 253 | } |
| 254 | - List<DiabetesRecordModel> recordModels = mongoTemplate.find(Query.query(Criteria.where("pid").is(mongoUtil.getPid(parentId))), DiabetesRecordModel | |
| 254 | + List<DiabetesRecordModel> recordModels = mongoTemplate.find(Query.query(Criteria.where("pid").is(mongoUtil.getPid(parentId))).with(new Sort(Sort.Direction.DESC, "created")), DiabetesRecordModel | |
| 255 | 255 | .class); |
| 256 | 256 | if (CollectionUtils.isNotEmpty(recordModels)) |
| 257 | 257 | { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/BabyListTask.java
View file @
209aa0a