Commit 2a591085c8c2c274587635dc99fe81bb3997ade1
1 parent
65735e10c1
Exists in
dev
#fix:优化高危统计管理
Showing 3 changed files with 14 additions and 10 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
View file @
2a59108
| ... | ... | @@ -113,7 +113,7 @@ |
| 113 | 113 | @TokenRequired |
| 114 | 114 | public BaseResponse queryAllPatPuerpera(@Valid RiskPatientsQueryRequest patientsQueryRequest, HttpServletRequest request) { |
| 115 | 115 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 116 | - return patientFacade.queryHighRisk1(patientsQueryRequest, null, null, loginState.getId(), "true", Boolean.FALSE); | |
| 116 | + return patientFacade.queryHighRisk1(patientsQueryRequest, null, null, loginState.getId(), null, Boolean.FALSE); | |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
2a59108
| ... | ... | @@ -752,7 +752,7 @@ |
| 752 | 752 | if (CollectionUtils.isNotEmpty(patientses)) { |
| 753 | 753 | //如果是查高危孕妇 |
| 754 | 754 | if (null != isHighRisk && Boolean.TRUE.equals(isHighRisk)) { |
| 755 | - data = convertToHighRisk(patientses, userId, hospital,null,null); | |
| 755 | + data = convertToHighRisk(patientses, userId, hospital,null); | |
| 756 | 756 | } else if (type == 1) { |
| 757 | 757 | //处理全部孕妇的情况 |
| 758 | 758 | data = convertToQuanPatient(patientses, userId, hospital); |
| ... | ... | @@ -2042,6 +2042,9 @@ |
| 2042 | 2042 | |
| 2043 | 2043 | public BaseResponse queryHighRisk1(RiskPatientsQueryRequest riskPatientsQueryRequest, Boolean isHighRisk, Integer type, Integer userId, String needPage, boolean isRegion) { |
| 2044 | 2044 | String hospital = autoMatchFacade.getHospitalId(userId); |
| 2045 | + if (!"2100002419".equals(hospital)){ | |
| 2046 | + needPage="true"; | |
| 2047 | + } | |
| 2045 | 2048 | //组合请求 |
| 2046 | 2049 | PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion,hospital); |
| 2047 | 2050 | |
| 2048 | 2051 | |
| 2049 | 2052 | |
| ... | ... | @@ -2053,13 +2056,14 @@ |
| 2053 | 2056 | |
| 2054 | 2057 | //logger.info(stopWatch.toString()); |
| 2055 | 2058 | List data = new ArrayList <>(); |
| 2056 | - PageInfo pageInfo= patientsQuery.getPageInfo(); | |
| 2059 | + // PageInfo pageInfo= patientsQuery.getPageInfo(); | |
| 2057 | 2060 | if (CollectionUtils.isNotEmpty(patientses)) { |
| 2058 | 2061 | //如果是查高危孕妇 |
| 2059 | - data = convertToHighRisk(patientses, userId, hospital,riskPatientsQueryRequest.getrLevel(),pageInfo); | |
| 2062 | + data = convertToHighRisk(patientses, userId, hospital,riskPatientsQueryRequest.getrLevel()); | |
| 2060 | 2063 | // pageInfo.setCount(data.size()); |
| 2061 | 2064 | } |
| 2062 | - return new BaseListResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(data).setPageInfo(pageInfo); | |
| 2065 | + | |
| 2066 | + return new BaseListResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(data).setPageInfo(patientsQuery.getPageInfo()); | |
| 2063 | 2067 | } |
| 2064 | 2068 | |
| 2065 | 2069 | public BaseResponse findPatient(PatientQueryRequest patientQueryRequest, Integer userId) { |
| ... | ... | @@ -2380,7 +2384,7 @@ |
| 2380 | 2384 | * @param patientses |
| 2381 | 2385 | * @return |
| 2382 | 2386 | */ |
| 2383 | - private List convertToHighRisk(List <Patients> patientses, Integer userId, String hospital,String level,PageInfo pageInfo) { | |
| 2387 | + private List convertToHighRisk(List <Patients> patientses, Integer userId, String hospital,String level) { | |
| 2384 | 2388 | List<RiskPatientsResult> data = new ArrayList <>(); |
| 2385 | 2389 | int batchSize = 4; |
| 2386 | 2390 | int end = 0; |
| ... | ... | @@ -2391,7 +2395,7 @@ |
| 2391 | 2395 | end = patientses.size(); |
| 2392 | 2396 | } |
| 2393 | 2397 | listFuture.add(commonThreadPool.submit(new WorkHR(patientses.subList(i, end), usersService, hospital, basicConfigService, antExService, patientsService, organizationService, |
| 2394 | - couponService,level,pageInfo))); | |
| 2398 | + couponService,level))); | |
| 2395 | 2399 | } |
| 2396 | 2400 | for (Future f : listFuture) { |
| 2397 | 2401 | try { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/WorkHR.java
View file @
2a59108
| ... | ... | @@ -56,13 +56,12 @@ |
| 56 | 56 | private CouponService couponService; |
| 57 | 57 | private OrganizationService organizationService; |
| 58 | 58 | private String level; |
| 59 | - private PageInfo pageInfo; | |
| 60 | 59 | |
| 61 | 60 | public WorkHR(List<Patients> patientses, UsersService usersService, String hospital, |
| 62 | 61 | BasicConfigService basicConfigService, |
| 63 | 62 | AntenatalExaminationService antExService, PatientsService patientsService, |
| 64 | 63 | OrganizationService organizationService, |
| 65 | - CouponService couponService,String level,PageInfo pageInfo) { | |
| 64 | + CouponService couponService,String level) { | |
| 66 | 65 | this.couponService = couponService; |
| 67 | 66 | this.patientses = patientses; |
| 68 | 67 | this.usersService = usersService; |
| ... | ... | @@ -72,7 +71,6 @@ |
| 72 | 71 | this.patientsService = patientsService; |
| 73 | 72 | this.organizationService = organizationService; |
| 74 | 73 | this.level=level; |
| 75 | - this.pageInfo=pageInfo; | |
| 76 | 74 | } |
| 77 | 75 | |
| 78 | 76 | public List<RiskPatientsResult> call() { |
| 79 | 77 | |
| ... | ... | @@ -105,7 +103,9 @@ |
| 105 | 103 | } |
| 106 | 104 | } |
| 107 | 105 | if (b){ |
| 106 | + /* stopWatch.start("pageInfo getCount level"); | |
| 108 | 107 | pageInfo.setCount(pageInfo.getCount()-1); |
| 108 | + stopWatch.stop();*/ | |
| 109 | 109 | continue; |
| 110 | 110 | } |
| 111 | 111 | } |