Commit fae6961dc30db05ec6118dc7e40ab689b6980be3
1 parent
52cb7a1b95
Exists in
luanping
and in
1 other branch
修改查询初诊数据只用pid不走索引的bug
Showing 1 changed file with 5 additions and 5 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
fae6961
... | ... | @@ -2014,7 +2014,7 @@ |
2014 | 2014 | wxMeasureInfo.setPid(pid); |
2015 | 2015 | wxMeasureInfo.setHospitalId(hospitalId); |
2016 | 2016 | wxMeasureInfo.setDoctorId(doctorId); |
2017 | - this.updateNexCheckTime(pid, yumInfosMap.get("nextTime").toString()); | |
2017 | + this.updateNexCheckTime(pid,hospitalId, yumInfosMap.get("nextTime").toString()); | |
2018 | 2018 | mongoTemplate.insert(wxMeasureInfo); |
2019 | 2019 | } else { |
2020 | 2020 | WxMeasureInfoModel wxMeasureInfoModel = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(pid).and("type").is("1")), WxMeasureInfoModel.class); |
... | ... | @@ -2064,7 +2064,7 @@ |
2064 | 2064 | if (null == yumInfosMap.get("nextTime") || "" == yumInfosMap.get("nextTime")) { |
2065 | 2065 | yumInfosMap.put("nextTime", map.get("nextTime")); |
2066 | 2066 | } |
2067 | - this.updateNexCheckTime(pid, yumInfosMap.get("nextTime").toString()); | |
2067 | + this.updateNexCheckTime(pid, hospitalId,yumInfosMap.get("nextTime").toString()); | |
2068 | 2068 | exist = true; |
2069 | 2069 | map.putAll(yumInfosMap); |
2070 | 2070 | break; |
... | ... | @@ -2295,8 +2295,8 @@ |
2295 | 2295 | } |
2296 | 2296 | |
2297 | 2297 | |
2298 | - public void updateNexCheckTime(String pid, String nexCheckTime) { | |
2299 | - List<AntenatalExaminationModel> antenatalExaminationModels = mongoTemplate.find(Query.query(Criteria.where("pid").is(pid)), AntenatalExaminationModel.class); | |
2298 | + public void updateNexCheckTime(String pid,String hospitalId, String nexCheckTime) { | |
2299 | + List<AntenatalExaminationModel> antenatalExaminationModels = mongoTemplate.find(Query.query(Criteria.where("pid").is(pid).and("hospitalId").is(hospitalId).and("yn").is(1)), AntenatalExaminationModel.class); | |
2300 | 2300 | //1.先查询复诊是否为空 |
2301 | 2301 | List<Map> list2 = new ArrayList(); |
2302 | 2302 | if (antenatalExaminationModels != null && antenatalExaminationModels.size() > 0) { |
... | ... | @@ -2333,7 +2333,7 @@ |
2333 | 2333 | |
2334 | 2334 | } else { |
2335 | 2335 | //获取初诊 |
2336 | - AntExChuModel antExChuModel = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(pid)), AntExChuModel.class); | |
2336 | + AntExChuModel antExChuModel = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(pid).and("hospitalId").is(hospitalId).and("yn").is(1)), AntExChuModel.class); | |
2337 | 2337 | if (null != antExChuModel) { |
2338 | 2338 | //萌萌提的需求 任意用户修改下次检查时间 |
2339 | 2339 | antExChuModel.setNextCheckTime(DateUtil.parseYMD(nexCheckTime)); |