Commit 074fb593f31f0ebd831da38291fb71c2b4f76ae7
1 parent
9209c23464
Exists in
master
and in
7 other branches
分娩作废产检劵
Showing 3 changed files with 41 additions and 8 deletions
platform-dal/src/main/java/com/lyms/platform/query/AntExRecordQuery.java
View file @
074fb59
| ... | ... | @@ -32,7 +32,27 @@ |
| 32 | 32 | * 末次月经 |
| 33 | 33 | */ |
| 34 | 34 | private Date lastMensesEnd; |
| 35 | + //产检孕周 | |
| 36 | + private Integer cDueWeekStart; | |
| 37 | + private Integer cDueWeekEnd; | |
| 35 | 38 | |
| 39 | + | |
| 40 | + public Integer getcDueWeekStart() { | |
| 41 | + return cDueWeekStart; | |
| 42 | + } | |
| 43 | + | |
| 44 | + public void setcDueWeekStart(Integer cDueWeekStart) { | |
| 45 | + this.cDueWeekStart = cDueWeekStart; | |
| 46 | + } | |
| 47 | + | |
| 48 | + public Integer getcDueWeekEnd() { | |
| 49 | + return cDueWeekEnd; | |
| 50 | + } | |
| 51 | + | |
| 52 | + public void setcDueWeekEnd(Integer cDueWeekEnd) { | |
| 53 | + this.cDueWeekEnd = cDueWeekEnd; | |
| 54 | + } | |
| 55 | + | |
| 36 | 56 | //生日查询 |
| 37 | 57 | private Date birthEnd; |
| 38 | 58 | private Date birthStart; |
| ... | ... | @@ -458,6 +478,21 @@ |
| 458 | 478 | c = c.lte(birthEnd); |
| 459 | 479 | } else { |
| 460 | 480 | c = Criteria.where("brith").lte(birthEnd); |
| 481 | + } | |
| 482 | + } | |
| 483 | + if (null != cDueWeekStart) { | |
| 484 | + if (null != c) { | |
| 485 | + c = c.and("cDay").gte(cDueWeekStart); | |
| 486 | + } else { | |
| 487 | + c = Criteria.where("cDay").gte(cDueWeekStart); | |
| 488 | + } | |
| 489 | + } | |
| 490 | + | |
| 491 | + if (null != cDueWeekEnd) { | |
| 492 | + if (null != c) { | |
| 493 | + c = c.lte(cDueWeekEnd); | |
| 494 | + } else { | |
| 495 | + c = Criteria.where("cDay").lte(cDueWeekEnd); | |
| 461 | 496 | } |
| 462 | 497 | } |
| 463 | 498 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
074fb59
| ... | ... | @@ -113,11 +113,11 @@ |
| 113 | 113 | } |
| 114 | 114 | //产检孕周 |
| 115 | 115 | if (null != antExManagerQueryRequest.getStartDueWeek()) { |
| 116 | - antExRecordQuery.setLastMensesEnd(antExManagerQueryRequest.capStart()); | |
| 116 | + antExRecordQuery.setcDueWeekStart(antExManagerQueryRequest.capStart()); | |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | if (null != antExManagerQueryRequest.getEndDueWeek()) { |
| 120 | - antExRecordQuery.setLastMensesStart(antExManagerQueryRequest.capEnd()); | |
| 120 | + antExRecordQuery.setcDueWeekEnd(antExManagerQueryRequest.capEnd()); | |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | //预产期 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExManagerQueryRequest.java
View file @
074fb59
| ... | ... | @@ -74,20 +74,18 @@ |
| 74 | 74 | |
| 75 | 75 | |
| 76 | 76 | |
| 77 | - public Date capStart() { | |
| 77 | + public Integer capStart() { | |
| 78 | 78 | if (StringUtils.isNotEmpty(startDueWeek) ) { |
| 79 | 79 | int start = NumberUtils.toInt(startDueWeek, 0); |
| 80 | - Date endDate = DateUtil.addDay(DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(new Date())), -(start * 7)); | |
| 81 | - return endDate; | |
| 80 | + return (start * 7); | |
| 82 | 81 | } |
| 83 | 82 | return null; |
| 84 | 83 | } |
| 85 | 84 | |
| 86 | - public Date capEnd() { | |
| 85 | + public Integer capEnd() { | |
| 87 | 86 | if (StringUtils.isNotEmpty(endDueWeek)) { |
| 88 | 87 | int end = NumberUtils.toInt(endDueWeek, 0); |
| 89 | - Date endDate = DateUtil.addDay(DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(new Date())), -(end*7)-6); | |
| 90 | - return endDate; | |
| 88 | + return (end*7)+6; | |
| 91 | 89 | } |
| 92 | 90 | return null; |
| 93 | 91 | } |