Commit 3ef9b0ec8f515a26c466029ca13d47f174d1e73a

Authored by jiangjiazhi
1 parent dca58212f0

分娩作废产检劵

Showing 1 changed file with 13 additions and 8 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ 3ef9b0e
... ... @@ -1691,6 +1691,9 @@
1691 1691 String hospitalId = autoMatchFacade.getHospitalId(userId);
1692 1692 Patients patients = null;
1693 1693 Organization og = organizationService.getOrganization(Integer.valueOf(hospitalId));
  1694 + //获取当前用户在的医院
  1695 + List<String> currentGroupHospital=groupsFacade.findGroupHospital(userId, false);
  1696 +
1694 1697 if (!StringUtils.isEmpty(queryRequest.getPatientId())) {
1695 1698 PatientsQuery patientsQuery = new PatientsQuery();
1696 1699 patientsQuery.setId(queryRequest.getPatientId());
1697 1700  
... ... @@ -1709,17 +1712,19 @@
1709 1712  
1710 1713 PatientCheckTicket checkTicket = patientCheckTicketService.getTicket(queryRequest.getBarCode());
1711 1714 if (null != checkTicket) {
1712   - Patients patients1 = patientsService.findOnePatientById(checkTicket.getPatientId());
1713   - if (null != patients1) {
1714   - if (StringUtils.isNotEmpty(patients1.getSource())) {
1715   - patients = patientsService.findOnePatientById(patients1.getSource());
1716   - } else {
1717   - patients = patients1;
  1715 + if(null!=currentGroupHospital&&currentGroupHospital.contains(checkTicket.getHospitalId())){
  1716 + Patients patients1 = patientsService.findOnePatientById(checkTicket.getPatientId());
  1717 + if (null != patients1) {
  1718 + if (StringUtils.isNotEmpty(patients1.getSource())) {
  1719 + patients = patientsService.findOnePatientById(patients1.getSource());
  1720 + } else {
  1721 + patients = patients1;
  1722 + }
1718 1723 }
1719 1724 }
1720 1725 }
1721 1726 } else {
1722   - patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, groupsFacade.findGroupHospital(userId, false), 1, false, null, og.getbStatus() == 1);
  1727 + patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null,currentGroupHospital , 1, false, null, og.getbStatus() == 1);
1723 1728 //查询产妇数据
1724 1729 // patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, hospitalId, 1, false, null, false);
1725 1730 }
... ... @@ -1732,7 +1737,7 @@
1732 1737 // //查询是否还有其他记录
1733 1738 // patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, hospitalId, 3, false, null, false);
1734 1739 // }
1735   - patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, groupsFacade.findGroupHospital(userId, false), 3, false, null, og.getbStatus() == 1);
  1740 + patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, currentGroupHospital, 3, false, null, og.getbStatus() == 1);
1736 1741  
1737 1742 //原来单机
1738 1743 if (null != patients) {