Commit 05a15786d5fda5c1380fb1aff22e440b12eaff49
1 parent
18a85c2bbb
Exists in
dev
小程序调用-产后康复
Showing 1 changed file with 16 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/matnRehabPC/service/impl/MatnRehabServiceImpl.java
View file @
05a1578
| ... | ... | @@ -8,7 +8,9 @@ |
| 8 | 8 | import com.lyms.platform.operate.web.facade.ViewFacade; |
| 9 | 9 | import com.lyms.platform.operate.web.matnRehabPC.service.MatnRehabService; |
| 10 | 10 | import com.lyms.platform.permission.model.MedicalRecordVo; |
| 11 | +import com.lyms.platform.permission.model.PatientService; | |
| 11 | 12 | import com.lyms.platform.permission.service.AppointmentService; |
| 13 | +import com.lyms.platform.permission.service.PatientServiceService; | |
| 12 | 14 | import com.lyms.platform.pojo.MaternalDeliverModel; |
| 13 | 15 | import com.lyms.platform.pojo.PatientWeight; |
| 14 | 16 | import com.lyms.platform.pojo.Patients; |
| ... | ... | @@ -20,6 +22,7 @@ |
| 20 | 22 | import org.springframework.data.mongodb.core.query.Query; |
| 21 | 23 | import org.springframework.stereotype.Service; |
| 22 | 24 | |
| 25 | +import java.util.Date; | |
| 23 | 26 | import java.util.List; |
| 24 | 27 | import java.util.Map; |
| 25 | 28 | |
| ... | ... | @@ -41,6 +44,9 @@ |
| 41 | 44 | @Autowired |
| 42 | 45 | private AppointmentService appointmentService; |
| 43 | 46 | |
| 47 | + @Autowired | |
| 48 | + PatientServiceService patientServiceService; | |
| 49 | + | |
| 44 | 50 | @Override |
| 45 | 51 | public BaseObjectResponse queryInfo(String phone) { |
| 46 | 52 | BaseObjectResponse baseObjectResponse = new BaseObjectResponse(); |
| ... | ... | @@ -79,6 +85,16 @@ |
| 79 | 85 | data.put("diagnosis",medicalRecordVo1.getDiagnosis()); |
| 80 | 86 | data.put("operation",medicalRecordVo1.getOperation()); |
| 81 | 87 | } |
| 88 | + | |
| 89 | + // 查询服务是否开通 | |
| 90 | + List<PatientService> patientServices = patientServiceService.getServiceListByParentId(patients.getId(),6); | |
| 91 | + if(CollectionUtils.isNotEmpty(patientServices)){ | |
| 92 | + Date date = new Date(); | |
| 93 | + if(date.compareTo(patientServices.get(0).getSerEndTime())>0){ | |
| 94 | + data.put("serStatus","1"); | |
| 95 | + } | |
| 96 | + } | |
| 97 | + | |
| 82 | 98 | baseObjectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 83 | 99 | baseObjectResponse.setErrormsg("成功"); |
| 84 | 100 | baseObjectResponse.setData(data); |