Commit 2eb7bc875742a1e99fe51fd68e446679c3d27c00

Authored by jiangjiazhi
1 parent e6547b5741

a

Showing 2 changed files with 4 additions and 1 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ 2eb7bc8
... ... @@ -277,7 +277,7 @@
277 277 if (null != areaCode&&StringUtils.isNotEmpty(areaCode.getAreaCode())) {
278 278 // 建档成功后,给孕妇造五个条形码
279 279 String ticketPid = autoIncermentService.nextPatientTicketId(areaCode.getAreaCode());
280   - for (Integer i = 1; i <= 5; i++) {
  280 + for (Integer i = PatientCheckTicketFacade.complyCurrentDay(p.getLastMenses()); i <= 5; i++) {
281 281 PatientCheckTicket ticket = new PatientCheckTicket();
282 282 ticket.setStatus(1);
283 283 ticket.setHospitalId(p.getHospitalId());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientCheckTicketFacade.java View file @ 2eb7bc8
... ... @@ -206,6 +206,9 @@
206 206 * @return
207 207 */
208 208 public static int complyCurrentDay(Date lastMess) {
  209 + if(null==lastMess){
  210 + return 0;
  211 + }
209 212 int day = DateUtil.getDays(lastMess, new Date());
210 213 if (day <= 12 * 7 + 6)
211 214 return 1;