Commit 813d46f3595017926aea981bc36977d394c51e17
1 parent
2be002f5e8
Exists in
master
and in
6 other branches
1
Showing 3 changed files with 29 additions and 16 deletions
platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
View file @
813d46f
| ... | ... | @@ -131,6 +131,16 @@ |
| 131 | 131 | */ |
| 132 | 132 | private Boolean isNull; |
| 133 | 133 | |
| 134 | + private Boolean extEnable; | |
| 135 | + | |
| 136 | + public Boolean getExtEnable() { | |
| 137 | + return extEnable; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public void setExtEnable(Boolean extEnable) { | |
| 141 | + this.extEnable = extEnable; | |
| 142 | + } | |
| 143 | + | |
| 134 | 144 | public Integer[] getOrServiceStatus() { |
| 135 | 145 | return orServiceStatus; |
| 136 | 146 | } |
| ... | ... | @@ -294,6 +304,7 @@ |
| 294 | 304 | //身长别体重 |
| 295 | 305 | private String heightWeight; |
| 296 | 306 | |
| 307 | + | |
| 297 | 308 | public String getWeightEvaluate() { |
| 298 | 309 | return weightEvaluate; |
| 299 | 310 | } |
| ... | ... | @@ -507,6 +518,10 @@ |
| 507 | 518 | } |
| 508 | 519 | if (null != source) { |
| 509 | 520 | condition = condition.and("source", source, MongoOper.IS); |
| 521 | + } | |
| 522 | + | |
| 523 | + if(null!=extEnable){ | |
| 524 | + condition.and("enable",extEnable,MongoOper.EXISTS); | |
| 510 | 525 | } |
| 511 | 526 | if (-1 != yn) { |
| 512 | 527 | condition = condition.and("yn", yn, MongoOper.IS); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java
View file @
813d46f
| ... | ... | @@ -297,12 +297,13 @@ |
| 297 | 297 | */ |
| 298 | 298 | @RequestMapping(method = RequestMethod.GET, value = "/bookBuildList") |
| 299 | 299 | @ResponseBody |
| 300 | - public BaseResponse bookBuildList(@RequestParam("babyId") String babyId) { | |
| 300 | + @TokenRequired | |
| 301 | + public BaseResponse bookBuildList(@RequestParam("babyId") String babyId,HttpServletRequest request) { | |
| 301 | 302 | if (org.apache.commons.lang.StringUtils.isEmpty(babyId)) { |
| 302 | - | |
| 303 | 303 | return new BaseResponse().setErrormsg("babyid不能为空").setErrorcode(ErrorCodeConstants.PARAMETER_ERROR); |
| 304 | 304 | } |
| 305 | - return babyBookbuildingFacade.bookBuildList(babyId); | |
| 305 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 306 | + return babyBookbuildingFacade.bookBuildList(babyId,loginState.getId()); | |
| 306 | 307 | } |
| 307 | 308 | |
| 308 | 309 | /** |
| ... | ... | @@ -399,7 +400,5 @@ |
| 399 | 400 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 400 | 401 | return babyBookbuildingFacade.getBabyGrowthRightList(babyManageRequest,loginState.getId(),page,limit); |
| 401 | 402 | } |
| 402 | - | |
| 403 | - | |
| 404 | 403 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
813d46f
| ... | ... | @@ -207,7 +207,7 @@ |
| 207 | 207 | * |
| 208 | 208 | * @return |
| 209 | 209 | */ |
| 210 | - public BaseResponse bookBuildList(String babyId) { | |
| 210 | + public BaseResponse bookBuildList(String babyId,Integer userId) { | |
| 211 | 211 | BaseObjectResponse br = new BaseObjectResponse(); |
| 212 | 212 | BabyBasicResult base = new BabyBasicResult(); |
| 213 | 213 | Map<String, Object> resMap = new HashMap<>(); |
| ... | ... | @@ -216,6 +216,11 @@ |
| 216 | 216 | babyQuery.setId(babyId); |
| 217 | 217 | babyQuery.setYn(YnEnums.YES.getId()); |
| 218 | 218 | |
| 219 | + //在区域组的时候不用查询隐藏档案 | |
| 220 | + if (null != groupsFacade.findByCurrentUserId(autoMatchFacade.getHospitalId(userId))) { | |
| 221 | + babyQuery.setExtEnable(false); | |
| 222 | + } | |
| 223 | + | |
| 219 | 224 | //查询建档记录 得到pid 通过pid查询所有的儿童建档记录 |
| 220 | 225 | List<BabyModel> builds = babyBookbuildingService.queryBabyBuildByCond(babyQuery); |
| 221 | 226 | if (CollectionUtils.isNotEmpty(builds)) { |
| 222 | 227 | |
| 223 | 228 | |
| ... | ... | @@ -1501,16 +1506,11 @@ |
| 1501 | 1506 | List<String> hospitalIdList = new ArrayList<>(); |
| 1502 | 1507 | |
| 1503 | 1508 | String hospitalName = ""; |
| 1504 | - | |
| 1509 | + BabyModelQuery babyQuery = new BabyModelQuery(); | |
| 1505 | 1510 | if(String.valueOf("true").equals(request.getIsArea())){ |
| 1506 | - | |
| 1511 | + babyQuery.setExtEnable(false); | |
| 1507 | 1512 | OrganizationQuery organizationQuery = new OrganizationQuery(); |
| 1508 | - // List<Integer> typeList = new ArrayList<>(); | |
| 1509 | - // typeList.add(OrganizationTypeEnum.NY.getId()); | |
| 1510 | - // typeList.add(OrganizationTypeEnum.FB.getId()); | |
| 1511 | - // typeList.add(OrganizationTypeEnum.JMQY.getId()); | |
| 1512 | - // typeList.add(OrganizationTypeEnum.TY.getId()); | |
| 1513 | - // organizationQuery.setTypeList(typeList); | |
| 1513 | + | |
| 1514 | 1514 | if(!StringUtils.isEmpty(request.getHospitalId())){ |
| 1515 | 1515 | hospitalIdList.add(request.getHospitalId()); |
| 1516 | 1516 | }else if(!StringUtils.isEmpty(request.getHospitalAreaId())){ |
| 1517 | 1517 | |
| ... | ... | @@ -1565,13 +1565,12 @@ |
| 1565 | 1565 | } |
| 1566 | 1566 | } |
| 1567 | 1567 | hospitalIdList.add(hospitalId); |
| 1568 | - | |
| 1569 | 1568 | hospitalName = organizationService.getOrganization(Integer.valueOf(hospitalId)).getName(); |
| 1570 | 1569 | } |
| 1571 | 1570 | |
| 1572 | 1571 | |
| 1573 | 1572 | List<BabyManageListResult> list = new ArrayList<>(); |
| 1574 | - BabyModelQuery babyQuery = new BabyModelQuery(); | |
| 1573 | + | |
| 1575 | 1574 | babyQuery.setHospitalIdList(hospitalIdList); |
| 1576 | 1575 | List<BabyModel> models = getBabayListByCondition(request, true, babyQuery); |
| 1577 | 1576 | if (CollectionUtils.isNotEmpty(models)) { |