Commit 5827895983c7bf837b8530f0569e79c6b08f75ed

Authored by jishenfei
1 parent c961491f0c

丰宁需求

Showing 31 changed files with 970 additions and 21 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/service/CouponService.java View file @ 5827895
... ... @@ -69,5 +69,7 @@
69 69 * @return
70 70 */
71 71 int getUserCouponCanUseCount(String userId);
  72 +
  73 + BaseObjectResponse use1(String hospitalId, String code, String userId, String usedId);
72 74 }
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java View file @ 5827895
... ... @@ -856,6 +856,19 @@
856 856 }
857 857  
858 858 @Override
  859 + public BaseObjectResponse use1(String hospitalId, String code, String userId, String usedId) {
  860 + Map<String, Object> param = new HashMap<>();
  861 + param.put("hospitalId", hospitalId);
  862 + param.put("operatorUseId", userId);
  863 + param.put("status", 2);
  864 + param.put("useDate", new Date());
  865 + param.put("code", code);
  866 + param.put("usedId", usedId);
  867 + couponMapper.use(param);
  868 + return RespBuilder.buildSuccess();
  869 + }
  870 +
  871 + @Override
859 872 public Set<Integer> findTypes(String hospital) {
860 873 Map<String, Object> param = new HashMap<>();
861 874 param.put("hospitalId", hospital);
platform-dal/src/main/java/com/lyms/platform/pojo/BabyEyeCheck.java View file @ 5827895
... ... @@ -309,6 +309,8 @@
309 309 * 泪器
310 310 */
311 311 private String lacrimalApparatus;
  312 + //晶状体
  313 + private String lens;
312 314  
313 315 // private String lacrimalApparatusYang;
314 316  
... ... @@ -441,6 +443,14 @@
441 443 private Integer healthCheckTypeWhole; //2:整体--幼儿园机构
442 444 private Integer kindergarten;//2:幼儿园转诊--幼儿园机构
443 445 private Integer basicOrganization;//3:基层转诊--基层机构
  446 +
  447 + public String getLens() {
  448 + return lens;
  449 + }
  450 +
  451 + public void setLens(String lens) {
  452 + this.lens = lens;
  453 + }
444 454  
445 455 public String getBabySource() {
446 456 return babySource;
platform-dal/src/main/java/com/lyms/platform/pojo/BabyKindergartenCheckModel.java View file @ 5827895
... ... @@ -97,7 +97,12 @@
97 97 private String wszq;
98 98 //脊柱及四肢
99 99 private String jzjsz;
100   -
  100 + //色觉检查
  101 + private String sjjc;
  102 + //双眼视觉
  103 + private String sysj;
  104 + //眼位
  105 + private String yw;
101 106 //眼左:
102 107 private String leftEye;
103 108 //眼右:
... ... @@ -167,6 +172,30 @@
167 172 private List<String> highRisk;
168 173 //脊柱及四肢-其他
169 174 private String jzjszQt;
  175 +
  176 + public String getSjjc() {
  177 + return sjjc;
  178 + }
  179 +
  180 + public void setSjjc(String sjjc) {
  181 + this.sjjc = sjjc;
  182 + }
  183 +
  184 + public String getSysj() {
  185 + return sysj;
  186 + }
  187 +
  188 + public void setSysj(String sysj) {
  189 + this.sysj = sysj;
  190 + }
  191 +
  192 + public String getYw() {
  193 + return yw;
  194 + }
  195 +
  196 + public void setYw(String yw) {
  197 + this.yw = yw;
  198 + }
170 199  
171 200 public String getJzjszQt() {
172 201 return jzjszQt;
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java View file @ 5827895
... ... @@ -132,7 +132,7 @@
132 132 private String hprovinceRegisterId;
133 133 private String hcityRegisterId;
134 134 private String hareaRegisterId;
135   - private String hstreetRegisterId;
  135 + private String hstreetRegisterId;
136 136 /**
137 137 * 丈夫居住地
138 138 */
... ... @@ -153,6 +153,7 @@
153 153 private String cityId;
154 154 private String areaId;
155 155 private String streetId;
  156 + private String villageId;
156 157  
157 158 //服务状态
158 159 private Integer serviceStatus;
159 160  
... ... @@ -166,8 +167,9 @@
166 167 //备注
167 168 private String mremark;
168 169  
  170 + //随访医生 丰宁需求
  171 + private String booksuifangDoctor;
169 172  
170   -
171 173 /**
172 174 * 产后休养地
173 175 */
... ... @@ -484,6 +486,22 @@
484 486 //是否建册
485 487 private String buildingManualCode;
486 488 private Integer isComplete;
  489 +
  490 + public String getVillageId() {
  491 + return villageId;
  492 + }
  493 +
  494 + public void setVillageId(String villageId) {
  495 + this.villageId = villageId;
  496 + }
  497 +
  498 + public String getBooksuifangDoctor() {
  499 + return booksuifangDoctor;
  500 + }
  501 +
  502 + public void setBooksuifangDoctor(String booksuifangDoctor) {
  503 + this.booksuifangDoctor = booksuifangDoctor;
  504 + }
487 505  
488 506 public Integer getIsComplete() {
489 507 return isComplete;
platform-dal/src/main/java/com/lyms/platform/pojo/TeamRecordUpdateModel.java View file @ 5827895
... ... @@ -31,6 +31,108 @@
31 31 private Date startTime;//开始时间
32 32 private Date endTime;//开始时间
33 33  
  34 + public String getId() {
  35 + return id;
  36 + }
34 37  
  38 + public void setId(String id) {
  39 + this.id = id;
  40 + }
  41 +
  42 + public String getPatientName() {
  43 + return patientName;
  44 + }
  45 +
  46 + public void setPatientName(String patientName) {
  47 + this.patientName = patientName;
  48 + }
  49 +
  50 + public Integer getPatientAge() {
  51 + return patientAge;
  52 + }
  53 +
  54 + public void setPatientAge(Integer patientAge) {
  55 + this.patientAge = patientAge;
  56 + }
  57 +
  58 + public String getPatientPhone() {
  59 + return patientPhone;
  60 + }
  61 +
  62 + public void setPatientPhone(String patientPhone) {
  63 + this.patientPhone = patientPhone;
  64 + }
  65 +
  66 + public String getPatientGestation() {
  67 + return patientGestation;
  68 + }
  69 +
  70 + public void setPatientGestation(String patientGestation) {
  71 + this.patientGestation = patientGestation;
  72 + }
  73 +
  74 + public Date getPatientDueDate() {
  75 + return patientDueDate;
  76 + }
  77 +
  78 + public void setPatientDueDate(Date patientDueDate) {
  79 + this.patientDueDate = patientDueDate;
  80 + }
  81 +
  82 + public String getDoctorName() {
  83 + return doctorName;
  84 + }
  85 +
  86 + public void setDoctorName(String doctorName) {
  87 + this.doctorName = doctorName;
  88 + }
  89 +
  90 + public String getOldTeamName() {
  91 + return oldTeamName;
  92 + }
  93 +
  94 + public void setOldTeamName(String oldTeamName) {
  95 + this.oldTeamName = oldTeamName;
  96 + }
  97 +
  98 + public String getTeamName() {
  99 + return teamName;
  100 + }
  101 +
  102 + public void setTeamName(String teamName) {
  103 + this.teamName = teamName;
  104 + }
  105 +
  106 + public String getUpdateCause() {
  107 + return updateCause;
  108 + }
  109 +
  110 + public void setUpdateCause(String updateCause) {
  111 + this.updateCause = updateCause;
  112 + }
  113 +
  114 + public Date getCreated() {
  115 + return created;
  116 + }
  117 +
  118 + public void setCreated(Date created) {
  119 + this.created = created;
  120 + }
  121 +
  122 + public Date getStartTime() {
  123 + return startTime;
  124 + }
  125 +
  126 + public void setStartTime(Date startTime) {
  127 + this.startTime = startTime;
  128 + }
  129 +
  130 + public Date getEndTime() {
  131 + return endTime;
  132 + }
  133 +
  134 + public void setEndTime(Date endTime) {
  135 + this.endTime = endTime;
  136 + }
35 137 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java View file @ 5827895
... ... @@ -436,6 +436,213 @@
436 436 return babyBookbuildingFacade.queryBabyList(request, loginState.getId());
437 437 }
438 438  
  439 +
  440 + /**
  441 + * 查询儿童丰宁需求管理页面
  442 + *
  443 + * @param mcardNo 母亲身份证
  444 + * @param page
  445 + * @param limit
  446 + * param endCase 0未结案 1已结案
  447 + * @param name 儿童姓名
  448 + * @param highRiskType 0 非高危 1 高危 2、全部 3、体弱儿列表 4临时档案列表
  449 + * @return
  450 + */
  451 + @RequestMapping(value = "/queryFNEndCaseBabyList", method = RequestMethod.GET)
  452 + @ResponseBody
  453 + @TokenRequired
  454 + public BaseListResponse queryFNEndCaseBabyList(HttpServletRequest httpServletRequest,
  455 + @RequestParam(value = "queryNo", required = false) String queryNo,
  456 + @RequestParam(value = "mcardNo", required = false) String mcardNo,
  457 + @RequestParam(value = "bcardNo", required = false) String bcardNo,
  458 + @RequestParam(value = "mphone", required = false) String mphone,
  459 + @RequestParam(value = "startMonthAge", required = false) Integer startMonthAge,
  460 + @RequestParam(value = "endMonthAge", required = false) Integer endMonthAge,
  461 + @RequestParam(value = "birth", required = false) String birth,
  462 + @RequestParam(value = "nextDate", required = false) String nextDate,
  463 + @RequestParam(value = "endCaseTime", required = false) String endCaseTime,
  464 + @RequestParam(value = "expVip", required = false) Integer expVip,
  465 + @RequestParam(value = "serviceType", required = false) Integer serviceType,
  466 + @RequestParam(value = "serviceStatus", required = false) Integer serviceStatus,
  467 + @RequestParam(value = "name", required = false) String name,
  468 + @RequestParam(value = "highRiskType", required = false) Integer highRiskType,
  469 + @RequestParam(value = "diagnose", required = false) String diagnose,
  470 + @RequestParam(value = "dateRange", required = false) String dateRange,
  471 + @RequestParam(value = "highRiskInfos", required = false) List highRiskInfos,
  472 + @RequestParam(value = "weakSonInfos", required = false) List weakSonInfos,
  473 + @RequestParam("page") Integer page,
  474 + @RequestParam("limit") Integer limit,
  475 + @RequestParam(value = "showDetail", defaultValue = "0") Integer showDetail,
  476 + @RequestParam(value = "isShowPhone",required = false) Integer isShowPhone,
  477 + @RequestParam(value = "buildDoctor", required = false) String buildDoctor,
  478 + @RequestParam(value = "provinceId", required = false) String provinceId,
  479 + @RequestParam(value = "cityId", required = false) String cityId,
  480 + @RequestParam(value = "areaId", required = false) String areaId,
  481 + @RequestParam(value = "weakSonInfo", required = false) String weakSonInfo,
  482 + @RequestParam(value = "highRiskInfo", required = false) String highRiskInfo,
  483 + @RequestParam(value = "streetId", required = false) String streetId,
  484 + @RequestParam(value = "hospitalProvinceId", required = false) String hospitalProvinceId,
  485 + @RequestParam(value = "hospitalCityId", required = false) String hospitalCityId,
  486 + @RequestParam(value = "hospitalAreaId", required = false) String hospitalAreaId,
  487 + @RequestParam(value = "hospitalId", required = false) String hospitalId,
  488 + @RequestParam(value = "vcCardNo", required = false) String vcCardNo,
  489 + @RequestParam(value = "liveType", required = false) String liveType,
  490 + @RequestParam(value = "isArea", required = false) String isArea,
  491 + @RequestParam(value = "fmHospitalId", required = false) String fmHospitalId,
  492 + @RequestParam(value = "openDisease", required = false) String openDisease,
  493 + @RequestParam(value = "endCase", required = false) Integer endCase,
  494 + @RequestParam(value = "dueWeekStart", required = false) Integer dueWeekStart,
  495 + @RequestParam(value = "dueWeekEnd", required = false) Integer dueWeekEnd,
  496 + @RequestParam(value = "lastCheckDoctor", required = false) String lastCheckDoctor,
  497 + @RequestParam(value = "riskCode", required = false) String riskCode,
  498 + @RequestParam(value = "healthHigh", required = false) Integer healthHigh,
  499 + @RequestParam(value = "mildAnaemia", required = false) String mildAnaemia,
  500 + @RequestParam(value = "moderateAnaemia", required = false) String moderateAnaemia,
  501 + @RequestParam(value = "heartMurmur", required = false) String heartMurmur,
  502 + @RequestParam(value = "cyNumType", required = false) Integer cyNumType,
  503 + @RequestParam(value = "qcNumType", required = false) Integer qcNumType,
  504 + @RequestParam(value = "settleType", required = false) Integer settleType,
  505 + @RequestParam(value = "settleTime", required = false) String settleTime,
  506 + @RequestParam(value = "positiveType", required = false) String positiveType,
  507 + @RequestParam(value = "lhEyePositiveType", required = false) String lhEyePositiveType,
  508 + @RequestParam(value = "babyProvinceId", required = false) String babyProvinceId,
  509 + @RequestParam(value = "babyCityId", required = false) String babyCityId,
  510 + @RequestParam(value = "babyAreaId", required = false) String babyAreaId,
  511 + @RequestParam(value = "babyStreetId", required = false) String babyStreetId,
  512 + @RequestParam(value = "areaType", required = false) Integer areaType
  513 + ) {
  514 +
  515 + if (CollectionUtils.isNotEmpty(highRiskInfos)) {
  516 +
  517 + System.out.println(highRiskInfos.size() + ":highRiskInfos");
  518 + }
  519 + if (CollectionUtils.isNotEmpty(weakSonInfos)) {
  520 + System.out.println("weakSonInfos:" + weakSonInfos.size());
  521 + }
  522 + LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext");
  523 + BabyManageRequest request = new BabyManageRequest();
  524 + request.setFmHospitalId(fmHospitalId);
  525 + request.setVcCardNo(vcCardNo);
  526 + request.setWeakSonInfos(weakSonInfos);
  527 + request.setHighRiskInfos(highRiskInfos);
  528 + request.setShowDetail(showDetail);
  529 + request.setIsShowPhone(isShowPhone);
  530 + request.setBuildDoctor(buildDoctor);
  531 + request.setQueryNo(queryNo);
  532 + request.setBcardNo(bcardNo);
  533 + request.setMcardNo(mcardNo);
  534 + startMonthAge = 39;
  535 + endMonthAge = 40;
  536 + request.setMphone(mphone);
  537 + if(startMonthAge!=null) {//不改变之前逻辑
  538 + //儿童管理页面月龄条件查询36:3岁 37:4岁 38:5岁 39:6岁 40:>6岁
  539 + switch (startMonthAge) {
  540 + case 36:
  541 + request.setMonthAgeStart(startMonthAge);
  542 + break;
  543 + case 37:
  544 + request.setMonthAgeStart(48);
  545 + break;
  546 + case 38:
  547 + request.setMonthAgeStart(60);
  548 + break;
  549 + case 39:
  550 + request.setMonthAgeStart(72);
  551 + break;
  552 + case 40:
  553 + request.setMonthAgeStart(84);
  554 + break;
  555 + default:
  556 + request.setMonthAgeStart(startMonthAge);
  557 + }
  558 + }else {
  559 + request.setMonthAgeStart(startMonthAge);
  560 + }
  561 +
  562 + if(endMonthAge!=null) {//不改变之前逻辑
  563 + switch (endMonthAge) {
  564 + case 36:
  565 + request.setMonthAgeEnd(47);
  566 + break;
  567 + case 37:
  568 + request.setMonthAgeEnd(59);
  569 + break;
  570 + case 38:
  571 + request.setMonthAgeEnd(71);
  572 + break;
  573 + case 39:
  574 + request.setMonthAgeEnd(83);
  575 + break;
  576 + case 40:
  577 + request.setMonthAgeEnd(null);
  578 + break;
  579 + default:
  580 + request.setMonthAgeEnd(endMonthAge);
  581 + }
  582 + }else {
  583 + request.setMonthAgeEnd(endMonthAge);
  584 + }
  585 + request.setBirth(birth);
  586 + request.setNextDate(nextDate);
  587 + request.setEndCaseTime(endCaseTime);
  588 + request.setExpVip(expVip);
  589 + request.setHighRiskType(highRiskType);
  590 + request.setServiceType(serviceType);
  591 + request.setDiagnose(diagnose);
  592 + request.setName(name);
  593 + request.setLimit(limit);
  594 + request.setPage(page);
  595 + request.setServiceStatus(serviceStatus);
  596 + request.setDateRange(dateRange);
  597 + // 省
  598 + request.setProvinceId(provinceId);
  599 + // 市
  600 + request.setCityId(cityId);
  601 + // 区/县
  602 + request.setAreaId(areaId);
  603 + request.setStreetId(streetId);
  604 + // 建档医院
  605 + request.setHospitalProvinceId(hospitalProvinceId);
  606 + request.setHospitalCityId(hospitalCityId);
  607 + request.setHospitalAreaId(hospitalAreaId);
  608 + request.setHospitalId(hospitalId);
  609 + // 是否区域
  610 + request.setIsArea(isArea);
  611 + //高危因素id
  612 + request.setHighRiskInfo(highRiskInfo);
  613 + //体弱儿因素id
  614 + request.setWeakSonInfo(weakSonInfo);
  615 + request.setLiveType(liveType);
  616 + request.setEndCase(endCase);
  617 + request.setOpenDisease(openDisease);
  618 + request.setDueWeekStart(dueWeekStart);
  619 + request.setDueWeekEnd(dueWeekEnd);
  620 + request.setLastCheckDoctor(lastCheckDoctor);
  621 + request.setRiskCode(riskCode);
  622 + request.setHealthHigh(healthHigh);
  623 + //隆化-牙齿异常、视力异常、轻度贫血、中度贫血、心脏杂音 筛选
  624 + request.setMildAnaemia(mildAnaemia);
  625 + request.setModerateAnaemia(moderateAnaemia);
  626 + request.setHeartMurmur(heartMurmur);
  627 + request.setPositiveType(positiveType);
  628 + request.setLhEyePositiveType(lhEyePositiveType);
  629 + //出牙数状态
  630 + request.setCyNumType(cyNumType);
  631 + //龋齿状态
  632 + request.setQcNumType(qcNumType);
  633 + //高危结案状态
  634 + request.setSettleType(settleType);
  635 + //高危结案时间
  636 + request.setSettleTime(settleTime);
  637 + //户籍地
  638 + request.setBabyProvinceId(babyProvinceId);
  639 + request.setBabyCityId(babyCityId);
  640 + request.setBabyAreaId(babyAreaId);
  641 + request.setBabyStreetId(babyStreetId);
  642 + request.setAreaType(areaType);
  643 + return babyBookbuildingFacade.queryBabyList(request, loginState.getId());
  644 + }
  645 +
439 646 /**
440 647 * 查询符合条件的儿童
441 648 * 判断是否已有儿童中
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyOralCheckController.java View file @ 5827895
... ... @@ -100,6 +100,19 @@
100 100 return babyOralCheckFacade.queryDateListPage(babyOralCheckQuery,loginState.getId());
101 101 }
102 102 /**
  103 + * 口腔检查列表
  104 + * @param babyOralCheckQuery
  105 + * @param request
  106 + * @return
  107 + */
  108 + @ResponseBody
  109 + @TokenRequired
  110 + @RequestMapping(value = "/queryDateListPageExport",method = RequestMethod.GET)
  111 + public void queryDateListPageExport(BabyOralCheckQuery babyOralCheckQuery, HttpServletRequest request,HttpServletResponse response) {
  112 + LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
  113 + babyOralCheckFacade.queryDateListPageExport(babyOralCheckQuery, loginState.getId(), response);
  114 + }
  115 + /**
103 116 * 儿童口腔管理
104 117 * @param babyModelQuery
105 118 * @param request
... ... @@ -111,6 +124,19 @@
111 124 public BaseResponse queryBabyOralListPage(BabyModelQuery babyModelQuery, HttpServletRequest request) {
112 125 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
113 126 return babyOralCheckFacade.queryBabyOralListPage(babyModelQuery,loginState.getId());
  127 + }
  128 + /**
  129 + * 儿童口腔管理
  130 + * @param babyModelQuery
  131 + * @param request
  132 + * @return
  133 + */
  134 + @ResponseBody
  135 + @TokenRequired
  136 + @RequestMapping(value = "/queryBabyOralListPageExport",method = RequestMethod.GET)
  137 + public void queryBabyOralListPageExport(BabyModelQuery babyModelQuery, HttpServletRequest request,HttpServletResponse response) {
  138 + LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
  139 + babyOralCheckFacade.queryBabyOralListPageExport(babyModelQuery,loginState.getId(),response);
114 140 }
115 141  
116 142  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/LhBabyEyeCheckController.java View file @ 5827895
1 1 package com.lyms.platform.operate.web.controller;
2 2  
  3 +import com.lyms.platform.biz.service.LhBabyEyeCheckService;
3 4 import com.lyms.platform.common.annotation.TokenRequired;
4 5 import com.lyms.platform.common.base.BaseController;
5 6 import com.lyms.platform.common.base.LoginContext;
  7 +import com.lyms.platform.common.constants.ErrorCodeConstants;
  8 +import com.lyms.platform.common.result.BaseObjectResponse;
6 9 import com.lyms.platform.common.result.BaseResponse;
7 10 import com.lyms.platform.operate.web.facade.LhBabyEyeCheckFacade;
8 11 import com.lyms.platform.pojo.LhBabyEyeCheck;
9 12 import com.lyms.platform.query.BabyModelQuery;
10 13 import com.lyms.platform.query.LhBabyEyelCheckQuery;
11 14 import org.springframework.beans.factory.annotation.Autowired;
  15 +import org.springframework.data.domain.Sort;
12 16 import org.springframework.stereotype.Controller;
13 17 import org.springframework.web.bind.annotation.*;
14 18  
15 19 import javax.servlet.http.HttpServletRequest;
  20 +import java.util.List;
16 21  
17 22  
18 23 /**
... ... @@ -27,6 +32,8 @@
27 32  
28 33 @Autowired
29 34 private LhBabyEyeCheckFacade lhBabyEyeCheckFacade;
  35 + @Autowired
  36 + private LhBabyEyeCheckService lhBabyEyeCheckService;
30 37  
31 38  
32 39  
... ... @@ -44,6 +51,34 @@
44 51 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
45 52 return lhBabyEyeCheckFacade.addOrUpDate(babyCheck, loginState.getId());
46 53 }
  54 + /**
  55 + * 搜索儿童体检套餐是否使用
  56 + * @param babyCheck
  57 + * @param request
  58 + * @return
  59 + */
  60 + @ResponseBody
  61 + @TokenRequired
  62 + @RequestMapping(value = "/findisTJTC",method = RequestMethod.POST)
  63 + public BaseResponse findisTJTC(@RequestBody LhBabyEyeCheck babyCheck, HttpServletRequest request) {
  64 +
  65 + LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
  66 + LhBabyEyelCheckQuery babyQuery = new LhBabyEyelCheckQuery();
  67 + babyQuery.setCheckMonthId(babyCheck.getCheckMonthId());
  68 + List<LhBabyEyeCheck> lhBaby = lhBabyEyeCheckService.queryList(babyQuery, Sort.Direction.DESC,new String[]{"eyeCheckTime","created"});
  69 + BaseObjectResponse br = new BaseObjectResponse();
  70 + if (lhBaby.size()>1){
  71 + br.setErrorcode(ErrorCodeConstants.DATA_EXIST);
  72 + br.setErrormsg("失败");
  73 + br.setData(babyCheck.getId());
  74 + return br;
  75 + }
  76 + br.setErrorcode(ErrorCodeConstants.SUCCESS);
  77 + br.setErrormsg("成功");
  78 + br.setData(babyCheck.getId());
  79 + return br;
  80 + }
  81 +
47 82 /**
48 83 * 删除检查
49 84 * @param id
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java View file @ 5827895
... ... @@ -255,6 +255,84 @@
255 255 return baseListResponse;
256 256 }
257 257  
  258 + /**
  259 + * @auther FengNing
  260 + * @createTime 2016年12月07日 14时22分
  261 + * @discription 已结案产妇管理
  262 + */
  263 + @TokenRequired
  264 + @ResponseBody
  265 + @RequestMapping(value = "childbirthYJAManager", method = RequestMethod.POST)
  266 + //@RequestBody
  267 + public BaseListResponse childbirthYJAManager(HttpServletRequest httpServletRequest, @RequestBody ChildbirthManagerRequest childbirthManagerRequest) {
  268 +
  269 + BaseListResponse baseListResponse;
  270 + childbirthManagerRequest.setStatus(5);
  271 + childbirthManagerRequest.setOperatorId(((LoginContext) httpServletRequest.getAttribute("loginContext")).getId());
  272 + String hospitalId = autoMatchFacade.getHospitalId(childbirthManagerRequest.getOperatorId());
  273 + try {
  274 + Map<String, String> query;
  275 + if (StringUtils.isNotEmpty(childbirthManagerRequest.getInitQuery())) {
  276 + // 自定义查询
  277 + query = new HashMap<>();
  278 + String initQuery = childbirthManagerRequest.getInitQuery();
  279 + for (String key : childbirthManagerRequest.getInitQueryMap().keySet()) {
  280 + if (initQuery.contains(key)) {
  281 + query.put(key, query.get(key));
  282 + }
  283 + }
  284 + } else {
  285 + // 没有自定义查询,开始构造普通查询
  286 + if (StringUtils.isEmpty(childbirthManagerRequest.getIsArea())) {
  287 + // 非区域
  288 + query = childbirthManagerRequest.getNormalQueryMap();
  289 + } else {
  290 + // 区域
  291 + query = childbirthManagerRequest.getAreaQueryMap();
  292 + }
  293 + String queryStr = "";
  294 + for (String key : query.keySet()) {
  295 + queryStr += key + ",";
  296 + }
  297 + childbirthManagerRequest.setInitQuery(queryStr.substring(0, queryStr.length() - 1));
  298 + }
  299 +
  300 + ChildbirthManagerResult childbirthManagerResult = matDeliverFacade.childbirthManager(childbirthManagerRequest);
  301 + if (childbirthManagerResult.getErrorcode() != ErrorCodeConstants.SUCCESS) {
  302 + baseListResponse = new BaseListResponse().setErrorcode(childbirthManagerResult.getErrorcode()).setErrormsg(childbirthManagerResult.getErrormsg());
  303 + return baseListResponse;
  304 + }
  305 +
  306 + // 根据查询规则构造返回bean
  307 + List<Object> objectList = new LinkedList<>();
  308 + if (childbirthManagerResult.getData() != null) {
  309 + for (Object temp : childbirthManagerResult.getData()) {
  310 + Organization og = organizationService.getOrganization(Integer.valueOf(hospitalId));
  311 +
  312 + if (og != null && "2".equals(og.getCityId()) && childbirthManagerRequest.getShowDetail() == 1) {//需要隐藏姓名、地址
  313 + if (temp instanceof ChildbirthManagerQueryModel) {
  314 + ChildbirthManagerQueryModel result = (ChildbirthManagerQueryModel) temp;
  315 + //出生医学证明卫纪委修改分娩记录可以查看到孕妇名称2018-04-28
  316 +// result.setName(com.lyms.platform.common.utils.StringUtils.encryName(result.getName()));
  317 + result.setAddress(com.lyms.platform.common.utils.StringUtils.encryAddr(result.getAddress()));
  318 + }
  319 + }
  320 +
  321 + for (String key : query.keySet()) {
  322 + query.put(key, BeanUtils.objectToStringMap(temp).get(key));
  323 + }
  324 + objectList.add(BeanUtils.createStringBean(query));
  325 + }
  326 + }
  327 +
  328 + baseListResponse = new BaseListResponse().setErrorcode(childbirthManagerResult.getErrorcode()).setErrormsg(childbirthManagerResult.getErrormsg()).setData(objectList).setPageInfo(childbirthManagerResult.getPageInfo());
  329 + } catch (Exception e) {
  330 + baseListResponse = new BaseListResponse().setErrorcode(ErrorCodeConstants.SYSTEM_ERROR).setErrormsg(ErrorCodeConstants.SYSTEM_ERROR_DESCRIPTION);
  331 + ExceptionUtils.catchException(e, "childbirthManager异常");
  332 + }
  333 + return baseListResponse;
  334 + }
  335 +
258 336 @TokenRequired
259 337 @RequestMapping(value = "childbirthManagerExcel", method = RequestMethod.POST)
260 338 public void childbirthManagerExcel(HttpServletRequest httpServletRequest, @RequestBody ChildbirthManagerRequest childbirthManagerRequest, HttpServletResponse httpServletResponse) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.java View file @ 5827895
... ... @@ -759,5 +759,19 @@
759 759 BaseObjectResponse objectResponse = bookbuildingFacade.queryAreaOrgs(loginState.getId());
760 760 return objectResponse;
761 761 }
  762 +
  763 + /**
  764 + * 乡下村级单位统计-丰宁需求根据账号地址获取其下属单位
  765 + *
  766 + * @return
  767 + */
  768 + @RequestMapping(value = "/queryVillageOrgs", method = RequestMethod.GET)
  769 + @ResponseBody
  770 + @TokenRequired
  771 + public BaseObjectResponse queryVillageOrgs(HttpServletRequest request) {
  772 + LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
  773 + BaseObjectResponse objectResponse = bookbuildingFacade.queryVillageOrgs(loginState.getId());
  774 + return objectResponse;
  775 + }
762 776 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java View file @ 5827895
... ... @@ -160,6 +160,8 @@
160 160 }
161 161  
162 162  
  163 +
  164 +
163 165 /**
164 166 * 初诊检查医生统计
165 167 * @param patientsQueryRequest
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java View file @ 5827895
... ... @@ -6290,6 +6290,37 @@
6290 6290 return "success";
6291 6291 }
6292 6292  
  6293 + /**
  6294 + * 秦皇岛妇幼孕妇补填血压
  6295 + * @return
  6296 + */
  6297 + @RequestMapping(value = "/addYfTXL", method = RequestMethod.GET)
  6298 + @ResponseBody
  6299 + public String addYfTXL(String start,String end) {
  6300 +
  6301 + Criteria criteria = Criteria.where("yn").is(YnEnums.YES.getId()).and("hospitalId").is("216")
  6302 + .and("bp").exists(false).and("checkDate").gte(DateUtil.parseYMD(start)).lte(DateUtil.parseYMD(end));
  6303 + List<AntenatalExaminationModel> checkModels = mongoTemplate.find(new Query(criteria),AntenatalExaminationModel.class);
  6304 + if (CollectionUtils.isNotEmpty(checkModels))
  6305 + {
  6306 + for (AntenatalExaminationModel checkModel : checkModels)
  6307 + {
  6308 + Map<String,String> result = new HashMap<>();
  6309 + result.put("ssy", NumberUtils.getRandomInt(133,120)+"");
  6310 + result.put("szy", NumberUtils.getRandomInt(80,65)+"");
  6311 +
  6312 + checkModel.setBp(JsonUtil.obj2JsonString(result));
  6313 +
  6314 + System.out.println("血压 update "+checkModel.getId());
  6315 + Update update = MongoConvertHelper
  6316 + .convertToNativeUpdate(ReflectionUtils.getUpdateField(checkModel));
  6317 + mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(checkModel.getId())), update,
  6318 + AntenatalExaminationModel.class);
  6319 + }
  6320 + }
  6321 + return "success";
  6322 + }
  6323 +
