diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.java index e305b51..913d7e8 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.java @@ -1,33 +1,28 @@ package com.lyms.platform.operate.web.controller; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.validation.Valid; - +import com.lyms.platform.biz.service.YunBookbuildingService; import com.lyms.platform.common.annotation.TokenRequired; +import com.lyms.platform.common.base.BaseController; import com.lyms.platform.common.base.LoginContext; +import com.lyms.platform.common.result.BaseListResponse; +import com.lyms.platform.common.result.BaseObjectResponse; +import com.lyms.platform.common.result.BaseResponse; import com.lyms.platform.common.utils.MessageUtil; import com.lyms.platform.common.utils.PropertiesUtils; import com.lyms.platform.common.utils.StringUtils; import com.lyms.platform.operate.web.facade.AntenatalExaminationFacade; +import com.lyms.platform.operate.web.facade.BookbuildingFacade; import com.lyms.platform.operate.web.request.AntenatalExaminationQueryRequest; -import com.lyms.platform.operate.web.request.BabyManageRequest; +import com.lyms.platform.operate.web.request.BookbuildingQueryRequest; +import com.lyms.platform.operate.web.request.YunBookbuildingAddRequest; import org.apache.commons.httpclient.HttpClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; -import com.lyms.platform.biz.service.YunBookbuildingService; -import com.lyms.platform.common.base.BaseController; -import com.lyms.platform.common.constants.ErrorCodeConstants; -import com.lyms.platform.common.result.BaseListResponse; -import com.lyms.platform.common.result.BaseObjectResponse; -import com.lyms.platform.common.result.BaseResponse; -import com.lyms.platform.operate.web.facade.BookbuildingFacade; -import com.lyms.platform.operate.web.request.BookbuildingQueryRequest; -import com.lyms.platform.operate.web.request.YunBookbuildingAddRequest; - +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; @@ -95,10 +90,12 @@ public class PregnantBuildController extends BaseController{ @RequestMapping(value = "/queryPregnantBuildRecord", method = RequestMethod.GET) @ResponseBody @TokenRequired - public BaseListResponse queryPregnantBuildRecord(@RequestParam(required = false) String vcCardNo,@RequestParam(required = false) String cardNo,HttpServletRequest httpServletRequest){ + public BaseListResponse queryPregnantBuildRecord(@RequestParam(required = false) String id,@RequestParam(required = false) String vcCardNo,@RequestParam(required = false) String cardNo,HttpServletRequest httpServletRequest){ BookbuildingQueryRequest bookbuildingQueryRequest = new BookbuildingQueryRequest(); bookbuildingQueryRequest.setVcCardNo(vcCardNo); bookbuildingQueryRequest.setCardNo(cardNo); + // id,HuJiaqi添加,为了建档管理里面的查看单条使用 + bookbuildingQueryRequest.setId(id); LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext"); BaseListResponse listResponse = bookbuildingFacade.queryPregnantBuildRecord(bookbuildingQueryRequest, loginState.getId()); return listResponse; diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java index 7408a78..bdeb41e 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java @@ -4,14 +4,14 @@ import com.lyms.hospitalapi.fnfy.FnfyHisService; import com.lyms.hospitalapi.qhdfy.QhdfyHisService; import com.lyms.hospitalapi.qinglongxian.QingLongXianHisService; import com.lyms.hospitalapi.v2.HisService; -import com.lyms.platform.biz.dal.IPersonDao; import com.lyms.platform.biz.service.*; import com.lyms.platform.common.base.PageInfo; +import com.lyms.platform.common.constants.ErrorCodeConstants; import com.lyms.platform.common.enums.*; import com.lyms.platform.common.result.BaseListResponse; +import com.lyms.platform.common.result.BaseObjectResponse; import com.lyms.platform.common.result.BaseResponse; import com.lyms.platform.common.utils.*; -import com.lyms.platform.common.utils.StringUtils; import com.lyms.platform.operate.web.request.*; import com.lyms.platform.operate.web.result.*; import com.lyms.platform.operate.web.utils.JdbcUtil; @@ -24,17 +24,12 @@ import com.lyms.platform.permission.service.UsersService; import com.lyms.platform.pojo.*; import com.lyms.platform.query.*; import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.data.domain.Sort; import org.springframework.stereotype.Component; -import com.lyms.platform.common.constants.ErrorCodeConstants; -import com.lyms.platform.common.result.BaseObjectResponse; - import javax.servlet.http.HttpServletResponse; import java.io.OutputStream; import java.util.*; @@ -528,6 +523,9 @@ public class BookbuildingFacade { typeMap.put("hisPatient", qhdfyHisService.getPatientInfoList(bookbuildingQueryRequest.getVcCardNo())); } } + }else if(!StringUtils.isEmpty(bookbuildingQueryRequest.getId())){ + // id,HuJiaqi添加,为了建档管理里面的查看单条使用 + patients.add(yunBookbuildingService.findOneById(bookbuildingQueryRequest.getId())); } //历史建档记录 diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java index f968772..43556c2 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java @@ -5,10 +5,7 @@ import com.lyms.platform.common.constants.ErrorCodeConstants; import com.lyms.platform.common.enums.*; import com.lyms.platform.common.result.BaseObjectResponse; import com.lyms.platform.common.result.BaseResponse; -import com.lyms.platform.common.utils.BeanUtils; -import com.lyms.platform.common.utils.DateUtil; -import com.lyms.platform.common.utils.ExceptionUtils; -import com.lyms.platform.common.utils.JsonUtil; +import com.lyms.platform.common.utils.*; import com.lyms.platform.operate.web.request.ChildbirthManagerRequest; import com.lyms.platform.operate.web.request.MatDeliverAddRequest; import com.lyms.platform.operate.web.request.MatDeliverQueryRequest; @@ -192,6 +189,23 @@ public class MatDeliverFacade { Patients patientsLocal = new Patients(); patientsLocal.setId(deliverAddRequest.getParentId()); patientsLocal.setFmDate(fmDate); + // HuJiaqi添加开始,这里冗余了分娩分娩医院,分娩年龄,分娩孕周,分娩方式,并将状态更改为产妇 + patientsLocal.setType(3); + patientsLocal.setFmHospital(maternalDeliverModel.getFmHospital()); + patientsLocal.setFmType(maternalDeliverModel.getDeliveryMode()); + try { + patientsLocal.setFmAge(DateUtil.getAge(patientsLocal.getBirth(), patientsLocal.getFmDate())); + } catch (Exception e) { + System.out.println(patientsLocal.getId() + ":这条数据的生日和分娩时间异常"); + // 跳过 + } + try { + patientsLocal.setFmWeek(DateUtil.getDays(patientsLocal.getLastMenses(), patientsLocal.getFmDate())); + } catch (Exception e) { + System.out.println(patientsLocal.getId() + ":这条数据的末日月经和分娩时间异常"); + // 跳过 + } + // HuJiaqi添加结束 patientsService.updatePatient(patientsLocal); //修改分娩日期 @@ -286,6 +300,23 @@ public class MatDeliverFacade { Patients patients1 = new Patients(); patients1.setId(deliverAddRequest.getParentId()); patients1.setFmDate(fmDate); + // HuJiaqi添加开始,这里冗余了分娩分娩医院,分娩年龄,分娩孕周,分娩方式,并将状态更改为产妇 + patients1.setType(3); + patients1.setFmHospital(maternalDeliverModel.getFmHospital()); + patients1.setFmType(maternalDeliverModel.getDeliveryMode()); + try { + patients1.setFmAge(DateUtil.getAge(patients1.getBirth(), patients1.getFmDate())); + } catch (Exception e) { + System.out.println(patients1.getId() + ":这条数据的生日和分娩时间异常"); + // 跳过 + } + try { + patients1.setFmWeek(DateUtil.getDays(patients1.getLastMenses(), patients1.getFmDate())); + } catch (Exception e) { + System.out.println(patients1.getId() + ":这条数据的末日月经和分娩时间异常"); + // 跳过 + } + // HuJiaqi添加结束 patientsService.updatePatient(patients1); //修改分娩日期 @@ -994,6 +1025,7 @@ public class MatDeliverFacade { MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); matDeliverQuery.setParentIdList(parentIdList); + matDeliverQuery.setYn(YnEnums.YES.getId()); List maternalDeliverModelList = matDeliverService.query(matDeliverQuery); if (CollectionUtils.isEmpty(maternalDeliverModelList)) { // 没有查到,直接抛出 diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BookbuildingQueryRequest.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BookbuildingQueryRequest.java index cc1bcd8..37957bc 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BookbuildingQueryRequest.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BookbuildingQueryRequest.java @@ -7,6 +7,8 @@ import com.lyms.platform.common.core.annotation.form.Form; */ @Form public class BookbuildingQueryRequest { + // id,HuJiaqi添加,为了建档管理里面的查看单条使用 + private String id; //身份号 private String cardNo; //就诊卡号 @@ -17,6 +19,14 @@ public class BookbuildingQueryRequest { //医院ID private String hospitalId; + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + public String getCardNo() { return cardNo; } diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientManagerQueryModel.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientManagerQueryModel.java index 4e945a5..97860f5 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientManagerQueryModel.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientManagerQueryModel.java @@ -70,6 +70,16 @@ public class PatientManagerQueryModel { */ private String bookbuildingDoctor; + private String id; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + public String getUsername() { return username; }