Commit 4cf6f80f80e07b541272ce48188045a34bdd7d25
1 parent
5caccd0045
Exists in
master
and in
1 other branch
分娩记录出生证明获取修改
Showing 4 changed files with 88 additions and 7 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/TrackDownRecord.java
- platform-dal/src/main/java/com/lyms/platform/query/TrackDownRecordQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TrackDownController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java
platform-dal/src/main/java/com/lyms/platform/pojo/TrackDownRecord.java
View file @
4cf6f80
| ... | ... | @@ -86,6 +86,17 @@ |
| 86 | 86 | |
| 87 | 87 | private String trackHospitalId; |
| 88 | 88 | |
| 89 | + //预约时间逾期次数 | |
| 90 | + private Integer overTimes; | |
| 91 | + | |
| 92 | + public Integer getOverTimes() { | |
| 93 | + return overTimes; | |
| 94 | + } | |
| 95 | + | |
| 96 | + public void setOverTimes(Integer overTimes) { | |
| 97 | + this.overTimes = overTimes; | |
| 98 | + } | |
| 99 | + | |
| 89 | 100 | public Date getNextCheckTime() { |
| 90 | 101 | return nextCheckTime; |
| 91 | 102 | } |
platform-dal/src/main/java/com/lyms/platform/query/TrackDownRecordQuery.java
View file @
4cf6f80
| ... | ... | @@ -76,7 +76,10 @@ |
| 76 | 76 | private Date checkOverDaysStart; |
| 77 | 77 | private Date checkOverDaysEnd; |
| 78 | 78 | |
| 79 | + private Date nextCheckTimeStart; | |
| 80 | + private Date nextCheckTimeEnd; | |
| 79 | 81 | |
| 82 | + | |
| 80 | 83 | //追访状态 0 正常 1. 待追访 2.已终止 |
| 81 | 84 | private Integer followupStatus; |
| 82 | 85 | |
| ... | ... | @@ -359,6 +362,30 @@ |
| 359 | 362 | |
| 360 | 363 | |
| 361 | 364 | } |
| 365 | + | |
| 366 | + if (null != nextCheckTimeStart) { | |
| 367 | + if (null != c1) { | |
| 368 | + c1 = c1.and("nextCheckTime").gte(nextCheckTimeStart); | |
| 369 | + } else { | |
| 370 | + c1 = Criteria.where("nextCheckTime").gte(nextCheckTimeStart); | |
| 371 | + } | |
| 372 | + } | |
| 373 | + if (null != nextCheckTimeEnd) { | |
| 374 | + if (c1 != null) { | |
| 375 | + if (c1.getCriteriaObject().containsField("nextCheckTime")) | |
| 376 | + { | |
| 377 | + c1 = c1.lte(nextCheckTimeEnd); | |
| 378 | + } | |
| 379 | + else | |
| 380 | + { | |
| 381 | + c1 = c1.and("nextCheckTime").lte(nextCheckTimeEnd); | |
| 382 | + } | |
| 383 | + | |
| 384 | + } else { | |
| 385 | + c1 = Criteria.where("nextCheckTime").lte(nextCheckTimeEnd); | |
| 386 | + } | |
| 387 | + } | |
| 388 | + | |
| 362 | 389 | /******产筛特殊处理*******/ |
| 363 | 390 | if (null != queryTrackType && queryTrackType == 4) { |
| 364 | 391 | if (null != trackDownDateStart) { |
| 365 | 392 | |
| ... | ... | @@ -476,7 +503,21 @@ |
| 476 | 503 | return condition.toMongoQuery(); |
| 477 | 504 | } |
| 478 | 505 | |
| 506 | + public Date getNextCheckTimeEnd() { | |
| 507 | + return nextCheckTimeEnd; | |
| 508 | + } | |
| 479 | 509 | |
| 510 | + public void setNextCheckTimeEnd(Date nextCheckTimeEnd) { | |
| 511 | + this.nextCheckTimeEnd = nextCheckTimeEnd; | |
| 512 | + } | |
| 513 | + | |
| 514 | + public Date getNextCheckTimeStart() { | |
| 515 | + return nextCheckTimeStart; | |
| 516 | + } | |
| 517 | + | |
| 518 | + public void setNextCheckTimeStart(Date nextCheckTimeStart) { | |
| 519 | + this.nextCheckTimeStart = nextCheckTimeStart; | |
| 520 | + } | |
| 480 | 521 | |
| 481 | 522 | public Date getCheckOverDaysStart() { |
| 482 | 523 | return checkOverDaysStart; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TrackDownController.java
View file @
4cf6f80
| ... | ... | @@ -88,7 +88,7 @@ |
| 88 | 88 | @RequestParam Integer page, @RequestParam Integer limit, HttpServletRequest request, |
| 89 | 89 | Integer check, Integer checkup, String pregnantBuild, Integer followupStatus, String isDeliver, Integer encryption,@RequestParam(required = false,defaultValue = "false") boolean isArea) { |
| 90 | 90 | return trackDownService.all(buildStart, buildEnd, checkStart, checkEnd, fmStart, fmEnd, key, |
| 91 | - page, limit, getUserId(request), type, check, checkup, pregnantBuild, followupStatus, isDeliver, encryption,isArea); | |
| 91 | + page, limit, getUserId(request), type, check, checkup, pregnantBuild, followupStatus, isDeliver, encryption, isArea); | |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | @ResponseBody |
| ... | ... | @@ -152,6 +152,15 @@ |
| 152 | 152 | |
| 153 | 153 | return downFacade.list(downQueryRequest, getUserId(request)); |
| 154 | 154 | } |
| 155 | + | |
| 156 | + | |
| 157 | + @ResponseBody | |
| 158 | + @RequestMapping(value = "/handleTrackDown", method = RequestMethod.GET) | |
| 159 | + public BaseResponse handleTrackDown() { | |
| 160 | + downFacade.handleTrackDown(); | |
| 161 | + return new BaseResponse(); | |
| 162 | + } | |
| 163 | + | |
| 155 | 164 | |
| 156 | 165 | /** |
| 157 | 166 | * 孕妇追访管理历史数据处理 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java
View file @
4cf6f80
| ... | ... | @@ -804,7 +804,6 @@ |
| 804 | 804 | PageResult pageResult = new PageResult(); |
| 805 | 805 | try { |
| 806 | 806 | downRecordQuery = convertNaviteQuery(downQueryRequest, userId); |
| 807 | - System.out.println(downRecordQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 808 | 807 | } catch (Exception e) { |
| 809 | 808 | pageResult.setCount(0); |
| 810 | 809 | pageResult.setPage(downQueryRequest.getPage()); |
| ... | ... | @@ -812,7 +811,6 @@ |
| 812 | 811 | pageResult.setGrid(new ArrayList<>()); |
| 813 | 812 | return RespBuilder.buildSuccess(pageResult); |
| 814 | 813 | } |
| 815 | - System.out.println(downRecordQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 816 | 814 | List<TrackDownRecord> downRecordList = trackDownRecordService.queryTrackDown(downRecordQuery); |
| 817 | 815 | List<Map> data = new ArrayList<>(); |
| 818 | 816 | TrackDownTypeHandler downTypeHandler = trackDownTypeHandlerMap.get(downQueryRequest.getTrackType()); |
| ... | ... | @@ -845,6 +843,26 @@ |
| 845 | 843 | return RespBuilder.buildSuccess(pageResult); |
| 846 | 844 | } |
| 847 | 845 | |
| 846 | + | |
| 847 | + public void handleTrackDown() | |
| 848 | + { | |
| 849 | + TrackDownRecordQuery downRecordQuery = new TrackDownRecordQuery(); | |
| 850 | + downRecordQuery.setTrackTypes(Arrays.asList(3, 9)); | |
| 851 | + Date time = DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(new Date())); | |
| 852 | + downRecordQuery.setNextCheckTimeStart(time); | |
| 853 | + downRecordQuery.setNextCheckTimeEnd(time); | |
| 854 | + List<TrackDownRecord> downRecordList = trackDownRecordService.queryTrackDown(downRecordQuery); | |
| 855 | + | |
| 856 | + if (CollectionUtils.isNotEmpty(downRecordList)) | |
| 857 | + { | |
| 858 | + for (TrackDownRecord downRecord : downRecordList) | |
| 859 | + { | |
| 860 | + downRecord.setNextCheckTime(DateUtil.addDay(time,7)); | |
| 861 | + trackDownRecordService.updateTrackDown(downRecord,downRecord.getId()); | |
| 862 | + } | |
| 863 | + } | |
| 864 | + } | |
| 865 | + | |
| 848 | 866 | /** |
| 849 | 867 | * 产后复查 |
| 850 | 868 | */ |
| ... | ... | @@ -1060,6 +1078,8 @@ |
| 1060 | 1078 | } |
| 1061 | 1079 | //完善高危数据 |
| 1062 | 1080 | handHightRisk(patients, temp); |
| 1081 | + temp.put("overTimes", downRecord.getOverTimes() == null ? 0 : downRecord.getOverTimes()); | |
| 1082 | + | |
| 1063 | 1083 | temp.put("username", downRecord.getUsername()); |
| 1064 | 1084 | temp.put("age", DateUtil.getAge(downRecord.getBirth())); |
| 1065 | 1085 | temp.put("cardNo", encryption == 0 ? StringUtils.encryCardNo(downRecord.getCardNo()) : downRecord.getCardNo()); |
| 1066 | 1086 | |
| ... | ... | @@ -1128,9 +1148,9 @@ |
| 1128 | 1148 | temp.put("cjDate", DateUtil.getyyyy_MM_dd(examinationModel.getCheckDate())); /** 产检日期 */ |
| 1129 | 1149 | //if (downRecord.getTrackType() == TrackDownDateEnums.C.getId() || downRecord.getTrackType() == TrackDownDateEnums.I.getId()) {//产检追访查询预约产检日期 |
| 1130 | 1150 | if (examinationModel.getNextCheckTime() != null) { |
| 1131 | - temp.put("yyTime", DateUtil.getyyyy_MM_dd(examinationModel.getNextCheckTime())); /** 预约产检日期 */ | |
| 1151 | + temp.put("yyTime", DateUtil.getyyyy_MM_dd(downRecord.getNextCheckTime())); /** 预约产检日期 */ | |
| 1132 | 1152 | |
| 1133 | - int days = DateUtil.getDays(examinationModel.getNextCheckTime(), new Date()); | |
| 1153 | + int days = DateUtil.getDays(downRecord.getNextCheckTime(), new Date()); | |
| 1134 | 1154 | temp.put("yyTimeDays", days); /** 预约逾期天数 */ |
| 1135 | 1155 | } |
| 1136 | 1156 | //} |
| ... | ... | @@ -1141,8 +1161,8 @@ |
| 1141 | 1161 | temp.put("cjDate", DateUtil.getyyyy_MM_dd(antExChuModel.getCheckTime())); /** 产检日期 */ |
| 1142 | 1162 | // if (downRecord.getTrackType() == TrackDownDateEnums.C.getId() || downRecord.getTrackType() == TrackDownDateEnums.I.getId()) {//产检追访查询预约产检日期 |
| 1143 | 1163 | if (antExChuModel.getNextCheckTime() != null) { |
| 1144 | - temp.put("yyTime", DateUtil.getyyyy_MM_dd(antExChuModel.getNextCheckTime())); /** 预约产检日期 */ | |
| 1145 | - int days = DateUtil.getDays(antExChuModel.getNextCheckTime(), new Date()); | |
| 1164 | + temp.put("yyTime", DateUtil.getyyyy_MM_dd(downRecord.getNextCheckTime())); /** 预约产检日期 */ | |
| 1165 | + int days = DateUtil.getDays(downRecord.getNextCheckTime(), new Date()); | |
| 1146 | 1166 | temp.put("yyTimeDays", days); /** 预约逾期天数 */ |
| 1147 | 1167 | } |
| 1148 | 1168 | //} |