Commit 67bee5ea95375518399fc4b363308f3f9bd07963

Authored by zhangchao
1 parent 20cfbe325f
Exists in dev

#fix:优化服务过期处理逻辑

Showing 2 changed files with 13 additions and 9 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ 67bee5e
... ... @@ -6481,6 +6481,7 @@
6481 6481 public BaseResponse getAutoRiskRecord(AntExManagerQueryRequest antExManagerQueryRequest, Integer id) {
6482 6482 List riskList = new ArrayList();
6483 6483 BaseQuery baseQuery = new BaseQuery();
  6484 + String hospitalId = autoMatchFacade.getHospitalId(id);
6484 6485  
6485 6486 PatientsQuery patientsQuery = new PatientsQuery();
6486 6487 List <Patients> patientses = null;
... ... @@ -6498,6 +6499,7 @@
6498 6499 }
6499 6500 }
6500 6501 Query query = new Query();
  6502 + query.addCriteria(Criteria.where("hospitalId").is(hospitalId));
6501 6503 if (CollectionUtils.isNotEmpty(patientIds)) {
6502 6504 query.addCriteria(Criteria.where("patientId").in(patientIds));
6503 6505 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java View file @ 67bee5e
... ... @@ -1566,16 +1566,18 @@
1566 1566 service.setSynStatus(1);
1567 1567 service.setUpdateDate(new Date());
1568 1568 patientServiceService.updatePatientService(service);
1569   -
1570   - Patients patients = patientsService.findOnePatientById(service.getParentid());
1571   - if (patients != null) {
1572   - if (patients.getType()==3){
1573   - patients.setServiceStatus(ServiceStatusEnums.STANDARD_OVERDUE.getId());
1574   - }else {
1575   - // patients.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId());
1576   - patients.setServiceStatus(ServiceStatusEnums.ADD_OVERDUE.getId());
  1569 + //只有孕期精准医疗、产后康复才更新
  1570 + if (service.getSerType()==1 ||service.getSerType()==20){
  1571 + Patients patients = patientsService.findOnePatientById(service.getParentid());
  1572 + if (patients != null) {
  1573 + if (patients.getType()==3){
  1574 + patients.setServiceStatus(ServiceStatusEnums.STANDARD_OVERDUE.getId());
  1575 + }else {
  1576 + // patients.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId());
  1577 + patients.setServiceStatus(ServiceStatusEnums.ADD_OVERDUE.getId());
  1578 + }
  1579 + patientsService.updatePatient(patients);
1577 1580 }
1578   - patientsService.updatePatient(patients);
1579 1581 }
1580 1582 }
1581 1583 }