Commit d3f69ac060ece4c4e1e014be6fcf6d5035c98bf0
1 parent
6995b20ef3
Exists in
dev
产妇管理
Showing 1 changed file with 44 additions and 4 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
View file @
d3f69ac
| 1 | 1 | package com.lyms.platform.operate.web.controller; |
| 2 | 2 | |
| 3 | 3 | import com.aspose.words.*; |
| 4 | +import com.lyms.platform.biz.service.PatientsService; | |
| 4 | 5 | import com.lyms.platform.common.annotation.TokenRequired; |
| 5 | 6 | import com.lyms.platform.common.base.BaseController; |
| 6 | 7 | import com.lyms.platform.common.base.LoginContext; |
| 7 | 8 | |
| 8 | 9 | |
| 9 | 10 | |
| 10 | 11 | |
| ... | ... | @@ -17,15 +18,16 @@ |
| 17 | 18 | import com.lyms.platform.operate.web.facade.BasicConfigFacade; |
| 18 | 19 | import com.lyms.platform.operate.web.facade.PatientFacade; |
| 19 | 20 | import com.lyms.platform.operate.web.request.*; |
| 20 | -import com.lyms.platform.operate.web.result.BasicConfigResult; | |
| 21 | -import com.lyms.platform.operate.web.result.HealthHandbookExcelModel; | |
| 22 | -import com.lyms.platform.operate.web.result.PatientManagerQueryModel; | |
| 23 | -import com.lyms.platform.operate.web.result.PatientManagerResult; | |
| 21 | +import com.lyms.platform.operate.web.result.*; | |
| 24 | 22 | import com.lyms.platform.operate.web.service.RareBloodGroupService; |
| 23 | +import com.lyms.platform.permission.model.MedicalRecordVo; | |
| 25 | 24 | import com.lyms.platform.permission.model.Organization; |
| 25 | +import com.lyms.platform.permission.service.AppointmentService; | |
| 26 | 26 | import com.lyms.platform.permission.service.OrganizationService; |
| 27 | 27 | import com.lyms.platform.permission.service.UsersService; |
| 28 | +import com.lyms.platform.pojo.Patients; | |
| 28 | 29 | import com.lyms.platform.pojo.RareBloodGroupModel; |
| 30 | +import com.lyms.platform.query.PatientsQuery; | |
| 29 | 31 | import org.apache.commons.collections.CollectionUtils; |
| 30 | 32 | import org.apache.commons.lang.StringUtils; |
| 31 | 33 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -59,6 +61,12 @@ |
| 59 | 61 | private AutoMatchFacade autoMatchFacade; |
| 60 | 62 | @Autowired |
| 61 | 63 | RareBloodGroupService rareBloodGroupService; |
| 64 | + | |
| 65 | + @Autowired | |
| 66 | + private AppointmentService appointmentService; | |
| 67 | + | |
| 68 | + @Autowired | |
| 69 | + private PatientsService patientsService; | |
| 62 | 70 | /** |
| 63 | 71 | * 产妇管理查询接口 |
| 64 | 72 | * |
| ... | ... | @@ -502,6 +510,38 @@ |
| 502 | 510 | @ResponseBody |
| 503 | 511 | @TokenRequired |
| 504 | 512 | public BaseResponse queryAllPatients(@Valid RiskPatientsQueryRequest patientsQueryRequest, HttpServletRequest request) { |
| 513 | + // 未建党标志 | |
| 514 | + if( "1".equals(patientsQueryRequest.getPatientsType())){ | |
| 515 | + List<QuanChanResult> data = new ArrayList<>(); | |
| 516 | + MedicalRecordVo medicalRecordVo = new MedicalRecordVo(); | |
| 517 | + medicalRecordVo.setNeed("true"); | |
| 518 | + medicalRecordVo.setLimit(patientsQueryRequest.getLimit()); | |
| 519 | + medicalRecordVo.setPage(patientsQueryRequest.getPage()); | |
| 520 | + List<MedicalRecordVo> medicalRecordVoList = appointmentService.queryList(medicalRecordVo); | |
| 521 | + if(CollectionUtils.isNotEmpty(medicalRecordVoList)){ | |
| 522 | + for (MedicalRecordVo recordVo : medicalRecordVoList) { | |
| 523 | + // 查建档 | |
| 524 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
| 525 | + patientsQuery.setCardNo(recordVo.getCardNo()); | |
| 526 | + patientsQuery.setYn(1); | |
| 527 | + patientsQuery.setDesc("true"); | |
| 528 | + patientsQuery.setSort("created"); | |
| 529 | + List<Patients> patientsList = patientsService.queryPatient(patientsQuery); | |
| 530 | + if(CollectionUtils.isNotEmpty(patientsList)){ | |
| 531 | + continue; | |
| 532 | + } | |
| 533 | + QuanChanResult quanChanResult = new QuanChanResult(); | |
| 534 | + quanChanResult.setName(recordVo.getName()); | |
| 535 | + quanChanResult.setAge(1); | |
| 536 | + quanChanResult.setDueWeek(recordVo.getDeliveryTime()); | |
| 537 | + quanChanResult.setcTime("1"); | |
| 538 | + quanChanResult.setRealPhone(recordVo.getPhone()); | |
| 539 | + data.add(quanChanResult); | |
| 540 | + } | |
| 541 | + } | |
| 542 | + return new BaseListResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(data); | |
| 543 | + | |
| 544 | + } | |
| 505 | 545 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 506 | 546 | return patientFacade.queryHighRisk(patientsQueryRequest, null, 3, loginState.getId(), "true", Boolean.FALSE); |
| 507 | 547 | } |