Commit 7fc5b88f1aac4cac2bc44814e8385827e3ae647b
1 parent
9d7f66ec87
Exists in
master
and in
6 other branches
条形码
Showing 3 changed files with 32 additions and 0 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
View file @
7fc5b88
| ... | ... | @@ -322,6 +322,14 @@ |
| 322 | 322 | //条码号 |
| 323 | 323 | private String numberCode; |
| 324 | 324 | |
| 325 | + public String getNumberCode() { | |
| 326 | + return numberCode; | |
| 327 | + } | |
| 328 | + | |
| 329 | + public void setNumberCode(String numberCode) { | |
| 330 | + this.numberCode = numberCode; | |
| 331 | + } | |
| 332 | + | |
| 325 | 333 | public String getLowerHairOgrId() { |
| 326 | 334 | return lowerHairOgrId; |
| 327 | 335 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
7fc5b88
| ... | ... | @@ -339,6 +339,9 @@ |
| 339 | 339 | patient.setModified(new Date()); |
| 340 | 340 | patient.setOperator(userId); |
| 341 | 341 | |
| 342 | + //生成条形码 | |
| 343 | + getNumberCode(patient); | |
| 344 | + | |
| 342 | 345 | //孕妇档案 |
| 343 | 346 | Patients p = yunBookbuildingService.addPregnantBookbuilding(patient); |
| 344 | 347 | |
| ... | ... | @@ -506,6 +509,26 @@ |
| 506 | 509 | br.setData(p.getId()); |
| 507 | 510 | return br; |
| 508 | 511 | } |
| 512 | + | |
| 513 | + | |
| 514 | + private void getNumberCode(Patients patients) | |
| 515 | + { | |
| 516 | + String numberCode = ""; | |
| 517 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
| 518 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
| 519 | + while (true) | |
| 520 | + { | |
| 521 | + numberCode = patients.getHospitalId()+DateUtil.getyyyy_MM_dd(new Date()) +new Random().nextInt(9999); | |
| 522 | + patientsQuery.setNumberCode(numberCode); | |
| 523 | + List<Patients> patientses = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); | |
| 524 | + if (!CollectionUtils.isNotEmpty(patientses)) | |
| 525 | + { | |
| 526 | + break; | |
| 527 | + } | |
| 528 | + } | |
| 529 | + patients.setNumberCode(numberCode); | |
| 530 | + } | |
| 531 | + | |
| 509 | 532 | |
| 510 | 533 | /** |
| 511 | 534 | * 添加或更新追访信息 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
7fc5b88