Commit 204e5fa21643d2c9381491a3b65a1813e9a3e978
1 parent
a8602b444f
Exists in
master
and in
6 other branches
工位统计
Showing 5 changed files with 48 additions and 55 deletions
- platform-common/src/main/java/com/lyms/platform/common/Test.java
- platform-common/src/main/java/com/lyms/platform/common/enums/ChildCareEnums.java
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientSyncMysqlFacade.java
platform-common/src/main/java/com/lyms/platform/common/Test.java
View file @
204e5fa
| ... | ... | @@ -14,54 +14,7 @@ |
| 14 | 14 | |
| 15 | 15 | public static void main(String[] args) throws UnsupportedEncodingException { |
| 16 | 16 | |
| 17 | - String content = "R+1.5DS-0.75DCx19° L不出值 骨密度:标准值"; | |
| 18 | - | |
| 19 | - String rValue = null; | |
| 20 | - String rdsValue = null; | |
| 21 | - String rdcValue = null; | |
| 22 | - String lValue = null; | |
| 23 | - String ldsValue = null; | |
| 24 | - String ldcValue = null; | |
| 25 | - try | |
| 26 | - { | |
| 27 | - String REGEX_CHINESE = "[\u4e00-\u9fa5]";// 中文正则 | |
| 28 | - if (StringUtils.isNotEmpty(content)) | |
| 29 | - { | |
| 30 | - content = content.toUpperCase(); | |
| 31 | - content = content.replaceAll(REGEX_CHINESE, ""); | |
| 32 | - if (content.contains("R+") && content.contains("DS") && content.contains("DCX") && content.contains("L+") ) | |
| 33 | - { | |
| 34 | - String[] arrays = content.split("L"); | |
| 35 | - if (arrays.length == 2) | |
| 36 | - { | |
| 37 | - String rds = arrays[0].trim(); | |
| 38 | - String[] rs = rds.split("DS"); | |
| 39 | - rValue = rs[0].replace("R",""); | |
| 40 | - String[] rdsx = rs[1].split("DCX"); | |
| 41 | - rdsValue = rdsx[0]; | |
| 42 | - rdcValue = rdsx[1].replace("°",""); | |
| 43 | - | |
| 44 | - | |
| 45 | - String lds = arrays[1].trim(); | |
| 46 | - String[] ls = lds.split("DS"); | |
| 47 | - lValue = ls[0]; | |
| 48 | - String[] ldsx = ls[1].split("DCX"); | |
| 49 | - ldsValue = ldsx[0]; | |
| 50 | - ldcValue = ldsx[1].replace("°",""); | |
| 51 | - } | |
| 52 | - } | |
| 53 | - | |
| 54 | - } | |
| 55 | - }catch (Exception e) | |
| 56 | - { | |
| 57 | - | |
| 58 | - } | |
| 59 | - System.out.println(rValue); | |
| 60 | - System.out.println(rdsValue); | |
| 61 | - System.out.println(rdcValue); | |
| 62 | - System.out.println(lValue); | |
| 63 | - System.out.println(ldsValue); | |
| 64 | - System.out.println(ldcValue); | |
| 17 | + System.out.println((int)Double.parseDouble("48.6")); | |
| 65 | 18 | } |
| 66 | 19 | |
| 67 | 20 | private static Date getStartTime() { |
platform-common/src/main/java/com/lyms/platform/common/enums/ChildCareEnums.java
View file @
204e5fa
| ... | ... | @@ -57,7 +57,17 @@ |
| 57 | 57 | J(10, "10月龄"), |
| 58 | 58 | K(11, "11月龄"), |
| 59 | 59 | L(12, "12月龄"), |
| 60 | + L1(13, "13月龄"), | |
| 61 | + L2(14, "14月龄"), | |
| 62 | + L3(15, "15月龄"), | |
| 63 | + L4(16, "16月龄"), | |
| 64 | + L5(17, "17月龄"), | |
| 60 | 65 | M(18, "18月龄"), |
| 66 | + M1(19, "19月龄"), | |
| 67 | + M2(20, "20月龄"), | |
| 68 | + M3(21, "21月龄"), | |
| 69 | + M4(22, "22月龄"), | |
| 70 | + M5(23, "23月龄"), | |
| 61 | 71 | N(24, "24月龄"), |
| 62 | 72 | O(30, "30月龄"), |
| 63 | 73 | P(36, "3岁"), |
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
204e5fa
| ... | ... | @@ -663,9 +663,7 @@ |
| 663 | 663 | if (isHistory) { |
| 664 | 664 | condition = condition.and("isHistory", false, MongoOper.EXISTS); |
| 665 | 665 | } |
| 666 | - if (existLastCheckEmployeeId != null) { | |
| 667 | - condition = condition.and("lastCheckEmployeeId", existLastCheckEmployeeId, MongoOper.EXISTS); | |
| 668 | - } | |
| 666 | + | |
| 669 | 667 | if (null != isDeliver) { |
| 670 | 668 | condition = condition.and("isDeliver", isDeliver, MongoOper.IS); |
| 671 | 669 | } |
| ... | ... | @@ -1193,6 +1191,9 @@ |
| 1193 | 1191 | //去掉type为3 的情况 |
| 1194 | 1192 | if (type != null && -1 != type) { |
| 1195 | 1193 | condition = condition.and("type", type, MongoOper.IS); |
| 1194 | + } | |
| 1195 | + if (existLastCheckEmployeeId != null) { | |
| 1196 | + condition = condition.and("lastCheckEmployeeId", existLastCheckEmployeeId, MongoOper.EXISTS); | |
| 1196 | 1197 | } |
| 1197 | 1198 | if (typeList != null && typeList.size() > 0) { |
| 1198 | 1199 | condition = condition.and("type", typeList, MongoOper.IN); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
204e5fa
| ... | ... | @@ -6011,7 +6011,36 @@ |
| 6011 | 6011 | return "success"; |
| 6012 | 6012 | } |
| 6013 | 6013 | |
| 6014 | + @RequestMapping(value = "/addYfxyhandle", method = RequestMethod.GET) | |
| 6015 | + @ResponseBody | |
| 6016 | + public String addYfxyhandle(String start,String end) { | |
| 6014 | 6017 | |
| 6018 | + Criteria criteria = Criteria.where("yn").is(YnEnums.YES.getId()).and("hospitalId").is("216") | |
| 6019 | + .and("bp").regex(Pattern.compile("^.*\\[.*$")).and("checkDate").gte(DateUtil.parseYMD(start)).lte(DateUtil.parseYMD(end)); | |
| 6020 | + List<AntenatalExaminationModel> checkModels = mongoTemplate.find(new Query(criteria),AntenatalExaminationModel.class); | |
| 6021 | + if (CollectionUtils.isNotEmpty(checkModels)) | |
| 6022 | + { | |
| 6023 | + for (AntenatalExaminationModel checkModel : checkModels) | |
| 6024 | + { | |
| 6025 | + String bp = checkModel.getBp(); | |
| 6026 | + if (StringUtils.isNotEmpty(bp)) | |
| 6027 | + { | |
| 6028 | + bp = bp.replace("[",""); | |
| 6029 | + bp = bp.replace("]",""); | |
| 6030 | + } | |
| 6031 | + checkModel.setBp(bp); | |
| 6032 | + | |
| 6033 | + System.out.println("血压 update "+checkModel.getId()); | |
| 6034 | + Update update = MongoConvertHelper | |
| 6035 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(checkModel)); | |
| 6036 | + mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(checkModel.getId())), update, | |
| 6037 | + AntenatalExaminationModel.class); | |
| 6038 | + } | |
| 6039 | + } | |
| 6040 | + return "success"; | |
| 6041 | + } | |
| 6042 | + | |
| 6043 | + | |
| 6015 | 6044 | /** |
| 6016 | 6045 | * 补填胎心率 |
| 6017 | 6046 | * @param start |
| ... | ... | @@ -6064,7 +6093,7 @@ |
| 6064 | 6093 | for (AntenatalExaminationModel checkModel : checkModels) |
| 6065 | 6094 | { |
| 6066 | 6095 | |
| 6067 | - Criteria criteria1 = Criteria.where("yn").is(YnEnums.YES.getId()).and("hospitalId").is("216") | |
| 6096 | + Criteria criteria1 = Criteria.where("yn").is(YnEnums.YES.getId()) | |
| 6068 | 6097 | .and("weight").exists(true).and("pid").is(checkModel.getPid()); |
| 6069 | 6098 | List<AntExChuModel> chuModelList = mongoTemplate.find(new Query(criteria1),AntExChuModel.class); |
| 6070 | 6099 | if(CollectionUtils.isNotEmpty(chuModelList)) |
| ... | ... | @@ -6072,7 +6101,7 @@ |
| 6072 | 6101 | AntExChuModel model = chuModelList.get(0); |
| 6073 | 6102 | try |
| 6074 | 6103 | { |
| 6075 | - int weight = Integer.parseInt(model.getWeight()); | |
| 6104 | + int weight = (int)Double.parseDouble(model.getWeight()); | |
| 6076 | 6105 | int dbWeight = NumberUtils.getRandomInt(weight+10,weight+5); |
| 6077 | 6106 | checkModel.setWeight(Double.valueOf(dbWeight)); |
| 6078 | 6107 | }catch (Exception e) |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientSyncMysqlFacade.java
View file @
204e5fa
| ... | ... | @@ -3483,7 +3483,6 @@ |
| 3483 | 3483 | patientsQuery.setStreetRegisterIds(streetIds); |
| 3484 | 3484 | patientsQuery.setBuildDaysStart(0); |
| 3485 | 3485 | patientsQuery.setBuildDaysEnd(13*7-1); |
| 3486 | - patientsQuery.setDueStatus(0); | |
| 3487 | 3486 | patientsQuery.setIsAutoFm(YnEnums.NO.getId()); |
| 3488 | 3487 | patientsQuery.setExtEnable(false); |
| 3489 | 3488 | patientsQuery.setBuildTypeNot(1); |
| ... | ... | @@ -3521,7 +3520,7 @@ |
| 3521 | 3520 | patientsQuery2.setBookbuildingDateEnd(endDate); |
| 3522 | 3521 | patientsQuery2.setYn(YnEnums.YES.getId()); |
| 3523 | 3522 | patientsQuery2.setExistLastCheckEmployeeId(true); |
| 3524 | - patientsQuery.setType(3); | |
| 3523 | + patientsQuery2.setType(3); | |
| 3525 | 3524 | System.out.println("===11"+patientsQuery2.convertToQuery().convertToMongoQuery().toString()); |
| 3526 | 3525 | int data17 = patientsService.queryPatientCount(patientsQuery2); |
| 3527 | 3526 | int lastDate17= null==hospitalDate.get("data17")?0:Integer.parseInt(hospitalDate.get("data17").toString()); |
| ... | ... | @@ -4077,6 +4076,7 @@ |
| 4077 | 4076 | patientsQuery.setNeed("Need"); |
| 4078 | 4077 | System.out.println("孕13周之前建册的人数"+patientsQuery.convertToQuery().convertToMongoQuery().toString()); |
| 4079 | 4078 | List<Patients> datas = patientsService.queryPatient(patientsQuery); |
| 4079 | + System.out.println("孕13周之前建册结束"); | |
| 4080 | 4080 | if (CollectionUtils.isNotEmpty(datas)) |
| 4081 | 4081 | { |
| 4082 | 4082 | for (Patients model : datas) |