Commit 1034a295057f8a632b763e066161b66a3f5bd0c1

Authored by liquanyu
1 parent 71596c97b6

高危统计

Showing 2 changed files with 24 additions and 8 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java View file @ 1034a29
... ... @@ -112,10 +112,27 @@
112 112  
113 113 for(BasicConfig levelConfig : riskLevelConfig)
114 114 {
  115 +
115 116 if ("e637b361-99cf-41eb-84f2-f0dab596e928".equals(levelConfig.getId()))
116 117 {
117 118 continue;
118 119 }
  120 +
  121 + PatientsQuery query = new PatientsQuery();
  122 + query.setYn(YnEnums.YES.getId());
  123 + query.setBuildTypeList(patientsQuery.getBuildTypeList());
  124 + query.setHospitalId(patientsQuery.getHospitalId());
  125 + query.setDueStatus(patientsQuery.getDueStatus());
  126 + //高危等级
  127 + query.setrLevel(patientsQuery.getrLevel());
  128 + //产检医生
  129 + query.setLastCheckEmployeeId(patientsQuery.getLastCheckEmployeeId());
  130 + query.setDueDateStart(patientsQuery.getDueDateStart());
  131 + query.setDueDateEnd(patientsQuery.getDueDateEnd());
  132 +
  133 + query.setBookbuildingDateStart(patientsQuery.getBookbuildingDateStart());
  134 + query.setBookbuildingDateEnd(patientsQuery.getBookbuildingDateEnd());
  135 +
119 136 Callable c = new HiskCountTask( basicConfigService,
120 137 patientsService, levelConfig,
121 138 patientsQuery,
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/HiskCountTask.java View file @ 1034a29
... ... @@ -25,18 +25,18 @@
25 25  
26 26 private PatientsService patientsService;
27 27 private BasicConfigService basicConfigService;
28   - private BasicConfig basicConfig;
  28 + private BasicConfig levelConfig;
29 29 private PatientsQuery patientsQuery;
30 30 private int allPatientCount;
31 31  
32 32 public HiskCountTask(BasicConfigService basicConfigService,
33   - PatientsService patientsService,BasicConfig basicConfig,
  33 + PatientsService patientsService,BasicConfig levelConfig,
34 34 PatientsQuery patientsQuery,
35 35 int allPatientCount)
36 36 {
37 37 this.basicConfigService = basicConfigService;
38 38 this.patientsService = patientsService;
39   - this.basicConfig = basicConfig;
  39 + this.levelConfig = levelConfig;
40 40 this.patientsQuery = patientsQuery;
41 41 this.allPatientCount = allPatientCount;
42 42 }
43 43  
44 44  
45 45  
... ... @@ -45,17 +45,16 @@
45 45  
46 46 BasicConfigQuery basicConfigQuery = new BasicConfigQuery();
47 47 basicConfigQuery.setYn(YnEnums.YES.getId());
48   - basicConfigQuery.setParentId(SystemConfig.HIGH_RISK_ID);
49 48 basicConfigQuery.setEnable(1);
  49 + basicConfigQuery.setParentId(levelConfig.getId());
50 50  
51 51 List<RiskReportResult> results = new ArrayList<>();
52   - basicConfigQuery.setParentId(basicConfig.getId());
53 52 List<BasicConfig> riskConfig = basicConfigService.queryBasicConfig(basicConfigQuery);
54 53  
55 54 if (CollectionUtils.isNotEmpty(riskConfig)) {
56 55 for (BasicConfig config : riskConfig) {
57 56 patientsQuery.setrFactor(config.getId());
58   - //单个高危妇条数
  57 + //单个高危因素孕产妇条数
59 58 int riskPatientCount = patientsService.queryPatientCount(patientsQuery);
60 59 if (riskPatientCount > 0)
61 60 {
62 61  
... ... @@ -68,10 +67,10 @@
68 67 String percent = df.format((double)riskPatientCount/allPatientCount*100)+"%";
69 68 risk.setPercent(percent);
70 69  
71   - if (null != basicConfig) {
  70 + if (null != levelConfig) {
72 71 List level = new ArrayList();
73 72 Map map = new HashMap();
74   - String name = basicConfig.getName();
  73 + String name = levelConfig.getName();
75 74 if (name.indexOf("预警") > -1) {
76 75 name = name.replace("预警", "");
77 76 }