Commit c4841bf80b4b728b40dc830692c2cd5b8a6c6429
1 parent
35c06e06d3
Exists in
master
and in
8 other branches
修改查询条件
Showing 1 changed file with 51 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
c4841bf
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | import com.lyms.platform.common.utils.BeanUtils; |
9 | 9 | import com.lyms.platform.common.utils.DateUtil; |
10 | 10 | import com.lyms.platform.common.utils.ExceptionUtils; |
11 | +import com.lyms.platform.common.utils.JsonUtil; | |
11 | 12 | import com.lyms.platform.operate.web.request.ChildbirthManagerRequest; |
12 | 13 | import com.lyms.platform.operate.web.request.MatDeliverAddRequest; |
13 | 14 | import com.lyms.platform.operate.web.request.MatDeliverQueryRequest; |
... | ... | @@ -984,6 +985,55 @@ |
984 | 985 | } catch (Exception e) { |
985 | 986 | // 什么都不干 |
986 | 987 | } |
988 | + | |
989 | + // 开始拼装自定义查询结果 | |
990 | + // 胎方位,胎心率,胎先露 | |
991 | + // 这个泛型不会出错,传入的就是这个 | |
992 | + @SuppressWarnings("unchecked") | |
993 | + List<MatDeliverAddRequest.Placenta> placentaList = maternalDeliverModel.getPlacentas(); | |
994 | + if (placentaList != null && placentaList.size() > 0) { | |
995 | + String fetalPosition = ""; | |
996 | + String heartRate = ""; | |
997 | + String fetalPresentation = ""; | |
998 | + for (MatDeliverAddRequest.Placenta placenta : placentaList) { | |
999 | + fetalPosition += placenta.getFetalPosition() + ","; | |
1000 | + heartRate += placenta.getHeartRate().toString() + ","; | |
1001 | + fetalPresentation += placenta.getFetalPresentation() + ","; | |
1002 | + } | |
1003 | + childbirthManagerQueryModel.setFetalPosition(fetalPosition.length() == 0 ? "" : fetalPosition.substring(0, fetalPosition.length() - 1)); | |
1004 | + childbirthManagerQueryModel.setHeartRate(heartRate.length() == 0 ? "" : heartRate.substring(0, heartRate.length() - 1)); | |
1005 | + childbirthManagerQueryModel.setFetalPresentation(fetalPresentation.length() == 0 ? "" : fetalPresentation.substring(0, fetalPresentation.length() - 1)); | |
1006 | + } | |
1007 | + // 第一产程,第二产程,第三产程 | |
1008 | + Map<String, Map<String, String>> prodprocessMap = JsonUtil.getDoubleMap(maternalDeliverModel.getProdprocess()); | |
1009 | + if (prodprocessMap != null && prodprocessMap.size() > 0) { | |
1010 | + Map<String, String> prodprocessOne = prodprocessMap.get("one"); | |
1011 | + if (prodprocessOne != null && prodprocessOne.size() > 0) { | |
1012 | + childbirthManagerQueryModel.setProdprocessOne("h:" + prodprocessOne.get("h") + "," + "m:" + prodprocessOne.get("m")); | |
1013 | + } | |
1014 | + Map<String, String> prodprocessTwo = prodprocessMap.get("two"); | |
1015 | + if (prodprocessTwo != null && prodprocessTwo.size() > 0) { | |
1016 | + childbirthManagerQueryModel.setProdprocessTwo("h:" + prodprocessTwo.get("h") + "," + "m:" + prodprocessTwo.get("m")); | |
1017 | + } | |
1018 | + Map<String, String> prodprocessThree = prodprocessMap.get("three"); | |
1019 | + if (prodprocessThree != null && prodprocessThree.size() > 0) { | |
1020 | + childbirthManagerQueryModel.setProdprocessThree("h:" + prodprocessThree.get("h") + "," + "m:" + prodprocessThree.get("m")); | |
1021 | + } | |
1022 | + } | |
1023 | + // 总产程 | |
1024 | + Map<String, String> totalprocessMap = JsonUtil.getMap(maternalDeliverModel.getTotalprocess()); | |
1025 | + if (totalprocessMap != null && totalprocessMap.size() > 0) { | |
1026 | + childbirthManagerQueryModel.setTotalprocess("h:" + totalprocessMap.get("h") + "," + "m:" + totalprocessMap.get("m")); | |
1027 | + } | |
1028 | + // 收缩压,舒张压 | |
1029 | + Map<String, String> chBpMap = JsonUtil.getMap(maternalDeliverModel.getChBp()); | |
1030 | + if (chBpMap != null && chBpMap.size() > 0) { | |
1031 | + childbirthManagerQueryModel.setChBpSsy1(chBpMap.get("ssy")); | |
1032 | + childbirthManagerQueryModel.setChBpSzy1(chBpMap.get("szy")); | |
1033 | + } | |
1034 | + | |
1035 | + // 拼装自定义查询结果结束 | |
1036 | + | |
987 | 1037 | childbirthManagerQueryModelList.add(childbirthManagerQueryModel); |
988 | 1038 | } |
989 | 1039 | } |
... | ... | @@ -1002,9 +1052,7 @@ |
1002 | 1052 | |
1003 | 1053 | BabyModelQuery babyModelQuery = new BabyModelQuery(); |
1004 | 1054 | babyModelQuery.setYn(YnEnums.YES.getId()); |
1005 | - babyModelQuery.setMname(newBabyManagerRequest.getMname()); | |
1006 | - babyModelQuery.setMcertNo(newBabyManagerRequest.getMcertNo()); | |
1007 | - babyModelQuery.setMphone(newBabyManagerRequest.getMphone()); | |
1055 | + babyModelQuery.setQueryNo(newBabyManagerRequest.getQueryNo()); | |
1008 | 1056 | babyModelQuery.setBirthStart(DateUtil.parseYMD(newBabyManagerRequest.getBirthStartDate())); |
1009 | 1057 | babyModelQuery.setBirthEnd(DateUtil.parseYMD(newBabyManagerRequest.getBirthEndDate())); |
1010 | 1058 | babyModelQuery.setDueType(newBabyManagerRequest.getDueType()); |