Commit dbb0e1a9c68349aca23ec9956a1d47ca114e212f
1 parent
2c4d3b9f9c
Exists in
master
and in
6 other branches
体重报告一周限制修改
Showing 2 changed files with 21 additions and 0 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/PatientWeight.java
View file @
dbb0e1a
... | ... | @@ -133,6 +133,16 @@ |
133 | 133 | //打印时间 |
134 | 134 | private Date printingTime; |
135 | 135 | |
136 | + // | |
137 | + private boolean printing; | |
138 | + | |
139 | + public boolean isPrinting() { | |
140 | + return printing; | |
141 | + } | |
142 | + | |
143 | + public void setPrinting(boolean printing) { | |
144 | + this.printing = printing; | |
145 | + } | |
136 | 146 | |
137 | 147 | public Date getPrintingTime() { |
138 | 148 | return printingTime; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
dbb0e1a
... | ... | @@ -443,6 +443,17 @@ |
443 | 443 | patientWeight.setIsShow(false); |
444 | 444 | } |
445 | 445 | |
446 | + if (null != patientWeight.getPrintingTime()) { | |
447 | + int hasPrint = DateUtil.getDays(patientWeight.getPrintingTime(), new Date()); | |
448 | + if (hasPrint > 7) { | |
449 | + patientWeight.setPrinting(false); | |
450 | + } else { | |
451 | + patientWeight.setPrinting(true); | |
452 | + } | |
453 | + } else { | |
454 | + patientWeight.setPrinting(false); | |
455 | + } | |
456 | + | |
446 | 457 | return RespBuilder.buildSuccess(patientWeight); |
447 | 458 | } |
448 | 459 |