Commit 259755fe981fdae5723bf5ba2ffa0835b3b38dcc
1 parent
cc46f162
提交代码
Showing
1 changed file
with
16 additions
and
2 deletions
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/areamanage/AreaManageController.java
| ... | ... | @@ -4,7 +4,9 @@ import java.util.List; |
| 4 | 4 | |
| 5 | 5 | import javax.servlet.http.HttpSession; |
| 6 | 6 | |
| 7 | +import com.clouds.common.utils.ResultUtils; | |
| 7 | 8 | import com.clouds.common.web.vo.BizResultVO; |
| 9 | +import com.clouds.common.web.vo.EasyUIDataGridVO; | |
| 8 | 10 | import com.zteits.clouds.api.apibase.bean.BaseRequest; |
| 9 | 11 | import com.zteits.clouds.api.apibase.bean.BizResult; |
| 10 | 12 | import com.zteits.clouds.api.apibase.constants.ErrorType; |
| ... | ... | @@ -14,6 +16,7 @@ import com.zteits.clouds.api.dto.sys.param.AreaTreeDTO; |
| 14 | 16 | import com.zteits.clouds.api.service.sys.TbAreaService; |
| 15 | 17 | import io.swagger.annotations.Api; |
| 16 | 18 | import io.swagger.annotations.ApiOperation; |
| 19 | +import org.apache.poi.ss.formula.functions.T; | |
| 17 | 20 | import org.slf4j.Logger; |
| 18 | 21 | import org.slf4j.LoggerFactory; |
| 19 | 22 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -47,14 +50,25 @@ public class AreaManageController { |
| 47 | 50 | |
| 48 | 51 | @ApiOperation("根据归属组织ID查询区域与区块树") |
| 49 | 52 | @PostMapping("/queryAreaAndBlockTree") |
| 50 | - public BizResultVO<List<AreaTreeDTO>> queryAreaAndBlockTree(@RequestBody BaseRequest baseRequest){ | |
| 53 | + public BizResultVO<EasyUIDataGridVO<AreaTreeDTO>> queryAreaAndBlockTree(@RequestBody BaseRequest baseRequest){ | |
| 51 | 54 | |
| 55 | + BizResultVO<EasyUIDataGridVO<AreaTreeDTO>> resultVO = new BizResultVO<>(); | |
| 56 | + EasyUIDataGridVO<AreaTreeDTO> easyUIDataGridVO = new EasyUIDataGridVO<>(); | |
| 52 | 57 | AreaBlockByOrgIdQueryRequest request = new AreaBlockByOrgIdQueryRequest(); |
| 53 | 58 | request.setSysCode(baseRequest.getSysCode()); |
| 54 | 59 | // TODO 此处orgId 从当前登录操作人中取,现在先不限制 |
| 55 | 60 | request.setOrgId(1L); |
| 56 | 61 | BizResult<List<AreaTreeDTO>> result= tbAreaService.queryAreaBlockByOrgId(request); |
| 57 | - return new BizResultVO<>(result); | |
| 62 | + if(ResultUtils.isSuccess(result)){ | |
| 63 | + easyUIDataGridVO.setRows(result.getData()); | |
| 64 | + easyUIDataGridVO.setTotal(result.getData().size()); | |
| 65 | + resultVO.setData(easyUIDataGridVO); | |
| 66 | + }else { | |
| 67 | + resultVO.setCode(result.getErrCode().getCode()); | |
| 68 | + resultVO.setMsg(result.getErrMsg()); | |
| 69 | + } | |
| 70 | + | |
| 71 | + return resultVO; | |
| 58 | 72 | } |
| 59 | 73 | |
| 60 | 74 | } | ... | ... |