6293 6324 @RequestMapping(value = "/addYfxyhandle", method = RequestMethod.GET)
6294 6325 @ResponseBody
6295 6326 public String addYfxyhandle(String start,String end) {
... ... @@ -6329,7 +6360,8 @@
6329 6360 @RequestMapping(value = "/addYftxl", method = RequestMethod.GET)
6330 6361 @ResponseBody
6331 6362 public String addYftxl(String start,String end) {
6332   -
  6363 + start = "2023-04-12 08:23:34.560Z";
  6364 + end = "2018-04-12 08:23:34.560Z";
6333 6365 Criteria criteria = Criteria.where("yn").is(YnEnums.YES.getId()).and("hospitalId").is("216")
6334 6366 .and("tireData.heartRate").exists(false).and("checkDate").gte(DateUtil.parseYMD(start)).lte(DateUtil.parseYMD(end));
6335 6367 List<AntenatalExaminationModel> checkModels = mongoTemplate.find(new Query(criteria),AntenatalExaminationModel.class);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ 5827895
... ... @@ -389,7 +389,7 @@
389 389 if (resp.getErrorcode() != 0) {
390 390 return resp;
391 391 } else {
392   - couponService.use(autoMatchFacade.getHospitalId(userId), antExAddRequest.getCouponCode(), userId, model.getId());
  392 + couponService.use1(autoMatchFacade.getHospitalId(userId), antExAddRequest.getCouponCode(), antExAddRequest.getCheckDoctor(), model.getId());
393 393  
394 394 //秦皇岛妇幼使用完优惠劵后需要把对应优惠劵插入到秦皇岛妇幼his
395 395 if ("216".equals(hospitalId)) {
... ... @@ -472,7 +472,7 @@
472 472 if (resp.getErrorcode() != 0) {
473 473 return resp;
474 474 } else {
475   - couponService.use(autoMatchFacade.getHospitalId(userId), antExAddRequest.getCouponCode(), userId, model.getId());
  475 + couponService.use1(autoMatchFacade.getHospitalId(userId), antExAddRequest.getCouponCode(), antExAddRequest.getCheckDoctor(), model.getId());
476 476  
477 477 //秦皇岛妇幼使用完优惠劵后需要把对应优惠劵插入到秦皇岛妇幼his
478 478 if ("216".equals(hospitalId)) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyKindergartenCheckFacade.java View file @ 5827895
... ... @@ -124,6 +124,9 @@
124 124 model.setYashu(request.getYashu());
125 125 model.setQuchi(request.getQuchi());
126 126  
  127 + model.setSjjc(request.getSjjc());
  128 + model.setSysj(request.getSysj());
  129 + model.setYw(request.getYw());
127 130 model.setLeftRefraction(request.getLeftRefraction());
128 131 model.setLeftRefractionDS(request.getLeftRefractionDS());
129 132 model.setLeftRefractionDC(request.getLeftRefractionDC());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyOralCheckFacade.java View file @ 5827895
... ... @@ -14,6 +14,7 @@
14 14 import com.lyms.platform.common.utils.StringUtils;
15 15 import com.lyms.platform.operate.web.utils.CollectionUtils;
16 16 import com.lyms.platform.operate.web.utils.MongoUtil;
  17 +import com.lyms.platform.operate.web.utils.ResponseUtil;
17 18 import com.lyms.platform.permission.dao.master.CouponMapper;
18 19 import com.lyms.platform.permission.model.Organization;
19 20 import com.lyms.platform.permission.service.OrganizationService;
... ... @@ -31,6 +32,7 @@
31 32 import org.springframework.data.mongodb.core.query.Update;
32 33 import org.springframework.stereotype.Component;
33 34  
  35 +import javax.servlet.http.HttpServletResponse;
34 36 import java.util.*;
35 37  
36 38 @Component
... ... @@ -314,6 +316,170 @@
314 316 br.setPageInfo(babyModelQuery.getPageInfo());
315 317 br.setErrormsg("成功");
316 318 return br;
  319 + }
  320 +
  321 + public void queryDateListPageExport(BabyOralCheckQuery request, Integer id, HttpServletResponse response) {
  322 + String hospitalId = autoMatchFacade.getHospitalId(id);
  323 + request.setHospitalId(hospitalId);
  324 + request.setYn(YnEnums.YES.getId());
  325 + request.setNeed("true");
  326 + //结束日期加上时分秒
  327 + if (request.getBirthEnd() != null) {
  328 + request.setBirthEnd(DateUtil.getDayLastSecond(request.getBirthEnd()));
  329 + }
  330 + if (request.getCreatedEnd() != null) {
  331 + request.setCreatedEnd(DateUtil.getDayLastSecond(request.getCreatedEnd()));
  332 + }
  333 + if (request.getOralCheckTimeEnd() != null) {
  334 + request.setOralCheckTimeEnd(DateUtil.getDayLastSecond(request.getOralCheckTimeEnd()));
  335 + }
  336 + if (request.getNextOralCheckTimeEnd() != null) {
  337 + request.setNextOralCheckTimeEnd(DateUtil.getDayLastSecond(request.getNextOralCheckTimeEnd()));
  338 + }
  339 + //当前月龄筛选
  340 + if(request.getQueryMonthAgeStart()!=null && request.getQueryMonthAgeEnd()!=null){
  341 + request.setBirthStart(DateUtil.getBirthStart(request.getQueryMonthAgeEnd()));
  342 + request.setBirthEnd(DateUtil.getBirthEnd(request.getQueryMonthAgeStart()));
  343 + }
  344 + List<BabyOralCheck> babyOralChecks=babyOralCheckService.queryList(request,Sort.Direction.DESC,new String[]{"oralCheckTime", "created"});
  345 + List<Map> datas=new ArrayList<>();
  346 + for (BabyOralCheck babyOralCheck : babyOralChecks) {
  347 + Map<String,Object> map=ReflectionUtils.beanToMap(babyOralCheck);//对象转map
  348 + map.put("sex",SexEnum.getTextById(babyOralCheck.getBabySex()));
  349 + map.put("oralCheckDoctor",couponMapper.getUserName(babyOralCheck.getOralCheckDoctor()));
  350 + map.put("name",babyOralCheck.getBabyName());
  351 + map.put("id",babyOralCheck.getId());
  352 + map.put("sex",babyOralCheck.getBabySex());
  353 + map.put("birth",babyOralCheck.getBirth());
  354 + map.put("mname",babyOralCheck.getBabyMName());
  355 + map.put("checkMonth",babyOralCheck.getCheckMonthAge());
  356 + map.put("qc",babyOralCheck.getQc());
  357 + map.put("hc",babyOralCheck.getHc());
  358 + map.put("wgfd",babyOralCheck.getWgfb());
  359 + map.put("oralCheckDoctor",babyOralCheck.getOralCheckDoctor());
  360 + map.put("babyBuildDate",babyOralCheck.getBabyBuildDate());
  361 + map.put("oralCheckTime",babyOralCheck.getOralCheckTime());
  362 + map.put("nextOralCheckTime",babyOralCheck.getNextOralCheckTime());
  363 + datas.add(map);
  364 + }
  365 + Map<String, String> cnames = new LinkedHashMap<>();
  366 + cnames.put("id", "#");
  367 + cnames.put("name", "儿童姓名");
  368 + cnames.put("sex", "性别");
  369 + cnames.put("birth", "出生日期");
  370 + cnames.put("mname", "母亲姓名");
  371 + cnames.put("checkMonth", "检查月龄");
  372 +
  373 + cnames.put("qc", "龋齿");
  374 + cnames.put("hc", "护齿");
  375 + cnames.put("wgfb", "窝沟封闭");
  376 + cnames.put("oralCheckDoctor", "检查医生");
  377 + cnames.put("babyBuildDate", "建档日期");
  378 + cnames.put("oralCheckTime", "检查日期");
  379 + //秦皇岛儿保-眼科检查-分类
  380 + cnames.put("nextOralCheckTime", "预约时间");
  381 +
  382 + List<Map<String, Object>> results = new ArrayList<>();
  383 + if (org.apache.commons.collections.CollectionUtils.isNotEmpty(datas)) {
  384 + int i = 0;
  385 + for (Map<String, Object> data : datas) {
  386 + Map<String, Object> result = new LinkedHashMap<>();
  387 + result.put("id", ++i);
  388 + result.put("name", data.get("name"));
  389 + result.put("sex", data.get("sex"));
  390 + result.put("mname", data.get("mname"));
  391 + result.put("checkMonth", data.get("checkMonth"));
  392 + result.put("birth", data.get("birth"));
  393 + result.put("qc", data.get("qc"));
  394 + result.put("hc", data.get("hc"));
  395 + result.put("wgfb", data.get("wgfb"));
  396 + result.put("oralCheckDoctor", data.get("oralCheckDoctor"));
  397 + result.put("babyBuildDate", data.get("babyBuildDate"));
  398 + //秦皇岛儿保-眼科检查-分类
  399 + result.put("oralCheckTime", data.get("oralCheckTime"));
  400 + result.put("nextOralCheckTime", data.get("nextOralCheckTime"));
  401 + results.add(result);
  402 + }
  403 + }
  404 +
  405 + ResponseUtil.responseExcel(cnames, results, response);
  406 + }
  407 +
  408 + public void queryBabyOralListPageExport(BabyModelQuery babyModelQuery, Integer id, HttpServletResponse response) {
  409 + String hospitalId = autoMatchFacade.getHospitalId(id);
  410 + babyModelQuery.setNeed("true");
  411 + babyModelQuery.setYn(YnEnums.YES.getId());
  412 + babyModelQuery.setOralCheckYn(YnEnums.YES.getId());
  413 + babyModelQuery.setHospitalId(hospitalId);
  414 + //结束日期加上时分秒
  415 + if (babyModelQuery.getOralCheckTimeEnd() != null) {
  416 + babyModelQuery.setOralCheckTimeEnd(DateUtil.getDayLastSecond(babyModelQuery.getOralCheckTimeEnd()));
  417 + }
  418 + if (babyModelQuery.getNextOralCheckTimeEnd() != null) {
  419 + babyModelQuery.setNextOralCheckTimeEnd(DateUtil.getDayLastSecond(babyModelQuery.getNextOralCheckTimeEnd()));
  420 + }
  421 + //当前月龄筛选
  422 + if(babyModelQuery.getQueryMonthAgeStart()!=null && babyModelQuery.getQueryMonthAgeEnd()!=null){
  423 + babyModelQuery.setBirthStart(DateUtil.getBirthStart(babyModelQuery.getQueryMonthAgeEnd()));
  424 + babyModelQuery.setBirthEnd(DateUtil.getBirthEnd(babyModelQuery.getQueryMonthAgeStart()));
  425 + }
  426 + List<BabyModel> babyModelList = babyBookbuildingService.queryBabyBuildByCond(babyModelQuery, "oralCheckTime", Sort.Direction.DESC);
  427 + List<Map> datas=new ArrayList<>();
  428 + for (BabyModel babyModel : babyModelList) {
  429 + Map<String,Object> map=new HashMap<>();
  430 + map.put("babyId",babyModel.getId());
  431 + map.put("oralCheckId",babyModel.getOralCheckId());//最后一次检查记录id
  432 + map.put("babyName",babyModel.getName());
  433 + map.put("sex",SexEnum.getTextById(babyModel.getSex()));
  434 + map.put("mName",babyModel.getMname());
  435 + map.put("birth", DateUtil.getyyyy_MM_dd(babyModel.getBirth()));//出生日期
  436 + map.put("buildDate", DateUtil.getyyyy_MM_dd(babyModel.getBuildDate()));//建档日期
  437 + map.put("oralCheckDoctor",couponMapper.getUserName(babyModel.getOralCheckDoctor()));
  438 + map.put("positive", StringUtils.isNotEmpty(babyModel.getPositiveType())?("2".equals(babyModel.getPositiveType())?"阳性":"正常"):"");//阳性项目
  439 + map.put("checkTime", DateUtil.getYyyyMmDd(babyModel.getOralCheckTime()));//检查日期
  440 + map.put("nextCheckTime", DateUtil.getYyyyMmDd(babyModel.getNextOralCheckTime()));//预约日期
  441 + map.put("oralCheckMonthAge", babyModel.getOralCheckMonthAge());//检查月龄
  442 + map.put("hc", babyModel.getHc());
  443 + map.put("qc", babyModel.getQc());
  444 + map.put("wgfb", babyModel.getWgfb());
  445 + datas.add(map);
  446 + }
  447 + Map<String, String> cnames = new LinkedHashMap<>();
  448 + cnames.put("id", "#");
  449 + cnames.put("name", "儿童姓名");
  450 + cnames.put("sex", "性别");
  451 + cnames.put("birth", "出生日期");
  452 + cnames.put("mname", "母亲姓名");
  453 + cnames.put("checkMonth", "检查月龄");
  454 + cnames.put("positive", "检查结果");
  455 + cnames.put("oralCheckDoctor", "检查医生");
  456 + cnames.put("buildDate", "建档日期");
  457 + cnames.put("checkTime", "检查日期");
  458 + //秦皇岛儿保-眼科检查-分类
  459 + cnames.put("oralCheckMonthAge", "预约时间");
  460 +
  461 + List<Map<String, Object>> results = new ArrayList<>();
  462 + if (org.apache.commons.collections.CollectionUtils.isNotEmpty(datas)) {
  463 + int i = 0;
  464 + for (Map<String, Object> data : datas) {
  465 + Map<String, Object> result = new LinkedHashMap<>();
  466 + result.put("id", ++i);
  467 + result.put("name", data.get("name"));
  468 + result.put("sex", data.get("sex"));
  469 + result.put("mname", data.get("mname"));
  470 + result.put("checkMonth", data.get("checkMonth"));
  471 + result.put("birth", data.get("birth"));
  472 + result.put("positive", data.get("positive"));
  473 + result.put("oralCheckDoctor", data.get("oralCheckDoctor"));
  474 + result.put("buildDate", data.get("buildDate"));
  475 + //秦皇岛儿保-眼科检查-分类
  476 + result.put("checkTime", data.get("checkTime"));
  477 + result.put("oralCheckMonthAge", data.get("oralCheckMonthAge"));
  478 + results.add(result);
  479 + }
  480 + }
  481 +
  482 + ResponseUtil.responseExcel(cnames, results, response);
317 483 }
318 484 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ 5827895
... ... @@ -348,7 +348,7 @@
348 348  
349 349 patient.setNextCheckTime(DateUtil.parseYMD(yunRequest.getNextCheckTime()));
350 350 patient.setcDueWeek(yunRequest.getcDueWeek());//前端计算出来的孕周
351   -
  351 + patient.setBooksuifangDoctor(yunRequest.getBooksuifangDoctor());
352 352 //承德市妇幼通过就诊卡号查询到病人id保存下来
353 353 if ("2100001291".equals(patient.getHospitalId()) && StringUtils.isNotEmpty(yunRequest.getVcCardNo())) {
354 354 patient.setBlNum(cdfyHisService.getIdByVcCardNo(yunRequest.getVcCardNo()));
... ... @@ -1208,6 +1208,7 @@
1208 1208 patient.setNextCheckTime(DateUtil.parseYMD(yunRequest.getNextCheckTime()));
1209 1209 patient.setcDueWeek(yunRequest.getcDueWeek());//前端计算出来的孕周
1210 1210  
  1211 + patient.setBooksuifangDoctor(yunRequest.getBooksuifangDoctor());
1211 1212 patient.setModified(new Date());
1212 1213 patient.setBuildDays(DateUtil.getDays(DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod()), DateUtil.parseYMD(yunRequest.getBookbuildingDate())));
1213 1214 // patient.setHospitalId(autoMatchFacade.getHospitalId(userId));
... ... @@ -2313,6 +2314,20 @@
2313 2314 result.setBookbuildingDoctor(doctorObj);
2314 2315 }
2315 2316 }
  2317 + if (StringUtils.isNotEmpty(p.getTownOrgId())) {
  2318 + UsersQuery usersQuery = new UsersQuery();
  2319 + usersQuery.setOrgId(Integer.parseInt(p.getTownOrgId()));
  2320 + List<Users> users = usersService.queryUsers(usersQuery);
  2321 + for (Users u : users) {
  2322 + Map map = new HashMap();
  2323 + if (u != null) {
  2324 + Map<String, String> doctorObj = new HashMap<>();
  2325 + map.put("id", p.getTownOrgId());
  2326 + map.put("name", u.getName());
  2327 + result.setBooksuifangDoctor(map);
  2328 + }
  2329 + }
  2330 + }
2316 2331  
2317 2332 result.setBookbuildingDate(DateUtil.getyyyy_MM_dd(p.getBookbuildingDate()));
2318 2333 result.setServiceType(p.getServiceType() == null ? "" : String.valueOf(p.getServiceType()));
... ... @@ -3610,6 +3625,52 @@
3610 3625 objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
3611 3626 objectResponse.setErrormsg("成功");
3612 3627 return objectResponse;
  3628 + }
  3629 +
  3630 + public BaseObjectResponse queryVillageOrgs(Integer id) {
  3631 + UsersQuery usersQuery = new UsersQuery();
  3632 + usersQuery.setId(id);
  3633 +
  3634 + usersQuery.setYn(1);
  3635 + List<Users> list = usersService.queryUsers(usersQuery);
  3636 + BaseObjectResponse objectResponse = new BaseObjectResponse();
  3637 + if (list.size()==1){
  3638 + Users userr = list.get(0);
  3639 + Organization organization =masterOrganizationMapper.getOrganization(userr.getDeptId());
  3640 + List<BasicConfig> basicConfigList = basicConfigDao.queryBasicConfig(MongoCondition.newInstance("parentId", organization.getAreaId(), MongoOper.IS).
  3641 + and("yn", YnEnums.YES.getId(), MongoOper.IS).toMongoQuery());
  3642 +
  3643 +// Map map=new HashMap();
  3644 +
  3645 + List<Map> datas=new ArrayList<>();
  3646 + for (BasicConfig basicConfig : basicConfigList){
  3647 + Map<String,Object> map=new HashMap<>();
  3648 + List<BasicConfig> basicConfigList1 = basicConfigDao.queryBasicConfig(MongoCondition.newInstance("parentId", basicConfig.getId(), MongoOper.IS).
  3649 + and("yn", YnEnums.YES.getId(), MongoOper.IS).toMongoQuery());
  3650 +
  3651 +// List<Map<String, Object>> Maplist = new ArrayList<>();
  3652 +// for (BasicConfig basicConfig1 : basicConfigList1) {
  3653 +//
  3654 +// map.put("name",basicConfig1.getName());
  3655 +// map.put("parentId",basicConfig1.getParentId());
  3656 +// Maplist.add(map);
  3657 +// }
  3658 + map.put("basicConfigListname",basicConfig);
  3659 + map.put("map",basicConfigList1);
  3660 + datas.add(map);
  3661 +
  3662 + }
  3663 + objectResponse.setData(datas);
  3664 + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
  3665 + objectResponse.setErrormsg("成功");
  3666 + return objectResponse;
  3667 + }else{
  3668 + objectResponse.setData(null);
  3669 + objectResponse.setErrorcode(ErrorCodeConstants.NO_DATA);
  3670 + objectResponse.setErrormsg("失败");
  3671 + return objectResponse;
  3672 + }
  3673 +
3613 3674 }
3614 3675 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LhBabyEyeCheckFacade.java View file @ 5827895
... ... @@ -106,19 +106,27 @@
106 106 }else {
107 107 return RespBuilder.buildSuccess(ResponseCode.NEED_BUILD);
108 108 }
  109 +// checkMonthId
  110 + LhBabyEyelCheckQuery babyQuery = new LhBabyEyelCheckQuery();
  111 + babyQuery.setCheckMonthId(babyModel.getCheckMonthId());
  112 + List<LhBabyEyeCheck> lhBaby = lhBabyEyeCheckService.queryList(babyQuery,Sort.Direction.DESC,new String[]{"eyeCheckTime","created"});
