Commit 820fe1726d37f85e30737f34ce74e631e6cfe753
1 parent
dbb6de2c
commit
Showing
1 changed file
with
14 additions
and
9 deletions
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/BerthManageController.java
1 | 1 | package com.zteits.irain.portal.web.parkinglotcloudplatform.datastatistic; |
2 | 2 | |
3 | -import java.text.DecimalFormat; | |
4 | 3 | import java.text.SimpleDateFormat; |
5 | 4 | import java.util.ArrayList; |
6 | -import java.util.Calendar; | |
7 | 5 | import java.util.Date; |
8 | 6 | import java.util.List; |
9 | 7 | |
... | ... | @@ -24,8 +22,6 @@ import org.springframework.web.bind.annotation.RequestParam; |
24 | 22 | import org.springframework.web.bind.annotation.ResponseBody; |
25 | 23 | |
26 | 24 | import com.alibaba.dubbo.common.utils.CollectionUtils; |
27 | -import com.clouds.common.constants.TableNameEnum; | |
28 | -import com.clouds.common.utils.DateUtil; | |
29 | 25 | import com.clouds.common.utils.excle.ExcelUtil; |
30 | 26 | import com.clouds.common.utils.excle.ExcleFillDateManager; |
31 | 27 | import com.clouds.common.utils.excle.Layouter; |
... | ... | @@ -35,12 +31,10 @@ import com.clouds.common.web.vo.EasyUIDataGridVO; |
35 | 31 | import com.zteits.clouds.api.apibase.bean.BaseInfo; |
36 | 32 | import com.zteits.clouds.api.apibase.bean.BizResult; |
37 | 33 | import com.zteits.clouds.api.apibase.bean.PageBean; |
38 | -import com.zteits.clouds.api.dto.clouds.param.BerthTurnOverQueryRequest; | |
39 | -import com.zteits.clouds.api.dto.park.dto.BerthTurnOverCountDTO; | |
34 | +import com.zteits.clouds.api.apibase.exception.BizException; | |
40 | 35 | import com.zteits.clouds.api.dto.park.dto.BerthsDTO; |
41 | 36 | import com.zteits.clouds.api.dto.park.param.BerthManageRequest; |
42 | 37 | import com.zteits.clouds.api.service.park.BerthManageService; |
43 | -import com.zteits.irain.portal.constant.ParkConstant; | |
44 | 38 | |
45 | 39 | import io.swagger.annotations.Api; |
46 | 40 | import io.swagger.annotations.ApiOperation; |
... | ... | @@ -84,8 +78,10 @@ public class BerthManageController extends BizController { |
84 | 78 | throws InstantiationException, IllegalAccessException { |
85 | 79 | |
86 | 80 | requestObject.setSysCode(sysCode); |
87 | - BizResult<PageBean<BerthsDTO>> respondObject = | |
88 | - berthManageService.queryBerthByCondition(requestObject); | |
81 | + BizResult<PageBean<BerthsDTO>> respondObject = berthManageService.queryBerthByCondition(requestObject); | |
82 | + if(!(respondObject.isSuccess())){ | |
83 | + throw new BizException(respondObject.getErrCode(),respondObject.getErrMsg()); | |
84 | + } | |
89 | 85 | return returnJqGridData(respondObject,BerthsDTO.class); |
90 | 86 | } |
91 | 87 | /** |
... | ... | @@ -98,6 +94,9 @@ public class BerthManageController extends BizController { |
98 | 94 | public BizResultVO<Boolean> updateBerthInfo(@RequestBody BerthManageRequest requestObject) { |
99 | 95 | requestObject.setSysCode(sysCode); |
100 | 96 | BizResult<Boolean> respondObject = berthManageService.updateBerthById(requestObject); |
97 | + if(!(respondObject.isSuccess())){ | |
98 | + throw new BizException(respondObject.getErrCode(),respondObject.getErrMsg()); | |
99 | + } | |
101 | 100 | return new BizResultVO<Boolean>(respondObject); |
102 | 101 | } |
103 | 102 | |
... | ... | @@ -111,6 +110,9 @@ public class BerthManageController extends BizController { |
111 | 110 | public BizResultVO<Boolean> deleteBerths(@RequestBody BerthManageRequest requestObject) { |
112 | 111 | requestObject.setSysCode(sysCode); |
113 | 112 | BizResult<Boolean> respondObject = berthManageService.deleteBerthByIds(requestObject); |
113 | + if(!(respondObject.isSuccess())){ | |
114 | + throw new BizException(respondObject.getErrCode(),respondObject.getErrMsg()); | |
115 | + } | |
114 | 116 | return new BizResultVO<Boolean>(respondObject); |
115 | 117 | } |
116 | 118 | |
... | ... | @@ -125,6 +127,9 @@ public class BerthManageController extends BizController { |
125 | 127 | public BizResultVO<Boolean> saveBerthInfo(@RequestBody BerthManageRequest requestObject) { |
126 | 128 | requestObject.setSysCode(sysCode); |
127 | 129 | BizResult<Boolean> respondObject = berthManageService.saveBerthInfo(requestObject); |
130 | + if(!(respondObject.isSuccess())){ | |
131 | + throw new BizException(respondObject.getErrCode(),respondObject.getErrMsg()); | |
132 | + } | |
128 | 133 | return new BizResultVO<Boolean>(respondObject); |
129 | 134 | } |
130 | 135 | ... | ... |