Commit 2a64349a2c94a60f7959656f17efcc7bba06be56

Authored by liquanyu
1 parent 14d587ea33

update

Showing 3 changed files with 6 additions and 6 deletions

platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java View file @ 2a64349
... ... @@ -1629,7 +1629,7 @@
1629 1629 public static void main(String[] args) {
1630 1630  
1631 1631 Date bir = parseYMD("1990-03-07");
1632   - Date bir1 = parseYMD("2019-03-04");
  1632 + Date bir1 = parseYMD("2019-03-08");
1633 1633 int i = DateUtil.getAge(bir, bir1);
1634 1634 System.out.println(i);
1635 1635  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java View file @ 2a64349
... ... @@ -3696,7 +3696,7 @@
3696 3696 public void setBabyHospitalId()
3697 3697 {
3698 3698 BabyModelQuery babyModelQuery = new BabyModelQuery();
3699   - babyModelQuery.setDataStatus(true);
  3699 + babyModelQuery.setFmDataStatu(true);
3700 3700 babyModelQuery.setBuildType(2);
3701 3701 babyModelQuery.setCreatedTimeStart(DateUtil.addMonth(new Date(), -3));
3702 3702 babyModelQuery.setCreatedTimeEnd(new Date());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ 2a64349
... ... @@ -6370,7 +6370,7 @@
6370 6370 }
6371 6371  
6372 6372 List<Patients> list;
6373   - String patientId = getPatientId(idCard);
  6373 + String patientId = getPatientId(idCard,hospitalId);
6374 6374 if (StringUtils.isNotEmpty(patientId)) {
6375 6375 //衡水市
6376 6376 if ("12".equals(cityId))
... ... @@ -6649,7 +6649,7 @@
6649 6649 * @param idCard
6650 6650 * @return patientId/null
6651 6651 */
6652   - private String getPatientId(String idCard) {
  6652 + private String getPatientId(String idCard,String hospitalId) {
6653 6653 PersonModel personModel = mongoTemplate.findOne(Query.query(Criteria.where("cardNo").is(idCard).and("type").ne(2)), PersonModel.class);
6654 6654 if (personModel != null) {
6655 6655 String personModelId = personModel.getId();
... ... @@ -6657,8 +6657,8 @@
6657 6657 with(new Sort(Sort.Direction.DESC, "created")), MaternalDeliverModel.class);
6658 6658 if (CollectionUtils.isNotEmpty(models)) {
6659 6659 MaternalDeliverModel deliverModel = models.get(0);
6660   - String parentId = deliverModel.getParentId();
6661   - Patients patientsModel = mongoTemplate.findOne(Query.query(Criteria.where("id").is(parentId)), Patients.class);
  6660 + Patients patientsModel = mongoTemplate.findOne(Query.query(Criteria.where("pid").
  6661 + is(deliverModel.getPid()).and("hospitalId").is(hospitalId).and("type").is(3).is(hospitalId).and("yn").is(YnEnums.YES.getId())), Patients.class);
6662 6662 if (patientsModel != null) {
6663 6663 return patientsModel.getId();
6664 6664 }