Commit 7080dcb83e5bec3f7dddc05c297de31e849921f3

Authored by jiangjiazhi
1 parent 2cc081bb9a

1

Showing 1 changed file with 20 additions and 20 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java View file @ 7080dcb
... ... @@ -124,29 +124,29 @@
124 124 map.put("dueDate", DateUtil.getyyyy_MM_dd(patients.getDueDate())); /** 预产期 */
125 125 map.put("trackCount", mongoTemplate.count(Query.query(Criteria.where("parentId").is(parentId).and("trackDownDateType").is(TrackDownDateEnums.F.getId()).and("yn").is(1)), TrackDown.class)); /** 访视次数 */
126 126 map.put("fmDate", DateUtil.getyyyy_MM_dd(patients.getFmDate()));
127   - }
128   -
129   - TrackDown tc = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(parentId).and("trackDownDateType").is(TrackDownDateEnums.E.getId()).and("yn").is(1)).with(new Sort(Sort.Direction.DESC, "created")), TrackDown.class);
130   - if (tc != null) {
131   - map.put("reservatDate", DateUtil.getyyyy_MM_dd(tc.getReservatDate())); /** 预约住院日期 */
132   - }
133   - map.put("fcCount", mongoTemplate.count(Query.query(Criteria.where("parentId").is(parentId).and("trackDownDateType").is(TrackDownDateEnums.G.getId()).and("yn").is(1)), TrackDown.class)); /** 复查次数 */
134   - map.put("checkCount", mongoTemplate.count(Query.query(Criteria.where("parentId").is(parentId).and("hospitalId").is(hospitalId)), AntenatalExaminationModel.class) +
135   - mongoTemplate.count(Query.query(Criteria.where("parentId").is(parentId)), AntExChuModel.class)); /** 本院产检次数 */
136   - AntenatalExaminationModel examinationModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(parentId)).with(new Sort(Sort.Direction.DESC, "created")), AntenatalExaminationModel.class);
137   - if (examinationModel != null) {
138   - map.put("checkTime", DateUtil.getyyyy_MM_dd(examinationModel.getCheckDate())); /** 产检日期 */
139   - map.put("nextCheckTime", DateUtil.getyyyy_MM_dd(examinationModel.getNextCheckTime())); /** 预约产检日期 */
140   - } else {
141   - AntExChuModel antExChuModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(parentId)).with(new Sort(Sort.Direction.DESC, "created")), AntExChuModel.class);
142   - if (antExChuModel != null) {
143   - map.put("checkTime", DateUtil.getyyyy_MM_dd(antExChuModel.getCheckTime())); /** 产检日期 */
144   - map.put("nextCheckTime", DateUtil.getyyyy_MM_dd(antExChuModel.getNextCheckTime())); /** 预约产检日期 */
  127 + TrackDown tc = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(parentId).and("trackDownDateType").is(TrackDownDateEnums.E.getId()).and("yn").is(1)).with(new Sort(Sort.Direction.DESC, "created")), TrackDown.class);
  128 + if (tc != null) {
  129 + map.put("reservatDate", DateUtil.getyyyy_MM_dd(tc.getReservatDate())); /** 预约住院日期 */
  130 + }
  131 + map.put("fcCount", mongoTemplate.count(Query.query(Criteria.where("parentId").is(parentId).and("trackDownDateType").is(TrackDownDateEnums.G.getId()).and("yn").is(1)), TrackDown.class)); /** 复查次数 */
  132 + map.put("checkCount", mongoTemplate.count(Query.query(Criteria.where("parentId").is(parentId).and("hospitalId").is(hospitalId)), AntenatalExaminationModel.class) +
  133 + mongoTemplate.count(Query.query(Criteria.where("parentId").is(parentId)), AntExChuModel.class)); /** 本院产检次数 */
  134 + AntenatalExaminationModel examinationModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(parentId)).with(new Sort(Sort.Direction.DESC, "created")), AntenatalExaminationModel.class);
  135 + if (examinationModel != null) {
  136 + map.put("checkTime", DateUtil.getyyyy_MM_dd(examinationModel.getCheckDate())); /** 产检日期 */
  137 + map.put("nextCheckTime", DateUtil.getyyyy_MM_dd(examinationModel.getNextCheckTime())); /** 预约产检日期 */
145 138 } else {
146   - map.put("checkTime", "--"); /** 产检日期 */
147   - map.put("nextCheckTime", "--"); /** 预约产检日期 */
  139 + AntExChuModel antExChuModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(parentId)).with(new Sort(Sort.Direction.DESC, "created")), AntExChuModel.class);
  140 + if (antExChuModel != null) {
  141 + map.put("checkTime", DateUtil.getyyyy_MM_dd(antExChuModel.getCheckTime())); /** 产检日期 */
  142 + map.put("nextCheckTime", DateUtil.getyyyy_MM_dd(antExChuModel.getNextCheckTime())); /** 预约产检日期 */
  143 + } else {
  144 + map.put("checkTime", "--"); /** 产检日期 */
  145 + map.put("nextCheckTime", "--"); /** 预约产检日期 */
  146 + }
148 147 }
149 148 }
  149 +
150 150 return RespBuilder.buildSuccess(map);
151 151 }
152 152