Commit ee4f2f912cca66fc274c9d44522c86d5f421b17a
1 parent
5a74958c15
Exists in
master
and in
6 other branches
区域孕产妇管理-高危管理:导出与页面不一致bug/全部孕妇导出bug
Showing 1 changed file with 91 additions and 39 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
ee4f2f9
... | ... | @@ -2189,53 +2189,105 @@ |
2189 | 2189 | response.setContentType("application/octet-stream"); |
2190 | 2190 | response.setHeader("Content-Disposition", "attachment;fileName=" + "datas.xls"); |
2191 | 2191 | try { |
2192 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
2192 | 2193 | BaseListResponse listResponse = null; |
2193 | 2194 | List <Map <String, Object>> datas = new ArrayList <>(); |
2194 | 2195 | Map <String, String> cnames = new LinkedHashMap <>(); |
2195 | 2196 | int type = patientsQueryRequest.getQueryType() == 1 ? 1 : 3; |
2196 | - //导出与页面不一致.不知道上面type逻辑什么意思。这里保证只要传querytype就能得到正确结果 | |
2197 | - if(null!=patientsQueryRequest.getQueryType()){ | |
2198 | - type=patientsQueryRequest.getQueryType(); | |
2197 | + //20220104区域(高危孕妇)导出与页面不一致,查高危孕妇 | |
2198 | + Boolean isHighRisk=null; | |
2199 | + if(patientsQueryRequest.getQueryType()==0){ | |
2200 | + isHighRisk=true;//查高危 | |
2201 | + patientsQueryRequest.setQueryType(0);//查孕妇 | |
2202 | + type=1; | |
2199 | 2203 | } |
2200 | - listResponse = (BaseListResponse) queryHighRisk(patientsQueryRequest, null, type, userId, "true", Boolean.TRUE); | |
2204 | + listResponse = (BaseListResponse) queryHighRisk(patientsQueryRequest, isHighRisk, type, userId, "true", Boolean.TRUE); | |
2201 | 2205 | List list = listResponse.getData(); |
2202 | 2206 | for (Object obj : list) { |
2203 | 2207 | Map <String, Object> data = new HashMap <>(); |
2204 | - QuanChanResult rp = (QuanChanResult) obj; | |
2205 | - data.put("name", rp.getName()); | |
2206 | - data.put("age", rp.getAge()); | |
2207 | - data.put("dueWeek", rp.getDueWeek()); | |
2208 | - data.put("cTime", rp.getcTime()); | |
2209 | - data.put("rLevel", getLevel(rp.getrLevel())); | |
2210 | - data.put("rFactor", rp.getrFactor()); | |
2211 | - data.put("nextCheckTime", rp.getNextCheckTime()); | |
2212 | - data.put("cTimes", rp.getcTimes()); | |
2213 | - data.put("cHTimes", rp.getcHTimes()); | |
2214 | - data.put("checkDoctor", rp.getCheckDoctor()); | |
2215 | - data.put("lName", rp.getlName()); | |
2216 | - data.put("phone", patientsQueryRequest.getIsEncry() == 0 ? rp.getRealPhone() : com.lyms.platform.common.utils.StringUtils.encryPhone(rp.getRealPhone())); | |
2217 | - data.put("addr", rp.getAddr()); | |
2218 | - data.put("serviceType", "服务类型"); | |
2219 | - data.put("serviceStatus", "服务类型"); | |
2220 | - datas.add(data); | |
2208 | + //孕妇 | |
2209 | + if(obj instanceof RiskPatientsResult){ | |
2210 | + RiskPatientsResult rp = (RiskPatientsResult) obj; | |
2211 | + data.put("name", rp.getName()); | |
2212 | + data.put("age", rp.getAge()); | |
2213 | + if ("1000000115".equals(hospital)) { | |
2214 | + data.put("cardNo", rp.getCardNo()); | |
2215 | + data.put("vcCardNo", rp.getVcCardNo()); | |
2216 | + } | |
2217 | + data.put("dueWeek", rp.getDueWeek()); | |
2218 | + data.put("rLevel", getLevel(rp.getrLevel())); | |
2219 | + data.put("rFactor", rp.getrFactor()); | |
2220 | + data.put("hScore", rp.gethScore()); | |
2221 | + data.put("cTimes", rp.getcTimes()); | |
2222 | + data.put("cHTimes", rp.getcHTimes()); | |
2223 | + data.put("cTime", rp.getcTime()); | |
2224 | + data.put("dueDate", rp.getDueDate()); | |
2225 | + data.put("checkDoctor", rp.getCheckDoctor()); | |
2226 | + data.put("lName", rp.getlName()); | |
2227 | + data.put("phone", patientsQueryRequest.getIsEncry() == 0 ? rp.getRealPhone() : StringUtils.encryPhone(rp.getRealPhone())); | |
2228 | + data.put("serviceType", rp.getServiceType()); | |
2229 | + data.put("serviceStatus", rp.getServiceStatus()); | |
2230 | + datas.add(data); | |
2231 | + }else { | |
2232 | + //产妇 | |
2233 | + QuanChanResult rp = (QuanChanResult) obj; | |
2234 | + data.put("name", rp.getName()); | |
2235 | + data.put("age", rp.getAge()); | |
2236 | + data.put("dueWeek", rp.getDueWeek()); | |
2237 | + data.put("cTime", rp.getcTime()); | |
2238 | + data.put("rLevel", getLevel(rp.getrLevel())); | |
2239 | + data.put("rFactor", rp.getrFactor()); | |
2240 | + data.put("nextCheckTime", rp.getNextCheckTime()); | |
2241 | + data.put("cTimes", rp.getcTimes()); | |
2242 | + data.put("cHTimes", rp.getcHTimes()); | |
2243 | + data.put("checkDoctor", rp.getCheckDoctor()); | |
2244 | + data.put("lName", rp.getlName()); | |
2245 | + data.put("phone", patientsQueryRequest.getIsEncry() == 0 ? rp.getRealPhone() : StringUtils.encryPhone(rp.getRealPhone())); | |
2246 | + data.put("addr", rp.getAddr()); | |
2247 | + data.put("serviceType", "服务类型"); | |
2248 | + data.put("serviceStatus", "服务类型"); | |
2249 | + datas.add(data); | |
2250 | + } | |
2221 | 2251 | } |
2222 | - cnames.put("name", "姓名"); | |
2223 | - cnames.put("age", "分娩年龄"); | |
2224 | - cnames.put("dueWeek", "分娩日期"); | |
2225 | - cnames.put("cTime", "产后时间"); | |
2226 | - cnames.put("rLevel", "高危等级"); | |
2227 | - cnames.put("rFactor", "高危风险因素"); | |
2228 | - cnames.put("nextCheckTime", "预约下次复查"); | |
2229 | - cnames.put("cTimes", "总复查次数"); | |
2230 | - cnames.put("cHTimes", "本院复查次数"); | |
2231 | - cnames.put("checkDoctor", "检查医生"); | |
2232 | - cnames.put("phone", "联系方式"); | |
2233 | - cnames.put("lName", "登记人"); | |
2234 | - cnames.put("addr", "居住地"); | |
2235 | - cnames.put("serviceType", "服务类型"); | |
2236 | - cnames.put("serviceStatus", "服务状态"); | |
2237 | - | |
2238 | - | |
2252 | + //孕妇 | |
2253 | + if(patientsQueryRequest.getQueryType()==0||patientsQueryRequest.getQueryType()==1){ | |
2254 | + cnames.put("name", "姓名"); | |
2255 | + cnames.put("age", "当前年龄"); | |
2256 | + if ("1000000115".equals(hospital)) { | |
2257 | + cnames.put("cardNo", "身份证"); | |
2258 | + cnames.put("vcCardNo", "就诊卡号"); | |
2259 | + } | |
2260 | + cnames.put("dueWeek", "当前孕周"); | |
2261 | + cnames.put("rLevel", "高危等级"); | |
2262 | + cnames.put("rFactor", "高危风险因素"); | |
2263 | + cnames.put("hScore", "高危评分"); | |
2264 | + cnames.put("cTimes", "总产检次数"); | |
2265 | + cnames.put("cHTimes", "本院产检次数"); | |
2266 | + cnames.put("cTime", "预约产检日期"); | |
2267 | + cnames.put("dueDate", "预产期"); | |
2268 | + cnames.put("checkDoctor", "产检医生"); | |
2269 | + cnames.put("lName", "登记人"); | |
2270 | + cnames.put("phone", "联系方式"); | |
2271 | + cnames.put("serviceType", "服务类型"); | |
2272 | + cnames.put("serviceStatus", "服务状态"); | |
2273 | + }else { | |
2274 | + //产妇 | |
2275 | + cnames.put("name", "姓名"); | |
2276 | + cnames.put("age", "分娩年龄"); | |
2277 | + cnames.put("dueWeek", "分娩日期"); | |
2278 | + cnames.put("cTime", "产后时间"); | |
2279 | + cnames.put("rLevel", "高危等级"); | |
2280 | + cnames.put("rFactor", "高危风险因素"); | |
2281 | + cnames.put("nextCheckTime", "预约下次复查"); | |
2282 | + cnames.put("cTimes", "总复查次数"); | |
2283 | + cnames.put("cHTimes", "本院复查次数"); | |
2284 | + cnames.put("checkDoctor", "检查医生"); | |
2285 | + cnames.put("phone", "联系方式"); | |
2286 | + cnames.put("lName", "登记人"); | |
2287 | + cnames.put("addr", "居住地"); | |
2288 | + cnames.put("serviceType", "服务类型"); | |
2289 | + cnames.put("serviceStatus", "服务状态"); | |
2290 | + } | |
2239 | 2291 | OutputStream out = response.getOutputStream(); |
2240 | 2292 | ExcelUtil.toExcel(out, datas, cnames); |
2241 | 2293 | } catch (Exception e) { |