Commit b671ba5cac20132d5b783b628611704a661577bc

Authored by liquanyu
1 parent a66fe4037f

update

Showing 9 changed files with 36 additions and 35 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/BabyModel.java View file @ b671ba5
... ... @@ -398,6 +398,16 @@
398 398 //居住类别
399 399 private String liveType;
400 400  
  401 + private String numberCode;
  402 +
  403 + public String getNumberCode() {
  404 + return numberCode;
  405 + }
  406 +
  407 + public void setNumberCode(String numberCode) {
  408 + this.numberCode = numberCode;
  409 + }
  410 +
401 411 public Integer getEndCase() {
402 412 return endCase;
403 413 }
platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java View file @ b671ba5
... ... @@ -106,7 +106,6 @@
106 106  
107 107 //母亲证件号
108 108 private String mcertNo;
109   - private String mcertNoEnd;
110 109  
111 110 //就诊卡号
112 111 private String vcCardNo;
... ... @@ -886,7 +885,7 @@
886 885 condition = condition.and("blNo", hasBlno, MongoOper.EXISTS);
887 886 }
888 887 if (null != numberCode) {
889   - condition = condition.and("numberCode", numberCode, MongoOper.LIKE);
  888 + condition = condition.and("numberCode", numberCode, MongoOper.IS);
890 889 }
891 890  
892 891 if (-1 != visitstatus) {
... ... @@ -969,9 +968,7 @@
969 968 if (!StringUtils.isEmpty(mcertNo)) {
970 969 condition = condition.and("mcertNo", mcertNo, MongoOper.IS);
971 970 }
972   - if (!StringUtils.isEmpty(mcertNoEnd)) {
973   - condition = condition.and("mcertNo", "^"+mcertNoEnd, MongoOper.LIKE);
974   - }
  971 +
975 972 if (!StringUtils.isEmpty(cardNo)) {
976 973 condition = condition.and("cardNo", cardNo, MongoOper.IS);
977 974 }
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ b671ba5
... ... @@ -183,7 +183,6 @@
183 183 * 身份证号码
184 184 */
185 185 private String cardNo;
186   - private String cardNoEnd;
187 186  
188 187  
189 188 private Date birth;
190 189  
... ... @@ -371,14 +370,7 @@
371 370  
372 371 private String trackHospitalId;
373 372  
374   - public String getCardNoEnd() {
375   - return cardNoEnd;
376   - }
377 373  
378   - public void setCardNoEnd(String cardNoEnd) {
379   - this.cardNoEnd = cardNoEnd;
380   - }
381   -
382 374 public String getTrackHospitalId() {
383 375 return trackHospitalId;
384 376 }
... ... @@ -678,10 +670,6 @@
678 670 }
679 671 if (StringUtils.isNotEmpty(cardNo)) {
680 672 condition = condition.and("cardNo", cardNo, MongoOper.IS);
681   -
682   - }
683   - if (StringUtils.isNotEmpty(cardNoEnd)) {
684   - condition = condition.and("cardNo", "^" + cardNoEnd, MongoOper.LIKE);
685 673  
686 674 }
687 675  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java View file @ b671ba5
... ... @@ -20,7 +20,7 @@
20 20  
21 21 // Map<String, Object> resutl = getSignParams("bisp-czsfy", "czsfy123$");
22 22 // System.out.println(resutl);
23   - System.out.println(contain("偏大","偏大异常"));
  23 + System.out.println("360102199003079318".substring("360102199003079318".length() - 8));
24 24 }
25 25  
26 26 public static boolean contain(String value, String content) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ b671ba5
... ... @@ -770,7 +770,7 @@
770 770 model.setBuildType(1);
771 771 model.setHospitalId(request.getHospitalId());
772 772 // String hospitalName = organizationService.getOrganization(Integer.valueOf(request.getHospitalId())).getName();
773   -
  773 + getNumberCode(model);
