소스 검색

用户-关联机构接口变更

zdm 6 년 전
부모
커밋
a0908b5426
1개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 6 6
      src/main/java/com.yihu.ehr/basic/org/controller/OrgEndPoint.java

+ 6 - 6
src/main/java/com.yihu.ehr/basic/org/controller/OrgEndPoint.java

@ -647,22 +647,22 @@ public class OrgEndPoint extends EnvelopRestEndPoint {
    @ApiOperation(value = "用户修改-按照区域获取机构;查询所有机构列表")
    public Envelop getAllOrgs(
            @ApiParam(name = "areaId", value = "区域id")
            @RequestParam(value = "areaId", required = false) Integer areaId,
            @RequestParam(value = "areaId", required = false) String areaId,
            @ApiParam(name = "fullName", value = "机构名称")
            @RequestParam(value = "fullName", required = false) String fullName) {
        Envelop envelop = new Envelop();
        try {
            List<Organization> orgList;
            if (StringUtils.isEmpty(fullName)&&StringUtils.isNotEmpty(String.valueOf(areaId))) {
            if (StringUtils.isEmpty(fullName)&&StringUtils.isNotEmpty(areaId)) {
                //区域id存在,机构名称不存在
                orgList = orgService.findByOrgArea(areaId.toString());
            } else if (StringUtils.isNotEmpty(fullName)&&StringUtils.isEmpty(String.valueOf(areaId))) {
            } else if (StringUtils.isNotEmpty(fullName)&&StringUtils.isEmpty(areaId)) {
                //区域id不存在,机构名称存在
                String filters="fullName?" +fullName;
                orgList =  orgService.search(null, filters, "createDate-", 1, 999);
            }else if (StringUtils.isNotEmpty(fullName)&&StringUtils.isNotEmpty(String.valueOf(areaId))) {
                orgList =  orgService.search("", filters, "-createDate", 1, 999);
            }else if (StringUtils.isNotEmpty(fullName)&&StringUtils.isNotEmpty(areaId)) {
                //区域和机构名称都存在
                orgList = orgService.getOrgListByAreaidAndParam(areaId, fullName);
                orgList = orgService.getOrgListByAreaidAndParam(Integer.valueOf(areaId), fullName);
            }else {
                envelop.setSuccessFlg(false);
                envelop.setErrorMsg("区域和机构名称不能同时为空!");