From 04cef5c0f1f357edfaba52a3855d604246c8c120 Mon Sep 17 00:00:00 2001 From: liquanyu Date: Wed, 22 Aug 2018 12:01:10 +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 | 1 - .../operate/web/facade/MatDeliverFacade.java | 16 ++++---- .../operate/web/worker/DueOrgCountWorker.java | 44 ++++++++++++++++++++-- 3 files changed, 49 insertions(+), 12 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 07260f6..34a18c3 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 @@ -403,7 +403,6 @@ public class MatDeliverController extends BaseController{ * @param proviceId * @param cityId * @param areaId - * @param httpServletResponse */ @TokenRequired @ResponseBody 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 a9cf6a2..516e2ce 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 @@ -110,8 +110,7 @@ public class MatDeliverFacade { @Autowired private OperateLogFacade operateLogFacade; - @Autowired - private PatientServiceFacade patientServiceFacade; + @Autowired private ITrackDownService trackDownService; @Autowired @@ -2642,8 +2641,9 @@ public class MatDeliverFacade { if (end > hospitalIds.size()) { end = hospitalIds.size(); } + List hids = hospitalIds.subList(i, end); - Callable c = new DueOrgCountWorker(time,hids,matDeliverService,organizationService,patientsService,babyService,params); + Callable c = new DueOrgCountWorker(time,hids,matDeliverService,organizationService,patientsService,babyService,params,basicConfigService); Future f = commonThreadPool.submit(c); futures.add(f); } @@ -2657,10 +2657,10 @@ public class MatDeliverFacade { } } } - - - - - return null; + BaseObjectResponse objectResponse = new BaseObjectResponse(); + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); + objectResponse.setErrormsg("成功"); + objectResponse.setData(list); + return objectResponse; } } \ 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 3a22962..7a5b598 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 @@ -2,6 +2,7 @@ package com.lyms.platform.operate.web.worker; import com.lyms.platform.biz.service.BabyService; +import com.lyms.platform.biz.service.BasicConfigService; import com.lyms.platform.biz.service.MatDeliverService; import com.lyms.platform.biz.service.PatientsService; import com.lyms.platform.common.enums.YnEnums; @@ -10,13 +11,13 @@ import com.lyms.platform.common.utils.StringUtils; import com.lyms.platform.operate.web.utils.CollectionUtils; import com.lyms.platform.operate.web.utils.CommonsHelper; import com.lyms.platform.permission.service.OrganizationService; +import com.lyms.platform.pojo.BasicConfig; import com.lyms.platform.pojo.MaternalDeliverModel; import com.lyms.platform.pojo.Patients; 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 org.springframework.data.domain.Sort; - import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -36,6 +37,7 @@ public class DueOrgCountWorker implements Callable>> { private BabyService babyService; private PatientsService patientsService; + private BasicConfigService basicConfigService; private Map params; public DueOrgCountWorker(String time, @@ -44,7 +46,8 @@ public class DueOrgCountWorker implements Callable>> { OrganizationService organizationService, PatientsService patientsService, BabyService babyService, - Map params + Map params, + BasicConfigService basicConfigService ) { this.time = time; @@ -54,6 +57,7 @@ public class DueOrgCountWorker implements Callable>> { this.patientsService = patientsService; this.babyService = babyService; this.params = params; + this.basicConfigService = basicConfigService; } @Override @@ -411,6 +415,40 @@ public class DueOrgCountWorker implements Callable>> { map.put("wsCount", String.valueOf(wsCount)); + //本市户籍 + 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; + for (BasicConfig basicConfig : basicConfigs) + { + + PatientsQuery patientsQuery4 = new PatientsQuery(); + patientsQuery4.setYn(YnEnums.YES.getId()); + if (StringUtils.isNotEmpty(time)) + { + patientsQuery4.setFmDateStart(DateUtil.getSNDate(time)[0]); + patientsQuery4.setFmDateEnd(DateUtil.getSNDate(time)[1]); + } + patientsQuery4.setFmHospital(hospialId); + patientsQuery4.setType(3); + patientsQuery4.setAreaRegisterId(basicConfig.getId()); + int areaCount = patientsService.queryPatientCount(patientsQuery4); + map.put("areaCount"+index, String.valueOf(areaCount)); + index++; + } + } + + + //筛查数 + map.put("sieveCount", ""); + //35岁以下免费筛查数 + map.put("sieveFreeCount", ""); + list.add(map); } -- 1.8.3.1