Commit f3af220527e85f8948bf5e642412da7420e3010c
1 parent
a06754edeb
Exists in
master
and in
6 other branches
a
Showing 2 changed files with 138 additions and 29 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java
View file @
f3af220
| ... | ... | @@ -108,7 +108,7 @@ |
| 108 | 108 | return; |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - Map<String, Object> map = viewFacade.exFuData(id, num,loginState.getId()); | |
| 111 | + Map<String, Object> map = viewFacade.exFuData(id, num, loginState.getId()); | |
| 112 | 112 | |
| 113 | 113 | if (map == null) { |
| 114 | 114 | System.out.println("没有查到数据!"); |
| ... | ... | @@ -125,6 +125,39 @@ |
| 125 | 125 | // doc = new Document("D:\\经济开发区乡镇涉及妇幼公卫表格(外联部)_复诊.dotx"); |
| 126 | 126 | doc = new Document(ViewController.class.getClassLoader().getResourceAsStream("经济开发区乡镇涉及妇幼公卫表格(外联部)_复诊.dotx")); |
| 127 | 127 | specialData(doc, map);//特殊数据 |
| 128 | + markData(doc, map);//普通数据 | |
| 129 | + sendToBrowser(doc, "导出", "doc", true, response); | |
| 130 | + } catch (Exception e) { | |
| 131 | + e.printStackTrace(); | |
| 132 | + } | |
| 133 | + response.flushBuffer(); | |
| 134 | + } catch (IOException e) { | |
| 135 | + e.printStackTrace(); | |
| 136 | + } | |
| 137 | + } | |
| 138 | + @RequestMapping(value = "/downExpostData", method = RequestMethod.GET) | |
| 139 | +// @TokenRequired | |
| 140 | + public void downExPostData(@RequestParam("id") String id, | |
| 141 | + | |
| 142 | + HttpServletRequest request, HttpServletResponse response) { | |
| 143 | +// LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 144 | +// if(loginState == null){ | |
| 145 | +// System.out.println("用户未登录!"); | |
| 146 | +// return; | |
| 147 | +// } | |
| 148 | + | |
| 149 | + Map<String, Object> map = viewFacade.expPostReview(id,null); | |
| 150 | + | |
| 151 | + try { | |
| 152 | + // 验证License | |
| 153 | + if (!getLicense()) { | |
| 154 | + return; | |
| 155 | + } | |
| 156 | + Document doc = null;// 原始word路径 | |
| 157 | + try { | |
| 158 | + // doc = new Document("D:\\经济开发区乡镇涉及妇幼公卫表格(外联部)_复诊.dotx"); | |
| 159 | + doc = new Document(ViewController.class.getClassLoader().getResourceAsStream("产后42天健康检查记录表.docx")); | |
| 160 | +// specialData(doc, map);//特殊数据 | |
| 128 | 161 | markData(doc, map);//普通数据 |
| 129 | 162 | sendToBrowser(doc, "导出", "doc", true, response); |
| 130 | 163 | } catch (Exception e) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
f3af220
| ... | ... | @@ -1154,14 +1154,14 @@ |
| 1154 | 1154 | String cDueWeek = ResolveUtils.getPregnancyWeek(patients.getLastMenses(), data.getCheckTime()); |
| 1155 | 1155 | //产检孕周 |
| 1156 | 1156 | map.put("cDueWeek", cDueWeek); |
| 1157 | - int week = Integer.parseInt(cDueWeek.substring(1,cDueWeek.indexOf("周"))); | |
| 1158 | - if(week>=20){ | |
| 1159 | - map.put("gongGaoText",UnitUtils.unitSplice(data.getGonggao(), UnitConstants.CM)); | |
| 1160 | - }else if(week<20){ | |
| 1157 | + int week = Integer.parseInt(cDueWeek.substring(1, cDueWeek.indexOf("周"))); | |
| 1158 | + if (week >= 20) { | |
| 1159 | + map.put("gongGaoText", UnitUtils.unitSplice(data.getGonggao(), UnitConstants.CM)); | |
| 1160 | + } else if (week < 20) { | |
| 1161 | 1161 | if (StringUtils.isNotEmpty(data.getGonggaoSelect())) { |
| 1162 | 1162 | if (StringUtils.isNotEmpty(data.getGonggaoType())) { |
| 1163 | - map.put("gongGaoText", GongJingEnums.getGongGaoNameById(data.getGonggaoSelect())+","+GongJingEnums.getHengZhiNameById(data.getGonggaoType())); | |
| 1164 | - }else{ | |
| 1163 | + map.put("gongGaoText", GongJingEnums.getGongGaoNameById(data.getGonggaoSelect()) + "," + GongJingEnums.getHengZhiNameById(data.getGonggaoType())); | |
| 1164 | + } else { | |
| 1165 | 1165 | map.put("gongGaoText", GongJingEnums.getGongGaoNameById(data.getGonggaoSelect())); |
| 1166 | 1166 | } |
| 1167 | 1167 | } |
| ... | ... | @@ -1199,7 +1199,7 @@ |
| 1199 | 1199 | map.put("textpjbc", Boolean.valueOf(data.getTextpjbc()) ? "已检查" : "未检查"); |
| 1200 | 1200 | map.put("s75gdgtt", Boolean.valueOf(data.getS75gdgtt()) ? "已检查" : "未检查"); |
| 1201 | 1201 | map.put("jzxgn", Boolean.valueOf(data.getJzxgn()) ? "已检查" : "未检查"); |
| 1202 | - map.put("zdjcxm","早孕期病毒检测:"+map.get("zyqbdjc")+", NT检查:"+map.get("ntjc")+", 产前筛查:"+map.get("cjsc")+", 胎儿系统排畸B超:"+map.get("textpjbc")+", 75gOGTT:"+map.get("s75gdgtt")+", 甲状腺功能:"+map.get("jzxgn")+"\n"); | |
| 1202 | + map.put("zdjcxm", "早孕期病毒检测:" + map.get("zyqbdjc") + ", NT检查:" + map.get("ntjc") + ", 产前筛查:" + map.get("cjsc") + ", 胎儿系统排畸B超:" + map.get("textpjbc") + ", 75gOGTT:" + map.get("s75gdgtt") + ", 甲状腺功能:" + map.get("jzxgn") + "\n"); | |
| 1203 | 1203 | |
| 1204 | 1204 | //实验结果选择 |
| 1205 | 1205 | //hiv 抗体 |
| 1206 | 1206 | |
| 1207 | 1207 | |
| 1208 | 1208 | |
| 1209 | 1209 | |
| 1210 | 1210 | |
| 1211 | 1211 | |
| ... | ... | @@ -1415,29 +1415,29 @@ |
| 1415 | 1415 | AntExcAddOther antExcAddOther = (AntExcAddOther) obj; |
| 1416 | 1416 | Map<String, Object> mapData = new HashMap<>(); |
| 1417 | 1417 | |
| 1418 | - if(antExcAddOther.getGestaMonth()!=null){ | |
| 1418 | + if (antExcAddOther.getGestaMonth() != null) { | |
| 1419 | 1419 | mapData.put("gestaMonth", GestaMonthEnums.getTitle(antExcAddOther.getGestaMonth())); |
| 1420 | 1420 | } |
| 1421 | 1421 | mapData.put("gestaDate", antExcAddOther.getGestaDate()); |
| 1422 | 1422 | |
| 1423 | - if (antExcAddOther.getFmType()!=null) { | |
| 1423 | + if (antExcAddOther.getFmType() != null) { | |
| 1424 | 1424 | String fmType = CZFmTypeEnums.getTitle(antExcAddOther.getFmType()); |
| 1425 | - if(antExcAddOther.getFmTypeRemark()!=null){ | |
| 1426 | - mapData.put("fmType", fmType+","+antExcAddOther.getFmTypeRemark()); | |
| 1427 | - }else{ | |
| 1425 | + if (antExcAddOther.getFmTypeRemark() != null) { | |
| 1426 | + mapData.put("fmType", fmType + "," + antExcAddOther.getFmTypeRemark()); | |
| 1427 | + } else { | |
| 1428 | 1428 | mapData.put("fmType", fmType); |
| 1429 | 1429 | } |
| 1430 | - }else{ | |
| 1430 | + } else { | |
| 1431 | 1431 | mapData.put("fmType", antExcAddOther.getFmTypeRemark()); |
| 1432 | 1432 | } |
| 1433 | - if (antExcAddOther.getFitness()!=null) { | |
| 1433 | + if (antExcAddOther.getFitness() != null) { | |
| 1434 | 1434 | String fitness = FitnessEnums.getTitle(Integer.parseInt(antExcAddOther.getFitness().toString())); |
| 1435 | - if(antExcAddOther.getFitnessRemark()!=null){ | |
| 1436 | - mapData.put("fitness", fitness+","+antExcAddOther.getFitnessRemark()); | |
| 1437 | - }else { | |
| 1435 | + if (antExcAddOther.getFitnessRemark() != null) { | |
| 1436 | + mapData.put("fitness", fitness + "," + antExcAddOther.getFitnessRemark()); | |
| 1437 | + } else { | |
| 1438 | 1438 | mapData.put("fitness", fitness); |
| 1439 | 1439 | } |
| 1440 | - }else{ | |
| 1440 | + } else { | |
| 1441 | 1441 | mapData.put("fitness", antExcAddOther.getFitnessRemark()); |
| 1442 | 1442 | } |
| 1443 | 1443 | |
| 1444 | 1444 | |
| 1445 | 1445 | |
| 1446 | 1446 | |
| 1447 | 1447 | |
| ... | ... | @@ -1459,26 +1459,26 @@ |
| 1459 | 1459 | } |
| 1460 | 1460 | if (otherMap.containsKey("fmType")) { |
| 1461 | 1461 | String fmType = CZFmTypeEnums.getTitle(Integer.parseInt(otherMap.get("fmType").toString())); |
| 1462 | - if(otherMap.get("fmTypeRemark")!=null){ | |
| 1463 | - mapData.put("fmType", fmType+","+otherMap.get("fmTypeRemark")); | |
| 1464 | - }else{ | |
| 1462 | + if (otherMap.get("fmTypeRemark") != null) { | |
| 1463 | + mapData.put("fmType", fmType + "," + otherMap.get("fmTypeRemark")); | |
| 1464 | + } else { | |
| 1465 | 1465 | mapData.put("fmType", fmType); |
| 1466 | 1466 | } |
| 1467 | - }else{ | |
| 1467 | + } else { | |
| 1468 | 1468 | mapData.put("fmType", otherMap.get("fmTypeRemark")); |
| 1469 | 1469 | } |
| 1470 | 1470 | if (otherMap.containsKey("fitness")) { |
| 1471 | 1471 | String fitness = FitnessEnums.getTitle(Integer.parseInt(otherMap.get("fitness").toString())); |
| 1472 | - if(otherMap.get("fitnessRemark")!=null){ | |
| 1473 | - mapData.put("fitness", fitness+","+otherMap.get("fitnessRemark")); | |
| 1474 | - }else { | |
| 1472 | + if (otherMap.get("fitnessRemark") != null) { | |
| 1473 | + mapData.put("fitness", fitness + "," + otherMap.get("fitnessRemark")); | |
| 1474 | + } else { | |
| 1475 | 1475 | mapData.put("fitness", fitness); |
| 1476 | 1476 | } |
| 1477 | - }else{ | |
| 1477 | + } else { | |
| 1478 | 1478 | mapData.put("fitness", otherMap.get("fitnessRemark")); |
| 1479 | 1479 | } |
| 1480 | 1480 | if (otherMap.get("newborWeight") != null) { |
| 1481 | - mapData.put("newborWeight", UnitUtils.unitSplice(otherMap.get("newborWeight"),UnitConstants.G)); | |
| 1481 | + mapData.put("newborWeight", UnitUtils.unitSplice(otherMap.get("newborWeight"), UnitConstants.G)); | |
| 1482 | 1482 | } |
| 1483 | 1483 | antExcAddOthersList.add(mapData); |
| 1484 | 1484 | } |
| ... | ... | @@ -2564,6 +2564,82 @@ |
| 2564 | 2564 | } |
| 2565 | 2565 | |
| 2566 | 2566 | /** |
| 2567 | + * 到处产后随访数据 | |
| 2568 | + * | |
| 2569 | + * @return | |
| 2570 | + */ | |
| 2571 | + public Map expPostReview(String id, Integer userId) { | |
| 2572 | + Map map = new HashMap(); | |
| 2573 | + PostReviewModel postReviewModel = postReviewService.findOneById(id); | |
| 2574 | + | |
| 2575 | + Patients patients = patientsService.findOnePatientById(postReviewModel.getParentId()); | |
| 2576 | + if (patients == null) { | |
| 2577 | + | |
| 2578 | + } | |
| 2579 | + /* 基础信息 */ | |
| 2580 | + map.put("id", id); | |
| 2581 | + map.put("username", patients.getUsername()); | |
| 2582 | + map.put("birth", DateUtil.getyyyy_MM_dd(patients.getBirth())); | |
| 2583 | + map.put("age", UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()), UnitConstants.SUI)); | |
| 2584 | + map.put("phone", patients.getPhone()); | |
| 2585 | + map.put("fmWeek", checkWeek(patients)); | |
| 2586 | + map.put("dueDate", DateUtil.getyyyy_MM_dd(patients.getFmDate())); | |
| 2587 | + map.put("mremark", patients.getMremark()); | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + map.put("weight", UnitUtils.unitSplice(postReviewModel.getWeight(), UnitConstants.KG)); | |
| 2591 | + String ssy = ""; | |
| 2592 | + String szy = ""; | |
| 2593 | + Map<String, String> chBpMap = JsonUtil.getMap(postReviewModel.getBp()); | |
| 2594 | + if (MapUtils.isNotEmpty(chBpMap)) { | |
| 2595 | + ssy = chBpMap.get("ssy"); | |
| 2596 | + szy = chBpMap.get("szy"); | |
| 2597 | + } | |
| 2598 | + map.put("bp", UnitUtils.unitSplice(ssy + "/" + szy, UnitConstants.MMHG)); | |
| 2599 | + | |
| 2600 | + map.put("breast", postReviewModel.getBreast()); | |
| 2601 | + map.put("lochia", postReviewModel.getLochia()); | |
| 2602 | + map.put("vulva", postReviewModel.getVulva()); | |
| 2603 | + map.put("vagina", postReviewModel.getVagina()); | |
| 2604 | + map.put("cervixUteri", postReviewModel.getCervixUteri()); | |
| 2605 | + map.put("matrix", postReviewModel.getMatrix()); | |
| 2606 | + map.put("fujian", postReviewModel.getFujian()); | |
| 2607 | + map.put("wound", postReviewModel.getWound()); | |
| 2608 | + map.put("other", postReviewModel.getOther()); | |
| 2609 | + | |
| 2610 | + map.put("basin", postReviewModel.getBasin()); | |
| 2611 | + map.put("traceElement", postReviewModel.getTraceElement()); | |
| 2612 | + map.put("boneDensity", postReviewModel.getBoneDensity()); | |
| 2613 | + map.put("ultrasonicExamination", postReviewModel.getUltrasonicExamination()); | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + /* 诊断指导 */ | |
| 2617 | + String diagnosis = ""; | |
| 2618 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(postReviewModel.getDiagnosis())) { | |
| 2619 | + List<String> temp = JsonUtil.toList(postReviewModel.getDiagnosis(), String.class); | |
| 2620 | + if (CollectionUtils.isNotEmpty(temp)) { | |
| 2621 | + | |
| 2622 | + StringBuilder sb = new StringBuilder(); | |
| 2623 | + | |
| 2624 | + for (String sId : temp) { | |
| 2625 | + sb.append(FunvCommonUtil.getBaseicConfigByid(sId, basicConfigService)).append(","); | |
| 2626 | + } | |
| 2627 | + if (sb.toString().endsWith(",")) { | |
| 2628 | + diagnosis = sb.substring(0, sb.length() - 1); | |
| 2629 | + } else { | |
| 2630 | + diagnosis = sb.toString(); | |
| 2631 | + } | |
| 2632 | + } | |
| 2633 | + } else { | |
| 2634 | + diagnosis = "-"; | |
| 2635 | + } | |
| 2636 | + map.put("diagnosis", diagnosis); | |
| 2637 | + map.put("treatOpinion", postReviewModel.getTreatOpinion()); | |
| 2638 | + map.put("dirOpinion", postReviewModel.getDirOpinion()); | |
| 2639 | + return map; | |
| 2640 | + } | |
| 2641 | + | |
| 2642 | + /** | |
| 2567 | 2643 | * 出院小结查询 |
| 2568 | 2644 | * |
| 2569 | 2645 | * @param id |
| ... | ... | @@ -2891,7 +2967,7 @@ |
| 2891 | 2967 | result.setCouponCode(couponService.findByType(id, 8)); |
| 2892 | 2968 | /** 优惠券编号血红蛋白 */ |
| 2893 | 2969 | String hemoglobinCoupon = couponService.findByType(id, 10); |
| 2894 | - if(com.lyms.platform.common.utils.StringUtils.isNotEmpty(hemoglobinCoupon)) { | |
| 2970 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(hemoglobinCoupon)) { | |
| 2895 | 2971 | result.setHemoglobinCoupon(hemoglobinCoupon); |
| 2896 | 2972 | } |
| 2897 | 2973 |