| | |
| | | package com.gkhy.safePlatform.equipment.controller; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.equipment.entity.*; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentInfoImportExcel; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentInfoSaveOrUpdate; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentInfoExcel; |
| | | import com.gkhy.safePlatform.equipment.utils.DateUtils; |
| | | import com.gkhy.safePlatform.equipment.utils.QueryHelpPlus; |
| | | import com.gkhy.safePlatform.equipment.utils.poihelper.ExcelLogs; |
| | | import com.gkhy.safePlatform.equipment.utils.poihelper.ExcelUtil; |
| | | import com.google.common.collect.Lists; |
| | |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.equipmentInfoService.removeByIds(idList); |
| | | |
| | | List<EquipmentInfo> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | EquipmentInfo info = new EquipmentInfo(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.equipmentInfoService.updateBatchById(delList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | |
| | | queryCriteria.setDelFlag(0); |
| | | List<EquipmentInfoExcel> respList = BeanCopyUtils.copyBeanList(equipmentInfoService.queryAll(queryCriteria), EquipmentInfoExcel.class); |
| | | |
| | | ExcelUtil.exportExcel(map,respList , response.getOutputStream(),DateUtils.PATTERN_STANDARD); |