Commit dce860d26a69c28e5b44305695b0bb7c6ca08974
1 parent
3979bf7edc
Exists in
dev
#fix:优化服务到期自动更新逻辑
Showing 1 changed file with 9 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
View file @
dce860d
... | ... | @@ -1557,18 +1557,24 @@ |
1557 | 1557 | |
1558 | 1558 | PatientServiceQuery patientQuery = new PatientServiceQuery(); |
1559 | 1559 | patientQuery.setSerEndTime(new Date()); |
1560 | - patientQuery.setStatus(1); | |
1560 | + patientQuery.setSerStatus(1); | |
1561 | 1561 | List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery); |
1562 | 1562 | if (CollectionUtils.isNotEmpty(patientServices)) { |
1563 | 1563 | for (PatientService service : patientServices) { |
1564 | 1564 | //service.setSerType(1); |
1565 | 1565 | service.setSerStatus(3); |
1566 | + service.setSynStatus(1); | |
1567 | + service.setUpdateDate(new Date()); | |
1566 | 1568 | patientServiceService.updatePatientService(service); |
1567 | 1569 | |
1568 | 1570 | Patients patients = patientsService.findOnePatientById(service.getParentid()); |
1569 | 1571 | if (patients != null) { |
1570 | - // patients.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId()); | |
1571 | - patients.setServiceStatus(ServiceStatusEnums.ADD_OVERDUE.getId()); | |
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()); | |
1577 | + } | |
1572 | 1578 | patientsService.updatePatient(patients); |
1573 | 1579 | } |
1574 | 1580 | } |