Commit 01b5adacd0179c262aa828b68242e210cd1e363c

Authored by yangfei
1 parent 2651729f7d

导出产检医生统计

Showing 4 changed files with 56 additions and 40 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntexDoctorStatistController.java View file @ 01b5ada
... ... @@ -498,7 +498,7 @@
498 498 }
499 499  
500 500 /**
501   - * 产检医生统计
  501 + * 产检医生统计导出
502 502 *
503 503 * @param startDate 建档开始时间
504 504 * @param endDate 建档结束时间
... ... @@ -515,10 +515,10 @@
515 515 columName.put("doctorName", "产检医生");
516 516 columName.put("inspectTime", "产检人次");
517 517 columName.put("inspectPeople", "产检人数");
518   - columName.put("twice", "两次");
519   - columName.put("twiceProportion", "");
520   - columName.put("fiveTimes", "");
521   - columName.put("fiveTimeProportion", "");
  518 + columName.put("twice", "两次(含)以上人数");
  519 + columName.put("twiceProportion", "两次(含)以上比例");
  520 + columName.put("fiveTimes", "五次(含)以上人数");
  521 + columName.put("fiveTimeProportion", "五次(含)以上比例");
522 522  
523 523 try {
524 524 ExcelUtil.toExcel(response.getOutputStream(), data, columName);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java View file @ 01b5ada
... ... @@ -196,7 +196,6 @@
196 196 @ResponseBody
197 197 public BaseObjectResponse getBaseConfig(){
198 198 return babyCheckFacade.getBaseConfig();
199   -
200 199 }
201 200  
202 201 /**
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java View file @ 01b5ada
... ... @@ -246,9 +246,9 @@
246 246 public BaseResponse addBabyCheck(BabyCheckRequest request, Integer userId) {
247 247  
248 248 /** 验证产检券是否可用 可用就改为已使用状态 */
249   - if(org.apache.commons.lang3.StringUtils.isNotBlank(request.getCouponCode()) && request.getCouponType() != null) {
  249 + if (org.apache.commons.lang3.StringUtils.isNotBlank(request.getCouponCode()) && request.getCouponType() != null) {
250 250 BaseObjectResponse resp = couponService.validate(request.getCouponCode(), request.getCouponType(), autoMatchFacade.getHospitalId(userId));
251   - if(resp.getErrorcode() != 0) {
  251 + if (resp.getErrorcode() != 0) {
252 252 return resp;
253 253 }
254 254 }
... ... @@ -297,7 +297,7 @@
297 297 model = babyCheckService.addBabyCheck(model);
298 298  
299 299 /** 使用优惠券 */
300   - if(org.apache.commons.lang3.StringUtils.isNotBlank(request.getCouponCode()) && request.getCouponType() != null) {
  300 + if (org.apache.commons.lang3.StringUtils.isNotBlank(request.getCouponCode()) && request.getCouponType() != null) {
301 301 couponService.use(autoMatchFacade.getHospitalId(userId), request.getCouponCode(), userId, model.getId());
302 302 }
303 303  
... ... @@ -480,7 +480,27 @@
480 480 BaseObjectResponse br = new BaseObjectResponse();
481 481 BabyBasicResult base = new BabyBasicResult();
482 482 Map<String, Object> resMap = new HashMap<>();
483   - getBabyModel(id, base);
  483 +
  484 + BabyModel model = getBabyModel(id, base);
  485 + BabyModelQuery babyQuery = new BabyModelQuery();
  486 + babyQuery.setPid(model.getPid());
  487 + babyQuery.setYn(YnEnums.YES.getId());
  488 +
  489 + //查询儿童的基本信息
  490 + List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery);
  491 +
  492 + if (CollectionUtils.isNotEmpty(models)) {
  493 +
  494 + PatientsQuery patientsQuery = new PatientsQuery();
  495 + patientsQuery.setId(model.getParentId());
  496 + patientsQuery.setYn(YnEnums.YES.getId());
  497 +
  498 + List<Patients> personModels = patientsService.queryPatient(patientsQuery);
  499 + if (CollectionUtils.isNotEmpty(personModels)) {
  500 + Patients personModel = personModels.get(0);
  501 + base.setPregnantCertificateTypeId(personModel.getHcertificateTypeId());
  502 + }
  503 + }
484 504 resMap.put("baseInfo", base);
485 505 br.setData(resMap);
486 506 br.setErrorcode(ErrorCodeConstants.SUCCESS);
... ... @@ -599,7 +619,7 @@
599 619 base.setCardNo(model.getMcertNo());
600 620 base.setMonthAge(DateUtil.getBabyMonthAge(model.getBirth(), new Date()));
601 621 base.setBirthday(DateUtil.getyyyy_MM_dd(model.getBirth()));
602   - base.setSourceId(org.apache.commons.lang.StringUtils.isNotEmpty(model.getSource())?model.getSource():model.getId());
  622 + base.setSourceId(org.apache.commons.lang.StringUtils.isNotEmpty(model.getSource()) ? model.getSource() : model.getId());
603 623 if (model.getPid() != null) {
604 624 //诊断
605 625 List list = getBabyLastDiagnose(model.getPid());
606 626  
... ... @@ -792,10 +812,10 @@
792 812 babyQuery.setYn(YnEnums.YES.getId());
793 813  
794 814 /** 处理优惠券查询 */
795   - if(StringUtils.isNotEmpty(coupon)) {
  815 + if (StringUtils.isNotEmpty(coupon)) {
796 816 Map<String, Object> m = couponMapper.findUrl(coupon);
797 817 Object personId = m.get("user_id");
798   - if(personId != null) {
  818 + if (personId != null) {
799 819 babyQuery.setPid(personId.toString());
800 820 }
801 821 }
802 822  
803 823  
... ... @@ -813,25 +833,23 @@
813 833  
814 834 List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery);
815 835  
816   - if (CollectionUtils.isEmpty(models) && StringUtils.isNotEmpty(vcCardNo))
817   - {
818   - if ("4".equals(HIS_VERSION)) {
819   - List<Map<String,Object>> hisPatient = qhdfyHisService.getPatientInfoList(vcCardNo);
  836 + if (CollectionUtils.isEmpty(models) && StringUtils.isNotEmpty(vcCardNo)) {
  837 + if ("4".equals(HIS_VERSION)) {
  838 + List<Map<String, Object>> hisPatient = qhdfyHisService.getPatientInfoList(vcCardNo);
820 839  
821   - if (CollectionUtils.isNotEmpty(hisPatient)) {
822   - Map<String, Object> babyHis = hisPatient.get(0);
823   - if (babyHis != null && babyHis.get("phone") != null && StringUtils.isNotEmpty(babyHis.get("phone").toString())) {
824   - babyQuery.setPhoneOrcardNo(null); //手机号码或者身份证号码
825   - babyQuery.setVcCardNo(null);
826   - babyQuery.setMphone(babyHis.get("phone").toString());
827   - models = babyBookbuildingService.queryBabyBuildByCond(babyQuery);
828   - }
829   - }
830   - }
  840 + if (CollectionUtils.isNotEmpty(hisPatient)) {
  841 + Map<String, Object> babyHis = hisPatient.get(0);
  842 + if (babyHis != null && babyHis.get("phone") != null && StringUtils.isNotEmpty(babyHis.get("phone").toString())) {
  843 + babyQuery.setPhoneOrcardNo(null); //手机号码或者身份证号码
  844 + babyQuery.setVcCardNo(null);
  845 + babyQuery.setMphone(babyHis.get("phone").toString());
  846 + models = babyBookbuildingService.queryBabyBuildByCond(babyQuery);
  847 + }
  848 + }
  849 + }
831 850 }
832 851  
833   - if (CollectionUtils.isNotEmpty(models))
834   - {
  852 + if (CollectionUtils.isNotEmpty(models)) {
835 853 for (BabyModel model : models) {
836 854 if (model != null && model.getHospitalId() != null && hList.contains(hospitalId)) {
837 855 isBuild = true;
... ... @@ -882,7 +900,6 @@
882 900 }
883 901  
884 902  
885   -
886 903 br.setData(result);
887 904 br.setErrorcode(ErrorCodeConstants.SUCCESS);
888 905 br.setErrormsg("成功");
... ... @@ -1142,6 +1159,7 @@
1142 1159 * 身高别体重》M-2s && 年龄别身高小于M-2s
1143 1160 * 4.慢性严重营养不良
1144 1161 * 身高别体重小于M-2s && 年龄别身高小于M-2s。
  1162 + *
1145 1163 * @return
1146 1164 */
1147 1165 public List<String> getBabyGrowthEvaluate(Double height, Integer sex, String birth, Double weight) {
1148 1166  
... ... @@ -1235,18 +1253,17 @@
1235 1253 date = DateUtil.parseYMD(checkDate);
1236 1254 }
1237 1255  
1238   - boolean isShowNavel = false;
1239   - int monthes = DateUtil.getBabyAgeMonth(birthDate,date);
1240   - if (monthes == 1 || monthes == 3)
1241   - {
1242   - isShowNavel = true;
  1256 + boolean isShowNavel = false;
  1257 + int monthes = DateUtil.getBabyAgeMonth(birthDate, date);
  1258 + if (monthes == 1 || monthes == 3) {
  1259 + isShowNavel = true;
1243 1260 }
1244 1261  
1245 1262 String ageStr = DateUtil.getBabyMonthAge(birthDate, date);
1246 1263 BaseObjectResponse objectResponse = new BaseObjectResponse();
1247   - Map<String,Object> map = new HashMap<>();
1248   - map.put("monthAge",ageStr);
1249   - map.put("isShowNavel",isShowNavel);
  1264 + Map<String, Object> map = new HashMap<>();
  1265 + map.put("monthAge", ageStr);
  1266 + map.put("isShowNavel", isShowNavel);
1250 1267 objectResponse.setData(map);
1251 1268 objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
1252 1269 objectResponse.setErrormsg("成功");
platform-operate-api/src/main/webapp/WEB-INF/web.xml View file @ 01b5ada
... ... @@ -13,7 +13,7 @@
13 13 version="2.5"
14 14 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
15 15 <!--start跨域开始-->
16   - <!--
  16 +<!--
17 17 <filter>
18 18 <filter-name>CorsFilter</filter-name>
19 19 <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>