774 774 operateLogFacade.addAddOptLog(userId, Integer.valueOf(hid), model, OptActionEnums.ADD.getId(), "儿童建档");
775 775 model = babyBookbuildingService.addBabyBookbuilding(model);
776 776  
... ... @@ -816,6 +816,18 @@
816 816 ExceptionUtils.catchException(e, "add baby building 异常");
817 817 }
818 818 return br;
  819 + }
  820 +
  821 + private void getNumberCode(BabyModel model)
  822 + {
  823 + if (model.getMcertNo().length() > 8)
  824 + {
  825 + model.setNumberCode(model.getMcertNo().substring(model.getMcertNo().length() - 8));
  826 + }
  827 + else
  828 + {
  829 + model.setNumberCode(model.getMcertNo());
  830 + }
819 831 }
820 832  
821 833 /**
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BoneFacade.java View file @ b671ba5
... ... @@ -263,7 +263,7 @@
263 263 PatientsQuery patientsQuery = new PatientsQuery();
264 264 patientsQuery.setYn(YnEnums.YES.getId());
265 265 patientsQuery.setType(1);
266   - patientsQuery.setCardNo(boneModel.getCardNo());
  266 + patientsQuery.setNumberCode(boneModel.getCardNo());
267 267 List<Patients> patients = patientsService.queryPatient(patientsQuery);
268 268 if (CollectionUtils.isNotEmpty(patients))
269 269 {
... ... @@ -284,7 +284,7 @@
284 284 {
285 285 BabyModelQuery babyModelQuery = new BabyModelQuery();
286 286 babyModelQuery.setYn(YnEnums.YES.getId());
287   - babyModelQuery.setMcertNo(boneModel.getCardNo());
  287 + babyModelQuery.setNumberCode(boneModel.getCardNo());
288 288 List<BabyModel> babyModels = babyBookbuildingService.queryBabyBuildByCond(babyModelQuery);
289 289  
290 290 if (CollectionUtils.isNotEmpty(babyModels)) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ b671ba5
... ... @@ -531,20 +531,14 @@
531 531  
532 532 private void getNumberCode(Patients patients)
533 533 {
534   - String numberCode = "";
535   - PatientsQuery patientsQuery = new PatientsQuery();
536   - patientsQuery.setYn(YnEnums.YES.getId());
537   - while (true)
  534 + if (patients.getCardNo().length() > 8)
538 535 {
539   - numberCode = patients.getHospitalId()+DateUtil.getYmd(new Date()) + new Random().nextInt(9999);
540   - patientsQuery.setNumberCode(numberCode);
541   - List<Patients> patientses = yunBookbuildingService.queryPregnantWithQuery(patientsQuery);
542   - if (!CollectionUtils.isNotEmpty(patientses))
543   - {
544   - break;
545   - }
  536 + patients.setNumberCode(patients.getCardNo().substring(patients.getCardNo().length() - 8));
546 537 }
547   - patients.setNumberCode(numberCode);
  538 + else
  539 + {
  540 + patients.setNumberCode(patients.getCardNo());
  541 + }
548 542 }
549 543  
550 544  
platform-transfer/src/main/java/com/lyms/platform/worker/BoneWorker.java View file @ b671ba5
... ... @@ -26,7 +26,7 @@
26 26 @Autowired
27 27 private ApplicationProperties properties;
28 28  
29   - @Scheduled(cron = "0 0/10 * * * ?")
  29 + @Scheduled(cron = "0 0/1 * * * ?")
30 30 public void getBoneRecords()
31 31 {
32 32 System.out.println("getBoneRecords start");
platform-transfer/src/main/resources/application.yml View file @ b671ba5
... ... @@ -4,7 +4,7 @@
4 4  
5 5 param:
6 6 #微量元素access路径
7   - microelement-path: D://tc.mdb
  7 + microelement-path: D://EK-8800181001-net_Plus//System//Patient.mdb
8 8 #骨密度access数据库路径
9 9 bone-path: D://tc.mdb
10 10 #区域url地址