Commit 9e4298d6e8f5c3b02af3e72a450418cbf888f553
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 2 changed files
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodPressureServiceImpl.java
View file @
9e4298d
... | ... | @@ -689,7 +689,8 @@ |
689 | 689 | //2.通过pnationId ID获取到相应的信息例如:末次月经 |
690 | 690 | if (StringUtils.isNotEmpty(bloodPressure.getParentId()) && StringUtils.isNotEmpty(weight) && StringUtils.isNotEmpty(height) && StringUtils.isNotEmpty(bregmatic)) { |
691 | 691 | Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(bloodPressure.getParentId())), Patients.class); |
692 | - Integer weeks = DateUtil.daysBetween(patients.getLastMenses(), new Date()) / 7; | |
692 | + Integer weeks = DateUtil.getWeek(patients.getLastMenses(), bloodPressure.getModified()) ; | |
693 | + System.out.println("孕周:"+weeks); | |
693 | 694 | Map paMap = new HashMap(); |
694 | 695 | paMap.put("vcCardNo", patients.getVcCardNo()); |
695 | 696 | paMap.put("username", patients.getUsername()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
9e4298d
... | ... | @@ -1952,9 +1952,17 @@ |
1952 | 1952 | public BaseResponse getWeightsReport(String pid) { |
1953 | 1953 | //1.获取该孕妇是否有推荐的高危项 |
1954 | 1954 | Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(pid)), Patients.class); |
1955 | - List<String> riskFactor = patients.getRiskFactorId(); | |
1956 | - for (String s : riskFactor) { | |
1957 | - System.out.println("得到的高危因素向:" + s); | |
1955 | + //1.1获取到这孕妇所有的高危因素id | |
1956 | + List<String> riskFactorId = patients.getRiskFactorId(); | |
1957 | + Criteria criteria = new Criteria(); | |
1958 | + criteria.orOperator(Criteria.where("diseasesDigestiveSystemId").in(riskFactorId), Criteria.where("viralHepatitisId").in(riskFactorId), | |
1959 | + Criteria.where("cirrhosis").in(riskFactorId), Criteria.where("liverFunctionErrorId").in(riskFactorId)); | |
1960 | + | |
1961 | + List<WeightReportModel> weightReport = mongoTemplate.find(Query.query(criteria), WeightReportModel.class); | |
1962 | + for (WeightReportModel weightReportModel : weightReport) { | |
1963 | + System.out.println(weightReportModel.getCal()); | |
1964 | + System.out.println(weightReportModel.getBreakfast()); | |
1965 | + | |
1958 | 1966 | } |
1959 | 1967 | //2.如果有打印推荐项对应的内容 |
1960 | 1968 | //2.1:根据高危因素id获取对应的内容 |