From 20605e4c95cd9e0dca0135de80291767dadbef66 Mon Sep 17 00:00:00 2001 From: wtt Date: Mon, 2 Sep 2019 13:41:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=BF=E5=BE=B7=E5=85=AC=E5=8D=AB=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=80=9A=E8=BF=87=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/lyms/hospitalapi/Cdfy/CdGwInterface.java | 171 +++++++++++++++++++++ .../operate/web/controller/CdGwController.java | 132 ++++++++++++++++ 2 files changed, 303 insertions(+) create mode 100644 platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CdGwController.java diff --git a/platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdGwInterface.java b/platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdGwInterface.java index 769aaf0..aa484f3 100644 --- a/platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdGwInterface.java +++ b/platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdGwInterface.java @@ -3785,7 +3785,32 @@ public class CdGwInterface { } return br; } + public BaseObjectResponse saveYfController(String id,String cardNo){ + BaseObjectResponse br = null; + try{ + PatientsQuery patientsQuery = new PatientsQuery(); + patientsQuery.setId(id); + patientsQuery.setCardNo(cardNo); + List list = patientsService.queryPatient(patientsQuery); + System.out.println(DateUtil.getyyyy_MM_dd_hms(new java.util.Date())+" pateient size = "+ list.size()); + if(list != null && list.size()>0){ + for(Patients patients : list){ + try{ + br = saveBaseInfo(patients); + }catch (Exception e){ + ExceptionUtils.catchException(e, "saveYf error."); + continue; + } + + } + } + }catch (Exception e) + { + ExceptionUtils.catchException(e, "get patientsService error."); + } + return br; + } @@ -3814,6 +3839,24 @@ public class CdGwInterface { } return br; } + public BaseObjectResponse saveChuZhenController(String parentId){ + BaseObjectResponse br = null; + AntExChuQuery antExChuQuery = new AntExChuQuery(); + antExChuQuery.setParentId(parentId); + List list = antExService.queryAntExChu(antExChuQuery); + if(list != null && list.size()>0){ + for(AntExChuModel antExChuModel : list){ + try{ + br = saveWoman_Prefirstvisit(antExChuModel); + }catch (Exception e){ + ExceptionUtils.catchException(e, "saveChuZhen error."); + continue; + } + + } + } + return br; + } /** @@ -3843,6 +3886,26 @@ public class CdGwInterface { return br; } + public BaseObjectResponse saveFuZhenController(String parentId){ + BaseObjectResponse br = null; + AntExQuery antExQuery = new AntExQuery(); + antExQuery.setParentId(parentId); + //antExQuery.setId("5b2b4a760cf24b66d2c0af28"); + List list = antExService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); + if(list != null && list.size()>0){ + for(AntenatalExaminationModel antenatalExaminationModel : list){ + try{ + br = saveWoman_Preothervisit(antenatalExaminationModel); + }catch (Exception e){ + ExceptionUtils.catchException(e, "saveFuZhen error."); + continue; + } + + } + } + + return br; + } /** @@ -3871,6 +3934,25 @@ public class CdGwInterface { return br; } + public BaseObjectResponse saveFmController(String parentId){ + BaseObjectResponse br = null; + MatDeliverQuery deliverQuery = new MatDeliverQuery(); + deliverQuery.setParentId(parentId); + List list = matDeliverService.query(deliverQuery); + if(null != list && list.size() > 0){ + for(MaternalDeliverModel maternalDeliverModel : list){ + try{ + br = saveWomen_Delivery(maternalDeliverModel); + }catch (Exception e){ + ExceptionUtils.catchException(e, "saveFm error."); + continue; + } + + } + } + return br; + + } /** @@ -3898,6 +3980,24 @@ public class CdGwInterface { } return br; } + public BaseResponse saveChFsController(String pid){ + BaseResponse br = null; + MatDeliverFollowQuery deliverQuery = new MatDeliverFollowQuery(); + deliverQuery.setPid(pid); + List list = matDeliverFollowService.query(deliverQuery); + if(null != list && list.size() > 0){ + for(MatdeliverFollowModel matdeliverFollowModel : list){ + try{ + br = saveWoman_Postvisit(matdeliverFollowModel); + }catch (Exception e){ + ExceptionUtils.catchException(e, "saveChFs error."); + continue; + } + + } + } + return br; + } /** @@ -3925,6 +4025,24 @@ public class CdGwInterface { } return br; } + public BaseResponse saveChFcController(String pid){ + BaseResponse br = null; + PostReviewQuery mongoQuery = new PostReviewQuery(); + mongoQuery.setPid(pid); + List list = postReviewService.findWithList(mongoQuery); + if(list != null && list.size() > 0){ + for(PostReviewModel postReviewModel : list){ + try{ + br = saveWoman_Post42Exam(postReviewModel); + }catch (Exception e){ + ExceptionUtils.catchException(e, "saveChFc error."); + continue; + } + + } + } + return br; + } /** @@ -3953,7 +4071,25 @@ public class CdGwInterface { } return br; } + public BaseObjectResponse saveEtDaController(String parentId){ + BaseObjectResponse br = null; + BabyModelQuery babyQuery = new BabyModelQuery(); + babyQuery.setParentId(parentId); + babyQuery.setYn(YnEnums.YES.getId()); + List models = babyBookbuildingService.queryBabyBuildByCond(babyQuery); + if(models != null && models.size() > 0){ + for(BabyModel babyModel : models){ + try{ + br = saveChild_Info(babyModel); + }catch (Exception e){ + ExceptionUtils.catchException(e, "saveEtDa error."); + continue; + } + } + } + return br; + } /** @@ -3980,6 +4116,24 @@ public class CdGwInterface { } return br; } + public BaseObjectResponse saveXsrFsController(String babyId){ + BaseObjectResponse br = null; + Criteria c = null; + c = Criteria.where("babyId").is(babyId);; + List visit = mongoTemplate.find(Query.query(c), NewbornVisit.class); + if(visit != null && visit.size() > 0){ + for(NewbornVisit newbornVisit : visit){ + try{ + br = saveChild_HomeVisit_Memo(newbornVisit); + }catch (Exception e){ + ExceptionUtils.catchException(e, "saveXsrFs error."); + continue; + } + + } + } + return br; + } /** @@ -4007,7 +4161,24 @@ public class CdGwInterface { } return br; } + public BaseObjectResponse saveEbController(String babyId){ + BaseObjectResponse br = null; + BabyCheckModelQuery babyQuery = new BabyCheckModelQuery(); + babyQuery.setBuildId(babyId); + List list = babyCheckService.queryBabyCheckRecord(babyQuery); + if(list != null && list.size() > 0){ + for(BabyCheckModel babyCheckModel : list){ + try{ + br = saveChild_HealthExam(babyCheckModel); + }catch (Exception e){ + ExceptionUtils.catchException(e, "saveEb error."); + continue; + } + } + } + return br; + } diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CdGwController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CdGwController.java new file mode 100644 index 0000000..a6dcc9f --- /dev/null +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CdGwController.java @@ -0,0 +1,132 @@ +package com.lyms.platform.operate.web.controller; + +import com.lyms.hospitalapi.Cdfy.CdGwInterface; +import com.lyms.platform.common.base.BaseController; +import com.lyms.platform.common.result.BaseObjectResponse; +import com.lyms.platform.common.result.BaseResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; + +import javax.servlet.http.HttpServletRequest; + +@Controller +@RequestMapping("/cdgw") +public class CdGwController extends BaseController { + + @Autowired + private CdGwInterface cdGwInterface; + + /** + * @param id 孕妇建档id + * @param cardNo 身份证号 + */ + @ResponseBody + @RequestMapping(value = "/saveYfController", method = RequestMethod.GET) + public BaseObjectResponse saveYfController( + @RequestParam(required = false) String id, + @RequestParam(required = false) String cardNo + ) { + return cdGwInterface.saveYfController(id, cardNo); + } + + /** + * 初诊 + * @param parentId 孕妇建档id + */ + @ResponseBody + @RequestMapping(value = "/saveChuZhenController", method = RequestMethod.GET) + public BaseObjectResponse saveChuZhenController(@RequestParam(required = false) String parentId + ) { + return cdGwInterface.saveChuZhenController(parentId); + } + + /** + * 复诊 + * @param parentId 孕妇建档id + */ + @ResponseBody + @RequestMapping(value = "/saveFuZhenController", method = RequestMethod.GET) + public BaseObjectResponse saveFuZhenController( + @RequestParam(required = false) String parentId + ) { + return cdGwInterface.saveFuZhenController(parentId); + } + + /** + * 产妇分娩 + * @param parentId 孕妇建档id + */ + @ResponseBody + @RequestMapping(value = "/saveFmController", method = RequestMethod.GET) + public BaseResponse saveFmController( + @RequestParam(required = false) String parentId + ) { + return cdGwInterface.saveFmController(parentId); + } + + /** + * 产妇访视 + * @param pid lyms_person id + */ + @ResponseBody + @RequestMapping(value = "/saveChFsController", method = RequestMethod.GET) + public BaseResponse saveChFsController( + @RequestParam(required = false) String pid + ) { + return cdGwInterface.saveChFsController(pid); + } + + /** + * 产后复查 + * @param pid lyms_person id + */ + @ResponseBody + @RequestMapping(value = "/saveChFcController", method = RequestMethod.GET) + public BaseResponse saveChFcController( + @RequestParam(required = false) String pid + ) { + return cdGwInterface.saveChFcController(pid); + } + + /** + * 新生儿 + * @param parentId 孕妇建档id + */ + @ResponseBody + @RequestMapping(value = "/saveEtDaController", method = RequestMethod.GET) + public BaseObjectResponse saveEtDaController( + @RequestParam(required = false) String parentId + ) { + return cdGwInterface.saveEtDaController(parentId); + } + + /** + * 新生儿访视 + * @param babyId 儿童id + */ + @ResponseBody + @RequestMapping(value = "/saveXsrFsController", method = RequestMethod.GET) + public BaseObjectResponse saveXsrFsController( + @RequestParam(required = false) String babyId + ) { + return cdGwInterface.saveXsrFsController(babyId); + } + + /** + * 儿保检查 + * @param babyId 儿童id + */ + @ResponseBody + @RequestMapping(value = "/saveEbController", method = RequestMethod.GET) + public BaseObjectResponse saveEbController( + @RequestParam(required = false) String babyId + ) { + return cdGwInterface.saveEbController(babyId); + } + + +} -- 1.8.3.1