Commit b5d36fb2c96235020fe0e38ad09dc24c2b09afaa
pda
Showing
1 changed file
with
40 additions
and
38 deletions
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/devicemanagement/PdaController.java
| @@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Value; | @@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Value; | ||
| 15 | import org.springframework.web.bind.annotation.GetMapping; | 15 | import org.springframework.web.bind.annotation.GetMapping; |
| 16 | import org.springframework.web.bind.annotation.PostMapping; | 16 | import org.springframework.web.bind.annotation.PostMapping; |
| 17 | import org.springframework.web.bind.annotation.RequestBody; | 17 | import org.springframework.web.bind.annotation.RequestBody; |
| 18 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 18 | import org.springframework.web.bind.annotation.RequestParam; | 19 | import org.springframework.web.bind.annotation.RequestParam; |
| 19 | import org.springframework.web.bind.annotation.RestController; | 20 | import org.springframework.web.bind.annotation.RestController; |
| 20 | import org.springframework.web.multipart.MultipartFile; | 21 | import org.springframework.web.multipart.MultipartFile; |
| @@ -35,6 +36,7 @@ import com.zteits.clouds.api.apibase.constants.ErrorType; | @@ -35,6 +36,7 @@ import com.zteits.clouds.api.apibase.constants.ErrorType; | ||
| 35 | import com.zteits.clouds.api.apibase.exception.BizException; | 36 | import com.zteits.clouds.api.apibase.exception.BizException; |
| 36 | import com.zteits.clouds.api.dto.park.dto.TpPPdaDTO; | 37 | import com.zteits.clouds.api.dto.park.dto.TpPPdaDTO; |
| 37 | import com.zteits.clouds.api.dto.park.dto.TpPTgsPassedcarDTO; | 38 | import com.zteits.clouds.api.dto.park.dto.TpPTgsPassedcarDTO; |
| 39 | +import com.zteits.clouds.api.dto.park.param.TpPPdaPageQueryRequest; | ||
| 38 | import com.zteits.clouds.api.dto.park.param.TpPPdaRequest; | 40 | import com.zteits.clouds.api.dto.park.param.TpPPdaRequest; |
| 39 | import com.zteits.clouds.api.dto.park.param.TpPPdaSRequest; | 41 | import com.zteits.clouds.api.dto.park.param.TpPPdaSRequest; |
| 40 | import com.zteits.clouds.api.dto.park.param.TpPTgsPassedcarRequest; | 42 | import com.zteits.clouds.api.dto.park.param.TpPTgsPassedcarRequest; |
| @@ -60,6 +62,7 @@ import io.swagger.annotations.ApiOperation; | @@ -60,6 +62,7 @@ import io.swagger.annotations.ApiOperation; | ||
| 60 | * 2017年8月31日 wangbiao v1.0.0 创建 | 62 | * 2017年8月31日 wangbiao v1.0.0 创建 |
| 61 | */ | 63 | */ |
| 62 | @RestController | 64 | @RestController |
| 65 | +@RequestMapping("/padinfo") | ||
| 63 | public class PdaController extends BizController { | 66 | public class PdaController extends BizController { |
| 64 | 67 | ||
| 65 | private static final Logger logger = LoggerFactory.getLogger(InOutParkStatisticController.class); | 68 | private static final Logger logger = LoggerFactory.getLogger(InOutParkStatisticController.class); |
| @@ -74,7 +77,7 @@ public class PdaController extends BizController { | @@ -74,7 +77,7 @@ public class PdaController extends BizController { | ||
| 74 | 77 | ||
| 75 | 78 | ||
| 76 | 79 | ||
| 77 | - @ApiOperation("PDA信息信息") | 80 | + @ApiOperation("过车查询") |
| 78 | @PostMapping("/queryPassedca4pabe") | 81 | @PostMapping("/queryPassedca4pabe") |
| 79 | public BizResultVO<EasyUIDataGridVO<TpPTgsPassedcarDTO>> queryPassedca4pabe(@RequestBody TpPTgsPassedcarRequest tpPTgsPassedcarRequest, HttpServletRequest request, | 82 | public BizResultVO<EasyUIDataGridVO<TpPTgsPassedcarDTO>> queryPassedca4pabe(@RequestBody TpPTgsPassedcarRequest tpPTgsPassedcarRequest, HttpServletRequest request, |
| 80 | HttpServletResponse response){ | 83 | HttpServletResponse response){ |
| @@ -91,9 +94,9 @@ public class PdaController extends BizController { | @@ -91,9 +94,9 @@ public class PdaController extends BizController { | ||
| 91 | return new BizResultVO<EasyUIDataGridVO<TpPTgsPassedcarDTO>>(); | 94 | return new BizResultVO<EasyUIDataGridVO<TpPTgsPassedcarDTO>>(); |
| 92 | } | 95 | } |
| 93 | 96 | ||
| 94 | - @ApiOperation("PDA信息信息") | 97 | + @ApiOperation("PDA分页查询信息") |
| 95 | @PostMapping("/queryPdaInfo4pabe") | 98 | @PostMapping("/queryPdaInfo4pabe") |
| 96 | - public BizResultVO<EasyUIDataGridVO<TpPPdaDTO>> queryPdaInfo4pabe(@RequestBody TpPPdaRequest tpPPdaRequest, HttpServletRequest request, | 99 | + public BizResultVO<EasyUIDataGridVO<TpPPdaDTO>> queryPdaInfo4pabe(@RequestBody TpPPdaPageQueryRequest tpPPdaRequest, HttpServletRequest request, |
| 97 | HttpServletResponse response){ | 100 | HttpServletResponse response){ |
| 98 | BizResult<PageBean<TpPPdaDTO>> bizResult = new BizResult<PageBean<TpPPdaDTO>>(); | 101 | BizResult<PageBean<TpPPdaDTO>> bizResult = new BizResult<PageBean<TpPPdaDTO>>(); |
| 99 | try { | 102 | try { |
| @@ -178,41 +181,40 @@ public class PdaController extends BizController { | @@ -178,41 +181,40 @@ public class PdaController extends BizController { | ||
| 178 | return new BizResultVO<Integer>(); | 181 | return new BizResultVO<Integer>(); |
| 179 | } | 182 | } |
| 180 | 183 | ||
| 181 | - @ApiOperation("pda信息导出excel") | ||
| 182 | - @GetMapping("exportBerthInfoExcel") | ||
| 183 | - public void exportBerthInfoExcel(@RequestBody TpPPdaRequest tpPPdaRequest, HttpServletRequest requests, HttpServletResponse response) { | ||
| 184 | - tpPPdaRequest.setSysCode(sysCode); | ||
| 185 | - BizResult<List<TpPPdaDTO>> list = tpPPdaService.queryPdaInfo(tpPPdaRequest); | ||
| 186 | - String[] title = new String[] { "序号","设备编号", "设备名称", "设备类型", "状态","持有人","资源描述" }; | ||
| 187 | - String sheetName = "PDA信息"; | ||
| 188 | - String fileName = sheetName+DateUtil.getDate(); | ||
| 189 | - // 1.创建excel信息 | ||
| 190 | - XSSFSheet workSheet = ExcelUtil.createExcel(fileName); | ||
| 191 | - // 2.设置excel表头和表体 | ||
| 192 | - Layouter.buildReport(workSheet, title, 0, 0); | ||
| 193 | - // 3.填充数据 | ||
| 194 | - List<Object[]> contentList = new ArrayList<Object[]>(); | ||
| 195 | - int number = 1; | ||
| 196 | - if(list.isSuccess() && CollectionUtil.isNotEmpty(list.getData())){ | ||
| 197 | - for (TpPPdaDTO b : list.getData()) { | ||
| 198 | - Object[] obj = new Object[title.length]; | ||
| 199 | - int index = 0; | ||
| 200 | - obj[index++] = number++; | ||
| 201 | - obj[index++] = b.getId(); | ||
| 202 | - obj[index++] = b.getPdaNo(); | ||
| 203 | - obj[index++] = b.getPdaName(); | ||
| 204 | - obj[index++] = b.getPdaType(); | ||
| 205 | - obj[index++] = b.getPdaStatus(); | ||
| 206 | - obj[index++] = b.getOwnerName(); | ||
| 207 | - obj[index++] = b.getRemark(); | ||
| 208 | - contentList.add(obj); | ||
| 209 | - } | ||
| 210 | - } | ||
| 211 | - ExcleFillDateManager fillUserManager = new ExcleFillDateManager(); | ||
| 212 | - fillUserManager.fillSalesOrga(workSheet, title, contentList, 2); | ||
| 213 | - // 4.excel输出配置 | ||
| 214 | - ExcelUtil.write(response, workSheet, fileName); | ||
| 215 | - } | 184 | +// @ApiOperation("pda信息导出excel") |
| 185 | +// @GetMapping("exportBerthInfoExcel") | ||
| 186 | +// public void exportBerthInfoExcel(@RequestBody TpPPdaRequest tpPPdaRequest, HttpServletRequest requests, HttpServletResponse response) { | ||
| 187 | +// tpPPdaRequest.setSysCode(sysCode); | ||
| 188 | +// BizResult<PageBean<TpPPdaDTO>> list = tpPPdaService.queryPdaInfo4pabe(tpPPdaRequest); | ||
| 189 | +// String[] title = new String[] { "序号","设备编号", "设备名称", "设备类型", "状态","资源描述" }; | ||
| 190 | +// String sheetName = "PDA信息"; | ||
| 191 | +// String fileName = sheetName+DateUtil.getDate(); | ||
| 192 | +// // 1.创建excel信息 | ||
| 193 | +// XSSFSheet workSheet = ExcelUtil.createExcel(fileName); | ||
| 194 | +// // 2.设置excel表头和表体 | ||
| 195 | +// Layouter.buildReport(workSheet, title, 0, 0); | ||
| 196 | +// // 3.填充数据 | ||
| 197 | +// List<Object[]> contentList = new ArrayList<Object[]>(); | ||
| 198 | +// int number = 1; | ||
| 199 | +// if(list.isSuccess() && CollectionUtil.isNotEmpty(list.getData())){ | ||
| 200 | +// for (TpPPdaDTO b : list.getData()) { | ||
| 201 | +// Object[] obj = new Object[title.length]; | ||
| 202 | +// int index = 0; | ||
| 203 | +// obj[index++] = number++; | ||
| 204 | +// obj[index++] = b.getId(); | ||
| 205 | +// obj[index++] = b.getPdaNo(); | ||
| 206 | +// obj[index++] = b.getPdaName(); | ||
| 207 | +// obj[index++] = b.getPdaType(); | ||
| 208 | +// obj[index++] = b.getPdaStatus(); | ||
| 209 | +// obj[index++] = b.getRemark(); | ||
| 210 | +// contentList.add(obj); | ||
| 211 | +// } | ||
| 212 | +// } | ||
| 213 | +// ExcleFillDateManager fillUserManager = new ExcleFillDateManager(); | ||
| 214 | +// fillUserManager.fillSalesOrga(workSheet, title, contentList, 2); | ||
| 215 | +// // 4.excel输出配置 | ||
| 216 | +// ExcelUtil.write(response, workSheet, fileName); | ||
| 217 | +// } | ||
| 216 | 218 | ||
| 217 | 219 | ||
| 218 | @ApiOperation("pda信息 导入模板下载") | 220 | @ApiOperation("pda信息 导入模板下载") |