Commit e364da5a5974384e3a9637e538c132b58c579756
1 parent
44d489d40d
Exists in
master
and in
6 other branches
承德市妇幼上线两癌需求-宫颈癌随访列表添加随访记录更新主随访表-删除预约下次随访时间
Showing 2 changed files with 15 additions and 8 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CancerScreeningFacade.java
View file @
e364da5
... | ... | @@ -36,6 +36,7 @@ |
36 | 36 | import org.springframework.data.mongodb.core.MongoTemplate; |
37 | 37 | import org.springframework.data.mongodb.core.query.Criteria; |
38 | 38 | import org.springframework.data.mongodb.core.query.Query; |
39 | +import org.springframework.data.mongodb.core.query.Update; | |
39 | 40 | import org.springframework.stereotype.Component; |
40 | 41 | import scala.Int; |
41 | 42 | import scala.util.parsing.combinator.testing.Str; |
... | ... | @@ -808,11 +809,13 @@ |
808 | 809 | model.setNextAfterVisitTime(RecordModel.getNextAfterVisitTime()); |
809 | 810 | model.setType(0);//追访状态,修改预约下次时间后改为待追访。 |
810 | 811 | } |
811 | - //选择不需要预约下次追访时间置为空 | |
812 | - | |
813 | - | |
814 | - breastAfterVisitService.updateOneBreastAfterVisit(model,1); | |
815 | - | |
812 | + Update update=MongoConvertHelper | |
813 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(model)); | |
814 | + //选择不需要预约下次追访时间,删除该字段。 | |
815 | + if(0==RecordModel.getAppointment()){ | |
816 | + update.unset("nextAfterVisitTime"); | |
817 | + } | |
818 | + mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(model.getId())), update, BreastAfterVisitModel.class); | |
816 | 819 | return new BaseResponse("成功", ErrorCodeConstants.SUCCESS); |
817 | 820 | } catch (Exception e) { |
818 | 821 | e.printStackTrace(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/CervicalCancerServiceImpl.java
View file @
e364da5
... | ... | @@ -1289,9 +1289,13 @@ |
1289 | 1289 | model.setNextAfterVisitTime(RecordModel.getNextAfterVisitTime()); |
1290 | 1290 | model.setType(0);//追访状态,修改预约下次时间后改为待追访。 |
1291 | 1291 | } |
1292 | - //选择不需要预约下次追访时间置为空 | |
1293 | - | |
1294 | - cervixVisitService.updateOneCervixVisit(model,1); | |
1292 | + Update update=MongoConvertHelper | |
1293 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(model)); | |
1294 | + //选择不需要预约下次追访时间,删除该字段。 | |
1295 | + if(0==RecordModel.getAppointment()){ | |
1296 | + update.unset("nextAfterVisitTime"); | |
1297 | + } | |
1298 | + mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(model.getId())), update, CervixVisitModel.class); | |
1295 | 1299 | |
1296 | 1300 | return new BaseResponse("成功", ErrorCodeConstants.SUCCESS); |
1297 | 1301 | } catch (Exception e) { |