Commit 85980bba10da7a80ce0bc1f82ad3a8e469b30909
Exists in
master
and in
7 other branches
Merge remote-tracking branch 'origin/master'
Showing 5 changed files
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BookbuildingQueryRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientManagerQueryModel.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.java
View file @
85980bb
| 1 | 1 | package com.lyms.platform.operate.web.controller; |
| 2 | 2 | |
| 3 | 3 | |
| 4 | -import javax.servlet.http.HttpServletRequest; | |
| 5 | -import javax.servlet.http.HttpServletResponse; | |
| 6 | -import javax.validation.Valid; | |
| 7 | - | |
| 4 | +import com.lyms.platform.biz.service.YunBookbuildingService; | |
| 8 | 5 | import com.lyms.platform.common.annotation.TokenRequired; |
| 6 | +import com.lyms.platform.common.base.BaseController; | |
| 9 | 7 | import com.lyms.platform.common.base.LoginContext; |
| 8 | +import com.lyms.platform.common.result.BaseListResponse; | |
| 9 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
| 10 | +import com.lyms.platform.common.result.BaseResponse; | |
| 10 | 11 | import com.lyms.platform.common.utils.MessageUtil; |
| 11 | 12 | import com.lyms.platform.common.utils.PropertiesUtils; |
| 12 | 13 | import com.lyms.platform.common.utils.StringUtils; |
| 13 | 14 | import com.lyms.platform.operate.web.facade.AntenatalExaminationFacade; |
| 15 | +import com.lyms.platform.operate.web.facade.BookbuildingFacade; | |
| 14 | 16 | import com.lyms.platform.operate.web.request.AntenatalExaminationQueryRequest; |
| 15 | -import com.lyms.platform.operate.web.request.BabyManageRequest; | |
| 17 | +import com.lyms.platform.operate.web.request.BookbuildingQueryRequest; | |
| 18 | +import com.lyms.platform.operate.web.request.YunBookbuildingAddRequest; | |
| 16 | 19 | import org.apache.commons.httpclient.HttpClient; |
| 17 | 20 | import org.springframework.beans.factory.annotation.Autowired; |
| 18 | 21 | import org.springframework.stereotype.Controller; |
| 19 | 22 | import org.springframework.web.bind.annotation.*; |
| 20 | 23 | |
| 21 | -import com.lyms.platform.biz.service.YunBookbuildingService; | |
| 22 | -import com.lyms.platform.common.base.BaseController; | |
| 23 | -import com.lyms.platform.common.constants.ErrorCodeConstants; | |
| 24 | -import com.lyms.platform.common.result.BaseListResponse; | |
| 25 | -import com.lyms.platform.common.result.BaseObjectResponse; | |
| 26 | -import com.lyms.platform.common.result.BaseResponse; | |
| 27 | -import com.lyms.platform.operate.web.facade.BookbuildingFacade; | |
| 28 | -import com.lyms.platform.operate.web.request.BookbuildingQueryRequest; | |
| 29 | -import com.lyms.platform.operate.web.request.YunBookbuildingAddRequest; | |
| 30 | - | |
| 24 | +import javax.servlet.http.HttpServletRequest; | |
| 25 | +import javax.servlet.http.HttpServletResponse; | |
| 31 | 26 | import java.io.IOException; |
| 32 | 27 | import java.io.UnsupportedEncodingException; |
| 33 | 28 | import java.net.URLEncoder; |
| 34 | 29 | |
| ... | ... | @@ -95,10 +90,12 @@ |
| 95 | 90 | @RequestMapping(value = "/queryPregnantBuildRecord", method = RequestMethod.GET) |
| 96 | 91 | @ResponseBody |
| 97 | 92 | @TokenRequired |
| 98 | - public BaseListResponse queryPregnantBuildRecord(@RequestParam(required = false) String vcCardNo,@RequestParam(required = false) String cardNo,HttpServletRequest httpServletRequest){ | |
| 93 | + public BaseListResponse queryPregnantBuildRecord(@RequestParam(required = false) String id,@RequestParam(required = false) String vcCardNo,@RequestParam(required = false) String cardNo,HttpServletRequest httpServletRequest){ | |
| 99 | 94 | BookbuildingQueryRequest bookbuildingQueryRequest = new BookbuildingQueryRequest(); |
| 100 | 95 | bookbuildingQueryRequest.setVcCardNo(vcCardNo); |
| 101 | 96 | bookbuildingQueryRequest.setCardNo(cardNo); |
| 97 | + // id,HuJiaqi添加,为了建档管理里面的查看单条使用 | |
| 98 | + bookbuildingQueryRequest.setId(id); | |
| 102 | 99 | LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext"); |
| 103 | 100 | BaseListResponse listResponse = bookbuildingFacade.queryPregnantBuildRecord(bookbuildingQueryRequest, loginState.getId()); |
| 104 | 101 | return listResponse; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
85980bb
| ... | ... | @@ -4,14 +4,14 @@ |
| 4 | 4 | import com.lyms.hospitalapi.qhdfy.QhdfyHisService; |
| 5 | 5 | import com.lyms.hospitalapi.qinglongxian.QingLongXianHisService; |
| 6 | 6 | import com.lyms.hospitalapi.v2.HisService; |
| 7 | -import com.lyms.platform.biz.dal.IPersonDao; | |
| 8 | 7 | import com.lyms.platform.biz.service.*; |
| 9 | 8 | import com.lyms.platform.common.base.PageInfo; |
| 9 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
| 10 | 10 | import com.lyms.platform.common.enums.*; |
| 11 | 11 | import com.lyms.platform.common.result.BaseListResponse; |
| 12 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
| 12 | 13 | import com.lyms.platform.common.result.BaseResponse; |
| 13 | 14 | import com.lyms.platform.common.utils.*; |
| 14 | -import com.lyms.platform.common.utils.StringUtils; | |
| 15 | 15 | import com.lyms.platform.operate.web.request.*; |
| 16 | 16 | import com.lyms.platform.operate.web.result.*; |
| 17 | 17 | import com.lyms.platform.operate.web.utils.JdbcUtil; |
| 18 | 18 | |
| 19 | 19 | |
| ... | ... | @@ -24,17 +24,12 @@ |
| 24 | 24 | import com.lyms.platform.pojo.*; |
| 25 | 25 | import com.lyms.platform.query.*; |
| 26 | 26 | import org.apache.commons.collections.CollectionUtils; |
| 27 | -import org.apache.commons.lang.*; | |
| 28 | 27 | import org.slf4j.Logger; |
| 29 | 28 | import org.slf4j.LoggerFactory; |
| 30 | 29 | import org.springframework.beans.factory.annotation.Autowired; |
| 31 | -import org.springframework.beans.factory.annotation.Value; | |
| 32 | 30 | import org.springframework.data.domain.Sort; |
| 33 | 31 | import org.springframework.stereotype.Component; |
| 34 | 32 | |
| 35 | -import com.lyms.platform.common.constants.ErrorCodeConstants; | |
| 36 | -import com.lyms.platform.common.result.BaseObjectResponse; | |
| 37 | - | |
| 38 | 33 | import javax.servlet.http.HttpServletResponse; |
| 39 | 34 | import java.io.OutputStream; |
| 40 | 35 | import java.util.*; |
| ... | ... | @@ -531,6 +526,9 @@ |
| 531 | 526 | typeMap.put("hisPatient", qhdfyHisService.getPatientInfoList(bookbuildingQueryRequest.getVcCardNo())); |
| 532 | 527 | } |
| 533 | 528 | } |
| 529 | + }else if(!StringUtils.isEmpty(bookbuildingQueryRequest.getId())){ | |
| 530 | + // id,HuJiaqi添加,为了建档管理里面的查看单条使用 | |
| 531 | + patients.add(yunBookbuildingService.findOneById(bookbuildingQueryRequest.getId())); | |
| 534 | 532 | } |
| 535 | 533 | |
| 536 | 534 | //历史建档记录 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
85980bb
| ... | ... | @@ -5,10 +5,7 @@ |
| 5 | 5 | import com.lyms.platform.common.enums.*; |
| 6 | 6 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 7 | 7 | import com.lyms.platform.common.result.BaseResponse; |
| 8 | -import com.lyms.platform.common.utils.BeanUtils; | |
| 9 | -import com.lyms.platform.common.utils.DateUtil; | |
| 10 | -import com.lyms.platform.common.utils.ExceptionUtils; | |
| 11 | -import com.lyms.platform.common.utils.JsonUtil; | |
| 8 | +import com.lyms.platform.common.utils.*; | |
| 12 | 9 | import com.lyms.platform.operate.web.request.ChildbirthManagerRequest; |
| 13 | 10 | import com.lyms.platform.operate.web.request.MatDeliverAddRequest; |
| 14 | 11 | import com.lyms.platform.operate.web.request.MatDeliverQueryRequest; |
| ... | ... | @@ -192,6 +189,23 @@ |
| 192 | 189 | Patients patientsLocal = new Patients(); |
| 193 | 190 | patientsLocal.setId(deliverAddRequest.getParentId()); |
| 194 | 191 | patientsLocal.setFmDate(fmDate); |
| 192 | + // HuJiaqi添加开始,这里冗余了分娩分娩医院,分娩年龄,分娩孕周,分娩方式,并将状态更改为产妇 | |
| 193 | + patientsLocal.setType(3); | |
| 194 | + patientsLocal.setFmHospital(maternalDeliverModel.getFmHospital()); | |
| 195 | + patientsLocal.setFmType(maternalDeliverModel.getDeliveryMode()); | |
| 196 | + try { | |
| 197 | + patientsLocal.setFmAge(DateUtil.getAge(patientsLocal.getBirth(), patientsLocal.getFmDate())); | |
| 198 | + } catch (Exception e) { | |
| 199 | + System.out.println(patientsLocal.getId() + ":这条数据的生日和分娩时间异常"); | |
| 200 | + // 跳过 | |
| 201 | + } | |
| 202 | + try { | |
| 203 | + patientsLocal.setFmWeek(DateUtil.getDays(patientsLocal.getLastMenses(), patientsLocal.getFmDate())); | |
| 204 | + } catch (Exception e) { | |
| 205 | + System.out.println(patientsLocal.getId() + ":这条数据的末日月经和分娩时间异常"); | |
| 206 | + // 跳过 | |
| 207 | + } | |
| 208 | + // HuJiaqi添加结束 | |
| 195 | 209 | patientsService.updatePatient(patientsLocal); |
| 196 | 210 | |
| 197 | 211 | //修改分娩日期 |
| ... | ... | @@ -286,6 +300,23 @@ |
| 286 | 300 | Patients patients1 = new Patients(); |
| 287 | 301 | patients1.setId(deliverAddRequest.getParentId()); |
| 288 | 302 | patients1.setFmDate(fmDate); |
| 303 | + // HuJiaqi添加开始,这里冗余了分娩分娩医院,分娩年龄,分娩孕周,分娩方式,并将状态更改为产妇 | |
| 304 | + patients1.setType(3); | |
| 305 | + patients1.setFmHospital(maternalDeliverModel.getFmHospital()); | |
| 306 | + patients1.setFmType(maternalDeliverModel.getDeliveryMode()); | |
| 307 | + try { | |
| 308 | + patients1.setFmAge(DateUtil.getAge(patients1.getBirth(), patients1.getFmDate())); | |
| 309 | + } catch (Exception e) { | |
| 310 | + System.out.println(patients1.getId() + ":这条数据的生日和分娩时间异常"); | |
| 311 | + // 跳过 | |
| 312 | + } | |
| 313 | + try { | |
| 314 | + patients1.setFmWeek(DateUtil.getDays(patients1.getLastMenses(), patients1.getFmDate())); | |
| 315 | + } catch (Exception e) { | |
| 316 | + System.out.println(patients1.getId() + ":这条数据的末日月经和分娩时间异常"); | |
| 317 | + // 跳过 | |
| 318 | + } | |
| 319 | + // HuJiaqi添加结束 | |
| 289 | 320 | patientsService.updatePatient(patients1); |
| 290 | 321 | |
| 291 | 322 | //修改分娩日期 |
| ... | ... | @@ -994,6 +1025,7 @@ |
| 994 | 1025 | |
| 995 | 1026 | MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); |
| 996 | 1027 | matDeliverQuery.setParentIdList(parentIdList); |
| 1028 | + matDeliverQuery.setYn(YnEnums.YES.getId()); | |
| 997 | 1029 | List<MaternalDeliverModel> maternalDeliverModelList = matDeliverService.query(matDeliverQuery); |
| 998 | 1030 | if (CollectionUtils.isEmpty(maternalDeliverModelList)) { |
| 999 | 1031 | // 没有查到,直接抛出 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BookbuildingQueryRequest.java
View file @
85980bb
| ... | ... | @@ -7,6 +7,8 @@ |
| 7 | 7 | */ |
| 8 | 8 | @Form |
| 9 | 9 | public class BookbuildingQueryRequest { |
| 10 | + // id,HuJiaqi添加,为了建档管理里面的查看单条使用 | |
| 11 | + private String id; | |
| 10 | 12 | //身份号 |
| 11 | 13 | private String cardNo; |
| 12 | 14 | //就诊卡号 |
| ... | ... | @@ -16,6 +18,14 @@ |
| 16 | 18 | |
| 17 | 19 | //医院ID |
| 18 | 20 | private String hospitalId; |
| 21 | + | |
| 22 | + public String getId() { | |
| 23 | + return id; | |
| 24 | + } | |
| 25 | + | |
| 26 | + public void setId(String id) { | |
| 27 | + this.id = id; | |
| 28 | + } | |
| 19 | 29 | |
| 20 | 30 | public String getCardNo() { |
| 21 | 31 | return cardNo; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientManagerQueryModel.java
View file @
85980bb
| ... | ... | @@ -70,6 +70,16 @@ |
| 70 | 70 | */ |
| 71 | 71 | private String bookbuildingDoctor; |
| 72 | 72 | |
| 73 | + private String id; | |
| 74 | + | |
| 75 | + public String getId() { | |
| 76 | + return id; | |
| 77 | + } | |
| 78 | + | |
| 79 | + public void setId(String id) { | |
| 80 | + this.id = id; | |
| 81 | + } | |
| 82 | + | |
| 73 | 83 | public String getUsername() { |
| 74 | 84 | return username; |
| 75 | 85 | } |