Commit 5b6388e15f3a18bd1dd9014e977f354be56d0417
1 parent
5f970ed760
Exists in
master
and in
6 other branches
助产机构报表
Showing 3 changed files with 81 additions and 19 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java
View file @
5b6388e
| ... | ... | @@ -408,10 +408,10 @@ |
| 408 | 408 | @ResponseBody |
| 409 | 409 | @RequestMapping(value = "getDueOrgCount", method = RequestMethod.GET) |
| 410 | 410 | public BaseObjectResponse getDueOrgCount(HttpServletRequest request, |
| 411 | - @RequestParam(required = false) String time, | |
| 411 | + @RequestParam(required = true) String time, | |
| 412 | 412 | @RequestParam(required = false) String hospitalId, |
| 413 | - @RequestParam(required = false) String proviceId, | |
| 414 | - @RequestParam(required = false) String cityId, | |
| 413 | + @RequestParam(required = true) String proviceId, | |
| 414 | + @RequestParam(required = true) String cityId, | |
| 415 | 415 | @RequestParam(required = false) String areaId) { |
| 416 | 416 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 417 | 417 | return matDeliverFacade.getDueOrgCount(time, loginState.getId(), hospitalId, proviceId, cityId, areaId); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
5b6388e
| ... | ... | @@ -530,6 +530,10 @@ |
| 530 | 530 | for (int j = 0;j < babyList.size();j++) |
| 531 | 531 | { |
| 532 | 532 | upCount+=1; |
| 533 | + if (upCount > 4) | |
| 534 | + { | |
| 535 | + upCount = 4; | |
| 536 | + } | |
| 533 | 537 | fmChildTimes.add(upCount); |
| 534 | 538 | model.setFmChildTimes(fmChildTimes); |
| 535 | 539 | } |
| ... | ... | @@ -2633,6 +2637,20 @@ |
| 2633 | 2637 | |
| 2634 | 2638 | List<Map<String,String>> list = new ArrayList<>(); |
| 2635 | 2639 | |
| 2640 | + //本市户籍 | |
| 2641 | + BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
| 2642 | + basicConfigQuery.setYn(YnEnums.YES.getId()); | |
| 2643 | + basicConfigQuery.setParentId(params.get("cityId")); | |
| 2644 | + | |
| 2645 | + List<BasicConfig> basicConfigs = basicConfigService.queryBasicConfig(basicConfigQuery); | |
| 2646 | + List<String> areaNames = new LinkedList<>(); | |
| 2647 | + if (CollectionUtils.isNotEmpty(basicConfigs)) { | |
| 2648 | + for (BasicConfig basicConfig : basicConfigs) { | |
| 2649 | + areaNames.add(basicConfig.getName()); | |
| 2650 | + } | |
| 2651 | + } | |
| 2652 | + | |
| 2653 | + | |
| 2636 | 2654 | int batchSize = 5; |
| 2637 | 2655 | int end = 0; |
| 2638 | 2656 | List<Future> futures = new ArrayList<>(); |
| ... | ... | @@ -2643,7 +2661,7 @@ |
| 2643 | 2661 | } |
| 2644 | 2662 | |
| 2645 | 2663 | List<String> hids = hospitalIds.subList(i, end); |
| 2646 | - Callable c = new DueOrgCountWorker(time,hids,matDeliverService,organizationService,patientsService,babyService,params,basicConfigService); | |
| 2664 | + Callable c = new DueOrgCountWorker(time,hids,matDeliverService,organizationService,patientsService,babyService,params,basicConfigs); | |
| 2647 | 2665 | Future f = commonThreadPool.submit(c); |
| 2648 | 2666 | futures.add(f); |
| 2649 | 2667 | } |
| 2650 | 2668 | |
| 2651 | 2669 | |
| ... | ... | @@ -2657,11 +2675,62 @@ |
| 2657 | 2675 | } |
| 2658 | 2676 | } |
| 2659 | 2677 | } |
| 2678 | + | |
| 2679 | + Map<String,Object> data = new HashMap<>(); | |
| 2680 | + data.put("coutData",list); | |
| 2681 | + data.put("areaNames",areaNames); | |
| 2682 | + | |
| 2660 | 2683 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
| 2661 | 2684 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 2662 | 2685 | objectResponse.setErrormsg("成功"); |
| 2663 | - objectResponse.setData(list); | |
| 2686 | + objectResponse.setData(data); | |
| 2664 | 2687 | return objectResponse; |
| 2688 | + } | |
| 2689 | + | |
| 2690 | + public void sum(List<Map<String,String>> list) | |
| 2691 | + { | |
| 2692 | + | |
| 2693 | + int fmPoGongCount = 0; //分娩方式 剖宫产 | |
| 2694 | + int wsCount = 0; //外省 | |
| 2695 | + int chanCount = 0; //产妇数 | |
| 2696 | + int babySiTaiCount = 0; //死胎数 | |
| 2697 | + int girlCount = 0; //女 | |
| 2698 | + int boyCount = 0; //男 | |
| 2699 | + int bswsCount = 0; //本省外市 | |
| 2700 | + int huoChanCount = 0; //活产数 | |
| 2701 | + int babySiChanCount = 0; //死产数 | |
| 2702 | + int zcBabyCount = 0; //早产儿数 | |
| 2703 | + int huiYinFullCount = 0; //会阴情况 完好 | |
| 2704 | + int siLielevelCount = 0; //会阴情况 Ⅰ-Ⅱ°裂伤 | |
| 2705 | + int siLielevelYzCount = 0; //会阴情况 重度裂伤 | |
| 2706 | + int queXianBabyCount = 0; //出生缺陷数 | |
| 2707 | + int huiYingTotalCount = 0; //会阴情况 小计 | |
| 2708 | + int fmShunChanCount = 0; //分娩方式 顺产 | |
| 2709 | + //int orgName = 唐山市丰南区大齐镇卫生院; //机构名称 | |
| 2710 | + int riskCount = 39; //高危孕产妇数 | |
| 2711 | + int fmCount = 0; //分娩方式 小计 | |
| 2712 | + int doubleCount = 0; //双胎数 | |
| 2713 | + int huiYinSpitCount = 0; //会阴情况 切开 | |
| 2714 | + int fzrDoubleCount = 0; //非自然妊娠双胎 | |
| 2715 | + | |
| 2716 | +// int lowWeightCount = ; //低出生体重数 | |
| 2717 | +// int babySiWangCount = ; //新生儿死亡数 | |
| 2718 | +// int sieveCount = ; //筛查数 | |
| 2719 | +// int bigBoyCount = ; //巨大儿数 | |
| 2720 | +// int sieveFreeCount = ; //35岁以下免费筛查数 | |
| 2721 | +// int fmOtherCount = ; //分娩方式 其他 | |
| 2722 | + | |
| 2723 | + if (CollectionUtils.isNotEmpty(list)) | |
| 2724 | + { | |
| 2725 | + for (Map<String,String> map : list) | |
| 2726 | + { | |
| 2727 | + | |
| 2728 | + } | |
| 2729 | + } | |
| 2730 | + | |
| 2731 | + Map<String,String> totalMap = new HashMap<>(); | |
| 2732 | + | |
| 2733 | + | |
| 2665 | 2734 | } |
| 2666 | 2735 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/DueOrgCountWorker.java
View file @
5b6388e
| ... | ... | @@ -18,10 +18,8 @@ |
| 18 | 18 | import com.lyms.platform.query.BasicConfigQuery; |
| 19 | 19 | import com.lyms.platform.query.MatDeliverQuery; |
| 20 | 20 | import com.lyms.platform.query.PatientsQuery; |
| 21 | -import java.util.ArrayList; | |
| 22 | -import java.util.HashMap; | |
| 23 | -import java.util.List; | |
| 24 | -import java.util.Map; | |
| 21 | + | |
| 22 | +import java.util.*; | |
| 25 | 23 | import java.util.concurrent.Callable; |
| 26 | 24 | |
| 27 | 25 | /** |
| 28 | 26 | |
| ... | ... | @@ -37,9 +35,9 @@ |
| 37 | 35 | private BabyService babyService; |
| 38 | 36 | |
| 39 | 37 | private PatientsService patientsService; |
| 40 | - private BasicConfigService basicConfigService; | |
| 41 | 38 | |
| 42 | 39 | private Map<String,String> params; |
| 40 | + private List<BasicConfig> basicConfigs; | |
| 43 | 41 | public DueOrgCountWorker(String time, |
| 44 | 42 | List<String> hospitalIds, |
| 45 | 43 | MatDeliverService matDeliverService, |
| ... | ... | @@ -47,7 +45,7 @@ |
| 47 | 45 | PatientsService patientsService, |
| 48 | 46 | BabyService babyService, |
| 49 | 47 | Map<String,String> params, |
| 50 | - BasicConfigService basicConfigService | |
| 48 | + List<BasicConfig> basicConfigs | |
| 51 | 49 | ) |
| 52 | 50 | { |
| 53 | 51 | this.time = time; |
| ... | ... | @@ -57,7 +55,7 @@ |
| 57 | 55 | this.patientsService = patientsService; |
| 58 | 56 | this.babyService = babyService; |
| 59 | 57 | this.params = params; |
| 60 | - this.basicConfigService = basicConfigService; | |
| 58 | + this.basicConfigs = basicConfigs; | |
| 61 | 59 | } |
| 62 | 60 | |
| 63 | 61 | @Override |
| ... | ... | @@ -67,7 +65,7 @@ |
| 67 | 65 | List<Map<String,String>> list = new ArrayList<>(); |
| 68 | 66 | for (String hospialId : hospitalIds) |
| 69 | 67 | { |
| 70 | - Map<String,String> map = new HashMap<>(); | |
| 68 | + Map<String,String> map = new LinkedHashMap<>(); | |
| 71 | 69 | |
| 72 | 70 | |
| 73 | 71 | //机构名称 |
| ... | ... | @@ -416,11 +414,6 @@ |
| 416 | 414 | |
| 417 | 415 | |
| 418 | 416 | //本市户籍 |
| 419 | - BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
| 420 | - basicConfigQuery.setYn(YnEnums.YES.getId()); | |
| 421 | - basicConfigQuery.setParentId(params.get("cityId")); | |
| 422 | - | |
| 423 | - List<BasicConfig> basicConfigs = basicConfigService.queryBasicConfig(basicConfigQuery); | |
| 424 | 417 | if (CollectionUtils.isNotEmpty(basicConfigs)) |
| 425 | 418 | { |
| 426 | 419 | int index = 1; |
| ... | ... | @@ -438,7 +431,7 @@ |
| 438 | 431 | patientsQuery4.setType(3); |
| 439 | 432 | patientsQuery4.setAreaRegisterId(basicConfig.getId()); |
| 440 | 433 | int areaCount = patientsService.queryPatientCount(patientsQuery4); |
| 441 | - map.put("areaCount"+index, String.valueOf(areaCount)); | |
| 434 | + map.put("areaCount"+index+basicConfig.getName(), String.valueOf(areaCount)); | |
| 442 | 435 | index++; |
| 443 | 436 | } |
| 444 | 437 | } |