Commit 331447c4a8ecfa3376c9c4747695098eaa80677f
1 parent
9432cc3828
Exists in
master
and in
3 other branches
修改
Showing 4 changed files with 121 additions and 12 deletions
- platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyManageRequest.java
platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
View file @
331447c
| ... | ... | @@ -130,6 +130,26 @@ |
| 130 | 130 | |
| 131 | 131 | private String areaId; |
| 132 | 132 | |
| 133 | + private String provinceId; | |
| 134 | + | |
| 135 | + private String cityId; | |
| 136 | + | |
| 137 | + public String getProvinceId() { | |
| 138 | + return provinceId; | |
| 139 | + } | |
| 140 | + | |
| 141 | + public void setProvinceId(String provinceId) { | |
| 142 | + this.provinceId = provinceId; | |
| 143 | + } | |
| 144 | + | |
| 145 | + public String getCityId() { | |
| 146 | + return cityId; | |
| 147 | + } | |
| 148 | + | |
| 149 | + public void setCityId(String cityId) { | |
| 150 | + this.cityId = cityId; | |
| 151 | + } | |
| 152 | + | |
| 133 | 153 | public String getAreaId() { |
| 134 | 154 | return areaId; |
| 135 | 155 | } |
| ... | ... | @@ -395,6 +415,12 @@ |
| 395 | 415 | } |
| 396 | 416 | if (null != buildType) { |
| 397 | 417 | condition = condition.and("buildType", buildType, MongoOper.IS); |
| 418 | + } | |
| 419 | + if (null != provinceId) { | |
| 420 | + condition = condition.and("provinceId", provinceId, MongoOper.IS); | |
| 421 | + } | |
| 422 | + if (null != cityId) { | |
| 423 | + condition = condition.and("cityId", cityId, MongoOper.IS); | |
| 398 | 424 | } |
| 399 | 425 | if (null != areaId) { |
| 400 | 426 | condition = condition.and("areaId", areaId, MongoOper.IS); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java
View file @
331447c
| ... | ... | @@ -188,7 +188,12 @@ |
| 188 | 188 | @RequestParam("page") Integer page, |
| 189 | 189 | @RequestParam("limit") Integer limit, |
| 190 | 190 | |
| 191 | + @RequestParam(value = "provinceId",required = false) String provinceId, | |
| 192 | + @RequestParam(value = "cityId",required = false) String cityId, | |
| 191 | 193 | @RequestParam(value = "areaId",required = false) String areaId, |
| 194 | + @RequestParam(value = "hospitalProvinceId",required = false) String hospitalProvinceId, | |
| 195 | + @RequestParam(value = "hospitalCityId",required = false) String hospitalCityId, | |
| 196 | + @RequestParam(value = "hospitalAreaId",required = false) String hospitalAreaId, | |
| 192 | 197 | @RequestParam(value = "hospitalId",required = false) String hospitalId, |
| 193 | 198 | @RequestParam(value = "isArea",required = false) String isArea){ |
| 194 | 199 | LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext"); |
| 195 | 200 | |
| ... | ... | @@ -210,9 +215,16 @@ |
| 210 | 215 | request.setServiceStatus(serviceStatus); |
| 211 | 216 | request.setDateRange(dateRange); |
| 212 | 217 | |
| 218 | + // 省 | |
| 219 | + request.setProvinceId(provinceId); | |
| 220 | + // 市 | |
| 221 | + request.setCityId(cityId); | |
| 213 | 222 | // 区/县 |
| 214 | 223 | request.setAreaId(areaId); |
| 215 | 224 | // 建档医院 |
| 225 | + request.setHospitalProvinceId(hospitalProvinceId); | |
| 226 | + request.setHospitalCityId(hospitalCityId); | |
| 227 | + request.setHospitalAreaId(hospitalAreaId); | |
| 216 | 228 | request.setHospitalId(hospitalId); |
| 217 | 229 | // 是否区域 |
| 218 | 230 | request.setIsArea(isArea); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
331447c
| ... | ... | @@ -1437,24 +1437,41 @@ |
| 1437 | 1437 | List<String> hospitalIdList = new ArrayList<>(); |
| 1438 | 1438 | |
| 1439 | 1439 | if(String.valueOf(YnEnums.YES.getId()).equals(request.getIsArea())){ |
| 1440 | - // 更改原因-从一个医院更改为list | |
| 1441 | - if(request.getHospitalId()==null){ | |
| 1442 | - // 没有传入医院,取所有有权限的医院 | |
| 1443 | - OrganizationQuery organizationQuery = new OrganizationQuery(); | |
| 1444 | - List<Integer> typeList = new ArrayList<>(); | |
| 1445 | - typeList.add(OrganizationTypeEnum.NY.getId()); | |
| 1446 | - typeList.add(OrganizationTypeEnum.FB.getId()); | |
| 1447 | - typeList.add(OrganizationTypeEnum.JMQY.getId()); | |
| 1448 | - typeList.add(OrganizationTypeEnum.TY.getId()); | |
| 1449 | - organizationQuery.setTypeList(typeList); | |
| 1440 | + | |
| 1441 | + OrganizationQuery organizationQuery = new OrganizationQuery(); | |
| 1442 | + List<Integer> typeList = new ArrayList<>(); | |
| 1443 | + typeList.add(OrganizationTypeEnum.NY.getId()); | |
| 1444 | + typeList.add(OrganizationTypeEnum.FB.getId()); | |
| 1445 | + typeList.add(OrganizationTypeEnum.JMQY.getId()); | |
| 1446 | + typeList.add(OrganizationTypeEnum.TY.getId()); | |
| 1447 | + organizationQuery.setTypeList(typeList); | |
| 1448 | + if(!StringUtils.isEmpty(request.getHospitalId())){ | |
| 1449 | + hospitalIdList.add(request.getHospitalId()); | |
| 1450 | + }else if(!StringUtils.isEmpty(request.getHospitalAreaId())){ | |
| 1451 | + organizationQuery.setAreaId(request.getAreaId()); | |
| 1450 | 1452 | List<Organization> organizationList = organizationService.queryOrganization(organizationQuery); |
| 1451 | 1453 | for (Organization organization : organizationList) { |
| 1452 | 1454 | hospitalIdList.add(String.valueOf(organization.getId())); |
| 1453 | 1455 | } |
| 1456 | + }else if(!StringUtils.isEmpty(request.getHospitalCityId())){ | |
| 1457 | + organizationQuery.setCityId(request.getHospitalCityId()); | |
| 1458 | + List<Organization> organizationList = organizationService.queryOrganization(organizationQuery); | |
| 1459 | + for (Organization organization : organizationList) { | |
| 1460 | + hospitalIdList.add(String.valueOf(organization.getId())); | |
| 1461 | + } | |
| 1462 | + }else if(!StringUtils.isEmpty(request.getProvinceId())){ | |
| 1463 | + organizationQuery.setProvinceId(request.getProvinceId()); | |
| 1464 | + List<Organization> organizationList = organizationService.queryOrganization(organizationQuery); | |
| 1465 | + for (Organization organization : organizationList) { | |
| 1466 | + hospitalIdList.add(String.valueOf(organization.getId())); | |
| 1467 | + } | |
| 1454 | 1468 | }else{ |
| 1455 | - // 传入了医院,取传入的医院 | |
| 1456 | - hospitalIdList.add(request.getHospitalId()); | |
| 1469 | + List<Organization> organizationList = organizationService.queryOrganization(organizationQuery); | |
| 1470 | + for (Organization organization : organizationList) { | |
| 1471 | + hospitalIdList.add(String.valueOf(organization.getId())); | |
| 1472 | + } | |
| 1457 | 1473 | } |
| 1474 | + | |
| 1458 | 1475 | }else{ |
| 1459 | 1476 | String hospitalId = ""; |
| 1460 | 1477 | //得到当前登录的医院id |
| ... | ... | @@ -1661,6 +1678,10 @@ |
| 1661 | 1678 | } |
| 1662 | 1679 | } |
| 1663 | 1680 | |
| 1681 | + // 省 | |
| 1682 | + babyQuery.setProvinceId(request.getProvinceId()); | |
| 1683 | + // 市 | |
| 1684 | + babyQuery.setCityId(request.getCityId()); | |
| 1664 | 1685 | // 区/县 |
| 1665 | 1686 | babyQuery.setAreaId(request.getAreaId()); |
| 1666 | 1687 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyManageRequest.java
View file @
331447c
| ... | ... | @@ -58,11 +58,61 @@ |
| 58 | 58 | |
| 59 | 59 | private String dateRange; |
| 60 | 60 | |
| 61 | + private String provinceId; | |
| 62 | + | |
| 63 | + private String cityId; | |
| 64 | + | |
| 61 | 65 | private String areaId; |
| 62 | 66 | |
| 67 | + private String hospitalProvinceId; | |
| 68 | + | |
| 69 | + private String hospitalCityId; | |
| 70 | + | |
| 71 | + private String hospitalAreaId; | |
| 72 | + | |
| 63 | 73 | private String hospitalId; |
| 64 | 74 | |
| 65 | 75 | private String isArea; |
| 76 | + | |
| 77 | + public String getHospitalProvinceId() { | |
| 78 | + return hospitalProvinceId; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public void setHospitalProvinceId(String hospitalProvinceId) { | |
| 82 | + this.hospitalProvinceId = hospitalProvinceId; | |
| 83 | + } | |
| 84 | + | |
| 85 | + public String getHospitalCityId() { | |
| 86 | + return hospitalCityId; | |
| 87 | + } | |
| 88 | + | |
| 89 | + public void setHospitalCityId(String hospitalCityId) { | |
| 90 | + this.hospitalCityId = hospitalCityId; | |
| 91 | + } | |
| 92 | + | |
| 93 | + public String getHospitalAreaId() { | |
| 94 | + return hospitalAreaId; | |
| 95 | + } | |
| 96 | + | |
| 97 | + public void setHospitalAreaId(String hospitalAreaId) { | |
| 98 | + this.hospitalAreaId = hospitalAreaId; | |
| 99 | + } | |
| 100 | + | |
| 101 | + public String getProvinceId() { | |
| 102 | + return provinceId; | |
| 103 | + } | |
| 104 | + | |
| 105 | + public void setProvinceId(String provinceId) { | |
| 106 | + this.provinceId = provinceId; | |
| 107 | + } | |
| 108 | + | |
| 109 | + public String getCityId() { | |
| 110 | + return cityId; | |
| 111 | + } | |
| 112 | + | |
| 113 | + public void setCityId(String cityId) { | |
| 114 | + this.cityId = cityId; | |
| 115 | + } | |
| 66 | 116 | |
| 67 | 117 | public String getIsArea() { |
| 68 | 118 | return isArea; |