Commit ce9657d24c26839165c8ee513ab90a1460715c88
1 parent
d31f9fd10d
Exists in
master
and in
6 other branches
产检节点统计
Showing 2 changed files with 92 additions and 38 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AreaCountController.java
View file @
ce9657d
| ... | ... | @@ -131,6 +131,40 @@ |
| 131 | 131 | cityId, areaId, page, limit, loginState.getId(),nodeName); |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | + /** | |
| 135 | + * 产检节点明细导出 | |
| 136 | + * @param request | |
| 137 | + * @param time | |
| 138 | + * @param hospitalId | |
| 139 | + * @param provinceId | |
| 140 | + * @param cityId | |
| 141 | + * @param areaId | |
| 142 | + * @param page | |
| 143 | + * @param limit | |
| 144 | + * @param nodeType | |
| 145 | + * @param nodeName | |
| 146 | + * @return | |
| 147 | + */ | |
| 148 | + @RequestMapping(method = RequestMethod.GET,value = "/getCheckDetailExport") | |
| 149 | + @TokenRequired | |
| 150 | + public void getCheckDetailExport(HttpServletRequest request, | |
| 151 | + HttpServletResponse response, | |
| 152 | + @RequestParam(required = false) String time, | |
| 153 | + @RequestParam(required = false)String hospitalId, | |
| 154 | + @RequestParam(required = false)String provinceId, | |
| 155 | + @RequestParam(required = false)String cityId, | |
| 156 | + @RequestParam(required = false)String areaId, | |
| 157 | + @RequestParam(required = false) Integer page, | |
| 158 | + @RequestParam(required = false) Integer limit, | |
| 159 | + @RequestParam(required = false)Integer nodeType, | |
| 160 | + @RequestParam(required = false)Integer nodeName | |
| 161 | + ) | |
| 162 | + { | |
| 163 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 164 | + areaCountFacade.getCheckDetailExport(nodeType, time, hospitalId, provinceId, | |
| 165 | + cityId, areaId, loginState.getId(),response, nodeName); | |
| 166 | + } | |
| 167 | + | |
| 134 | 168 | |
| 135 | 169 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AreaCountFacade.java
View file @
ce9657d
| ... | ... | @@ -577,8 +577,20 @@ |
| 577 | 577 | String provinceId, String cityId, String areaId, |
| 578 | 578 | Integer page, Integer limit, Integer userId, Integer nodeName) |
| 579 | 579 | { |
| 580 | + AntExRecordQuery antExRecordQuery = new AntExRecordQuery(); | |
| 581 | + List<Map> results = getCheckDetailData( nodeType, time, hospitalId, | |
| 582 | + provinceId, cityId, areaId, | |
| 583 | + page, limit, userId, nodeName, "true",antExRecordQuery); | |
| 580 | 584 | |
| 585 | + return new BaseListResponse().setData(results).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION).setPageInfo(antExRecordQuery.getPageInfo()); | |
| 586 | + } | |
| 581 | 587 | |
| 588 | + | |
| 589 | + public List<Map> getCheckDetailData(Integer nodeType, String time, String hospitalId, | |
| 590 | + String provinceId, String cityId, String areaId, | |
| 591 | + Integer page, Integer limit, Integer userId, Integer nodeName,String needPage, AntExRecordQuery antExRecordQuery) | |
| 592 | + { | |
| 593 | + | |
| 582 | 594 | List<String> hospitalIds = new ArrayList<>(); |
| 583 | 595 | if (StringUtils.isNotEmpty(hospitalId)) { |
| 584 | 596 | hospitalIds.add(hospitalId); |
| 585 | 597 | |
| ... | ... | @@ -599,13 +611,13 @@ |
| 599 | 611 | } |
| 600 | 612 | } |
| 601 | 613 | |
| 602 | - AntExRecordQuery antExRecordQuery = new AntExRecordQuery(); | |
| 614 | + | |
| 603 | 615 | antExRecordQuery.setBuildTimeStart(startTime); |
| 604 | 616 | antExRecordQuery.setBuildTimeEnd(endTime); |
| 605 | 617 | antExRecordQuery.setHospitalList(hospitalIds); |
| 606 | 618 | antExRecordQuery.setPage(page); |
| 607 | 619 | antExRecordQuery.setLimit(limit); |
| 608 | - antExRecordQuery.setNeed("true"); | |
| 620 | + antExRecordQuery.setNeed(needPage); | |
| 609 | 621 | if (nodeType != null && nodeType == 1) |
| 610 | 622 | { |
| 611 | 623 | antExRecordQuery.setIsFirst(nodeType); |
| ... | ... | @@ -669,7 +681,7 @@ |
| 669 | 681 | end +=batchSize; |
| 670 | 682 | end = end > list.size() ? list.size() : end; |
| 671 | 683 | |
| 672 | - final List<AntExRecordModel> tempList = list.subList(i,end); | |
| 684 | + final List<AntExRecordModel> tempList = list.subList(i,end); | |
| 673 | 685 | Callable callable = new Callable<List<Map>>() { |
| 674 | 686 | @Override |
| 675 | 687 | public List<Map> call() throws Exception { |
| 676 | 688 | |
| 677 | 689 | |
| 678 | 690 | |
| 679 | 691 | |
| 680 | 692 | |
| 681 | 693 | |
| 682 | 694 | |
| ... | ... | @@ -781,50 +793,50 @@ |
| 781 | 793 | } |
| 782 | 794 | } |
| 783 | 795 | } |
| 784 | - | |
| 785 | - return new BaseListResponse().setData(results).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION).setPageInfo(antExRecordQuery.getPageInfo()); | |
| 796 | + return results; | |
| 786 | 797 | } |
| 787 | 798 | |
| 788 | -} | |
| 789 | 799 | |
| 800 | + //导出 | |
| 801 | + public void getCheckDetailExport(Integer nodeType, String time, String hospitalId, | |
| 802 | + String provinceId, String cityId, String areaId, | |
| 803 | + Integer userId, HttpServletResponse httpServletResponse,Integer nodeName) { | |
| 790 | 804 | |
| 805 | + AntExRecordQuery antExRecordQuery = new AntExRecordQuery(); | |
| 806 | + List<Map> ticketList = getCheckDetailData( nodeType, time, hospitalId, | |
| 807 | + provinceId, cityId, areaId, | |
| 808 | + null, null, userId, nodeName, null,antExRecordQuery); | |
| 791 | 809 | |
| 810 | + List<Map<String,Object>> results = new ArrayList<>(); | |
| 811 | + if (CollectionUtils.isNotEmpty(ticketList)) | |
| 812 | + { | |
| 813 | + for (Map<String,Object> map : ticketList) | |
| 814 | + { | |
| 815 | + Map<String,Object> result = new HashMap<>(); | |
| 816 | + result.put("examineDate", map.get("EXAMINE_DATE") == null ? "" : DateUtil.getyyyy_MM_dd((Date)map.get("EXAMINE_DATE"))); //产检日期 | |
| 817 | + result.put("name", map.get("NAME")); //姓名 | |
| 818 | + result.put("checkWeek", map.get("YZ_NAME")); //产检孕周 | |
| 819 | + result.put("examineHistoryNum", map.get("EXAMINE_HISTORY_NUM")); //产检第次 | |
| 820 | + result.put("examineHospital",map.get("EXAMINE_HOSPITAL")); //产检机构 | |
| 821 | + result.put("doctorName",map.get("DOCTOR_NAME")); //产检医生 | |
| 822 | + result.put("jdHospital",map.get("JD_HOSPITAL")); //建档机构 | |
| 823 | + result.put("telNo",map.get("TEL_NO")); //联系电话 | |
| 824 | + results.add(result); | |
| 825 | + } | |
| 826 | + } | |
| 792 | 827 | |
| 828 | + Map<String, String> cnames = new LinkedHashMap<>(); | |
| 829 | + cnames.put("examineDate", "产检日期"); //产检日期 | |
| 830 | + cnames.put("name", "姓名"); //姓名 | |
| 831 | + cnames.put("checkWeek", "产检孕周"); //产检孕周 | |
| 832 | + cnames.put("examineHistoryNum", "产检第次"); //产检第次 | |
| 833 | + cnames.put("examineHospital","产检机构"); //产检机构 | |
| 834 | + cnames.put("doctorName","产检医生"); //产检医生 | |
| 835 | + cnames.put("jdHospital","建档机构"); //建档机构 | |
| 836 | + cnames.put("telNo","联系电话"); //联系电话 | |
| 793 | 837 | |
| 838 | + ResponseUtil.responseExcel(cnames,results,httpServletResponse); | |
| 839 | + } | |
| 794 | 840 | |
| 795 | - | |
| 796 | -// public void getCheckDetailExport(Integer pointType, String time, String hospitalId, | |
| 797 | -// String provinceId, String cityId, String areaId, | |
| 798 | -// Integer userId, HttpServletResponse httpServletResponse,Integer nodeName) { | |
| 799 | -// | |
| 800 | -// List<Map<String,Object>> results = new ArrayList<>(); | |
| 801 | -// if (CollectionUtils.isNotEmpty(ticketList)) | |
| 802 | -// { | |
| 803 | -// for (Map<String,Object> map : ticketList) | |
| 804 | -// { | |
| 805 | -// Map<String,Object> result = new HashMap<>(); | |
| 806 | -// result.put("examineDate", map.get("EXAMINE_DATE") == null ? "" : DateUtil.getyyyy_MM_dd((Date)map.get("EXAMINE_DATE"))); //产检日期 | |
| 807 | -// result.put("name", map.get("NAME")); //姓名 | |
| 808 | -// result.put("checkWeek", map.get("YZ_NAME")); //产检孕周 | |
| 809 | -// result.put("examineHistoryNum", map.get("EXAMINE_HISTORY_NUM")); //产检第次 | |
| 810 | -// result.put("examineHospital",map.get("EXAMINE_HOSPITAL")); //产检机构 | |
| 811 | -// result.put("doctorName",map.get("DOCTOR_NAME")); //产检医生 | |
| 812 | -// result.put("jdHospital",map.get("JD_HOSPITAL")); //建档机构 | |
| 813 | -// result.put("telNo",map.get("TEL_NO")); //联系电话 | |
| 814 | -// results.add(result); | |
| 815 | -// } | |
| 816 | -// } | |
| 817 | -// | |
| 818 | -// Map<String, String> cnames = new LinkedHashMap<>(); | |
| 819 | -// cnames.put("examineDate", "产检日期"); //产检日期 | |
| 820 | -// cnames.put("name", "姓名"); //姓名 | |
| 821 | -// cnames.put("checkWeek", "产检孕周"); //产检孕周 | |
| 822 | -// cnames.put("examineHistoryNum", "产检第次"); //产检第次 | |
| 823 | -// cnames.put("examineHospital","产检机构"); //产检机构 | |
| 824 | -// cnames.put("doctorName","产检医生"); //产检医生 | |
| 825 | -// cnames.put("jdHospital","建档机构"); //建档机构 | |
| 826 | -// cnames.put("telNo","联系电话"); //联系电话 | |
| 827 | -// | |
| 828 | -// ResponseUtil.responseExcel(cnames,results,httpServletResponse); | |
| 829 | -// } | |
| 841 | +} |