Commit 04cef5c0f1f357edfaba52a3855d604246c8c120

Authored by liquanyu
1 parent bc0bb66d84

助产机构报表

Showing 3 changed files with 49 additions and 12 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java View file @ 04cef5c
... ... @@ -403,7 +403,6 @@
403 403 * @param proviceId
404 404 * @param cityId
405 405 * @param areaId
406   - * @param httpServletResponse
407 406 */
408 407 @TokenRequired
409 408 @ResponseBody
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java View file @ 04cef5c
... ... @@ -110,9 +110,8 @@
110 110  
111 111 @Autowired
112 112 private OperateLogFacade operateLogFacade;
  113 +
113 114 @Autowired
114   - private PatientServiceFacade patientServiceFacade;
115   - @Autowired
116 115 private ITrackDownService trackDownService;
117 116 @Autowired
118 117 private TrackDownRecordService trackDownRecordService;
119 118  
... ... @@ -2642,8 +2641,9 @@
2642 2641 if (end > hospitalIds.size()) {
2643 2642 end = hospitalIds.size();
2644 2643 }
  2644 +
2645 2645 List<String> hids = hospitalIds.subList(i, end);
2646   - Callable c = new DueOrgCountWorker(time,hids,matDeliverService,organizationService,patientsService,babyService,params);
  2646 + Callable c = new DueOrgCountWorker(time,hids,matDeliverService,organizationService,patientsService,babyService,params,basicConfigService);
2647 2647 Future f = commonThreadPool.submit(c);
2648 2648 futures.add(f);
2649 2649 }
... ... @@ -2657,11 +2657,11 @@
2657 2657 }
2658 2658 }
2659 2659 }
2660   -
2661   -
2662   -
2663   -
2664   - return null;
  2660 + BaseObjectResponse objectResponse = new BaseObjectResponse();
  2661 + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
  2662 + objectResponse.setErrormsg("成功");
  2663 + objectResponse.setData(list);
  2664 + return objectResponse;
2665 2665 }
2666 2666 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/DueOrgCountWorker.java View file @ 04cef5c
... ... @@ -2,6 +2,7 @@
2 2  
3 3  
4 4 import com.lyms.platform.biz.service.BabyService;
  5 +import com.lyms.platform.biz.service.BasicConfigService;
5 6 import com.lyms.platform.biz.service.MatDeliverService;
6 7 import com.lyms.platform.biz.service.PatientsService;
7 8 import com.lyms.platform.common.enums.YnEnums;
8 9  
9 10  
... ... @@ -10,13 +11,13 @@
10 11 import com.lyms.platform.operate.web.utils.CollectionUtils;
11 12 import com.lyms.platform.operate.web.utils.CommonsHelper;
12 13 import com.lyms.platform.permission.service.OrganizationService;
  14 +import com.lyms.platform.pojo.BasicConfig;
13 15 import com.lyms.platform.pojo.MaternalDeliverModel;
14 16 import com.lyms.platform.pojo.Patients;
15 17 import com.lyms.platform.query.BabyModelQuery;
  18 +import com.lyms.platform.query.BasicConfigQuery;
16 19 import com.lyms.platform.query.MatDeliverQuery;
17 20 import com.lyms.platform.query.PatientsQuery;
18   -import org.springframework.data.domain.Sort;
19   -
20 21 import java.util.ArrayList;
21 22 import java.util.HashMap;
22 23 import java.util.List;
... ... @@ -36,6 +37,7 @@
36 37 private BabyService babyService;
37 38  
38 39 private PatientsService patientsService;
  40 + private BasicConfigService basicConfigService;
39 41  
40 42 private Map<String,String> params;
41 43 public DueOrgCountWorker(String time,
... ... @@ -44,7 +46,8 @@
44 46 OrganizationService organizationService,
45 47 PatientsService patientsService,
46 48 BabyService babyService,
47   - Map<String,String> params
  49 + Map<String,String> params,
  50 + BasicConfigService basicConfigService
48 51 )
49 52 {
50 53 this.time = time;
... ... @@ -54,6 +57,7 @@
54 57 this.patientsService = patientsService;
55 58 this.babyService = babyService;
56 59 this.params = params;
  60 + this.basicConfigService = basicConfigService;
57 61 }
58 62  
59 63 @Override
... ... @@ -410,6 +414,40 @@
410 414 int wsCount = patientsService.queryPatientCount(patientsQuery2);
411 415 map.put("wsCount", String.valueOf(wsCount));
412 416  
  417 +
  418 + //本市户籍
  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 + if (CollectionUtils.isNotEmpty(basicConfigs))
  425 + {
  426 + int index = 1;
  427 + for (BasicConfig basicConfig : basicConfigs)
  428 + {
  429 +
  430 + PatientsQuery patientsQuery4 = new PatientsQuery();
  431 + patientsQuery4.setYn(YnEnums.YES.getId());
  432 + if (StringUtils.isNotEmpty(time))
  433 + {
  434 + patientsQuery4.setFmDateStart(DateUtil.getSNDate(time)[0]);
  435 + patientsQuery4.setFmDateEnd(DateUtil.getSNDate(time)[1]);
  436 + }
  437 + patientsQuery4.setFmHospital(hospialId);
  438 + patientsQuery4.setType(3);
  439 + patientsQuery4.setAreaRegisterId(basicConfig.getId());
  440 + int areaCount = patientsService.queryPatientCount(patientsQuery4);
  441 + map.put("areaCount"+index, String.valueOf(areaCount));
  442 + index++;
  443 + }
  444 + }
  445 +
  446 +
  447 + //筛查数
  448 + map.put("sieveCount", "");
  449 + //35岁以下免费筛查数
  450 + map.put("sieveFreeCount", "");
413 451  
414 452 list.add(map);
415 453 }