|
@ -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("区域和机构名称不能同时为空!");
|