Commit 2005d359 authored by 朱晨阳's avatar 朱晨阳

添加根据省份获取区域公司接口

parent 03afed11
...@@ -444,6 +444,31 @@ public class JpStationController extends BaseController { ...@@ -444,6 +444,31 @@ public class JpStationController extends BaseController {
return ResponseHelper.buildResponse(result); return ResponseHelper.buildResponse(result);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询当前登录人权限区域公司", notes = "查询当前登录人权限区域公司")
@GetMapping(value = "/getRegionCompanyByProvince")
@UserLimits
public ResponseModel<List<Map<String, String>>> getRegionCompanyByProvince(String province) {
List<DropDown> list = new ArrayList<>();
if (StringUtils.isEmpty(province)){
list = jpStationMapper.getRegion(null, null);
}else {
List<String> ids = jpStationMapper.getRegionNode(province);
list = jpStationMapper.getRegionByProvince(ids);
}
List<Map<String, String>> result = new ArrayList<>();
list.forEach(dropDown -> {
Map<String, String> item = new HashMap<>();
item.put("text", dropDown.getName());
item.put("value", dropDown.getOrgCode());
result.add(item);
});
return ResponseHelper.buildResponse(result);
}
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询当前登录人权限区域公司省份地址", notes = "查询当前登录人权限区域公司省份地址") @ApiOperation(httpMethod = "GET", value = "查询当前登录人权限区域公司省份地址", notes = "查询当前登录人权限区域公司省份地址")
@GetMapping(value = "/getRegionAddress") @GetMapping(value = "/getRegionAddress")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment