From 5b6388e15f3a18bd1dd9014e977f354be56d0417 Mon Sep 17 00:00:00 2001 From: liquanyu Date: Wed, 22 Aug 2018 15:07:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A9=E4=BA=A7=E6=9C=BA=E6=9E=84=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/MatDeliverController.java | 6 +- .../operate/web/facade/MatDeliverFacade.java | 73 +++++++++++++++++++++- .../operate/web/worker/DueOrgCountWorker.java | 21 +++---- 3 files changed, 81 insertions(+), 19 deletions(-) diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java index 34a18c3..e6193e7 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java @@ -408,10 +408,10 @@ public class MatDeliverController extends BaseController{ @ResponseBody @RequestMapping(value = "getDueOrgCount", method = RequestMethod.GET) public BaseObjectResponse getDueOrgCount(HttpServletRequest request, - @RequestParam(required = false) String time, + @RequestParam(required = true) String time, @RequestParam(required = false) String hospitalId, - @RequestParam(required = false) String proviceId, - @RequestParam(required = false) String cityId, + @RequestParam(required = true) String proviceId, + @RequestParam(required = true) String cityId, @RequestParam(required = false) String areaId) { LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); return matDeliverFacade.getDueOrgCount(time, loginState.getId(), hospitalId, proviceId, cityId, areaId); diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java index 516e2ce..ee1d8cf 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java @@ -530,6 +530,10 @@ public class MatDeliverFacade { for (int j = 0;j < babyList.size();j++) { upCount+=1; + if (upCount > 4) + { + upCount = 4; + } fmChildTimes.add(upCount); model.setFmChildTimes(fmChildTimes); } @@ -2633,6 +2637,20 @@ public class MatDeliverFacade { List> list = new ArrayList<>(); + //本市户籍 + BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); + basicConfigQuery.setYn(YnEnums.YES.getId()); + basicConfigQuery.setParentId(params.get("cityId")); + + List basicConfigs = basicConfigService.queryBasicConfig(basicConfigQuery); + List areaNames = new LinkedList<>(); + if (CollectionUtils.isNotEmpty(basicConfigs)) { + for (BasicConfig basicConfig : basicConfigs) { + areaNames.add(basicConfig.getName()); + } + } + + int batchSize = 5; int end = 0; List futures = new ArrayList<>(); @@ -2643,7 +2661,7 @@ public class MatDeliverFacade { } List hids = hospitalIds.subList(i, end); - Callable c = new DueOrgCountWorker(time,hids,matDeliverService,organizationService,patientsService,babyService,params,basicConfigService); + Callable c = new DueOrgCountWorker(time,hids,matDeliverService,organizationService,patientsService,babyService,params,basicConfigs); Future f = commonThreadPool.submit(c); futures.add(f); } @@ -2657,10 +2675,61 @@ public class MatDeliverFacade { } } } + + Map data = new HashMap<>(); + data.put("coutData",list); + data.put("areaNames",areaNames); + BaseObjectResponse objectResponse = new BaseObjectResponse(); objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); objectResponse.setErrormsg("成功"); - objectResponse.setData(list); + objectResponse.setData(data); return objectResponse; } + + public void sum(List> list) + { + + int fmPoGongCount = 0; //分娩方式 剖宫产 + int wsCount = 0; //外省 + int chanCount = 0; //产妇数 + int babySiTaiCount = 0; //死胎数 + int girlCount = 0; //女 + int boyCount = 0; //男 + int bswsCount = 0; //本省外市 + int huoChanCount = 0; //活产数 + int babySiChanCount = 0; //死产数 + int zcBabyCount = 0; //早产儿数 + int huiYinFullCount = 0; //会阴情况 完好 + int siLielevelCount = 0; //会阴情况 Ⅰ-Ⅱ°裂伤 + int siLielevelYzCount = 0; //会阴情况 重度裂伤 + int queXianBabyCount = 0; //出生缺陷数 + int huiYingTotalCount = 0; //会阴情况 小计 + int fmShunChanCount = 0; //分娩方式 顺产 + //int orgName = 唐山市丰南区大齐镇卫生院; //机构名称 + int riskCount = 39; //高危孕产妇数 + int fmCount = 0; //分娩方式 小计 + int doubleCount = 0; //双胎数 + int huiYinSpitCount = 0; //会阴情况 切开 + int fzrDoubleCount = 0; //非自然妊娠双胎 + +// int lowWeightCount = ; //低出生体重数 +// int babySiWangCount = ; //新生儿死亡数 +// int sieveCount = ; //筛查数 +// int bigBoyCount = ; //巨大儿数 +// int sieveFreeCount = ; //35岁以下免费筛查数 +// int fmOtherCount = ; //分娩方式 其他 + + if (CollectionUtils.isNotEmpty(list)) + { + for (Map map : list) + { + + } + } + + Map totalMap = new HashMap<>(); + + + } } \ No newline at end of file diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/DueOrgCountWorker.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/DueOrgCountWorker.java index 7a5b598..d0c1a5b 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/DueOrgCountWorker.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/DueOrgCountWorker.java @@ -18,10 +18,8 @@ import com.lyms.platform.query.BabyModelQuery; import com.lyms.platform.query.BasicConfigQuery; import com.lyms.platform.query.MatDeliverQuery; import com.lyms.platform.query.PatientsQuery; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; + +import java.util.*; import java.util.concurrent.Callable; /** @@ -37,9 +35,9 @@ public class DueOrgCountWorker implements Callable>> { private BabyService babyService; private PatientsService patientsService; - private BasicConfigService basicConfigService; private Map params; + private List basicConfigs; public DueOrgCountWorker(String time, List hospitalIds, MatDeliverService matDeliverService, @@ -47,7 +45,7 @@ public class DueOrgCountWorker implements Callable>> { PatientsService patientsService, BabyService babyService, Map params, - BasicConfigService basicConfigService + List basicConfigs ) { this.time = time; @@ -57,7 +55,7 @@ public class DueOrgCountWorker implements Callable>> { this.patientsService = patientsService; this.babyService = babyService; this.params = params; - this.basicConfigService = basicConfigService; + this.basicConfigs = basicConfigs; } @Override @@ -67,7 +65,7 @@ public class DueOrgCountWorker implements Callable>> { List> list = new ArrayList<>(); for (String hospialId : hospitalIds) { - Map map = new HashMap<>(); + Map map = new LinkedHashMap<>(); //机构名称 @@ -416,11 +414,6 @@ public class DueOrgCountWorker implements Callable>> { //本市户籍 - BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); - basicConfigQuery.setYn(YnEnums.YES.getId()); - basicConfigQuery.setParentId(params.get("cityId")); - - List basicConfigs = basicConfigService.queryBasicConfig(basicConfigQuery); if (CollectionUtils.isNotEmpty(basicConfigs)) { int index = 1; @@ -438,7 +431,7 @@ public class DueOrgCountWorker implements Callable>> { patientsQuery4.setType(3); patientsQuery4.setAreaRegisterId(basicConfig.getId()); int areaCount = patientsService.queryPatientCount(patientsQuery4); - map.put("areaCount"+index, String.valueOf(areaCount)); + map.put("areaCount"+index+basicConfig.getName(), String.valueOf(areaCount)); index++; } } -- 1.8.3.1