Commit d9fa7aaac2db5e9b66d7ec2d153a5d412f1494d7

Authored by liquanyu
1 parent 9b8349575d

update

Showing 1 changed file with 39 additions and 17 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AmniocentesisFacade.java View file @ d9fa7aa
1 1 package com.lyms.platform.operate.web.facade;
2 2  
3   -import com.lyms.platform.biz.service.AmniocentesisInfoService;
4   -import com.lyms.platform.biz.service.AmniocentesisRecordService;
5   -import com.lyms.platform.biz.service.AmniocentesisResultService;
6   -import com.lyms.platform.biz.service.PatientsService;
  3 +import com.lyms.platform.biz.service.*;
7 4 import com.lyms.platform.common.constants.ErrorCodeConstants;
8 5 import com.lyms.platform.common.enums.YnEnums;
9 6 import com.lyms.platform.common.result.BaseListResponse;
... ... @@ -22,14 +19,8 @@
22 19 import com.lyms.platform.operate.web.utils.ResponseUtil;
23 20 import com.lyms.platform.permission.model.Organization;
24 21 import com.lyms.platform.permission.service.OrganizationService;
25   -import com.lyms.platform.pojo.AmniocentesisInfoModel;
26   -import com.lyms.platform.pojo.AmniocentesisRecordModel;
27   -import com.lyms.platform.pojo.AmniocentesisResultModel;
28   -import com.lyms.platform.pojo.Patients;
29   -import com.lyms.platform.query.AmniocentesisInfoQuery;
30   -import com.lyms.platform.query.AmniocentesisRecordQuery;
31   -import com.lyms.platform.query.AmniocentesisResultQuery;
32   -import com.lyms.platform.query.PatientsQuery;
  22 +import com.lyms.platform.pojo.*;
  23 +import com.lyms.platform.query.*;
33 24 import org.apache.commons.collections.CollectionUtils;
34 25 import org.springframework.beans.factory.annotation.Autowired;
35 26 import org.springframework.stereotype.Component;
... ... @@ -64,6 +55,9 @@
64 55 @Autowired
65 56 private PatientsService patientsService;
66 57  
  58 + @Autowired
  59 + private AntenatalExaminationService antenatalExaminationService;
  60 +
67 61 public BaseResponse queryAmniocentesisInfo(String cardNo, String vcCardNo, Integer userId) {
68 62  
69 63 Map data = new HashMap<>();
... ... @@ -103,7 +97,8 @@
103 97 patientsQuery.setYn(YnEnums.YES.getId());
104 98 patientsQuery.setVcCardNo(vcCardNo);
105 99 patientsQuery.setCardNo(cardNo);
106   - patientsQuery.setHospitalId(hospitalId);
  100 + patientsQuery.setType(1);
  101 + //patientsQuery.setHospitalId(hospitalId);
107 102  
108 103 List<Patients> patientses = patientsService.queryPatient(patientsQuery);
109 104 if (CollectionUtils.isNotEmpty(patientses))
... ... @@ -134,7 +129,34 @@
134 129 data.put("mensStopStartDay",pat.getMensStopStartDay());
135 130 data.put("mensStopEndDay",pat.getMensStopEndDay());
136 131  
137   - data.put("week",DateUtil.getWeekDesc(pat.getLastMenses(),new Date()));
  132 + data.put("week",DateUtil.getWeekDesc(pat.getLastMenses(), new Date()));
  133 +
  134 +
  135 +
  136 + data.put("hbirthday", DateUtil.getyyyy_MM_dd(pat.getHusbandBirth()));
  137 +
  138 +
  139 +
  140 + AntExChuQuery antExChuQuery = new AntExChuQuery();
  141 + antExChuQuery.setYn(YnEnums.YES.getId());
  142 + antExChuQuery.setParentId(pat.getId());
  143 +
  144 + String weight = "";
  145 + String pregnancyTimes = "";
  146 + String prodTime = "";
  147 + List<AntExChuModel> list = antenatalExaminationService.queryAntExChu(antExChuQuery);
  148 + if (CollectionUtils.isNotEmpty(list))
  149 + {
  150 + AntExChuModel model = list.get(0);
  151 + weight = model.getWeight();
  152 + pregnancyTimes = model.getPregnancyTimes() == null ? "" : String.valueOf(model.getPregnancyTimes());
  153 + prodTime = model.getProdTime() == null ? "" : String.valueOf(model.getProdTime());
  154 + }
  155 +
  156 + data.put("weight",weight);
  157 + data.put("pregnancyTimes",pregnancyTimes);
  158 + data.put("prodTime",prodTime);
  159 +
138 160 }
139 161  
140 162 return data;
... ... @@ -340,7 +362,7 @@
340 362 {
341 363 String[] arrs = queryParam.getApplyDate().split(" - ");
342 364 amniocentesisInfoQuery.setApplyDateStart(DateUtil.parseYMD(arrs[0]));
343   - amniocentesisInfoQuery.setApplyDateEnd(DateUtil.parseYMDHMS(arrs[0]+" 23:59:59"));
  365 + amniocentesisInfoQuery.setApplyDateEnd(DateUtil.parseYMDHMS(arrs[1]+" 23:59:59"));
344 366 }
345 367  
346 368 //手术日期
347 369  
... ... @@ -348,14 +370,14 @@
348 370 {
349 371 String[] arrs = queryParam.getOperationDate().split(" - ");
350 372 amniocentesisInfoQuery.setOperationDateStart(DateUtil.parseYMD(arrs[0]));
351   - amniocentesisInfoQuery.setOperationDateEnd(DateUtil.parseYMDHMS(arrs[0] + " 23:59:59"));
  373 + amniocentesisInfoQuery.setOperationDateEnd(DateUtil.parseYMDHMS(arrs[1] + " 23:59:59"));
352 374 }
353 375 //预约日期
354 376 if (StringUtils.isNotEmpty(queryParam.getOrderDate()))
355 377 {
356 378 String[] arrs = queryParam.getOrderDate().split(" - ");
357 379 amniocentesisInfoQuery.setOrderDateStart(DateUtil.parseYMD(arrs[0]));
358   - amniocentesisInfoQuery.setOrderDateEnd(DateUtil.parseYMDHMS(arrs[0] + " 23:59:59"));
  380 + amniocentesisInfoQuery.setOrderDateEnd(DateUtil.parseYMDHMS(arrs[1] + " 23:59:59"));
359 381 }
360 382 //预产期
361 383 if (StringUtils.isNotEmpty(queryParam.getDueDate()))