|
@@ -20,6 +20,9 @@ import thyyxxk.webserver.utils.DateUtil;
|
|
|
import thyyxxk.webserver.utils.ResultVoUtil;
|
|
|
import thyyxxk.webserver.utils.StringUtil;
|
|
|
|
|
|
+import java.time.LocalDate;
|
|
|
+import java.time.ZoneId;
|
|
|
+import java.time.temporal.ChronoUnit;
|
|
|
import java.util.Date;
|
|
|
|
|
|
@RestController
|
|
@@ -85,7 +88,12 @@ public class MedicalLaboratoryController {
|
|
|
dao.updateById(body);
|
|
|
}
|
|
|
if (body.getReportState() == State.PUBLISHED) {
|
|
|
- pushWxMessage(body);
|
|
|
+ LocalDate pb = body.getPublishTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
|
|
+ LocalDate now = LocalDate.now();
|
|
|
+ long daysBetween = ChronoUnit.DAYS.between(pb, now);
|
|
|
+ if (daysBetween <= 15) {
|
|
|
+ pushWxMessage(body);
|
|
|
+ }
|
|
|
}
|
|
|
return ResultVoUtil.success(body.getReqNo());
|
|
|
}
|