From 2b4afe24e1136e4eb25e37b7a76565603ddc1a85 Mon Sep 17 00:00:00 2001 From: songhuangfeng123 <shf18767906695@163.com> Date: 星期四, 18 八月 2022 15:37:44 +0800 Subject: [PATCH] 统计fix --- equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/EquipmentInfoController.java | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/EquipmentInfoController.java b/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/EquipmentInfoController.java index 23f46ee..a7f0856 100644 --- a/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/EquipmentInfoController.java +++ b/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/EquipmentInfoController.java @@ -67,7 +67,7 @@ return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少infoType"); } - PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); + PageUtils.checkCheck(pageQuery); return this.equipmentInfoService.queryAll(pageQuery); } @@ -108,10 +108,12 @@ * @param ids 主键结合 * @return 删除结果 */ - @GetMapping(value = "/delete") - public ResultVO delete(String ids) { - List<String> idList = Arrays.stream(ids.split(",")) - .collect(Collectors.toList()); + @RequestMapping(value = "/delete",method = RequestMethod.POST) + public ResultVO delete(@RequestBody Long[] ids) { + if(ids == null){ + return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); + } + List<Long> idList = Arrays.asList(ids); this.equipmentInfoService.removeByIds(idList); return new ResultVO<>(ResultCodes.OK); } @@ -184,6 +186,7 @@ map.put("45", "报废理由"); map.put("46", "报废填报日期(yyyy-MM-dd HH:mm:ss)"); map.put("47", "实际报废日期(yyyy-MM-dd HH:mm:ss)"); + map.put("48", "保养周期"); String fileName = URLEncoder.encode("设备设施管理数据导入模板.xls", "UTF-8"); response.setContentType("application/vnd.ms-excel"); response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); @@ -276,6 +279,7 @@ map.put("45", "报废理由"); map.put("46", "报废填报日期(yyyy-MM-dd HH:mm:ss)"); map.put("47", "实际报废日期(yyyy-MM-dd HH:mm:ss)"); + map.put("48", "保养周期"); String key = DateUtils.date2String(new Date(), DateUtils.PATTERN_ALLTIME_NOSIGN) ; String fileName = URLEncoder.encode("设备设施管理"+key+".xls", "UTF-8"); @@ -401,8 +405,8 @@ infoDto.setDestoryReason(""); infoDto.setDestorySubmitDate(new Timestamp(new java.util.Date().getTime())); infoDto.setActualDestoryDate(new Timestamp(new java.util.Date().getTime())); - System.out.println(JSONObject.toJSONString(infoDto)); + System.out.println(JSONObject.toJSONString(infoDto)); } } \ No newline at end of file -- Gitblit v1.9.2