109 113 //添加
110   - if (StringUtils.isEmpty(babyCheck.getId())) {
111   - lhBabyEyeCheckService.add(babyCheck);
112   - //operateLogFacade.addDeleteOptLog(userid, Integer.parseInt(hospitalId), babyCheck, OptActionEnums.ADD.getId(), "添加眼健康检查");
113   - }else {//修改
114   - babyCheck.setOperaterId(userid+"");
115   - babyCheck.setModified(new Date());
116   - lhBabyEyeCheckService.update(babyCheck);
117   - LhBabyEyeCheck Check = mongoTemplate.findOne(Query.query(Criteria.where("id").is(babyCheck.getId())), LhBabyEyeCheck.class);
  114 +
  115 + if (StringUtils.isEmpty(babyCheck.getId())) {
  116 +
  117 + lhBabyEyeCheckService.add(babyCheck);
  118 + //operateLogFacade.addDeleteOptLog(userid, Integer.parseInt(hospitalId), babyCheck, OptActionEnums.ADD.getId(), "添加眼健康检查");
  119 + }else {//修改
  120 + babyCheck.setOperaterId(userid+"");
  121 + babyCheck.setModified(new Date());
  122 + lhBabyEyeCheckService.update(babyCheck);
  123 + LhBabyEyeCheck Check = mongoTemplate.findOne(Query.query(Criteria.where("id").is(babyCheck.getId())), LhBabyEyeCheck.class);
118 124 // if (null!=Check) {
119 125 // operateLogFacade.addDeleteOptLog(userid, Integer.parseInt(hospitalId), Check, OptActionEnums.UPDATE.getId(), "修改眼健康检查");
120 126 // }
121   - }
  127 + }
  128 +
  129 +
