diff --git a/src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/devicemanagement/PdaController.java b/src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/devicemanagement/PdaController.java index bd049c4..8bf050b 100644 --- a/src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/devicemanagement/PdaController.java +++ b/src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/devicemanagement/PdaController.java @@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -35,6 +36,7 @@ import com.zteits.clouds.api.apibase.constants.ErrorType; import com.zteits.clouds.api.apibase.exception.BizException; import com.zteits.clouds.api.dto.park.dto.TpPPdaDTO; import com.zteits.clouds.api.dto.park.dto.TpPTgsPassedcarDTO; +import com.zteits.clouds.api.dto.park.param.TpPPdaPageQueryRequest; import com.zteits.clouds.api.dto.park.param.TpPPdaRequest; import com.zteits.clouds.api.dto.park.param.TpPPdaSRequest; import com.zteits.clouds.api.dto.park.param.TpPTgsPassedcarRequest; @@ -60,6 +62,7 @@ import io.swagger.annotations.ApiOperation; * 2017年8月31日 wangbiao v1.0.0 创建 */ @RestController +@RequestMapping("/padinfo") public class PdaController extends BizController { private static final Logger logger = LoggerFactory.getLogger(InOutParkStatisticController.class); @@ -74,7 +77,7 @@ public class PdaController extends BizController { - @ApiOperation("PDA信息信息") + @ApiOperation("过车查询") @PostMapping("/queryPassedca4pabe") public BizResultVO> queryPassedca4pabe(@RequestBody TpPTgsPassedcarRequest tpPTgsPassedcarRequest, HttpServletRequest request, HttpServletResponse response){ @@ -91,9 +94,9 @@ public class PdaController extends BizController { return new BizResultVO>(); } - @ApiOperation("PDA信息信息") + @ApiOperation("PDA分页查询信息") @PostMapping("/queryPdaInfo4pabe") - public BizResultVO> queryPdaInfo4pabe(@RequestBody TpPPdaRequest tpPPdaRequest, HttpServletRequest request, + public BizResultVO> queryPdaInfo4pabe(@RequestBody TpPPdaPageQueryRequest tpPPdaRequest, HttpServletRequest request, HttpServletResponse response){ BizResult> bizResult = new BizResult>(); try { @@ -178,41 +181,40 @@ public class PdaController extends BizController { return new BizResultVO(); } - @ApiOperation("pda信息导出excel") - @GetMapping("exportBerthInfoExcel") - public void exportBerthInfoExcel(@RequestBody TpPPdaRequest tpPPdaRequest, HttpServletRequest requests, HttpServletResponse response) { - tpPPdaRequest.setSysCode(sysCode); - BizResult> list = tpPPdaService.queryPdaInfo(tpPPdaRequest); - String[] title = new String[] { "序号","设备编号", "设备名称", "设备类型", "状态","持有人","资源描述" }; - String sheetName = "PDA信息"; - String fileName = sheetName+DateUtil.getDate(); - // 1.创建excel信息 - XSSFSheet workSheet = ExcelUtil.createExcel(fileName); - // 2.设置excel表头和表体 - Layouter.buildReport(workSheet, title, 0, 0); - // 3.填充数据 - List contentList = new ArrayList(); - int number = 1; - if(list.isSuccess() && CollectionUtil.isNotEmpty(list.getData())){ - for (TpPPdaDTO b : list.getData()) { - Object[] obj = new Object[title.length]; - int index = 0; - obj[index++] = number++; - obj[index++] = b.getId(); - obj[index++] = b.getPdaNo(); - obj[index++] = b.getPdaName(); - obj[index++] = b.getPdaType(); - obj[index++] = b.getPdaStatus(); - obj[index++] = b.getOwnerName(); - obj[index++] = b.getRemark(); - contentList.add(obj); - } - } - ExcleFillDateManager fillUserManager = new ExcleFillDateManager(); - fillUserManager.fillSalesOrga(workSheet, title, contentList, 2); - // 4.excel输出配置 - ExcelUtil.write(response, workSheet, fileName); - } +// @ApiOperation("pda信息导出excel") +// @GetMapping("exportBerthInfoExcel") +// public void exportBerthInfoExcel(@RequestBody TpPPdaRequest tpPPdaRequest, HttpServletRequest requests, HttpServletResponse response) { +// tpPPdaRequest.setSysCode(sysCode); +// BizResult> list = tpPPdaService.queryPdaInfo4pabe(tpPPdaRequest); +// String[] title = new String[] { "序号","设备编号", "设备名称", "设备类型", "状态","资源描述" }; +// String sheetName = "PDA信息"; +// String fileName = sheetName+DateUtil.getDate(); +// // 1.创建excel信息 +// XSSFSheet workSheet = ExcelUtil.createExcel(fileName); +// // 2.设置excel表头和表体 +// Layouter.buildReport(workSheet, title, 0, 0); +// // 3.填充数据 +// List contentList = new ArrayList(); +// int number = 1; +// if(list.isSuccess() && CollectionUtil.isNotEmpty(list.getData())){ +// for (TpPPdaDTO b : list.getData()) { +// Object[] obj = new Object[title.length]; +// int index = 0; +// obj[index++] = number++; +// obj[index++] = b.getId(); +// obj[index++] = b.getPdaNo(); +// obj[index++] = b.getPdaName(); +// obj[index++] = b.getPdaType(); +// obj[index++] = b.getPdaStatus(); +// obj[index++] = b.getRemark(); +// contentList.add(obj); +// } +// } +// ExcleFillDateManager fillUserManager = new ExcleFillDateManager(); +// fillUserManager.fillSalesOrga(workSheet, title, contentList, 2); +// // 4.excel输出配置 +// ExcelUtil.write(response, workSheet, fileName); +// } @ApiOperation("pda信息 导入模板下载")