Commit 33ae550d8751563f8d8bb6b144bc4eb386a055ad
1 parent
74c56bb4
提交代码
Showing
1 changed file
with
60 additions
and
0 deletions
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/areamanage/AreaManageController.java
0 → 100644
| 1 | +package com.zteits.irain.portal.web.parkinglotcloudplatform.areamanage; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | + | ||
| 5 | +import javax.servlet.http.HttpSession; | ||
| 6 | + | ||
| 7 | +import com.clouds.common.web.vo.BizResultVO; | ||
| 8 | +import com.zteits.clouds.api.apibase.bean.BaseRequest; | ||
| 9 | +import com.zteits.clouds.api.apibase.bean.BizResult; | ||
| 10 | +import com.zteits.clouds.api.apibase.constants.ErrorType; | ||
| 11 | +import com.zteits.clouds.api.apibase.exception.BizException; | ||
| 12 | +import com.zteits.clouds.api.dto.sys.param.AreaBlockByOrgIdQueryRequest; | ||
| 13 | +import com.zteits.clouds.api.dto.sys.param.AreaTreeDTO; | ||
| 14 | +import com.zteits.clouds.api.service.sys.TbAreaService; | ||
| 15 | +import io.swagger.annotations.Api; | ||
| 16 | +import io.swagger.annotations.ApiOperation; | ||
| 17 | +import org.slf4j.Logger; | ||
| 18 | +import org.slf4j.LoggerFactory; | ||
| 19 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 20 | +import org.springframework.web.bind.annotation.PostMapping; | ||
| 21 | +import org.springframework.web.bind.annotation.RequestBody; | ||
| 22 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 23 | +import org.springframework.web.bind.annotation.RestController; | ||
| 24 | + | ||
| 25 | +/** | ||
| 26 | + * Copyright: Copyright (c) 2017 zteits | ||
| 27 | + * | ||
| 28 | + * @ClassName: com.zteits.irain.portal.web.parkinglotcloudplatform.areamanage | ||
| 29 | + * @Description: | ||
| 30 | + * @version: v1.0.0 | ||
| 31 | + * @author: atao | ||
| 32 | + * @date: 2017/8/29 下午4:23 | ||
| 33 | + * Modification History: | ||
| 34 | + * Date Author Version Description | ||
| 35 | + * ---------------------------------------------------------* | ||
| 36 | + * 2017/8/29 atao v1.0.0 创建 | ||
| 37 | + */ | ||
| 38 | +@Api(value = "区域管理", description = "区域管理") | ||
| 39 | +@RestController | ||
| 40 | +@RequestMapping("/areaManage") | ||
| 41 | +public class AreaManageController { | ||
| 42 | + private Logger logger = LoggerFactory.getLogger(AreaManageController.class); | ||
| 43 | + @Autowired | ||
| 44 | + private HttpSession session; | ||
| 45 | + @Autowired | ||
| 46 | + private TbAreaService tbAreaService; | ||
| 47 | + | ||
| 48 | + @ApiOperation("根据归属组织ID查询区域与区块树") | ||
| 49 | + @PostMapping("/queryAreaAndBlockTree") | ||
| 50 | + public BizResultVO<List<AreaTreeDTO>> queryAreaAndBlockTree(@RequestBody BaseRequest baseRequest){ | ||
| 51 | + | ||
| 52 | + AreaBlockByOrgIdQueryRequest request = new AreaBlockByOrgIdQueryRequest(); | ||
| 53 | + request.setSysCode(baseRequest.getSysCode()); | ||
| 54 | + // TODO 此处orgId 从当前登录操作人中取,现在先不限制 | ||
| 55 | + request.setOrgId(1L); | ||
| 56 | + BizResult<List<AreaTreeDTO>> result= tbAreaService.queryAreaBlockByOrgId(request); | ||
| 57 | + return new BizResultVO<>(result); | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | +} |