122 130  
123 131 //同步数据到儿童档案
124 132 LhBabyEyelCheckQuery checkQuery=new LhBabyEyelCheckQuery();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyKindergartenCheckRequest.java View file @ 5827895
... ... @@ -105,7 +105,12 @@
105 105 private String wszq;
106 106 //脊柱及四肢
107 107 private String jzjsz;
108   -
  108 + //色觉检查
  109 + private String sjjc;
  110 + //双眼视觉
  111 + private String sysj;
  112 + //眼位
  113 + private String yw;
109 114 //眼左:
110 115 private String leftEye;
111 116 //眼右:
... ... @@ -180,6 +185,30 @@
180 185 private List<String> highRisk;
181 186 //脊柱及四肢-其他
182 187 private String jzjszQt;
  188 +
  189 + public String getSjjc() {
  190 + return sjjc;
  191 + }
  192 +
  193 + public void setSjjc(String sjjc) {
  194 + this.sjjc = sjjc;
  195 + }
  196 +
  197 + public String getSysj() {
  198 + return sysj;
  199 + }
  200 +
  201 + public void setSysj(String sysj) {
  202 + this.sysj = sysj;
  203 + }
  204 +
  205 + public String getYw() {
  206 + return yw;
  207 + }
  208 +
  209 + public void setYw(String yw) {
  210 + this.yw = yw;
  211 + }
183 212  
184 213 public String getJzjszQt() {
185 214 return jzjszQt;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyManageRequest.java View file @ 5827895
... ... @@ -15,6 +15,17 @@
15 15 private String mname;
16 16 //服务状态
17 17 private Integer serviceStatus;
  18 + //月龄套餐
  19 + private Integer tctype;
  20 +
  21 + public Integer getTctype() {
  22 + return tctype;
  23 + }
  24 +
  25 + public void setTctype(Integer tctype) {
  26 + this.tctype = tctype;
  27 + }
  28 +
18 29 //服务类型
19 30 private Integer serviceType;
20 31 //妈咪身份证号
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/YunBookbuildingAddRequest.java View file @ 5827895
... ... @@ -51,6 +51,8 @@
51 51  
52 52 private FilePathModel filePath;
53 53  
  54 + //随访医生
  55 + private String booksuifangDoctor;
54 56  
55 57 //孕妇证件核验方式 1 自动核验 2人工核验
56 58 private String patientVerifType;
... ... @@ -80,6 +82,14 @@
80 82 private String orgName;
81 83 //归属地id
82 84 private String addressId;
  85 +
  86 + public String getBooksuifangDoctor() {
  87 + return booksuifangDoctor;
  88 + }
  89 +
  90 + public void setBooksuifangDoctor(String booksuifangDoctor) {
  91 + this.booksuifangDoctor = booksuifangDoctor;
  92 + }
83 93  
84 94 public String getAddressId() {
85 95 return addressId;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyManageListResult.java View file @ 5827895
... ... @@ -94,6 +94,8 @@
94 94 private String lastCheckDoctor;
95 95 private String riskCode;
96 96  
  97 + private String liveType;
  98 +
97 99 /*************************************************
98 100 * 秦皇岛-高危儿因素详情-替换原诊断位置
99 101 */
... ... @@ -136,6 +138,14 @@
136 138  
137 139 public Integer getDataStatus() {
138 140 return dataStatus;
  141 + }
  142 +
  143 + public String getLiveType() {
  144 + return liveType;
  145 + }
  146 +
  147 + public void setLiveType(String liveType) {
  148 + this.liveType = liveType;
139 149 }
140 150  
141 151 public void setDataStatus(Integer dataStatus) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PregnantInfoResult.java View file @ 5827895
... ... @@ -363,6 +363,17 @@
363 363 //建档医生
364 364 private Map<String, String> bookbuildingDoctor;
365 365  
  366 + //随访医生
  367 + private Map<String, String> booksuifangDoctor;
  368 +
  369 + public Map<String, String> getBooksuifangDoctor() {
  370 + return booksuifangDoctor;
  371 + }
  372 +
  373 + public void setBooksuifangDoctor(Map<String, String> booksuifangDoctor) {
  374 + this.booksuifangDoctor = booksuifangDoctor;
  375 + }
  376 +
366 377 //建档日期
367 378 private String bookbuildingDate;
368 379 //服务类型
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/QuanChanResult.java View file @ 5827895
... ... @@ -41,6 +41,10 @@
41 41 //产检次数
42 42 private int cTimes = 0;
43 43  
  44 + //居住属性
  45 + private String pliveTypeId;
  46 +
  47 + private String liveType;
44 48 //产检次数
45 49 private int cHTimes = 0;
46 50  
... ... @@ -125,6 +129,22 @@
125 129  
126 130 //领劵社区
127 131 private String couponCommunity;
  132 +
  133 + public String getLiveType() {
  134 + return liveType;
  135 + }
  136 +
  137 + public void setLiveType(String liveType) {
  138 + this.liveType = liveType;
  139 + }
  140 +
  141 + public String getPliveTypeId() {
  142 + return pliveTypeId;
  143 + }
  144 +
  145 + public void setPliveTypeId(String pliveTypeId) {
  146 + this.pliveTypeId = pliveTypeId;
  147 + }
128 148  
129 149 public String getCouponCommunity() {
130 150 return couponCommunity;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/QuanPatientsResult.java View file @ 5827895
... ... @@ -40,6 +40,7 @@
40 40 //登记人
41 41 private String lName;
42 42  
  43 + private String pliveTypeId;
43 44 //联系方式
44 45 private String phone;
45 46 // @JsonIgnore
... ... @@ -114,6 +115,14 @@
114 115  
115 116 //领劵社区
116 117 private String couponCommunity;
  118 +
  119 + public String getPliveTypeId() {
  120 + return pliveTypeId;
  121 + }
  122 +
  123 + public void setPliveTypeId(String pliveTypeId) {
  124 + this.pliveTypeId = pliveTypeId;
  125 + }
117 126  
118 127 public String getCouponCommunity() {
119 128 return couponCommunity;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/RiskPatientsResult.java View file @ 5827895
... ... @@ -90,11 +90,20 @@
90 90 //建档孕周
91 91 private String createdWeek;
92 92  
93   -
  93 + //流动属性
  94 + private String liveType;
94 95 //初诊医生
95 96 private String firstCheckDoctor;
96 97 //初诊时间
97 98 private String firstCheckTime;
  99 +
  100 + public String getLiveType() {
  101 + return liveType;
  102 + }
  103 +
  104 + public void setLiveType(String liveType) {
  105 + this.liveType = liveType;
  106 + }
98 107  
99 108 public String getFirstCheckDoctor() {
100 109 return firstCheckDoctor;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/OrgCouponServiceImpl.java View file @ 5827895
1 1 package com.lyms.platform.operate.web.service.impl;
2 2  
  3 +import com.lyms.platform.biz.service.AntenatalExaminationService;
3 4 import com.lyms.platform.biz.service.ApplyOrderService;
4 5 import com.lyms.platform.biz.service.BasicConfigService;
5 6 import com.lyms.platform.common.enums.YnEnums;
... ... @@ -45,6 +46,8 @@
45 46  
46 47 @Autowired
47 48 private BasicConfigService basicConfigService;
  49 + @Autowired
  50 + private AntenatalExaminationService antenatalExaminationService;
48 51  
49 52 /**
50 53 * 优惠券统计报表key(type + "_" + coupon_order)所对应的header名称
... ... @@ -247,6 +250,11 @@
247 250  
248 251 List<Patients> patients = mongoTemplate.find(Query.query(Criteria.where("pid").is(couponInfo.get("user_id"))
249 252 .and("yn").is(1)), Patients.class);
  253 + List<AntenatalExaminationModel> antenatalExaminationModel = antenatalExaminationService.findAllByParentId(patients.get(0).getId());
  254 + if (antenatalExaminationModel.size()>0){
  255 + couponInfo.put("operator_use_id",antenatalExaminationModel.get(0).getCheckDoctor());
  256 + }
  257 +
250 258 String age = "";
251 259 if (CollectionUtils.isNotEmpty(patients) && useDate != null)
252 260 {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/BabyListTask.java View file @ 5827895
... ... @@ -18,6 +18,7 @@
18 18 import com.lyms.platform.pojo.BabyModel;
19 19 import com.lyms.platform.pojo.BasicConfig;
20 20 import com.lyms.platform.query.BabyCheckModelQuery;
  21 +import com.lyms.platform.query.BasicConfigQuery;
21 22 import org.apache.commons.collections.CollectionUtils;
22 23  
23 24 import java.util.ArrayList;
24 25  
... ... @@ -177,7 +178,15 @@
177 178 result.setPatientId(model.getParentId());
178 179 result.setBuildTime(DateUtil.getyyyy_MM_dd(model.getBuildDate()));
179 180 result.setHospitalName(hospitalName);
  181 + if (model.getLiveType()!=null){
  182 + BasicConfigQuery basicConfigQuery = new BasicConfigQuery();
  183 + basicConfigQuery.setId(model.getLiveType());
180 184  
  185 + //所有数据
  186 + List<BasicConfig> basicConfigList = basicConfigService.queryBasicConfig(basicConfigQuery);
  187 + result.setLiveType(basicConfigList.get(0).getName());
  188 + }
  189 +
181 190 result.setMcertNo(model.getMcertNo());
182 191 result.setMcertTypeId(model.getMcertTypeId());
183 192  
184 193  
... ... @@ -255,8 +264,8 @@
255 264 {
256 265 fmHospitalName = model.getDeliverOrg() == null ? "" : model.getDeliverOrg();
257 266 }
258   - result.setFmHospitalName(fmHospitalName);
259 267  
  268 + result.setFmHospitalName(fmHospitalName);
260 269 result.setOpenDisease(model.getOpenDisease() == null || "1".equals(model.getOpenDisease()) ? "未开通" : "开通");
261 270 result.setCardNo(model.getCardNo());
262 271 result.setVcCardNo(model.getVcCardNo());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java View file @ 5827895
... ... @@ -225,6 +225,14 @@
225 225 chanResult.setlName(patients.getBookbuildingDoctor());
226 226 }
227 227 }
  228 + if (patients.getPliveTypeId()!=null){
  229 + BasicConfigQuery basicConfigQuery = new BasicConfigQuery();
  230 + basicConfigQuery.setId(patients.getPliveTypeId());
  231 +
  232 + //所有数据
  233 + List<BasicConfig> basicConfigList = basicConfigService.queryBasicConfig(basicConfigQuery);
  234 + chanResult.setLiveType(basicConfigList.get(0).getName());
  235 + }
228 236 chanResult.setbTime(DateUtil.getyyyy_MM_dd(patients.getBookbuildingDate()));
229 237 //注册地址
230 238 chanResult.setRegisterAddr(CommonsHelper.getResidence(patients.getProvinceId(), patients.getCityId(), patients.getAreaId(), patients.getStreetId(), patients.getAddress(), basicConfigService));
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/WorkHR.java View file @ 5827895
... ... @@ -23,6 +23,7 @@
23 23 import com.lyms.platform.pojo.Patients;
24 24 import com.lyms.platform.query.AntExChuQuery;
25 25 import com.lyms.platform.query.AntExQuery;
  26 +import com.lyms.platform.query.BasicConfigQuery;
26 27 import org.apache.commons.collections.CollectionUtils;
27 28 import org.apache.commons.lang.StringUtils;
28 29 import org.apache.commons.lang.math.NumberUtils;
29 30  
... ... @@ -87,7 +88,14 @@
87 88 riskPatientsResult.setlName(patients.getBookbuildingDoctor());
88 89 }
89 90 }
  91 + if (patients.getPliveTypeId()!=null){
  92 + BasicConfigQuery basicConfigQuery = new BasicConfigQuery();
  93 + basicConfigQuery.setId(patients.getPliveTypeId());
90 94  
  95 + //所有数据
  96 + List<BasicConfig> basicConfigList = basicConfigService.queryBasicConfig(basicConfigQuery);
  97 + riskPatientsResult.setLiveType(basicConfigList.get(0).getName());
  98 + }
91 99  
92 100 if (StringUtils.isNotEmpty(patients.getFirstCheckId())) {
93 101 if (NumberUtils.isNumber(patients.getFirstCheckId())) {
... ... @@ -188,6 +196,7 @@
188 196 } catch (Exception e) {
189 197 riskPatientsResult.setFirstBH("");
190 198 }
  199 +
191 200  
192 201  
193 202 riskPatientsResult.setServiceType(ServiceTypeEnums.getTitleById(patients.getServiceType()));
... ... @@ -25,10 +25,10 @@
25 25 <!---->
26 26 <!-- <module>platform-job-index</module>-->
27 27 <!-- <module>platform-report-api</module>-->
28   -<!-- <module>platform-reportData</module>-->
  28 + <module>platform-reportData</module>
29 29 <!-- <module>regional-etl</module>-->
30 30 <!-- <module>platform-sync-data</module>-->
31   -<!-- <module>platform-msg-generate</module>-->
  31 + <module>platform-msg-generate</module>
32 32 <!-- <module>platform-transfer</module>-->
33 33 </modules>
34 34