| | |
| | | package org.dromara.demo.service.impl; |
| | | |
| | | import org.dromara.common.core.utils.MapstructUtils; |
| | | import org.dromara.common.core.utils.StringUtils; |
| | | import org.dromara.common.mybatis.core.page.TableDataInfo; |
| | | import org.dromara.common.mybatis.core.page.PageQuery; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.dromara.demo.domain.RsDangerInfo; |
| | | import org.springframework.stereotype.Service; |
| | | import org.dromara.common.core.utils.MapstructUtils; |
| | | import org.dromara.common.core.utils.StringUtils; |
| | | import org.dromara.common.mybatis.core.page.PageQuery; |
| | | import org.dromara.common.mybatis.core.page.TableDataInfo; |
| | | import org.dromara.demo.domain.RsDangerTotal; |
| | | import org.dromara.demo.domain.bo.RsDangerTotalBo; |
| | | import org.dromara.demo.domain.vo.RsDangerTotalVo; |
| | | import org.dromara.demo.domain.RsDangerTotal; |
| | | import org.dromara.demo.mapper.RsDangerTotalMapper; |
| | | import org.dromara.demo.service.IRsDangerTotalService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.util.Collection; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Collection; |
| | | |
| | | /** |
| | | * 安全隐患统计Service业务层处理 |
| | |
| | | } |
| | | return baseMapper.deleteBatchIds(ids) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public String importExcel(List<RsDangerTotal> list) { |
| | | for (RsDangerTotal dangerTotal : list) { |
| | | dangerTotal.setPeriod(dangerTotal.getPeriodDate().length() > 4 ? 1L : 2L); |
| | | dangerTotal.setCreateTime(new Date()); |
| | | dangerTotal.setStatus(2L); |
| | | } |
| | | return baseMapper.insertBatch(list) ? "恭喜您,数据已全部导入成功!共" + list.size() + "条!" : "很抱歉,导入失败!请检查数据格式!"; |
| | | } |
| | | } |